Getting Started with Cradlepoint Router Applications / SDK

« Go Back



The first step in mastering the Cradlepoint Router Applications / SDK is to understand that it means learning to program in Python. In the future that will change, but lets be honest and realistic - creation of an SDK by any company takes time and evolution.

Open BETA - begining August 9, 2016: You can enable Router Apps/SDK in your own account

As before, the firmware and ECM are released and not "BETA" - our ability to support large numbers of people trying it is limited; support is still in "BETA".

Enable Router Apps in ECM

To enable SDK functionality a root account administrator needs to go to the TOOLS tab from the ECM menu and check the Enabled checkbox under the Router Apps section.

Use ECM to enable Development Mode on your router

By default, Router Apps/SDK is handled on an ECM group level - you upload a prepared code bundle, and apply to a group.
However, this would not be suitable for development on your desk. Therefore, you can enable a local development mode, which enables direct code upload using Secure-Copy (SCP) and Syslog debug output.

Obtain the Router Apps/SDK sample tools

The tools which package you code, plus sample code examples, are shared on GITHUB:

Install the appropriate Python version on your computer

As of Router firmware 6.1, Cradlepoint Routers are running Python version 3.5.1. For common Python applications, you can use any modern form of Python 3.x, so 3.3, 3.4, or 3.5. Since you load source code within the SDK archive, the exact version is unimportant; if you need to include a standard module such as FTPLIB or ZIPFILE, then you should select the 3.5.1 version. In the future, the Cradlepoint Router FW will change - so the version will change over time.
  • Since Windows does not include any "standard" python, you can install any version desired - install 3.5.1.
  • Linux is harder, as Linux includes an assumed version of Python 3. Ubuntu 14.04 LTS assumes Python 3.4, which is fine for general work. Trying to change Ubuntu to use 3.5 is a fools mission, as too many utilities assume Python 3.4 is used. My suggestion is to install Python 3.5.1, but do not bother trying to make it the default. Rather, do your testing under 3.4 (the default), but when you need to include a standard module (like FTPLIB or ZIPFILE), then copy it from the Python 3.5.1 instead of generic Linux "python3".
  • Mac-OS is a derivative of Linux.

Walk Through a Simple Hello World Example

  • open a command/terminal window
  • make sure your program search path includes the appropriate location of the Python binary
    • As proof, if you type "python", a interactive session will open.
    • Don't work about the AMD64 - calls the 32-bit version 'X86' and the 64-bit AMD64, but both run on AMD or Intel processors.
    • Close this - it was only a test!
           Python 3.5.1 (v3.5.1:37a07cee5969, Dec  6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)] on win32
           Type "help", "copyright", "credits" or "license" for more information.
  • Change directory (CD) to the root of the sample code and tools.
  • if you need syslog, you can run the ./tools/ script in a separate window. This turns your PC into a syslog server.
  • Edit the text file named ./config/settings.ini to define your local router details:
    • section [logging]
      • syslog_ip=x.x.x.x (enter the IP of your PC. You can also use /dev/log, but I have found this tends to drop logging output if you generate too much too fast. So I have it sent directly to my PC)
    • section [router_api]
      • user_name=admin (likely this is okay)
      • password=441a819c (or whatever your password is)
      • interface=?? (likely you can comment this out - so make "; interface=". This is used by tools/ on a multi-homed PC to auto-detect routers, and so on)
    • the remaining defaults should be okay.
    • run the command "python -m status", and you should see some information from your router.
         D:\root>python -m status
         INFO:make:Cradlepoint router is model:IBR1150LPE
         INFO:make:Cradlepoint router FW version:6.1
         INFO:make:Checking SDK status on router(
         INFO:make:SDK status check successful
         INFO:make:SDK Service Status:started
         INFO:make:SDK Summary:Service started
         INFO:make:SDK Router is in DEV MODE
         INFO:make:SDK - No Apps Installed
  • If there are any errors:
    • make sure your router is available
    • the correct IP & password is in the config/settings.ini file
    • your router is both in "development mode", and has been hard rebooted at least once. The reboot is critical to actually start the SDK management task
  • After running, the file /config/settings.json might exist - don't edit this, as freely rewrites it!
  • run the command "python -m build simple.hello_world"
  • run the command "python -m install"
    • The only output from this sample is text lines to your Syslog server.

Installing Router Apps to a Group in ECM

  • ​Under Available Router Apps click Add
  • Browse to a previously built Router App file and click Upload
User-added image
  • Once the app shows under the Available Router Apps list go the the GROUPS tab from the left hand menu
  • Select your group (with firmware 6.1 or later) to install the app on
  • Click Commands > Manage Router Apps
  • Click Add and select your App from the list of available apps
  • Click OK, then click Yes, then click Done to install the app to the group
User-added image
  • Go to TOOLS from the left hand menu and your app should now show Yes in the column named Installed On Group


Learn Python

There are many online resources for learning Python.

Developer Community

Click here for access to Cradlepoint's Developer Community.

Knowledge Home | Product