User's Manual
Table Of Contents
- 1.0 Absolute Maximum Ratings
- 2.0 Normal Operating Conditions
- 3.0 Electrical Specifications
- 4.0 Radio
- 5.0 Pinout
- 6.0 Mote Boot Up
- 7.0 Interfaces
- 7.1 Timestamps
- 7.2 Status
- 7.3 Serial Interface
- 7.3.1 Serial Handshake Protocol
- 7.3.2 Mote Command Data Types
- 7.3.3 Mote Commands
- 7.3.3.1 Command 0x80 Serial Payload Sent to Mote Serial
- 7.3.3.2 Command 0x81 Unacknowledged Serial Payload Received from Mote Serial
- 7.3.3.3 Command 0x82 Acknowledged Serial Payload Received from Mote Serial
- 7.3.3.4 Command 0x84 Time/State Packet
- 7.3.3.5 Commands 0x87 and 0x88 Set Parameter Request/Response
- 7.3.3.6 Commands 0x89 and 0x8A Get Parameter Request/Response
- 7.3.3.7 Command 0x8C Mote Information
- 7.3.3.8 Command 0x8D Reset Mote
- 7.3.4 Mote Get/Set Command Parameters
- 7.3.5 HDLC Packet Processing Examples
- 8.0 Packaging Description
- 9.0 Regulatory and Standards Compliance
- 10.0 Ordering Information
Interfaces
22 DUST NETWORKS™ M2135-1/M2030-1 MOTE DATASHEET
CONFIDENTIAL
7.3.5 HDLC Packet Processing Examples
Example 1: Constructing an HDLC packet to send to the mote
This example demonstrates how you would construct an HDLC packet to set the network ID value to 125. (All values are in
hexadecimal.)
Step 1 Define HDLC packet payload:
Command type => 87
Parameter => 01
Network ID => 7D
Step 2 Calculate FCS:
a. Calculate the FCS using FCS-16 algorithm (RFC 1662) on the hexadecimal sequence '87 01 00 7D'.
The FCS (including 1's complement) is 74 2F.
b. Append FCS to payload, FCS is sent least significant byte first (RFC 1662):
Step 3 Perform byte stuffing.
To perform byte stuffing, check the HDLC Packet Payload and FCS for instances of “7D” or “7E” and replace as
follows:
7D => 7D 5D
7E => 7D 5E
Note that the additional control bytes do not count against the 80-byte payload limit.
Step 4 Add start and stop delimiters:
Enclose the above in start/stop flags (RFC 1662).
Or simply, the hexadecimal sequence:
7E 87 01 00 7D 5D 2F 74 7E
Example 2: Decoding an HDLC packet received from the mote
To understand how to decode an HDLC packet sent from the mote, let’s assume that the mote received a “get mote
information” command, and replied with the following HDLC Packet. (All values are in hexadecimal.)
Step 1 (HDLC layer) strip off delimiters:
HDLC Packet Payload
Command Type Message Content
87 01 00 7D
HDLC Packet Payload FCS
87 01 00 7D 2F 74
HDLC Packet Payload (stuffed) FCS (stuffed)
87 01 00 7D 5D 2F 74
Start Delimiter HDLC Packet Payload (stuffed) FCS (stuffed) Stop Delimiter
7E 87 01 00 7D 5D 2F 74 7E
Start Byte HDLC Packet Payload (stuffed) FCS (stuffed) Stop Byte
7E 8A 07 00 1F 00 00 5B 00 01 01 06 00 3C 00 00 00 00 00 00
7D 5E C3 02 00 08 30 30 30 5F 45 56 30 31 00 13 00
43 47 7E
HDLC Packet Payload (stuffed) FCS (stuffed)
8A 07 00 1F 00 00 5B 00 01 01 06 00 3C 00 00 00 00 00 00
7D 5E C3 02 00 08 30 30 30 5F 45 56 30 31 00 13 00
43 47
PRELMINARY