M2M 3G support on Gateworks products (GSM/GPRS/EDGE/UMTS/HSPA)

M2M cellular modems operate as a point-to-point serial device. They are used as IP network interfaces by initiating a connection to a cellular carrier using standard AT modem commands then running pppd which performs CHAP authentication and implements the PPP protocol. The pppd daemon uses the chat application for AT command scripts and creates a network interface once authentication succeeds. Some devices expose more than one serial interface for things like AT commands, proprietary API's, NMEA data from optional GPS etc can be used while the network is connected.

As a general rule, you need to have obtained the following from your Service Provider to use M2M devices in linux:

  • GSM modems:
    • A SIM card and the following details:
      • APN - Access Point Name
      • unlocked - or you need the PIN to unlock it (the SIM must not be locked to another device)
      • username - often optional but may be required by your provider
      • password - often optional but may be required by your provider
  • UMTS modems:
    • a modem that has been previously 'activated' by your provider. This involves providing the provider with the IMEI (unique identifier on the modem/module), the provider adding it to their system, and you 'activating' the module (which usually requires a Windows PC and application if not already done by the provider of the module)

General Reference:

Important Notes:

  • Production hardware needs to be 'Carrier Approved' - a process that the end-customer needs to work through with the M2M Carrier on the finished device
  • The Carrier dictates if your plan provides 'mobile termination' (the ability to accept connections from the Internet) and the IP address provisioning (IP class, static vs dynamic, IP range). For GSM Carriers this is based on the APN.

Troubleshooting:

  • is your GSM module locked to a Carrier/Network?/SIM/PIN? - if so you have to unlock it (if possible/allowed)
  • is your module in low-power / airplane mode?
  • is your MC9780V/MC5728V module being used on a GW2380/GW16059/GW16062? - if so pull-up resistor to pin22 needs to be removed
  • have you specified the correct APN for your GSM module? - Your carrier can provide you with the proper APN
  • are you using the correct serial device? - most modules provide several, not all of which can be used with pppd/chat/gcom
  • is your CDMA/EVDO module 'activated'? - you may need to do this on a Windows system with vendor-supplied application/drivers

Sierra Wireless Modems

Commonly used Modules known to work on Gateworks products:

  • MC8790/MC8790V UTMS modem
  • MC5728/MC5728V CDMA modem

General Notes:

  • The 'V' version of the modules (ie MC8790V and MC5728V) support audio modes and interfaces (Handset/Headset/Car? kit/Speakerphone/AUX/TTY) that the non-V modules do not.
  • The 'V' version of the modules (ie MC8790V and MC5728V) use pin22 for an auxiliary voltage that must be between 0 and 2.6V. Pin22 however in the Mini-PCIe standard is PCI_RESET# thus on some products has a pull-up to 3.3V. On products that have this pull-up, the pull-up resistor must be unloaded in order to use these cards. This includes the GW2380, GW16062,
  • The LED output (pin 42) indicates the module state according to the PCI-Express Mini Card specification:
    • Off - module not powered
    • On - module powered and connected but not transmitting or receiving
    • slow blink - module powered and searching for a connection (250ms on at 0.2Hz)
    • fast blink - module is transmitting or receiving (3Hz blink rate)

GW2380 Notes:

  • The 'V' version of the modules (ie MC8790V and MC5728V) use pin22 for an auxiliary voltage that must be between 0 and 2.6V. Pin22 however in the Mini-PCIe standard is PCI_RESET# thus on some products has a pull-up to 3.3V. On products that have this pull-up, the pull-up resistor must be unloaded in order to use these cards.

MC8790/MC5790V Notes:

  • exposes 7 serial devices (/dev/ttyUSB0 - /dev/ttyUSB7) - /dev/ttyUSB3,4,5,6 can all be used for either AT commands or M2M data device (allowing sigstr etc to be retrieved while connected)
  • power mode - The MC8970/MC8970V has a power-mode setting to put the card in 'low-power' (aka 'airplane') mode where the module is active but RF is disabled. Some users report that the modules start up in low-power mode (this is not always the case and its not clear what the circumstances are here). The AT+CFUN command allows you to get/set this mode:
    AT+CFUN?
    +CFUN: 1
    
    OK
    AT+CFUN=0
    OK
    
  • if 'gcom -d /dev/ttyUSB3 info' reports 'Network locked: 1' then your module is locked to a network carrier's specific plan and can only be used with a SIM for that network carriers plan. Take care to use the right SIM plan or to purchase an unlocked or 'generic' module.

MC5828/MC5728V Notes:

  • exposes 4 serial devices (/dev/ttyUSB0 - /dev/ttyUSB3) - only /dev/ttyUSB0 can be used for either AT commands or M2M data device which means once connected you can't use it to obtain signal strength

OpenWRT support (comgt package)

The comgt package supports configuration of various 3G cards such as the Sierra Wireless, Novatel, and Option modems. This package supports startup scripts that are used for network interfaces specified with proto=3g.

Note that some 3G devices require some manipulation to be used for 3G communications. In these cases you can create an init script to configure the device properly:

  • typically USB dongles, require the 'setmode' application to be used to switch the devices from a USB Mass Storage device configuration to a 3G modem configuration
  • some devices have AT commands that are required to take them out of low-power modes. For example, some Sierra Wireless modems have been reported to come up in low-power (airplane) mode. A startup script can be used to always set full power mode on bootup:
    1. Download and place the 3g Download script in /etc/init.d/ on the board. (Instructions on downloading: Transferring Files)
    2. Enable the script to run on start up. First you will need to change the file permissions.
      chmod +x /etc/init.d/3g
      /etc/init.d/3g enable 
      

