Tcp Socket Server Setup; Udp Client Socket Setup; Udp Socket Listener Setup - CalAmp 819-GPRS series User Manual

Gsm gprs serial cellular data modem
Table of Contents

Advertisement

TCP Socket Server Setup

This example describes commands to setup the modem as a TCP Socket Server. Configure the
modem using the following AT commands:
AT^SISS=0,alphabet,1
AT^SISS=0,srvtype,socket
AT^SISS=0,address,"socktcp://listener:2000"
AT^SISS=0,conid,0
Open the connection by typing, AT^SISO=0.
Close connection by typing, AT^SISC=0.

UDP Client Socket Setup

This example describes commands to setup the modem as a UDP Socket Client. To check that data
is received by the server, you can launch a UDP socket server on a computer with a public IP
address.
Configure the modem using the following AT commands:
AT^SISS=0,srvtype,socket
AT^SISS= 0,address,"sockudp://<REMOTE_IP>:<REMOTE_PORT>"
For example:
AT^SISS=0,srvtype,socket
AT^SISS=0,address,"sockudp://10.48.132.11:2000"
Open the connection by typing, AT^SISO=0.
Close connection by typing, AT^SISC=0.

UDP Socket Listener Setup

This example describes the commands to setup the modem as a TCP Socket Server. Configure the
modem using the following AT commands:
AT^SISS=0,alphabet,1
AT^SISS=0,srvtype,socket
AT^SISS=0,address,"sockudp://listener:2000"
AT^SISS=0,conid,0
Open the connection by typing, AT^SISO=0.
A response of "^SISR: 0, 1" will be displayed for incoming UDP data. Type, AT^SISR=0,1500 to
read data. An example response is shown below;
^SISR: 0, 20, 0, 10.40.236.159:1024
Hello from UDP client
Replying directly using 20 bytes by typing, AT^SISW=0,20,,,10.40.236.159:1024. After
receiving the "^SISW: 0, 20, 0" type your reply and hit enter.
Close connection by typing, AT^SISC=0.
001-0003-829 Revision 1
Page 29 of 65

Advertisement

Table of Contents
loading

Table of Contents