Advanced application features Network commissioning and diagnostics
XBee® SX 868 RF Module User Guide
66
Example
Suppose that the link between device A (SH/SL = 0x0013a20040521234) and device B
(SH/SL=0x0013a2004052abcd) is being tested by transmitting 1,000 40 byte packets. Send the
following API packet to the serial interface of the device outputting the results, device C. Note that
device C can be the same device as device A or B (Whitespace delineates fields and bold text is the
payload portion of the packet):
7E 0020 11 01 0013A20040521234 FFFE E6 E6 0014 C105 00 00 0013A2004052ABCD 0028 03E8 EB
And the following is a possible packet returned:
7E 0027 91 0013A20040521234 FFFE E6 E6 0094 C105 00 0013A2004052ABCD 0028 03E8 03E7 0064 00
0A 50 53 52 9F
(999 out of 1000 packets successful, 100 retries used, RR=10, maxRSSI= - 80 dBm, minRSSI= - 83 dBm,
avgRSSI= - 82 dBm)
If the result field is not equal to zero then an error occurred. Ignore the other fields in the packet. If
the Success field is equal to zero then ignore the RSSI fields.
Trace routing
Determining the route a DigiMesh unicast takes to its destination is useful when setting up a network
or diagnosing problems within a network. Use the Trace Route API option of Tx Request Packets to
transmit routing information packets to the originator of a DigiMesh unicast by the intermediate
nodes. For a description of the API frames, see API operating mode.
When a unicast is sent with the Trace Route API option enabled, the unicast is sent to its destination
radios which forward the unicast to its eventual destination and transmit a Route Information—RI—
packet back along the route to the unicast originator. For more information, see API operating mode.
Example:
Suppose you unicast a data packet with the trace route enabled from radio A to radio E, through
radios B, C, and D. The following sequence occurs:
n
After the successful MAC transmission of the data packet from A to B, A outputs an RI Packet
indicating that the transmission of the data packet from A to E was successfully forwarded one
hop from A to B.
n
After the successful MAC transmission of the data packet from B to C, B transmits a RI Packet
to A. Then, A outputs this RI packet out its serial interface.
n
After the successful MAC transmission of the data packet from C to D, C transmits a RI Packet
to A—through B. Then, A outputs this RI packet out its serial interface.
n
After the successful MAC transmission of the data packet from D to E, D transmits an RI Packet
to A—through C and B. Then, A outputs this RI packet out its serial interface.
Route Information packets are not guaranteed to arrive in the same order as the unicast packet took.
It is also possible Route Information packets that are transferred on a weak route to fail before
arriving at the unicast originator.
Because of the large number of Route Information packets that can be generated by a unicast with
Trace Route enabled, we suggest that the Trace Route option only be used for occasional diagnostic
purposes and not for normal operations.
NACK messages
Transmit Request (0x10 and 0x11) frames contain a negative-acknowledge character (NACK) API
option (Bit 2 of the Transmit Options field).