Skip to main content
search

GPRS Connection

//Set extended error messages
AT+CMEE=2

//Set GPRS APN Name
AT+CGDCONT=1,”IP”,”APN Name”

Outgoing Connection

//Set packet size and timeouts on context 1-6
AT#SCFG=1,1,300,90,600,50

//Open GPRS context 1-6 with GPRS Username and GPRS Password. (This will return your ISP assigned IP address)
AT#SGACT=1,1,”username”,”password”

//Open Socket on Port Number at IP Address
AT#SD=1,0,Port Number,”IP Address”,255,0

// Close GPRS context 1-6
AT#SGACT=1,0

Incoming Connection

//Open GPRS context 1-6 with GPRS Username and GPRS Password
AT#SGACT=1,1,”username”,”password”

//Setup Firewall
AT#FRWL=1,”IP Address”,”Subnet Mask”
//Allow all: AT#FRWL=1,”0.0.0.0”,”0.0.0.0”

//Socket listen 1-6
AT#SL=1,1,”Port Number”

Socket Status

//Check status of each socket from 1-6
AT#SS

Application Example

Modem A (Local): IP Address – 80.80.80.80, Port Number – 1024
Modem B (Remote): IP Address – 80.80.80.81, Port Number – 1024

Modem A Config

AT+CMEE=2

AT+CGDCONT=1,”IP”,”APN Name”

AT#SGACT=1,1,”username”,”password”

AT#SD=1,0,1024,”080.080.080.081”,255,0

Modem B Config

AT+CMEE=2

AT+CGDCONT=1,”IP”,”APN Name”

AT#SGACT=1,1,”username”,”password”

AT#FRWL=1,”80.80.80.80”,”255.255.255.255”

AT#SL=1,1,1024,255

Successful Connection

Upon success modem A (80.80.80.80) will show: CONNECT
Upon success modem B (80.80.80.81) will show: SRING:1 Showing a connection is requested on connection context 1.

Type AT#SA=1 to allow the connection and you will get the response below: CONNECT

Either modem can close the connection using the closure command +++

Up to 6 active socket connections can be stored at any time, however only 1 active connection can be maintained on a single channel (COM Port).

Download PDF
Close Menu