Announcements‎ > ‎

Managing SWAP networks from the command line

posted Oct 10, 2014, 9:54 AM by Daniel Berenguer
The original SWAPdmt tool, the graphical version, showed up that sometimes maintaining multi-platform graphical application is not so simple. Not being a GUI-guy, I've also found some problems to add new functionality or make the tool more user friendly and simpler to install. Since the latest evolution of wxPython for Windows 7 and 8 I decided to invest all these development efforts in a less ambitious application but with higher functionality and flexibility.

SWAPdmt-cmd introduces the following new functionality:

  1. Control of regular endpoints
  2. Wireless upload of firmware (only for NRG modules)
  3. Remote restart of nodes

The new command-line tool is maybe less seductive but it's still easy to use. It's by far simpler to install on all platforms since it only needs Python 2.6/2.7, pyserial and pyswap. No more need to install wXPython or wxWidgets. You simply start an interactive session with "python" and start running commands from the terminal.

>> help
SWAPdmt commands and syntax:

help                         Print help
quit                         Quit application
traffic <on|off>             Print or hide SWAP traffic
hexfile <path to hex file>   Enter hex file for SWAP firmware upgrade
list nodes                   Print list of nodes detected in the SWAP network
clear nodes                  Clear list of nodes detected in the SWAP network

node <addr> channel [<new_channel>]          Print or set RF channel of node
node <addr> netid [<new_netid>]              Print or set SWAP network ID of node
node <addr> address [<new_addr>]             Print or set SWAP address of node
node <addr> txinterval [<new_interval>]      Print or set Tx interval of node
node <addr> reg <reg_id> [<new_reg_value>]   Print or set register value
node <addr> details                          Print product details of node
node <addr> restart                          Restart node (if it's not sleeping)
node <addr> program                          Program node wirelessly with hex file

This wiki page introduces SWAPdmt-cmd and shows how to install and use the application