snap node

snap 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

snap [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:

snap node bridge info

snap node info device

Description

Gets device information about the <target> node:
  • Address
  • Feature Bits
  • Device Name
  • Platform
  • Device Type
  • Vendor Settings

Usage

snap [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:

snap node bridge info device

snap node info firmware

Description

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

Usage

snap [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:

snap node bridge info firmware

snap 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

snap [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:

snap node bridge info mcast

snap node info network

Description

Gets network information about the <target> node:
  • Channel
  • Default Radio Rate
  • Network ID
  • Radio LQ Threshold
  • Radio Unicast Retries

Usage

snap [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:

snap node bridge info network

snap node info script

Description

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

Usage

snap [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:

snap node bridge info script

snap 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

snap [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:

snap node bridge info security

snap 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

snap [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:

snap node bridge info stats

snap 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

snap [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:

snap node bridge info uart

snap node info all

Description

Gets all information from the <target> node:
  • Device
  • Firmware
  • Mcast
  • Mesh
  • Network
  • Script
  • Security
  • Stats
  • Summary
  • UART

Usage

snap [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:

snap node bridge info all

snap node traceroute

Description

Performs a traceroute to the target node. Returns the round trip time and link quality information for each hop along the way. See the SNAP Manual for more details on the traceroute process.

Node Traceroute

Usage

snap node <target> traceroute

Positional Arguments

target
SNAP address of target node or bridge

Examples

Traceroute to 00aabb:

snap node 00aabb traceroute

snap node script

Description

Queries the script name and CRC. Erases the script on the target node. Loads the <spy_file> over-the-air on the <target> node.

Usage

snap node <target> script (build | erase | info | upload) [options]

Positional Arguments

target
SNAP address of target node or bridge

Examples

Ask the bridge for its script information:

snap node bridge script info

Erase the script on node 987654:

snap node 987654 script erase

Upload SnapStick.spy on the bridge:

snap node bridge script upload SnapStick.spy

snap node script build

Description

Build the script for the TARGET node. Uses SNAPbuild to compile the script to a SPY file for that node’s module and core.

By default the output .spy/.map files are placed in the current working directory, use -o to override.

Note

This command requires SNAPbuild to be installed

Usage

snap [global options] node <target> script build <script> [-h] [-I include [...]] [-o output]

Positional Arguments

target
SNAP address of target node or bridge
script
The .py SNAPpy script to build.

Options

-I <include> Additional SNAPpy script import path (repeat to include multiple paths)
-o <output_path>
 Path to save the .spy and .map files

Examples

Build SnapStick.py for the bridge node:

snap node bridge script build SnapStick.py

snap node script erase

Description

Erase the script on the <target> node.

Usage

snap [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:

snap node bridge script erase

snap node script info

Description

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

Usage

snap [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:

snap node bridge script info

snap node script upload

Description

Uploads the script to the <target> node. Uses SNAPbuild to compile the script to a SPY file for that node’s module and core. If <script> is already a SPY file, just upload it without rebuilding.

Note

This command requires SNAPbuild to be installed.

Usage

snap [global options] node <target> script upload <script.[s]py> [-h] [-I include [...]]

Positional Arguments

target
SNAP address of target node or bridge
script
The .py SNAPpy script (or .spy SNAPpy script image) to upload to the node.

Options

-I <include> Additional SNAPpy script import path (repeat to include multiple paths)

Examples

Upload SnapStick.py to the bridge node:

snap node bridge script upload SnapStick.py

snap node firmware info

Description

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

Usage

snap [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:

snap node bridge firmware info

snap node firmware upload

Description

Load the specified firmware on the <target> module.

Usage

snap [global options] node <target> firmware upload [-h] (<core> | -f <sfi-file>)

Positional Arguments

target
SNAP address of target node or bridge
core
The version of SNAPcore to load

Options

-f <sfi-file>, --file <sfi-file>
 If firmware support package is not installed, an SFI file path can be provided

Examples

Load the 2.7.2 firmware on node 012345:

snap node 012345 firmware upload 2.7.2

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

snap node 00aabb firmware upload -f RF200_AES128_SnapV2.6.2.sfi

snap 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

snap 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:

snap node bridge energy -n 3 -d 2

snap node reboot

Description

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

Usage

snap 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:

snap node bridge reboot

snap node nvparam

Description

Either reset the <target> node NVParams to factory default, or query the <target> node for the value of NVParam <nvparam_id> and optioanlly set it <value>. Values are parsed like RPC arguments.

You can reference NVParams by name, see snap help nvparam for details.

Warning

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

Usage

snap node <target> (reset | nvparam <nvparam_id> [<value>]...)

Positional Arguments

target
SNAP address of target node or bridge
nvparam_id
The ID (integer or name) of the nvparam
value
If provided, set the nvparam to this value.

Examples

Ask the bridge node for the value of NVParam 128:

snap node bridge nvparam 128

Ask node 123456 for its mesh routing max hop limit:

snap node 123456 nvparam mesh.routing.max-hop-limit

Set NVParam 110 to foo on node 012345:

snap node 012345 nvparam 110 'foo'

Set the multicast forwarded groups on the bridge node to 5:

snap node bridge nvparam mcast.forwarded-groups 5

Read NVParams 0-127 in a single pass:

snap node bridge nvparam all

snap node intercept

Description

Tell the <target> node to start/stop sending its STDOUT and/or STDERR to us

Note

Use the snap network intercept command to listen for the output after telling a node to start.

Usage

snap [global options] node <target> intercept [-h] (start [--out-only | --err-only] | stop)

Positional Arguments

target
SNAP address of target node or bridge

Options

--out-only Send only STDOUT.
--err-only Send only STDERR.

Examples

Ask node 001122 to start sending us both STDOUT and STDERR:

snap node 001122 intercept start

Ask node 001122 to stop sending us output:

snap node 001122 intercept stop

snap 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

snap [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:

snap node bridge move lighting

Move node 001122 to the ‘power’ network:

snap node 001122 move power

snap 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

snap [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:

snap node 00aabb topology -sdc