toolbelt node

toolbelt node call directed-multicast

Description

Callback Directed Multicast RPC (This is a convenience alias for toolbelt rpc call directed-multicast to a single target.)

Usage

toolbelt [global options] node <target> call (d | dm | directed-multicast) <func> [<args>...] [-h] [-g <group>] [-t <ttl>] [-d <delay>] [-c <callback-name>]

Positional Arguments

target

SNAP address of target node or bridge

func

Name of function to call on targets

args

A list of arguments to pass to the function (space-delimited, use quotes to pass an argument with whitespace.)

Options

-g <group>, --group <group>

Override the Network’s default multicast group

-t <ttl>, --ttl <ttl>

Override the Network’s default multicast TTL

-d <delay>, --delay <delay>

Specify a response delay in milliseconds from the targets, default is 0

-c <name>, --callback-name <name>

Specify which function will be called on a response from the targets

-w <wait>, --wait <wait>

Callback reply timeout/wait between attempts (ms)

-a <attempts>, --attempts <attempts>

Number of attempts

Examples

Directed Multicast a request for getInfo(5) to 123456, ask it to delay its response in a 100ms window:

toolbelt node 123456 call dm getInfo 5 --delay 100

toolbelt node call unicast

Description

Callback Unicast RPC (This is a convenience alias for toolbelt rpc call unicast to a single target.)

Usage

toolbelt [global options] node <target> call (u | unicast) <func> [<args>...] [-h] [-c <callback-name>] [-w <wait>] [-a <attempts>]

Positional Arguments

target

SNAP address of target node or bridge

func

Name of function to call on target

args

A list of arguments to pass to the function (space-delimited, use quotes to pass an argument with whitespace.)

Options

-c <name>, --callback-name <name>

Specify which function will be called on a response from the targets

-w <wait>, --wait <wait>

Callback reply timeout/wait between attempts (ms)

-a <attempts>, --attempts <attempts>

Number of attempts

Examples

Unicast a request for getInfo(5) to 123456.

toolbelt node 123456 call u getInfo 5

Ask the bridge node vmStat(6), expect it to return its result via tellVmStat:

toolbelt rpc node bridge call u vmStat 6 --callback-name tellVmStat

toolbelt node eeprom peek

Description

Peeks a single byte from EEPROM

Usage

toolbelt node <target> eeprom peek [options] <address>

Positional Arguments

target

SNAP address of target node or bridge

address

Address to peek in EEPROM. Can be -1 to -4096 (SNAP peek addressing), or 0 to 4095 (EEPROM address).

Examples

Peek byte 4000 in EEPROM.

toolbelt node bridge eeprom peek 4000

Peek byte 1023 in EEPROM, using SNAP peek addressing

toolbelt node bridge eeprom peek -- -1024

toolbelt node eeprom poke

Description

Poke a single byte to EEPROM

Usage

toolbelt node <target> eeprom poke [options] <address> <value>

Positional Arguments

target

SNAP address of target node or bridge

address

Address to poke in EEPROM. Can be -1 to -4096 (SNAP peek addressing), or 0 to 4095 (EEPROM address).

value

Value (integer byte) to poke into EEPROM.

Examples

Poke 42 into byte 3084 in EEPROM.

toolbelt node bridge eeprom poke 3084 42

toolbelt node eeprom read

Description

Read a range of bytes from EEPROM as a string.

Usage

toolbelt node <target> eeprom read <start> <length>

Positional Arguments

target

SNAP address of target node or bridge

start

Start address of range to read in EEPROM. Can be -1 to -4096 (SNAP peek addressing), or 0 to 4095 (EEPROM address).

length

Number of bytes to read from EEPROM.

Examples

Read 19 bytes starting at address 4037 in EEPROM.

toolbelt node bridge eeprom read 4037 19

toolbelt node eeprom write

Description

Write a range of bytes to EEPROM.

Usage

toolbelt node <target> eeprom write <start> <value>

Positional Arguments

target

SNAP address of target node or bridge

start

Start address of range to write in EEPROM. Can be -1 to -4096 (SNAP peek addressing), or 0 to 4095 (EEPROM address).

value

Bytes to write into EEPROM

Examples

Write "SENSE-OMNI-S       " to EEPROM, starting at address 4036.

toolbelt node bridge eeprom write 4036 "SENSE-OMNI-S       "

Write "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" to EEPROM, starting at address 900, using SNAP peek addressing.

