Nishadh KA

Sending SMS with Beagle bone black

2014-03-25


  1. BBB is setup with Angstrom Linux, first connected to Ubuntu lap using USB wire from BBB, then a USB was connected to the powered USB hub, in which a serial USB connector and a Huwaei e 173 data (This tested for Huwaei E303F, it worked) card were connected.
  2. ssh’s into it using ssh 192.168.7.2 -l root and password blank (an enter)
  3. lsusb shows Huwaei with modem and serial usb.
  4. Need to make usb_modeswitch for Huwaei GSM to sent SMS, so usb_modeswitch has to be installed in the Angstrom, downloaded ipk file (deb in angstrom) from http://feeds.angstrom-distribution.org/feeds/unstable/ipk/glibc/armv7a/base/usbmodeswitch_1.1.3-r0.5_armv7a.ipk and transferred the file into BBB using the command from lap Ubuntu

    scp Downloads/usbmodeswitch_1.1.3-r0.5_armv7a.ipk root@192.168.7.2:~/Desktop/
    
  5. To install used opkg install usbmodeswitch_1.1.3-r0.5_armv7a.ipk

  6. Edited usb_modeswitch.conf as

    ##################################
    DefaultVendor= 0x12d1
    DefaultProduct=0x1446
    
    TargetVendor=  0x12d1
    TargetProductList="1001,1406,140b,140c,1412,141b,1433,14ac"
    
    CheckSuccess=20
    
    MessageContent="55534243000000000000000000000011060000000000000000000000000000"
    ###################################
    

    following http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?p=4521, https://bbs.archlinux.org/viewtopic.php?id=118746

  7. Then fired usb_modeswitch as usb_modeswitch -I -W -c /etc/usb_modeswitch.conf

  8. it finally says good news of modem switch, based on http://www.tabletroms.com/forums/adam-general-development/510-success-3g-usb-modems-now-work*-adam-35.html

  9. to send the SMS followed https://groups.google.com/forum/#!msg/beagleboard/lW60u9wR-iA/ziuvODtCaZQJ

  10. Made a sms.sh file copied the contents follows

    echo -e -n "AT+CMGF=1 \015" > /dev/ttyUSB1
    echo -e -n "AT+CMGS=\"your mobile number\" \015" > /dev/ttyUSB1
    echo -e -n "your text message \015" > /dev/ttyUSB1
    echo -e -n "\032" > /dev/ttyUSB1
    echo "****SMS was sent successfully!***
    
  11. run the file as sh sms.sh and immediately good news came SMS was sent successfully. dmesg| grep tty given the information to choose /dev/ttyUSB1