User's Manual

Table Of Contents
Direct Socket Interface
AT+i Programmer‘s Manual Version 8.32 13-2
13.2 +iSUDP Open A Connectionless UDP Socket
Syntax:
AT+iSUDP:<host>,<rport>[,<lport>]
Opens a UDP (User Datagram Protocol) socket and sets the
remote system‘s <host>:<port> address.
Parameters:
<host>
Logical name of the target server or a host IP address, or
0.0.0.0 to open a non-connected socket.
<rport>
Remote port number to send to, or 0 to open a non-connected
socket.
<lport>
Optional local UDP port to use.
Command Options:
<host>
The remote system‘s name may be any legal Internet server
name that can be resolved by iChip‘s
DNS (Domain Name
Server) settings. The server name may also be specified as an
absolute IP address given in DOT form. When the <host> is
defined, the resulting UDP socket is created and connected. If
<host>=0.0.0.0, the socket is created but remains unconnected.
The first UDP packet to arrive automatically latches the
sender‘s IP port, in effect connecting the socket.
<rport>
Specifies the remote system‘s port.
<lport>
Specifies the local port to use. If unspecified, iChip allocates a
port from its internal pool.
Result Code:
I/<sock handle>
Upon successfully opening and connecting the UDP socket to
<host>:<port>, a socket handle is returned. The socket handle
<sock handle> is in the range 0..9 and used to reference the
socket in all following socket commands.
I/ERROR
Otherwise
The Socket Command Abort may be used to abort prematurely.