Skip to content

GSM Data Setup

aeratek edited this page Aug 9, 2015 · 3 revisions

This page describes tested procedures that enable a Raspberry Pi running Debian to be enabled with GSM data. Running these background configurations and setup procedures create a Raspberry Pi that continually connects/reconnects to the internet through the cell phone (GSM) network. This allows for the Kinisi Tracker to become a realtime GPS reporting device, and/or create a platform with other use cases. Only required knowledge is a basic understanding of the Linux command line, such as navigating file/folder structure and running commands.

This setup requires a Raspberry Pi (B models), a Huawei E303 USB dongle, and a Ting SIM card. The procedures use multiple Linux packages, including usb-modeswitch, ppp, wvdial and UMTSkeeper/Sakis3G. Run the Background Configurations below, if you have a new Huawei dongle and Ting SIM card. Otherwise skip to the GSM Keep Alive Configurations below the Background Configurations.

These three configuration files contained in this repository are used for this guide: https://github.com/kinisi/kinisi-agent-nodejs/blob/master/scripts/Huawei_E303_usb_modeswitch.conf https://github.com/kinisi/kinisi-agent-nodejs/blob/master/scripts/Ting_wvdial.conf https://github.com/kinisi/kinisi-agent-nodejs/blob/master/scripts/umtskeeper_rc.local

Background Configurations: The Ting SIM must first be activated through your account on Ting.com. It must also be inserted into the Huawei dongle and initialized in a computer. To initialized on the Raspberry Pi, take the following actions:

  1. Insert the device into the Pi and power-on.

  2. run "sudo apt-get install ppp usb-modeswitch wvdial"

  3. Place the contents of the Ting_wvdial.conf and Huawei_E303_usb_modeswitch.conf files (contained with this wiki or downloaded at www.kinisi.cc/s/Ting_wvdial.conf and www.kinisi.cc/s/Huawei_E303_usb_modeswitch.conf) as a replacement for /etc/wvdial.conf and /etc/usb_modeswitch.conf, respectively.

  4. restart the device with "sudo reboot".

  5. After power-on and login, type the following command to connect to the Ting/T-Mobile network: "sudo wvdial 3gconnect &". After connecting successfully, try running some ping and curl commands to test internet connectivity (make sure your WiFi and ethernet's unplugged at this point ;)

  6. reboot again and proceed to the next steps for setting up scripts to allow for continual GSM connectivity.

GSM Keep Alive Configurations: Assuming the Huawei + Ting combo has been initialized and connects a Raspberry Pi correctly, the following steps can now be taken to enable UMTSkeeper/Sakis3G scripts to the work of continually connecting your Pi to the internet.

  1. If usb-modeswitch and ppp have not yet been installed, go ahead and do so with the following command: "sudo apt-get install ppp usb-modeswitch"

  2. Create a directory for the UMTSkeeper/Sakis3G script, e.g. cd; mkdir umtskeeper

  3. Download UMTSkeeper (http://mintakaconciencia.net/squares/umtskeeper/src/umtskeeper.tar.gz) to this new directory, e.g. cd; cd umtskeeper; wget "http://mintakaconciencia.net/squares/umtskeeper/src/umtskeeper.tar.gz"

  4. Unpack/Untar the downloaded file in the umtskeeper directory, e.g. tar -xzvf umtskeeper.tar.gz

  5. Allow umtskeeper and sakis3g scripts to be executed in Linux, e.g. chmod +x sakis3g umtskeeper

  6. Now we'll need to add working configuration files for these utilities to the Raspberry Pi. Download both of these files to your device from the following links or obtain them from this repository: www.kinisi.cc/s/Huawei_E303_usb_modeswitch.conf and www.kinisi.cc/s/umtskeeper_rc.local. Replace the contents of the following files with that of the config files you just downloaded: /etc/usb_modeswitch.conf and /etc/rc.local. Alternatively, you could just copy/overwrite these two files, being sure to maintain the same filenames, so that the OS finds/recognizes them automatically.

  7. restart the device with "sudo reboot".

Once restarted, it will take about 25-45 seconds from power-on, if not slightly longer, to get internet connectivity. You'll know you have internet connectivity by looking at the Huawei dongle and observing the green LED light, which will be on continually (not blinking). If it's blinking, the device is not connected to the internet. You can check connectivity by running some pings and curl commands.

Clone this wiki locally