Installation

Requirements

Be sure to follow the General Setup procedures to install all of the necessary requirements before installing the package.

Install via pip

Within the virtual environment use pip to install SNAPtoolbelt:

pip install --extra-index-url https://update.synapse-wireless.com/pypi snaptoolbelt

Try it out:

snap version

Optional Steps

There are a few optional steps that you may need when using SNAPtoolbelt.

Autocompletion

To make use of autocompletion in a bash shell, a bash-completion script is available using the following command:

source $(snap autocomplete)

The script will attempt to tab-complete commands, profiles, networks, and nodes you’ve talked to recently. You can also link the autocomplete script to your /etc/bash_completion.d/ (or /usr/local/etc/bash_completion.d/):

$ ln -s $(snap autocomplete) /etc/bash_completion.d/

Encryption

To talk to AES-128 encrypted networks, you will also need to install PyCrypto. Within the virtual environment use pip to install PyCrypto:

(ENV) pip install pycrypto

Note

Windows Users: Installing pycrypto requires the Microsoft Visual C++ Compiler for your installed version of Python.

Building SNAPpy Scripts

To build SNAPpy scripts, you will also need to install SNAPbuild and related SNAPcore firmware packages:

(ENV) pip install -i https://update.synapse-wireless.com/pypi snapbuild snap-firmware-2.7.2

Note

You will need to install package that matches the version of SNAPcore you are using.

Use Outside of Virtualenv

You can use SNAPtoolbelt outside its virtualenv by specifying the full path (or adding it to your own $PATH):

~/.virtualenvs/snaptoolbelt/bin/snap version

You can also symlink from the virtualenv to /usr/local/bin:

ln -s ~/.virtualenvs/snaptoolbelt/bin/snap /usr/local/bin/