Download XServe Users Manual

Transcript
XServe User’s Manual
13.2.1 Connection Protocol
When connecting to a Serial Forwarder, the initial connection phase requires a simple protocol
version check. Both applictions send their version information, and then choose the minimum
version between the version received and the version they sent. XServe runs version two of the
protocol and is backward compatible with version one.
Protocol is as follows:
1. On connection open send 2 bytes: ‘T’ and ‘<version>’. The two available versions are
0x20 (character value: ‘ ‘) and 0x21 (character value: ‘!’).
2. If the received version is 0x20 then the protocol is version one and the initiation ends.
3. Otherwise if the version is 0x21, then send 4 bytes representing the platform of the connected
mote.
13.2.2 Packet Format
The Serial Forwarder protocol is simpler than the Serial Framer because TCP/IP provides a
reliable link layer. Each packet has the form: <length><data payload><16-bit CRC>
Length
Data
Data
CRC
0x2D
TOS_Msg_Header
Payload
0x23D4
The first byte is the length of the remaining data payload. The Data portion contains the packet
data.
Page 184
Doc.# 7430-0111-01 Rev. C