How to use serial forwarder on testbed

From Cyber-Physical Systems Laboratory
Revision as of 05:50, 31 August 2017 by Bowen (talk | contribs)
Jump to navigationJump to search

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':

  1. 0: Delimiter (0x7E)
  1. 1: Protocol: ACK (0x43), PACKET_ACK (0x44) or PACKET_NOACK (0x45)
  1. 2: Sequence number (omitted if protocol is PACKET_NOACK)
  1. 3: Packet type (0x00, omitted if protocol is ACK)
  1. 4: Destination high byte (omitted if protocol is ACK)
  1. 5: Destination low byte (omitted if protocol is ACK)
  1. 6: Source high byte (omitted if protocol is ACK)
  1. 7: Source low byte (omitted if protocol is ACK)
  1. 8: Payload length (omitted if protocol is ACK)
  1. 9: Destination PAN group (omitted if protocol is ACK)
  1. 10: Packet AM type (omitted if protocol is ACK)
  1. 11 .. n-4: Payload (omitted if protocol is ACK)
  1. n-3: CRC-16 low byte
  1. n-2: CRC-16 high byte
  1. n-1: Delimiter (0x7E)