toolbelt node bridge eeprom write -- -901 "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"

toolbelt node energy

Description

Performs an energy scan on a node across all of its channels and returns a list of “clear percentages”. These percentages can be used to determine the least noisy channel to use for communication.

Usage

toolbelt node <target> energy [options]

Positional Arguments

target

SNAP address of target node or bridge

Options

-n <number>, --num_queries <number>

Perform <number> queries and average the results

-d <delay>, --delay <delay>

Wait for <delay> seconds between queries

-c <cutoff>, --cutoff <dbm>

Cutoff value for the dBm floor

Examples

Ask the bridge node to scan 3 times, waiting 2 seconds between scans:

toolbelt node bridge energy -n 3 -d 2

toolbelt node expect

Description

Expect an RPC by regex from a single node, with a timeout.

Usage

toolbelt [global options] node <target> expect <func_re> [-t <timeout>]

Positional Arguments

func_re

RPC function regex

Options

-t, --timeout <timeout>

Seconds to wait for RPC to arrive [default: 30]

Examples

Expect a button RPC from 00da7a, with a 10 second timeout:

toolbelt node 00da7a expect button -t 10

toolbelt node firmware info

Description

Gets firmware information about the <target> node:
  • Core Version

  • Platform

  • Platform Category

Usage

toolbelt [global options] node <target> firmware info [-h]

Positional Arguments

target

SNAP address of target node or bridge

Examples

Ask the bridge node for its firmware information:

toolbelt node bridge firmware info

toolbelt node firmware upload

Description

Load the specified firmware file on the <target> module.

Usage

toolbelt [global options] node <target> firmware upload [-h] <sfi-or-gbl-file>

Positional Arguments

target

SNAP address of target node or bridge

<sfi-or-gbl-file>

The SNAPcore firmware for the target node.

Examples

Load the RF200_AES128_SnapV2.6.2.sfi firmware on node 00aabb:

toolbelt node 00aabb firmware upload RF200_AES128_SnapV2.6.2.sfi

toolbelt node info

Description

Get summary information about the <target> node. By default it queries:
  • Current Channel (i.e. “Where is this node now?”)

  • Current Network ID

  • NVParam Channel (i.e. “Where will this node go if it’s rebooted?”)

  • NVParam Network ID

  • Feature Bits

  • Vendor settings

  • Encryption Type

  • Lockdown Bitmask

  • Current Script Name

  • Current Script CRC

  • Current Firmware version

  • Current Firmware category

Usage

toolbelt [global options] node <target> info [-h] [summary]

Positional Arguments

target

SNAP address of target node or bridge

Examples

Ask the bridge node for its summary information:

toolbelt node bridge info

toolbelt node info all

Description

Gets all information from the <target> node:
  • Device

  • Firmware

  • Mcast

  • Mesh

  • Network

  • Script

  • Security

  • Stats

  • Summary

  • UART

Usage

toolbelt [global options] node <target> info all [-h]

Positional Arguments

target

SNAP address of target node or bridge

Examples

Ask the bridge node for all its information:

toolbelt node bridge info all

toolbelt node info device

Description

Gets device information about the <target> node:
  • Address

  • Feature Bits

  • Device Name

  • Platform

  • Device Type

  • Vendor Settings

Usage

toolbelt [global options] node <target> info device [-h]

Positional Arguments

target

SNAP address of target node or bridge

Examples

Ask the bridge node for its device information:

toolbelt node bridge info device

toolbelt node info firmware

Description

Gets firmware information about the <target> node:
  • Core Version

  • Platform

  • Platform Category

Usage

toolbelt [global options] node <target> info firmware [-h]

Positional Arguments

target

SNAP address of target node or bridge

Examples

Ask the bridge node for its firmware information:

toolbelt node bridge info firmware

toolbelt node info mcast

Description

Gets mcast information about the <target> node:
  • Carrier Sense

  • Collision Avoidance

  • Collision Detect

  • CS/CD Threshold

  • CSMA Settings

  • Multicast Forwarded Groups

  • Multicast Processed Groups

  • Serial Multicast Forwarded Groups

Usage

toolbelt [global options] node <target> info mcast [-h]

Positional Arguments

target

SNAP address of target node or bridge

Examples

Ask the bridge node for its mcast information:

toolbelt node bridge info mcast

toolbelt node info network

Description

