Welcome to RobustOS Pro! This guide provides a step-by-step roadmap for understanding, developing, and deploying applications on the platform.
This document is only applicable to RobustOS Pro 2.4.x firmware versions.
RobustOS Pro is an embedded Linux operating system built on Debian 11, designed for industrial-grade reliability and modern IIoT (Industrial Internet of Things) development.
It harnesses the full power of standard Linux, while significantly simplifying the development lifecycle, deployment, and maintenance of industrial applications.
No Proprietary SDK Dependency — Develop directly with standard Debian tools, libraries, and workflows, ensuring a seamless learning curve for any experienced Linux developer.
Modern Development Experience — Leverage familiar technologies such as Docker, Python, Node.js, and other mainstream frameworks to accelerate innovation.
Decoupled Layered Architecture — We enforce a clean, strict separation between your Workloads and the underlying hardware. This enables simplified upgrades, flexible customization, and guarantees long-term maintainability.
Your applications will run alongside several key system services. Understanding them helps with troubleshooting and avoiding conflicts.
| Service Name | Primary Purpose | Notes |
|---|---|---|
| router.service | RobustOS Pro core service, coordinating network, configuration, firewall, etc. | Prohibition Note: It is strictly prohibited to stop or disable this core service. |
| NetworkManager.service | Core Networking Service — Manages and maintains all critical network interfaces and connections. | If your application needs to configure networks, please refer to NetworkManager Integration Guide |
| nginx.service | System's built-in web server. The system's web administration interface uses ports 80/443 by default. | If your application needs a web interface, please refer to Web Service Integration Guide for RobustOS Pro |
| systemd | Standard Linux initialization system and service manager. | Your application can be packaged as a systemd service for auto-start on boot. |
| ssh.service | Provides secure remote command-line access. | In production environments, it's recommended to change the default port, disable password login, and use key-based authentication instead. |
| systemd-journald.service | Collects and manages system logs. | Troubleshooting: The primary method for troubleshooting system issues is by using the journalctl command to view collected logs. |
| ModemManager | Manages cellular network modules (Modem) and connections. | Closely related to cellular network functionality. |
| dbus.service | Provides system-level inter-process communication (IPC) mechanism. | Communication Foundation: Serves as the underlying mechanism for Inter-Process Communication (IPC), enabling many system services (e.g., NetworkManager, ModemManager) to interact. |
| chirpstack.service chirpstack-gateway-bridge.service chirpstack-rest-api.service | Provides LoRaWAN network server functionality. | Present only on devices equipped with LoRa functionality. |
| postgresql.service | Relational database service. | Used by specific applications (ChirpStack) for data persistence. Present only on devices equipped with LoRa functionality. |
| redis-server.service | In-memory data storage service. | Used by specific applications (ChirpStack) for caching and task queues. Present only on devices equipped with LoRa functionality. |
| mosquitto.service | MQTT message broker service. | Used by specific applications (ChirpStack), providing publish/subscribe messaging model. Present only on devices equipped with LoRa functionality. |
Before you begin development and test, it is essential to correctly set up the physical connections for your device. This includes connecting the power supply, antennas, and any necessary cables (e.g., Ethernet, serial).
The system itself is a standard Debian 11 environment. You can install development tools and libraries via apt.
# Install C/C++ compilation tools and Python package manager
sudo apt-get update
sudo apt-get install build-essential python3-pip
Depending on your application's complexity and integration requirements, you can choose from the following two development approaches:
Description: Develop directly using languages like Python, C/C++, Go, just as you would on a standard Debian server. This is the simplest and most flexible approach. If you have application source code from other Linux platforms (especially ARM architecture), you can recompile it directly on the device or use a cross-compiler for Debian armhf/arm64.
Applicable Scenarios: Rapid prototyping, background services, applications that don't need to integrate with system web UI.
How to Start: You can refer to hardware access and status query example code in subsequent chapters and use systemd or Docker for deployment.
Detailed guide: Debian-Based Application Development Guide
Description: Use the officially provided C language SDK, and quickly generate a complete project framework through the scaffolding tool (create_app.sh).
Advantages: Automatically handles logging, signals, packaging, and can easily integrate into the system's web UI (through UCI/USI configuration files), greatly simplifying the development process.
Applicable Scenarios: Applications that need to provide configuration and status pages in the system web UI, C language applications that need deep interaction with system services.
Detailed guide: RobustOS Pro SDK - Quick Start Guide
| Deployment Method | View Status | View Real-time Logs | Enter Environment for Debugging |
|---|---|---|---|
| Debian Package (Systemd) | systemctl status my-app | journalctl -u my-app -f | - |
| Docker Container | docker ps | docker logs -f my-container | docker exec -it my-container /bin/bash |
General Tip: Before packaging your application as a service, run your program directly in an SSH terminal to see its output and error messages directly.
⚠️ The system's default admin user is not a standard shell environment. You need to add a sudo user and connect via SSH to execute shell commands.
Steps for adding a sudo user, please refer to: RobustOS Pro Adding Development Users Guide
This approach is suitable for background services that need to auto-start on boot. The standard process is to create a .deb package containing a systemd service file.
Core Steps:
Write your application.
Write a .service file defining how to start and manage your application.
Create a postinst post-installation script that uses systemctl enable and systemctl start to enable and start your service.
Use debuild or other tools to package the above files into a .deb file.
Detailed guide: Systemd Integration Guide for Robustel Gateway
Docker container deployment provides excellent environment isolation and dependency management.
Core Steps:
Write your application.
Write a Dockerfile to define how to build the application's container image.
(Optional but recommended) Write a docker-compose.yml file to define how to run the container (such as port mapping, device mapping, etc.).
Detailed guide: Deploying Applications with Docker on RobustOS Pro
For large-scale deployments, the ability to efficiently replicate a mature application and configuration solution across hundreds or thousands of devices is critical to success.. RobustOS Pro provides a system cloning feature to address various bulk deployment scenarios.
The system cloning feature can create a complete system snapshot (clone package) for a configured "template gateway", which includes all installed applications, system configurations, and data.
Using the clone package, you can achieve two deployment scenarios:
This is our strongly recommended bulk deployment method, especially suitable for large-scale production.
After your application is developed and tested on a prototype, you can create a clone package and provide it to Robustel. Your application and configuration will be pre-installed on devices directly during the factory production stage. Devices are ready to use out of the box without requiring manual configuration per device, greatly improving deployment efficiency and reliability.
This approach is suitable for small-batch deployment or unified configuration after devices have been distributed.
You can create a clone package and then use USB recovery to execute recovery commands on target devices one by one, restoring them to the exact same state as the template gateway.
In either scenario, the first step is to create a clone package.
Prepare Template Gateway: On one gateway, install all necessary applications (e.g., .deb packages, Docker images, etc.) and complete all system configurations.
Create Clone Package: Connect an ext4-formatted USB drive to the gateway, then execute the following command via SSH:
# <usb_mount_point> is usually /media/sda1 or similar path
sudo rbt-system-mgmt clone create -D <usb_mount_point>
This command will generate a .tar.gz format clone package file in the USB drive's root directory.
If you choose Scenario 1, please provide this file to Robustel.
If you choose Scenario 2, continue to the next step.
sudo rbt-system-mgmt clone restore <path_to_clone_package.tar.gz>
Detailed operation guide: Creating a System Clone Package Operation Guide
Applications access hardware through standard Linux file I/O.
| Interface | Device File Path | Access Method |
|---|---|---|
| Serial Port | /dev/ttyCOMx | Standard serial port programming (e.g., Python's pyserial library) |
| Digital Input (DI) | /dev/DIx | Read input events through evdev library |
| Digital Output (DO) | /sys/class/leds/doX/brightness | Write "1" or "0" |
Detailed guide: RobustOS Pro Hardware Interface Quick Usage Guide
⚠️ Docker Container Hardware Access: To grant a Docker container access to hardware, use the --device parameter when starting the container, such as --device=/dev/ttyCOM1:/dev/ttyCOM1.
The simplest and most reliable way to obtain device status is to use the usi (Unified Status Interface) command.
Core Pattern: First sync (synchronize), then get (retrieve).
| Common Status | Query Command (Example) |
|---|---|
| Serial Number (SN) | sudo usi get system.serial_number |
| Network IP Address | sudo usi sync wan_links sudo usi get active_link.ip |
| Cellular Signal Strength | sudo usi sync cellular sudo usi get cellular.status[1].rsrp |
| GPS Latitude | sudo usi sync gps sudo usi get gps.latitude |
Detailed guide: RobustOS Pro Device Status Query Manual (USI)
Refer to the following sections if your application needs to manage system functions or interact with system services.
# Example: Set static IP
sudo uci set wan_links.link[1].ipv4.connection_type manual
sudo uci set wan_links.link[1].ipv4.address "192.168.1.100/24"
sudo uci commit
Warning: Changes made directly with nmcli or by modifying .nmconnection files are temporary and will be automatically overwritten when system network configuration has uci changes, potentially causing network interruption.
Detailed guide: NetworkManager Integration Guide
Recommended Approach: For simple port opening, use uci to add firewall rules.
Advanced Approach: For complex iptables rules, it's recommended to create custom scripts in the /tmp/fw.d/ directory.
Detailed guide: RobustOS Pro Firewall Configuration Guide
Approach 1: Independent Port: Let your application listen directly on a non-conflicting port (such as 8080), users access via http://:8080. If your application needs to use the default web ports (80/443), you must first reconfigure the system's administration UI to use different ports. Modification method, please refer to RobustOS Pro UCI Configuration Manual
Approach 2: Nginx Reverse Proxy (Recommended): Let your application listen on a local port (such as 5000), then configure Nginx to proxy traffic from https:///myapp/ to http://127.0.0.1:5000.
Nginx proxy configuration example (/etc/nginx/server_common_conf/myapp.conf):
location /myapp/ {
proxy_pass http://127.0.0.1:5000/; # Proxy to your application's address
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
Detailed guide: Web Service Integration Guide for RobustOS Pro
All of the above configurations may involve modifying system UCI configuration. For detailed UCI configuration options, please refer to: RobustOS Pro UCI Configuration Manual