4 remote connection between two modules – Telit Wireless Solutions Easy GPRS User Manual

Page 35

Advertising
background image





Easy GPRS User Guide

80000ST10028 Rev. 1 - 14/03/07

Reproduction forbidden without Telit Communications S.p.A. written authorization - All Rights Reserved

page 35 of 37

2.3.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#GPRS=1

Firewall Setup(if requiered)

AT#FRWL=1,”198.158.1.1”,”0.0.0.0”

Socket Listen

AT#SKTL=1,0,1024,255


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#GPRS=1
+IP: 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 commad AT#SKTL=1,0,1024,255 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#GPRS=1

Socket Dial

AT#SKTD=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#GPRS=1

Advertising