Gets network information about the <target> node:
  • Channel

  • Default Radio Rate

  • Network ID

  • Radio LQ Threshold

  • Radio Unicast Retries

Usage

toolbelt [global options] node <target> info network [-h]

Positional Arguments

target

SNAP address of target node or bridge

Examples

Ask the bridge node for its network information:

toolbelt node bridge info network

toolbelt node info script

Description

Gets script information about the <target> node:
  • Script CRC

  • Script Name

Usage

toolbelt [global options] node <target> info script [-h]

Positional Arguments

target

SNAP address of target node or bridge

Examples

Ask the bridge node for its script information:

toolbelt node bridge info script

toolbelt node info security

Description

Gets security information about the <target> node:
  • Encryption Type

  • Lockdown Bitmask

Note

The Encryption Key is intentionally not queried or displayed. (If you can talk to the node, you already have the correct encryption key.)

Usage

toolbelt [global options] node <target> info security [-h]

Positional Arguments

target

SNAP address of target node or bridge

Examples

Ask the bridge node for its security information:

toolbelt node bridge info security

toolbelt node info stats

Description

Gets stats from the <target> node:
  • Null Transmit Buffers

  • Transparent Receive Buffers

  • Transparent Transmit Buffers

  • UART0 Receive Buffers

  • UART0 Transmit Buffers

  • UART1 Receive Buffers

  • UART1 Receive Buffers

  • Packet Serial Forwarded Unicasts

  • Packet Serial Forwarded Multicasts

  • Packet Serial Receive Buffers

  • Packet Serial Transmit Buffers

  • Radio Forwarded Unicasts

  • Radio Forwarded Multicasts

  • Radio Receive Buffers

  • Radio Transmit Buffers

Usage

toolbelt [global options] node <target> info stats [-h]

Positional Arguments

target

SNAP address of target node or bridge

Examples

Ask the bridge node for its stats:

toolbelt node bridge info stats

toolbelt node info uart

Description

Gets UART information from the <target> node:
  • Buffering Threshold

  • Buffering Timeout

  • Default UART

  • Intercharacter Timeout

  • UART0 Default Baud Rate

  • UART1 Default Baud Rate

Usage

toolbelt [global options] node <target> info uart [-h]

Positional Arguments

target

SNAP address of target node or bridge

Examples

Ask the bridge node for its UART information:

toolbelt node bridge info uart

toolbelt node move

Description

Moves the <target> node to the specified <network>. You must be able to reach the node on the current network. If the <target> node is the bridge, this command also updates the “last used” network for the current profile to the <target> network.

Usage

toolbelt [global options] node <target> move [-h] <network>

Positional Arguments

target

SNAP address of target node or bridge

network

Name of SNAP Network the node should move to.

Examples

Move the bridge to the ‘lighting’ network:

toolbelt node bridge move lighting

Move node 001122 to the ‘power’ network:

toolbelt node 001122 move power

toolbelt node nvparam

Description

Query the <target> node for the value of NVParam <nvparam_id> and optioanlly set it <value>. Values are parsed like RPC arguments.

Warning

The changes do not take effect until you reboot the node, see toolbelt node reboot

Usage

toolbelt node <target> nvparam <nvparam_id> [<value>]...

Positional Arguments

target

SNAP address of target node or bridge

nvparam_id

The ID (integer, see NV Parameters) of the nvparam

value

If provided, set the nvparam to this value.

Examples

Ask the bridge node for the value of NVParam 128:

toolbelt node bridge nvparam 128

Set NVParam 110 to foo on node 012345:

toolbelt node 012345 nvparam 110 'foo'

Read NVParams 0-127 in a single pass:

toolbelt node bridge nvparam all

See Also

toolbelt node reboot

Description

Ask the target node to reboot, with an optional <delay>

Usage

toolbelt node <target> reboot [<delay>]

Positional Arguments

target

SNAP address of target node or bridge

delay

Optional milliseconds the node should wait between receiving the RPC and actually rebooting.

Examples

Reboot the bridge node:

toolbelt node bridge reboot

toolbelt node script erase

Description

Erase the script on the <target> node.

Usage

toolbelt [global options] node <target> script erase [-h]

Positional Arguments

target

SNAP address of target node or bridge

Examples

Erase the script from the bridge node:

toolbelt node bridge script erase

toolbelt node script info

Description

Gets script information about the <target> node:
  • Script CRC

  • Script Name

