RawSerial
Introduction
RawSerial is a command-line (non graphical) tool that allows you to send arbitrary payloads to the API of a SmartMesh IP mote or manager.
It connects to:
- The SmartMesh IP manager
- The SmartMesh IP mote in slave mode
Running
You can run the RawSerial application:
- by double-clicking on the Windows executable at
/win/RawSerial.exe
- by double-clicking on its source files at
/src/
bin/RawSerial/NetworkHealth.py
(may require additional steps on non-windows OSes)
Description
The RawSerial application allow the user to send API commands as raw hex bytes to a mote or manager and see the responses. It does not perform HDLC encoding.
To see a list of commands, use the help
command:
Raw Serial Application - (c) Dust Networks SmartMesh SDK 1.0.5.138 > help Available commands: - help (h): print this menu - info (i): information about this application - quit (q): quit this application - uptime (ut): how long this application has been running - connect (c): connnect to a serial port - baudrate (b): set the baudrate - tx (tx): transmit a number of bytes, represented in hexadecimal (e.g. "ab12eb44") >
As an example, use the connect
command to connect to the manager's API port:
> connect COM11 > opening COM11 connected successfully
The manager will begin sending mgrHello packets:
rxByte: 7e rxByte: 00 rxByte: 03 rxByte: 00 rxByte: 02 rxByte: 04 rxByte: 00 rxByte: 9b rxByte: 38 rxByte: 7e
You can use HdlcTool to decapsulate (to Raw) the response and confirm that it is a mgrHello.
You can then use the tx
command to send a Hello packet. You can use the HdlcTool to do the encapsulation (to HDLC) of the raw API payload.
> tx 7e00010003040000f7ce7e >
This will cause the manager to respond with a helloResponse packet. Again you can use HdlcTool to decapsulate the response.
rxByte: 7e rxByte: 00 rxByte: 02 rxByte: 00 rxByte: 05 rxByte: 00 rxByte: 04 rxByte: 00 rxByte: 00 rxByte: 00 rxByte: e3 rxByte: dc rxByte: 7e
At this point you can issue other raw API commands.