Difference between revisions of "How to use serial forwarder on testbed"
Line 9: | Line 9: | ||
byte 0: Delimiter (0x7E) | byte 0: Delimiter (0x7E) | ||
− | + | byte 1: Protocol: ACK (0x43), PACKET_ACK (0x44) or PACKET_NOACK (0x45) | |
− | + | byte 2: Sequence number (omitted if protocol is PACKET_NOACK) | |
− | + | byte 3: Packet type (0x00, omitted if protocol is ACK) | |
− | + | byte 4: Destination high byte (omitted if protocol is ACK) | |
− | + | byte 5: Destination low byte (omitted if protocol is ACK) | |
− | + | byte 6: Source high byte (omitted if protocol is ACK) | |
− | + | byte 7: Source low byte (omitted if protocol is ACK) | |
− | + | byte 8: Payload length (omitted if protocol is ACK) | |
− | + | byte 9: Destination PAN group (omitted if protocol is ACK) | |
− | + | byte 10: Packet AM type (omitted if protocol is ACK) | |
− | + | byte 11 .. n-4: Payload (omitted if protocol is ACK) | |
− | + | byte n-3: CRC-16 low byte | |
− | + | byte n-2: CRC-16 high byte | |
− | + | byte n-1: Delimiter (0x7E) |
Revision as of 05:56, 31 August 2017
How to use the serial forwarder on testbed?
1. To open the serial forwarder on testbed, run the command
forwarder.py -2 -a telosb
2. We can get the packet format used by the serial forwarder in tospacket.py:
byte 0: Delimiter (0x7E)
byte 1: Protocol: ACK (0x43), PACKET_ACK (0x44) or PACKET_NOACK (0x45)
byte 2: Sequence number (omitted if protocol is PACKET_NOACK)
byte 3: Packet type (0x00, omitted if protocol is ACK)
byte 4: Destination high byte (omitted if protocol is ACK)
byte 5: Destination low byte (omitted if protocol is ACK)
byte 6: Source high byte (omitted if protocol is ACK)
byte 7: Source low byte (omitted if protocol is ACK)
byte 8: Payload length (omitted if protocol is ACK)
byte 9: Destination PAN group (omitted if protocol is ACK)
byte 10: Packet AM type (omitted if protocol is ACK)
byte 11 .. n-4: Payload (omitted if protocol is ACK)
byte n-3: CRC-16 low byte
byte n-2: CRC-16 high byte
byte n-1: Delimiter (0x7E)