Usage

toolbelt [global options] node <target> script info [-h]

Positional Arguments

target

SNAP address of target node or bridge

Examples

Ask the bridge node for its script information:

toolbelt node bridge script info

toolbelt node script turboload

Description

Uploads a SPY file (SNAPpy image) to the <target> node. You must provide the SPY file, SNAPtoolbelt does not attempt to compile the script. Use SNAPcompiler to compile a SNAPpy script to a SNAPpy image.

Warning

The turboload method only works for MG24-based modules directly attached to a serial link. It works by boosting the baud rate of the link during the upload, up to 2Mbaud.

Usage

toolbelt [global options] node <target> script turboload <script.spy> [-b <baud-rate>] [-h]

Positional Arguments

target

SNAP address of target node or bridge

script

The .spy (SNAPpy image) to upload to the node.

Options

-b, --baud-rate <baud-rate>

Baud rate to use for turbo [default: 2000000] [possible values: 115200, 230400, 500000, 1000000, 2000000]

Examples

Upload SnapStick.spy to the bridge node using this method:

toolbelt node bridge script turboload SnapStick.spy

toolbelt node script upload

Description

Uploads a SPY file (SNAPpy image) to the <target> node. You must provide the SPY file, SNAPtoolbelt does not attempt to compile the script. Use SNAPcompiler to compile a SNAPpy script to a SNAPpy image.

Usage

toolbelt [global options] node <target> script upload <script.spy> [-h]

Positional Arguments

target

SNAP address of target node or bridge

script

The .spy (SNAPpy image) to upload to the node.

Examples

Upload SnapStick.spy to the bridge node:

toolbelt node bridge script upload SnapStick.spy

toolbelt node script unicast-upload

Description

Uploads a SPY file (SNAPpy image) to the <target> node using unicast RPCs. You must provide the SPY file, SNAPtoolbelt does not attempt to compile the script. Use SNAPcompiler to compile a SNAPpy script to a SNAPpy image.

Usage

toolbelt [global options] node <target> script unicast-upload <script.spy> [-h]

Positional Arguments

target

SNAP address of target node or bridge

script

The .spy (SNAPpy image) to upload to the node.

Examples

Upload SnapStick.spy to the bridge node:

toolbelt node bridge script unicast-upload SnapStick.spy

toolbelt node send directed-multicast

Description

Send Directed Multicast RPC (This is a convenience alias for toolbelt rpc send directed-multicast to a single target.)

Usage

toolbelt [global options] node <target> send (d | dm | directed-multicast) <func> [<args>...] [-h] [-g <group>] [-t <ttl>] [-d <delay>]

Positional Arguments

target

SNAP address of target node or bridge

func

Name of function to call on targets

args

A list of arguments to pass to the function (space-delimited, use quotes to pass an argument with whitespace.)

Options

-g <group>, --group <group>

Override the Network’s default multicast group

-t <ttl>, --ttl <ttl>

Override the Network’s default multicast TTL

-d <delay>, --delay <delay>

Specify a response delay in milliseconds from the targets, default is 0

Examples

Send node 001122 the RPC getData(17, 'blue', 22):

toolbelt node 001122 send dm getData 17 'blue' 22

toolbelt node send unicast

Description

Send Unicast RPC (This is a convenience alias for toolbelt rpc send unicast.)

Usage

toolbelt [global options] node <target> send (u | unicast) <func> [<args>...] [-h]

Positional Arguments

target

SNAP address of target node or bridge

func

Name of function to call on targets

args

A list of arguments to pass to the function (space-delimited, use quotes to pass an argument with whitespace.)

Examples

Send ping() to the bridge node:

toolbelt node bridge send u ping

toolbelt node topology

Description

Asks the target node to acquire its immediate topology (census of immediate neighbors). Returns a map of edges and link qualities.

Node Topology

Usage

toolbelt [global options] node <target> topology [-h] [-d [-c]] [-s]

Positional Arguments

target

SNAP address of target node or bridge

Options

-d, --dot

Output DOT digraph format

-c, --colorize-lq

When rendering DOT format, colorize edges based on link quality. (>-30 dBm is excellent, <-80 dBm is bad)

-s, --simplify

Merge digraph into undirected graph by averaging A->B and B->A link qualities.

Examples

Ask 00aabb for its topology in simplified DOT form, with colors:

toolbelt node 00aabb topology -sdc