An example configuration for a Sierra Wireless MC9870 3G UMTS modem (ie AT&T Carrier using the ISP.CINGULAR APN):

uci set network.wan=interface
uci set network.wan.proto=3g
uci set network.wan.service=umts
uci set network.wan.apn=ISP.CINGULAR
uci set network.wan.device=/dev/ttyUSB4
uci commit network
  • Note that UMTS/GSM providers sometimes require a user and password. In this case the ppp scripts require this information in your network interface. If your user is 'user' and password is 'pass' you can set this via:
    uci set network.wan.username=user
    uci set network.wan.password=pass
    

An example configuration for a Sierra Wireless MC5728 3G CDMA/EVDO modem (ie Sprint/Verizon? Carriers):

uci set network.wan=interface
uci set network.wan.proto=3g
uci set network.wan.service=cdma
uci set network.wan.device=/dev/ttyUSB0
uci commit network
  • Note that CDMA/EVDO modules need to be 'activated' (one-time) before they can connect to he carrier's network. This is best done using the Windows software from the module vendor (For Verizon this is VZAccess Manager bundled with the CDMA Watcher drivers/application)

The comgt package has an application installed to /usr/bin/gcom that uses chat scripts installed in /etc/gcom to perform common tasks with supported 3G devices (assuming /dev/ttyUSB3 is the control channel as in a MC8790):

  • report SIM status, connection status, and signal quality:
    # gcom -d /dev/ttyUSB3
    SIM ready
    Waiting for Registration..(120 sec max)
    Registered on Home network: "AT&T",2
    Signal Quality: 12,99
    
  • report just signal strength:
    # gcom -d /dev/ttyUSB3 sig
    Signal Quality: 12,99
    
  • report card info (mfg strings):
    # gcom -d /dev/ttyUSB3 info
    ##### Wireless WAN Modem Configuration #####
    Product text:
    ====
    
    Manufacturer: Sierra Wireless, Inc.
    Model: MC8790
    Revision: K1_0_2_8AP C:/WS/FW/K1_0_2_8AP/MSM6290/SRC 2008/09/17 14:00:22
    IMEI: 352974021856935
    IMEI SV: 3
    FSN: D661380183210
    3GPP Release 6
    +GCAP: +CGSM,+DS,+ES
    OK
    ====
    Manufacturer:           Sierra Wireless, Inc.
    IMEI and Serial Number: 352974021856935
    Manufacturer's Revision: 
    K1_0_2_8AP C:/WS/FW/K1_0_2_8AP/MSM6290/SRC 2008/09/17 14:00:
    Hardware Revision:      
    
    Network Locked:         0
    Customisation:          
    
    Band settings:          (
    )
    APN:                    1,"IP","ISP.CINGULAR","0.0.0.0",0,0
    ##### END #####
    

OpenWRT Luci Web-Admin Configuration for 3G cards

1. Access the board's web interface. For instructions: Accessing the Web Interface

2. Go to the Network tab, then the Interfaces tab.

3. Click on "Add new interface..." at the bottom left of the screen.

4. Name the interface. Here it is named "wan"

5. Check "Custom Interface" with nothing entered in the text box.

6. Under the Protocol field, select "UMTS/3G from the drop down menu.

7. Continue to fill out the remaining fields.

8. Click on Save & Apply at the bottom right of the screen.

9. Reboot the board. The modem should be woken up from the /etc/init.d/3g script a few seconds after the board boots.

MiniPCI to Mini-PCIe Multiple SIM Card Access

Gateworks has several mini-PCI to PCI Express Mini Card adapters specifically designed for PCI Express Mini Card Standard GSM/GPRS/EDGE/UMTS/HSPA wireless radio modules on the Avila, Cambria, Laguna platforms:

  • [ GW16049] - USB routed, No SIM connectors (Can't be used for GSM Modules)
  • [ GW16038] - USB routed, has SIM connectors
  • GW16059 - PCI/USB routed, No SIM connectors (Can't be used for GSM Modules)
  • GW16062 - PCI/USB routed, has SIM connectors

Notes:

  • the Avila, Cambria, Laguna boards may need to be specifically configured (resistor loading) to route USB to a miniPCI slot.
  • the GW16059/GW16062 route PCI signals and thus pull up Pin22 (RST#) which causes issues with the MC8790V/MC5728V modules - either use a GW16049/GW16038 carrier or a resistor on the carrier will need to be unloaded for the modules to function properly.

The GW16038/GW16062 carriers have 3 SIM connector sites which can be multiplexed onto the PCI Express Mini Card SIM signals depending on jumper position and/or software controlled GPIO steering. Jumper block W1 can set SEL0/SEL1 signals low/high or GPIO controlled. The card selection is shown in a table on the PCB silkscreen.

Note that the GPIO signals routed through the miniPCI slot differ among the various platforms:

  • Laguna GW2388-x:
    • GPIO7 - GSMSEL0
    • GPIO8 - GSMSEL1
  • Cambria GW2358-x:
    • GPIO10 - GSMSEL0
    • GPIO11 - GSMSEL1
  • Avila
    • GPIO2 - GSMSEL0
    • GPIO1 - GSMSEL1

Examples:

  • Laguna platform - select SIM site:
    gpioctl dirout 7; gpioctl dirout 8;  # make gpio7/8 outputs
    gpioctl set 7; gpioctl set 8; # sel SEL1/SEL0 1,1 for SIMC
    gpioctl clear 7; gpioctl set 8; # sel SEL1/SEL0 1,0 for SIMB
    gpioctl set 7; gpioctl clear 8; # sel SEL1/SEL0 0,1 for SIMA
    gpioctl clear 7; gpioctl clear 8; # sel SEL1/SEL0 0,0 for None
    

Attachments