How to use serial forwarder on testbed
From Cyber-Physical Systems Laboratory
Jump to navigationJump to searchHow 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':
0: Delimiter (0x7E)
1: Protocol: ACK (0x43), PACKET_ACK (0x44) or PACKET_NOACK (0x45)
2: Sequence number (omitted if protocol is PACKET_NOACK)
3: Packet type (0x00, omitted if protocol is ACK)
4: Destination high byte (omitted if protocol is ACK)
5: Destination low byte (omitted if protocol is ACK)
6: Source high byte (omitted if protocol is ACK)
7: Source low byte (omitted if protocol is ACK)
8: Payload length (omitted if protocol is ACK)
9: Destination PAN group (omitted if protocol is ACK)
10: Packet AM type (omitted if protocol is ACK)
11 .. n-4: Payload (omitted if protocol is ACK)
n-3: CRC-16 low byte
n-2: CRC-16 high byte
n-1: Delimiter (0x7E)