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


1. Topology Manager Commands


1.1. 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)

2. RPC Commands


2.1. 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.

2.2. 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

3. Logging Commands


3.1. 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)

3.2. 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

4. DSN Commands


4.1. version

Prints JAWS program version.

dsn get version

output:

:DV <addr> <version>
versiondatetime in format: yymmddhhmm

4.2. 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>

4.3. 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

4.4. 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

4.5. time

TODO: missing descriptions

dsn get time

output:

:DT <time-millissec>

4.6. 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

4.7. traffic

Prints out the traffic (in/out/dropped packets).

dsn get traffic

output:

:DTR <addr> <in> <out> <dropped>

4.8. 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>

5. Code Distribution Commands


5.1. 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

5.2. 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 del
TODO: obsolete?, missing description
xbank get status
xbank set progname <name>
xbank set progtype dsn|tg
xbank set progver <ver>

5.3. 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}

6. Target Adapter Commands


6.1. flash

Reprogram the target.

tg flash

output:

:TF ok
:TF failed: <reason-code>

6.2. reset

Resets the target

tg reset

Output:

:TR ok

6.3. 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}

6.4. 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>

7. Other Commands


7.1. blink

Blinks with all four leds.

blink

CVS 2007-03-05
output:

:BL ok

7.2. reset

Resets the BTnode.

reset

CVS 2007-03-05
output:

:RS ok

8. Non-Released Commands


These commands are non-stable and may change without further notice.

8.1. 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

8.2. 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>
           :

8.3. 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

8.4. log id

Returns next message log ID.

log id

output:

:LI <id>

8.5. debug

output will be never stable/fixed, only for developers
Returns any debug informations.

dsn get debug

output:

:DD <arbitrary-string>