Skip to content

cradlepoint/sdk-samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,130 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ericsson Cradlepoint NCOS SDK

Extend your Ericsson routers with custom Python applications.

The NCOS SDK enables developers to build and deploy Python applications that run directly on Ericsson Cradlepoint NetCloud OS (NCOS) routers. Create custom logic for connectivity management, IoT data collection, monitoring, automation, and more—without replacing hardware.


Why Custom Applications on Ericsson Routers?

  • Extend without hardware changes — Add new capabilities through software while your existing Ericsson/Cradlepoint fleet stays in place.
  • Access router internals — Query modem signal strength, WAN status, GPS, connected clients, and system metrics via a Python API.
  • Integrate with your stack — Push data to cloud platforms (Azure IoT, Splunk, MQTT), trigger alerts, or automate workflows based on router state.
  • Deploy at scale — Build once, distribute via NetCloud Manager to thousands of devices with group-based assignment.
  • Standard Python — Use familiar libraries and patterns; the SDK provides a simple cp module for router interaction.

Resources

Resource Link
Pre-built sample apps Releases — built_apps
NCOS SDK Developers Guide Documentation
NetCloud Manager — SDK apps Tools Tab

Sample Applications

Ready-to-use applications you can install from the releases page. Each app includes source code for reference and customization.

Application Catalog

