User's Guide

User’s Guide CDPD Operation
2110059 Rev 1.1 Proprietary and Confidential Page 49
5.8.3.1. Configuring a TCP Client Session
Client sessions are those in which your modem initiates a conversation with a server.
A detailed discussion of this type of session follows the outline of steps to open a TCP Client
Session. (AT is omitted for brevity):
1. +WS46=4 to place the modem in CDPD mode (only required on the SB320).
2. +S31=0 to disable logic sleep.
3. +WS175=0 to disable CDPD sleep.
4. +WS45=1 to select TCP packet service.
5. Optionally assign a channel with +WPCHAN=n where n is the channel to use.
6. Optionally verify the channel acquisition with +WPRSSI looking for the second value in the
return string to be 3.
If the modem is using auto-registration (+WS173=1) skip to step 9.
7. +WS197=n where n is the index (1-4) of the NEI to register, to select the NEI
8. +WPREG to register on the CDPD network. The modem will reply as noted in the section
above on manual registration.
9. +WS56? to query the registration status. Repeat this command until it returns a value of
1 (registered) or until the host chooses to timeout, failing the connection.
10. D<dest> where <dest> is the destination IP and port number to send your data to. If the
Dial Directory (quick dial) is being used, <dest> can be an index to the Friends Only list.
The entry there will be used to determine the IP address and port for the call. See the AT
Command Reference for details on this command.
The modem will reply with CONNECT at which point you are in data state.
The modem is now ready to accept host data for packet assembly and transmission to the network.
Incoming packets from the <dest> address will be passed to the host. This allows the host to
exchange data in a point-to-point connection on a specified port with a specific station.
Detailed Discussion
The first four steps simply place the modem in CDPD TCP mode. The modem’s sleep features
are disabled to prevent delays in TCP acknowledgements, which would cause excessive re-
transmissions and possibly loss of connection. The modem’s packet service is set in register
+WS45 (Packet Service) by step 4. Setting this value to 1 will enable the modem’s TCP stack.
This can be done before or after registration on the network so auto-registration can occur before
this step.
The registration process can be more closely controlled with steps 5 through 8. Steps 5 and 6 can
be used in auto-register as well as manual register settings.
To send data over the network in a TCP client session the user must enter a data state connection
to the network with a specific IP address and port number.
The On-line command (O) can only be used after a session has started. The Dial command must
be used to establish the TCP point-to-point connection. Once established, the host can escape data
state and then use this command to return to data state with the point-to-point connection still
intact.
The IP of the destination can be any valid IP. Client sessions do not apply the Friends Only
restrictions. If the Dial command is given bad syntax including an invalid destination IP or port
number, then it will return the ERROR result code. This is also true if a “quick dial” index points
to an empty or invalid entry in the Friends Only list.