4 remote connection between two modules – Rainbow Electronics GM862-QUAD-PY User Manual
Page 44

Easy GPRS User Guide
80000ST10028 Rev. 4 - 16/07/08
Reproduction forbidden without Telit Communications S.p.A. written authorization - All Rights Reserved
page 44 of 63
2.4.4 Remote connection between two modules
Configuration for the module that receives data (server):
Define PDP Context
AT+CGDCONT=1,”IP”,”ibox.tim.it”,”0.0.0.0”
GPRS Context Activation
AT#SGACT=1,1
Firewall Setup
AT#FRWL=1,”198.158.1.1”,”0.0.0.0”
Socket Listen
AT#SL=1,1,0,1024
First you have to define PDP context filling in the information of APN in this example: ibox.tim.it.
Next step is activation of GPRS context which gives as reply the IP of the module assigned by
network:
AT#SGACT=1,1
#SGACT: 217.201.142.223
OK
Before opening socket in listen it is possible to define an accept firewall chain in order to filter IP of the
senders.
At the end with AT command AT#SL=1,1,1024,0 the socket will be set in listen on the port #1024.
Configuration for the module that opens connection (client):
Define PDP Context
AT+CGDCONT=1,”IP”,”ibox.tim.it”,”0.0.0.0”
GPRS Context Activation
AT#SGACT=1,1
Socket Dial
AT#SD=2,0,1024,”217.201.142.223”
First you have to define PDP context filling in the information of APN in this example: ibox.tim.it.
Next step is activation of GPRS context which gives as reply the IP of the module assigned by
network. Now you can open the connection with the remote host with IP address 217.201.142.223 on
the port 1024 (as in example).
NOTE: IP of the modules can be verified with the following AT command line: AT#CGPADDR=