Presentation is loading. Please wait.

Presentation is loading. Please wait.

TOS Message Format Test: Display Raw Data Packet.

Similar presentations


Presentation on theme: "TOS Message Format Test: Display Raw Data Packet."— Presentation transcript:

1 TOS Message Format Test: Display Raw Data Packet

2 Test Raw Data Packet(1) Prepare two motes. Compile TOSBase and program to the 1 st mote. Compile OscilloscopeRF and program to the 2 nd mote. Connect the serial cable to the 1 st mote.

3 Start cygwin and type the following. –cd /opt/tinyos-1.x/tools/java –java net.tinyos.tools.ListenRaw COM1 (result 1) –java net.tinyos.tools.Listen (result 2)

4 Result 1

5 Result 2

6 Display result on oscilloscope java net.tinyos.oscope.oscilloscope If the result is not on display, press “scrolling.”

7

8 TOS Message Format(1) Sync byte –Indicate the boundary of the TOS message –0x7E is used –What if the sync byte is included in the payload data? Use 0x7D as an escape character Ex, 0x7D 0x7E –What if the escape character is included in the payload data? Exclusive OR the character after 0x7D. Ex. 0x7E -> 0x7D 0x5E 0x7D.? 0x7D 0x5D Refer to RFC 1662 sync byte packet type packet data 1 byte1

9 TOS Message Format(2) Packet type –0x42: user packet not requiring ACK –0x41: user packet requiring ACK –0x40: response packet to 0x41 –0xFF: packet without any format Users can define any packet type that is not specified in advance.

10 address Address: 007E or FFFF –0x007E : UART (serial port) –0xFFFF: broadcast –TOS_LOCAL_ADDRESS Make zigbex reinstall.# (# is a mote ID.) sync byte packet type packet data addressCRC message type group ID data length data 2 11 12

11 Message type AMTYPE_XUART = 0x00 AMTYPE_MHOP_DEBUG = 0x03 AMTYPE_SURGE_MSG = 0x11 AMTYPE_XSENSOR = 0x32 AMTYPE_XMULTIHOP = 0x33 AMTYPE_MHOP_MSG = 0xFA

12 Group ID Default is 0x7D User can define the group ID in the Makefile as the following: –DEFAULT_LOCAL_GROUP = 0xgid (gid = from 0 to ff)


Download ppt "TOS Message Format Test: Display Raw Data Packet."

Similar presentations


Ads by Google