The document walk through the steps in installing the Cradlepoint Router Apps/SDK under Linux - specifically Ubuntu 14.04 LTS.
Optional: Install Python 3.5.1
The Cradlepoint routers use 3.3, but will soon use 3.5.1. However, since you are loading your Router App/SDK with Python source (text files), matching the exact version is not critical. Since Linux treats Python 3 as a critical part of the OS, trying to change versions is an advanced topic! Ubuntu 14.04 defaults to use version 3.4.3, which is not ideal but close enough to 3.3 or 3.5 to be adequate. As you work, try to keep your usage as generic as possible, making it easier to reuse your code on other versions of Python. Also, be warned that a future Cradlepoint firmware which change to a newer version, such as Python 3.6. So some day, you will need to migrate your SDK code.
The only reason you will need v3.5.1, is if you wish to include standard public modules like ftplib, which is omitted from the Cradlepoint router firmware. In this case, you can install Python 3.5 for access and reference, but I would still avoid trying to use "by default" under Ubuntu.
Install Suggested Tools
PyCharm IDE – Community Version
You'll create your code the fastest, and avoid the most stupid bugs by using a quality Python-aware tool such as PyCharm. There is a Linux version, but be warned it requires Java to be installed
This section is a work in progress! Most of OpenSSL is already installed in Ubuntu, however you will need to add a few development libraries to allow Python to add specific extra modules.
- Run "sudo apt-get install libffi-dev"
- Run "sudo apt-get install libssl-dev"
- Run "sudo apt-get install sshpass" (not part of OpenSSL, but allows make.py to use SSH without asking your password always)
PIP (how public Python extensions are managed)
PIP comes preinstalled in Python 3.5, but requires manual installation in Python 3.3 or 3.4. PIP is a smart tool which understands module dependencies.
Normally, you can use PyCharm to install PIP-supported modules. However, you can speed your work by manually installing the following:
- Open a Terminal Window
- Start by confirming your PIP is the latest.
- Run "sudo apt-get install python3-pip" (do not get "python-pip", as this will be Python v2.7!)
- Periodically, run "sudo python3 -m pip install -U pip" to confirm you have the latest version.
Once your PIP is running properly, then use it to add these modules:
- Serial port support: Run "sudo python3 -m pip install -U pyserial"
- Router API access: Run "sudo python3 -m pip install -U requests"
- For digital signing: Run "sudo python3 -m pip install -U cryptography"