Sample Application Descriptions

  • 5GSpeed
    • Run Ookla speedtests via NCM API. Results are put in asset_id field (configurable in SDK Data). Clearing the results starts a new test. This can be done easily via NCM API v2 /routers/ endpoint.
    • Download: 5GSpeed v0.2.0.tar.gz
  • Autoinstall
    • Automatically choose fastest SIM on install. On bootup, AutoInstall detects SIMs, and ensures (clones) they have unique WAN profiles for prioritization. Then the app collects diagnostics and runs Ookla speedtests on each SIM. Then the app prioritizes the SIMs WAN Profiles by TCP download speed. Results are written to the log, set as the description field, and sent as a custom alert. The app can be manually triggered again by clearing out the description field in NCM.
    • Download: AutoInstall v1.0.0.tar.gz
  • Installer_UI
  • Mobile_Site_Survey
    • Field survey tool that runs speedtests and collects modem diagnostics with GPS locations, uploading results for network coverage and throughput analysis to 5g-ready.io
    • Download: Mobile_Site_Survey v3.0.2.tar.gz
  • Motorola
    • Integrates with Motorola SmartConnect by broadcasting WAN and VPN status as UDP beacons on configured LANs.
    • Download: Motorola v1.2.0.tar.gz
  • app_template
  • app_holder
  • cli_sample
    • Includes csterm module that enables access to local CLI to send commands and return output.
    • Download: cli_sample v1.0.3.tar.gz
  • clients
    • Puts the LAN clients in the asset_id field, or specify another field in SDK Appdata.
    • Download: clients v1.0.0.tar.gz
  • client_rssi_monitor
  • cp_shell
  • cpu_usage
    • Gets cpu and memory usage information from the router every 30 seconds and writes a csv file to a usb stick formatted in fat32.
    • Download: cpu_usage v0.2.0.tar.gz
  • cs_explorer
    • A web based application for exploring config store (CS) data. Runs on http://ROUTER_IP:9002 by default.
    • Download: cs_explorer v1.0.0.tar.gz
  • dead_reckoning
  • ddns
    • Updates a dynamic DNS hostname with the IP address of the WAN device matching specified WAN profile.
    • Download: ddns v1.0.0.tar.gz
  • dynamic_app
    • Downloads apps from a self hosted url and install into app_holder app. Overcome limitates with dev_mode and app size limits.
    • Download: dynamic_app v1.0.3.tar.gz
  • daily_speedtest
  • encrypt_appdata
    • Uses ECC encryption to automatically encrypt app data values that start with specific prefixes (enc_, secret_, password_, or encrypt_).
    • Download: encrypt_appdata v1.0.0.tar.gz
  • ftp_client
  • ftp_server
    • Creates an FTP server in the device. A USB memory device is used as the FTP directory.
    • Download: ftp_server v2.0.0.tar.gz
  • geofences
    • Send alert when entering or exiting geofences. Configure geofences in SDK app data after loading app.
    • Download: geofences v1.0.0.tar.gz
  • gpio_any_wan_connected
  • gpio_sample
  • gpio_wlan_control
  • hello_world
  • hspt
  • ibr1700_gnss
  • ibr1700_obdII
  • iperf3
    • Downloads and runs iPerf3 to a user defined server and puts results in asset_id. Clear the asset_id to run a new test.
    • Download: iperf3 v1.0.0.tar.gz
  • ipverify_custom_action
  • logfile
    • Writes router logs to flash available for download via HTTP/LAN Manager.
    • Download: logfile v0.4.0.tar.gz
  • mosquitto
  • mqtt_app
  • mqtt_app_tls
  • mqtt_azure_client
  • mqtt_azure_tls
    • Sample Application which uses SDK to send sensor data to Microsoft Azure IoT Central over TLS connection.
    • Download: mqtt_azure_tls v2.0.0.tar.gz
  • ncx_self_provision
  • OBDII_monitor
    • Monitor OBD-II values, put latest values in asset_id, and alert on conditions defined in SDK AppData.
    • Download: OBDII_monitor v1.0.2.tar.gz
  • ping_sample
  • ports_status
  • power_alert
  • power_dashboard
    • A comprehensive real-time power usage monitoring application for Cradlepoint routers that tracks current, total energy consumption, and voltage with a professional web interface. Optional power indicator message in asset ID.
    • Download: power_dashboard v1.4.0.tar.gz
  • python_module_list
    • This app will log the python version and modules in the device. It is intended to help with app development to show the python environment within the device.
    • Download: python_module_list v2.0.0.tar.gz
  • rate_limit
  • rproxy
    • A reverse proxy similar to port forwarding, except traffic forwarded to a udp/tcp target will be sourced from the router's IP. This reverse proxy can be dynamically added to clients as they connect.
    • Download: rproxy v0.0.15.tar.gz
  • s400_userio
  • shell_sample
  • send_to_server
  • serial_temp
  • signal_alert
    • Monitors modem signal metrics on all connected modems and sends NetCloud alerts with GPS when any metric goes below its threshold. Sends one alert when signal crosses below and one when it recovers (after 60 seconds above threshold).
    • Download: signal_alert v0.1.0.tar.gz
  • simple_custom_dashboard
    • Creates a simple dashboard using HTML and JS. Note that any 'server function' requires the router firewall to be correctly changed to allow client access to the router.
    • Download: simple_custom_dashboard v2.0.0.tar.gz
  • simple_web_server
    • A simple web server to receive messages. Note that any 'server function' requires the router firewall to be correctly changed to allow client access to the router.
    • Download: simple_web_server v2.0.0.tar.gz
  • splunk_conntrack
  • splunk_log_filter
  • system_monitor
  • system_monitor_web
    • A comprehensive real-time system monitoring application for Cradlepoint routers that tracks both memory and CPU usage with customizable alert thresholds and a professional web interface.
    • Download: system_monitor_web v1.0.0.tar.gz
  • tailscale
    • A 3rd party mesh VPN called Tailscale that makes it easy to connect your devices, wherever they are. This application provides a way to proxy traffic from the LAN to the Tailscale network. See the README.md for more information.
    • Download: tailscale v0.0.36.tar.gz
  • timezone_via_gnss
    • An app to read the device's GNSS data and send a request to timezonedb.com in order to return and set time device's timezone.
    • Download: timezone_via_gnss v0.1.0.tar.gz
  • tornado_sample
  • throttle_cellular_datacap
    • Upon any Modem interface reaching 100% of the monthly data capacity limit, manual QoS will be enabled globally and bandwidth throttling will be enforced on ALL Modem profiles to the configured limit (minbwup and minbwdown variables).
    • Download: throttle_cellular_datacap v1.1.0.tar.gz
  • throttle_cellular_datacap_rate_tiered
    • Upon any Modem interface reaching 70, 80, 90 or 100% of the monthly data capacity limit, manual QoS will be enabled globally and bandwidth throttling will be enforced on ALL Modem profiles to the configured limit as set by the rate tier (minbwup and minbwdown variables).
    • Download: throttle_cellular_datacap_rate_tiered v1.1.0.tar.gz
  • tunnel_modem_reset
  • usb_alerts
  • wan_dashboard
  • wan_rate
    • Tracks WAN bandwidth rates over time and stores rolling averages in a configurable field.
    • Download: wan_rate v1.0.0.tar.gz
  • wan_ip_change_alert
    • Tracks the WAN IP address and sends an alert when it changes. Includes a confirmation delay to prevent false alerts from temporary IP changes.

    • Download: wan_ip_change_alert v1.4.0.tar.gz



