EMBEDDED APPLICATIONS FCT
2.2
Basic Usage of TCP/IP Features
2.2.1
Protocols
The radio device embedded application functions provide
support for the IP, UDP and TCP protocols. The user has
no direct control over the IP layer (for instance a raw
sockets interface is not provided), it is simply used as a
transport by the higher-level protocols.
UDP provides for fast connectionless, less reliable
communications between the radio device and remote
hosts; TCP provides slower but reliable, connection-
oriented communications, with flow-control, sequence
checking and reordering.
Whilst the lower-level stack provides support for ICMP
(Internet Control Messaging Protocol) features, and ICMP
packets influence the operation and performance of the
lower-level TCP/IP stack, the application-writer has no
direct access to any ICMP features.
2.2.2
GPRS Transport for IP
In order to use the embedded TCP/IP functions, a GPRS
PDP context must be activated first, to provide the
underlying IP transport. This should be done using the
pdpa() function, not by using direct AT dial commands.
The embedded applications TCP/IP cannot properly make
use of a PDP context that has been created using the ATD
command.
In order to activate a PDP context, the details associated
with the context (such as APN) must have been previously
established. This is achieved using the AT+CGDCONT
command. Use of AT commands to define PDP contexts
alongside TCP/IP functions is normal; it is the PDP
activation and deactivation that should not be performed
using AT commands.
Once the PDP context is active, a socket can be created
to enable bi-directional communications using TCP or
UDP.
2.2.3
Flow of TCP/IP Operations in a Script
The basic flow of the TCP/IP operations within a script will
normally take the following form:
LZT 123 8019 R1A
6