Search by Tags

How to use GPRS Modem for Internet connectivity

 
Applicable for

Article updated at 28 Oct 2017

This article demonstrates how to connect Toradex module with a GPRS modem through dial-up connection for internet connectivity.

Overview

There are 2 ways to connect to a GPRS modem, one by dial-up connection and other by CellCore function which provides basic set of connection oriented services.

The CellCore module uses Radio Interface Layer (RIL) for communication with radio hardware. As most GPRS modems are not available with support for RIL, therefore dial-up connection is often used.

If you want to establish dial-up connection from application then you can refer RAS APIs from here.

Hardware setup

Connect GPRS modem to UART CoM1 port which is a FF UART (lower RS-232 on X25 connector of Evaluation Board V3.1A). You can also use other UART ports according to your requirement, for more information on serial ports, please refer this article.

Registry settings

Edit the following registry keys at HKLM\Drivers\Unimodem.

[HKLM\Drivers\Unimodem\Init]
"1"="AT<cr>"
"2"="ATE0V1&C1&D2<cr>"
 
[HKLM\Drivers\Unimodem\Settings]
"Prefix"="AT"
"Terminator"="<cr>"
"DialPrefix"="D"
"DialSuffix"=";"
"Pulse"="P"
"Tone"="T"
"Blind_Off"="X4"
"Blind_On"="X3"
"CmdSendDelay"="500"
"CallSetupFailTimeout"="ATS7=<#><cr>"
"Reset"="AT<cr>"
 
[HKLM\Drivers\Unimodem\Config]
"CallSetupFailTimer"=dword:B4

When establishing a dial-up connection you must take care that the registry keys at HKCU\ControlPanel\Dial are set with correct country and area code. You can refer this article for more information.

[HKCU\ControlPanel\Dial]
"CurrentLoc"=dword: 0
"HighLocID"=dword: 2
 
[HKCU\ControlPanel\Dial\Locations]
"0"=multi_sz:"Work",
              "G",
              "G",
              "G",
              "425",
              "  ",
              "1",
              "0"
"1"=multi_sz:"Home",
             "G",
             "1FG",
             "011, EFG",
             "425",
             "  ",
             "1",
             "0"

Save the registry settings after editing.

Steps to establish connection with GPRS modem

Once the registry settings are done follow the steps mention below to connect GPRS modem with Toradex module through dial-up connection.

  • Open Network and Dial-up Connections.

  • Make a new Dial-Up Connection and name it GPRS.

  • Select Serial on CoM1 from Select a modem option.

  • Click on Configure... button in Modem menu and set the Port Settings as follows.

  • Enter the command +CGDCONT=1,"IP","APN" (replace APN with the APN of your network provider) in the Extra Settings as shown in picture below.

You can also set this parameter in registry as shown below.

[HKLM\Drivers\Unimodem\Config]
"DialModifier"="+CGDCONT=1,"IP","APN""

  • Click OK then Next. In Phone Number menu set the following parameters.

  • Click on OK and it will create a new GPRS connection in Network Connection wizard.

  • Right click on GPRS icon and click on Connect, then GPRS status dialog box will appear.

  • Once the GPRS connection is established successfully, Connected message will appear on the dialog box.

NOTE

  • The internet connection using GPRS modem is very slow, if you are using ping command to test the internet connection then it is recommended to use -w ping option to increase the timeout value from 1s to 3s (depending on your internet speed).

You can use the following command:

ping -w 3000 www.toradex.com
  • While the Windows CE device’s USB client port is connected to a host (e.g. for debugging), the network connection is not accessible. For more information please refer this article.
  • If your modem do not use DCD signal then it is recommended that you disconnect this signal from your connector. If you are using Colibri Evaluation Board V3.1A then you can remove the jumper (on X11) that connects UART_A_DCD and SODIMM_31. Alternatively, you can also connect SODIMM pin 31 to 3.3V.
  • While establishing a dial-up connection, if a port not available message comes then please refer this article for more information.
  • Not tested for Colibri T20, T30 and VFxx yet.