Sierra Wireless DART 300 User Manual

Page of 137
User’s Guide 
 
UDP/TCP Service 
 
2110212 Rev 1.0 
 
Page 67 
8.3.1.2. 
UDP Server Sessions 
Opening a UDP Server Session 
The modem will check all incoming packets for the source IP address.  If Friends Only is enabled, 
the originator’s IP address is checked against entries in the Friends List.  If no match is found the 
packet is discarded.  If there is a match, or the Friends List is empty, the modem will also verify 
that the destination port is matched to the listening port set in register +WS212.  Again, a 
mismatch will cause the modem to discard the packet. 
Provided an incoming packet is acceptable, the modem will then behave as determined by the 
setting of control signals (DTR and RTS), Quiet (Q), and the auto-answer setting (S0). 
 
 
NOTE 
UDP packets are buffered at the modem.  If manual answer is being used, and several 
connection attempts are ignored, the packet buffers may overflow.  When a session is 
opened, all buffered packets are forwarded to the host. 
It is possible to have buffered packets from multiple source clients but only the last 
packet received can be answered. 
The onus is on the user to implement host protocols when using UDP to ensure data is 
not lost or corrupted. 
When the modem has advised the local host device of the change from command state to data 
state, the incoming packets will be presented to the host (based on DTR).  The modem is ready to 
accept host reply data for packet assembly and transmission to the client. 
The host can check the identity of the current client by escaping data state and issuing the 
+WVCALLERIP command.  The response is the IP address of the current client in dotted-
decimal format. 
Using an Open UDP Session 
While a session is open, the modem handles packet assembly and disassembly for outgoing and 
incoming data respectively.  For details on packet assembly and forwarding see Section 6.6 above. 
An intelligent or semi-intelligent host server will want to receive the packet data and respond to it.  
A dumb host server will simply begin sending telemetry. 
Receiving Data 
Once the session is open, the modem will accept packets based on the setting of the UDP Server 
Receive Lock (+WS217).  If the lock is disabled (+WS217=0) then the modem will only accept 
packets from the connected client; any packets arriving from a source address (IP and port) other 
than the current client are ignored.  When the receive lock feature is enabled, the modem will 
accept packets from any client (within the Friends List if used), entering them into a first-in first-
out (FIFO) queue as described in Section 6.2.1.2 above. 
When the receive lock is not used, then, when the calling station closes its session the DART 300 
server must do so also; otherwise, if the caller initiates another client session, it may use a 
different originating port and its packets will be declined by the original server session as 
originating from a different client process.  The protocol to ensure that both the client and server 
close a session is up to the application.  The PAD Inactivity Timeout (S30) is available to allow 
dumb and semi-intelligent host devices to do this. 
RTS or DTR flow control can be used to suspend the flow of data from the modem to the local 
host (DTE).  If RTS or DTR is de-asserted, the modem will buffer incoming packets.  When RTS 
is re-asserted, the data held in the modem will be delivered to the host.  If DTR is being used for 
flow control, the modem will not release the buffered data until a packet arrives while DTR is 
asserted.  In the event that the modem’s receive buffer fills, the modem will automatically assert