JAWS Specification - Terminal Commands
This provides an overview on the available terminal commands. Command output beginning with a colon is intended for being parsed by the JAWS graphical user interface.
The specifications is only up to date with the newest release on DownloadTheJAWSSoftware
(:toc:)
(:num:)
Topology Manager Commands
coninfo
Sends topology request to get topology information from a node/all nodes.
coninfo [<addr>]
output:
:T <source-addr> <num-entries> :TE <neighbor-addr-1> <con-state> <rssi> :TE <neighbor-addr-2> <con-state> <rssi> ...
<addr> | target address (xx:xx:xx:xx:xx:xx ), if not specified, the topology request is sent to all connected nodes. |
<source-addr> | format xx:xx:xx:xx:xx:xx |
<neighbor-addr-x> | format xx:xx (last 2 bytes) |
<con-state> | 0 : visible/not connected, 1 : neighbor is slave, 2 : neighbor is master, 3 : connection error |
<rssi> | received signal strength, range: -1 (good) to -127 (bad) |
RPC Commands
rpc
Executes remotely a registered rpc function.
rpc <addr> <command>
<addr> | address where the command should be executed. If 00:00:00:00:00:00 or 0 , command will be executed on all nodes (including this node). |
<command> | registered rpc command. If command is not registered it will only be executed locally. |
rpcs
Executes any terminal command remotely. The difference to the rpc
command is, that this rpcs
sends the command and an optional reply as ASCII strings. Therefore any terminal-command (also unregistered) can be called that way. The disadvantage is the transmission overhead of the bulky string data. Arguments are the same as for rpc
.
rpcs <addr> <command>
output (single pkt):
:RP <source-addr> <...data...><endtag>\n
output (single pkt):
:RP <source-addr> <...data...><endtag>\n
output (single pkt):
:RP <source-addr> <...data...><endtag>\n
output (multi pkt message, first n-1-th pkts):
:RP <source-addr> <...data...><breaktag>\n
output (multi pkt message, n-th pkt):
:RP <source-addr> <...data...><endtag>\n
<addr> | address where the command should be executed. If 00:00:00:00:00:00 or 0 , command will be executed on all nodes (including this node). |
<source-addr> | format xx:xx:xx:xx:xx:xx |
<...data...> | captured result string. |
<breaktag> | ='\x03' tag that indicates end of a multi-pkt message that is continued |
<endtag> | ='\x04' tag that indicates end of the message |
Logging Commands
log
Prints logged messages.
log show [<nr_msgs> [<class> [<mask]]]
Deletes all log messages.
log clear
Sets the log-mask to define which events from a specific class should be logged.
log logmask <class> [<mask>]
Sets the verbosity-mask to define which events from a specific class should directly be printed on the terminal when they occur.
log verbosity <class> [<mask>]
TODO: missing description
log get [<id_newer> [<nr_msgs> [<class> [<mask>]]]] log verbosity on log verbosity pause log verbosity resume log verbosity off
<class> | log class defined in source files (example: 5 for connection-manager, complete list in btnut/btnode/include/debug/syslog.h ) |
<mask> | log mask, format xx (example: ff for all logs, 1. bit masks error logs, seconds bit masks warning logs, 3. bit masks info logs, 4. bit masks debug logs) |
slog
Sends the local log to another node.
slog send <addr> [<nr_msgs> [<class> [<mask]]]
output (single pkt):
:SL <addr> <time> <class> <level> <data><endtag>
output (multi pkt message, first n-1-th pkts):
:SL <addr> <time> <class> <level> <data><breaktag>
output (multi pkt message, n-th pkt):
:SL <addr> <time> <class> <level> <data><endtag>
Sets the sendfilter mask, such that events from a specific class are directly sent to the target defined by the slog vtarget
command.
slog verbosity <class> [<mask>]
Sets the target for directly sending events from verbosity classes, that have been set by the slog verbosity
command.
slog vtarget [<addr>]TODO: missing descriptions
slog get <addr> [<id_newer> [<nr_msgs> [<class> [<mask>]]]] slog verbosity on
<addr> | where to send the logs, format xx:xx:xx:xx:xx:xx |
<data> | log message (may contain newlines) |
<endtag> | ='\x04' tag that indicates end of log message |
<breaktag> | ='\x03' tag that indicates end of a multi-pkt message that is continued |
DSN Commands
version
Prints JAWS program version.
dsn get version
output:
:DV <addr> <version>
version | datetime in format: yymmddhhmm |
mode
Prints JAWS mode (gui or dsn mode).
dsn get mode
output:
:DM {gui|dsn}
Sets JAWS mode (needs a reset for changing effectively the running mode). Use this command to configure the local node as normal DSN node or as GUI node. Defines, whether the DSN adapter board or the USB prog adapter board can be attached.
dsn set mode {gui|dsn}
output:
:DM <old_mode>
output after reset:
:DM <new_mode>
power
Returns the power supply status of the DSN node
dsn get power
output:
:DPW <external> <voltage>
<external> | 1: external powered (3.3V) , 0: battery powered |
<voltage> | battery voltage in V |
target
TODO: better description
Prints selected target.
dsn get target
output:
:DTG {none|btnode|tmote|tinynode|a80} <compiled-target>
Sets target.
dsn set target {none|btnode|tmote|tinynode|a80}
output:
:DT {none|btnode|tmote|tinynode|a80} <compiled-target>
<compiled-target> | BTNODE , TMOTE , TINYNODE or A80 |
time
TODO: missing descriptionsdsn get time
output:
:DT <time-millissec>
ping
Resets the watchdog timer. Main task of the DSN server.
dsn ping
output:
:DP <addr> <boot-counter>
Gets the watchdog timeout.
dsn get wdt
output:
:DW <timeout-sec>
Sets the watchdog timeout.
dsn set wdt <timeout-sec>
output:
:DW <timeout-sec>
<bootcounter> | Incremented by each boot up of the BTnode |
traffic
Prints out the traffic (in/out/dropped packets).
dsn get traffic
output:
:DTR <addr> <in> <out> <dropped>
location
Prints the location.
dsn get loc
output:
:DL <addr> <location-string>
Sets the location as string (limited to 16 characters).
dsn set loc <location-string>
Code Distribution Commands
loadhex
Loads program code stored in Intel HEX file to local storage memory.
loadhex <version> [<type> <name>]
output:
ready to receive hex data, press enter for quit
After sending the program hex data:
:LH completed: <x> lines read :LH failed: <reason-code>
<version> | datetime in format: yymmddhhmm |
<type> | 0 : dsn, 1 : target |
<name> | Program name |
xbank
Gets info of program image.
xbank get proginfo
output if no image present:
:XP <source-addr> NP
output if image present:
PI <type> <version> <size> <name>
<type> | 0 : DSN-Image, 1 : Target-Image |
Deletes a stored image.
xbank delTODO: obsolete?, missing description
xbank get status xbank set progname <name> xbank set progtype dsn|tg xbank set progver <ver>
cdist
TODO: better description, difference between run and on?
starts code distribution immediately (automatically called after loadhex
)
cdist run
start/stop code distribution
cdist {on|off}
Target Adapter Commands
flash
Reprogram the target.
tg flash
output:
:TF ok :TF failed: <reason-code>
reset
Resets the target
tg reset
Output:
:TR ok
power
Reads the target power settings and measurements.
tg get power
output:
:TP {on|off|bat} [<voltage-mV> [<current-mA>]]
Sets the target power.
tg set power {on|off|bat}
output:
:TP {on|off|bat}
cmd
Sends an arbitrary command to the target.
tcmd <cmd>
output:
tcmd: ok tcmd: failed <error-code>CVS 2007-03-02
:TC ok :TC failed: <error-code>
Other Commands
blink
Blinks with all four leds.
blink
CVS 2007-03-05
output:
:BL ok
reset
Resets the BTnode.
reset
CVS 2007-03-05
output:
:RS ok
Non-Released Commands
These commands are non-stable and may change without further notice.
BT powerdown
CVS 2007-03-05
CVS 2007-03-29, lpl stuff
Returns the time in seconds until the powerdown phase is over.
dsn get btpwdown
output (during power down phase):
:DBD <seconds> <lpl_interval1> <lpl_interval2>
output (after timeouted power down phase):
:DBD 0 0 <lpl_interval2>
output (during powered up BT):
:DBD 0 0 0
Shutdowns the Bluetooth module for a given time.
dsn set btpwdown <seconds> [<lpl_interval1> [<lpl_interval2>]]
output:
:DBD <seconds> <lpl_interval1> <lpl_interval2> :DBD failed <error-code>
Wakeup powered down nodes in low power listening (LPL) mode (broadcasting/flooding).
dsn ccwakeup
output:
:DCW ok :DCW failed <error-code>
<lpl_interval1> | Low power listening interval (for BT wakeup) during power down phase, 0 (default) means no lpl |
<lpl_interval2> | Low power listening interval (for BT wakeup) after timeouted power down phase, 0 (default) means BT power up, else waiting infinite long for wakeup command |
hops
CVS 2007-03-05
Returns the number of hops to a certain address (at least the root node is returned after receiving the ping).
dsn get hops
output, if empty:
:DH empty
output, if not empty:
:DH <address-1> <hops-1> :DH <address-2> <hops-2> :
target node id
CVS 2007-03-05
Returns TinyOS specific node ID (TOS_LOCAL_ADDRESS or TOS_NODE_ID).
tg get tosnodeid
output if unset:
:TID unset
output if set
:TID <id>
Sets TinyOS specific node ID (0-65534, -1 means unset)
tg set tosnodeid <id>
output:
:TID unset :TID <id> :TID failed
log id
Returns next message log ID.
log id
output:
:LI <id>
debug
output will be never stable/fixed, only for developers
Returns any debug informations.
dsn get debug
output:
:DD <arbitrary-string>