Quick Start — make.py

The make.py tool manages the full lifecycle of SDK applications: create, build, install, and maintain.

Usage

python make.py <action> [app_name]

Actions

Action Description
create Create a new application from the app_template directory. Example: python3 make.py create my_new_app
build Produce a distributable application archive (.tar.gz). Use all to build every app.
install Securely copy the built archive to a locally connected NCOS device (requires SDK DEV mode).
status Retrieve and print the current status of the app on the device.
uninstall Remove the application from the locally connected NCOS device.
purge Remove all installed applications from the device.
update Update core SDK helper files (cp.py, cp_methods_reference.md, make.py, etc.) from the upstream repository.

Examples

# Create a new app
python3 make.py create my_new_app

# Build a single app
python3 make.py build my_new_app

# Build all apps
python3 make.py build all

# Clean artifacts for all apps
python3 make.py clean all

Prerequisites

  • Python 3 is required.
  • SSH access (scp/ssh) to the target NCOS device is required for install, start, stop, uninstall, purge, and status.
  • The NCOS device must be in SDK DEV mode via registration and licensing with NetCloud Manager.
  • Any directory containing a package.ini file is treated as an application.
  • Run python3 make.py help for full help from the tool.

Key Files

File Description
cp.py The Python library used in applications to communicate with the router (NCOS).
cp_methods_reference.md Reference for all available methods/functions when importing cp.py.
make.py The main tool for managing application packages: create, build, install, uninstall, start, stop, purge, and update.
sdk_settings.ini Configuration settings used by make.py (device connection, app name, etc.).
tools/bin Contains pscp.exe for Windows-based transfers.

Code Example

import cp

# Get router uptime
uptime = cp.get_uptime()
cp.log(f"Router uptime: {uptime} seconds")

# Get connected clients
clients = cp.get_ipv4_lan_clients()
cp.log(f"Total clients: {len(clients)}")

# Get device location
lat_long = cp.get_lat_long()
if lat_long:
    cp.log(f"Device location: {lat_long}")

# Get connected WANs
wans = cp.get_connected_wans()
cp.log(f"Connected WANs: {len(wans)}")

# Get SIM information
sims = cp.get_sims()
cp.log(f"SIM details: {sims}")

See the cp_methods_reference for the full API.


License

This software, including any sample applications, and associated documentation (the "Software"), are subject to the Cradlepoint Terms of Service and License Agreement available at https://cradlepoint.com/terms-of-service ("TSLA").

NOTWITHSTANDING ANY PROVISION CONTAINED IN THE TSLA, CRADLEPOINT DOES NOT WARRANT THAT THE SOFTWARE OR ANY FUNCTION CONTAINED THEREIN WILL MEET CUSTOMER'S REQUIREMENTS, BE UNINTERRUPTED OR ERROR-FREE, THAT DEFECTS WILL BE CORRECTED, OR THAT THE SOFTWARE IS FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT ANY WARRANTIES OF ANY KIND. ANY USE OF THE SOFTWARE IS DONE AT CUSTOMER'S SOLE RISK AND CUSTOMER WILL BE SOLELY RESPONSIBLE FOR ANY DAMAGE, LOSS OR EXPENSE INCURRED AS A RESULT OF OR ARISING OUT OF CUSTOMER'S USE OF THE SOFTWARE. CRADLEPOINT MAKES NO OTHER WARRANTY, EITHER EXPRESSED OR IMPLIED, WITH RESPECT TO THE SOFTWARE. CRADLEPOINT SPECIFICALLY DISCLAIMS THE IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT.

Copyright © 2018 Cradlepoint, Inc. All rights reserved.

About

Cradlepoint team sample code and tools

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 17

Languages