RobustOS Pro Third-Party Application Development Guide

RobustOS Pro Third-Party Application Development Guide

1. Quick Overview

What is RobustOS Pro?

RobustOS Pro is an embedded Linux distribution based on Debian 11 (bullseye), designed specifically to meet the demanding requirements of industrial IoT gateways, providing a high degree of customization and system optimization. This document is based on RobustOS Pro version 2.4; subsequent firmware versions may have updates.

Core Concept:

RobustOS Pro = Debian 11 + Robustel Proprietary Framework + Pre-configured Gateway Services - Some Standard Components

Core Summary:

If you're familiar with Debian development, you already know 80% of RobustOS Pro; the remaining 20% is Robustel's functional enhancements and architectural adjustments for industrial gateway scenarios.

2. Similarities: Reusable Debian Knowledge

2.1 Fully Retained Core System

ComponentDebian 11RobustOS ProDescription
Package Managerapt/dpkgIdenticalCan use apt install to install standard Debian packages
Service ManagementsystemdIdenticalsystemctl commands and service unit file syntax are identical
Logging SystemjournaldIdenticaljournalctl commands are identical
Device ManagementudevIdenticalSupports udev rules, same hot-plug mechanism
Process CommunicationdbusIdenticalD-Bus interfaces and tools are the same
Shell EnvironmentbashIdenticalBash scripts can run directly
Kernel Interfacesysfs/procfsIdentical/sys, /proc directory structure is standard
System Librariesglibc, openssl, etc.IdenticalStandard library versions match Debian 11

Implications for Developers:

  • Your Debian applications should theoretically run directly on RobustOS Pro.

  • systemd service files can be reused directly.

  • Software packages installed via apt are compatible.

  • Bash or Python scripts can run without modification.

  • System calls and file path specifications are consistent with standard Debian.

2.2 Same Development Toolchain

# The following commands are identical on Debian and RobustOS Pro
apt update && apt install python3-pip
systemctl enable my-app.service
journalctl -u my-app -f
udevadm monitor
dbus-send --system --print-reply ...

Directly Usable Development Technologies:

  • Python 3 (system included)

  • C/C++ compilation toolchain (gcc/g++)

  • Shell scripts (bash/sh)

  • System programming interfaces (POSIX API)

  • Network programming (socket, libcurl)

3. Differences: Robustel's Customizations and Choices

3.1 Architectural Differences

① Added RobustOS Pro Application Framework Layer

Debian 11 Architecture:

Application Layer
  ↓
Debian System Framework (systemd/udev/dbus)
  ↓
Linux Kernel

RobustOS Pro Architecture:

Application Layer
  ↓
RobustOS Pro Application Framework ← New Layer
  ↓
Debian System Framework
  ↓
Linux Kernel

RobustOS Pro Application Framework Provides:

  • Unified Config - Unified configuration system (OpenWRT UCI-like implementation)

  • Router Env Var - Gateway environment variable management

  • Router Message - Inter-application messaging mechanism

  • Auto-Generated Web UI - Automatic Web management interface generation

Impact on Developers:

  • Optional Use: You can completely ignore this framework layer and use standard Debian interfaces directly.

  • Convenient Features: If you need to integrate applications into the Web interface, you can leverage Auto-Generated UI functionality to simplify development.

  • Learning Cost: Deep integration requires learning Robustel's proprietary APIs.

② Added Robustel Proprietary System Services

New Core Services:

Service NamePurposeDeveloper Attention Level
router.serviceRobustOS Pro core daemon (keeper)High - Do not stop this service
watchdog-ros.serviceHardware watchdog (dual watchdog architecture)Medium - Affects system reliability
debsums_check.serviceSoftware package integrity checkLow - Runs automatically in background

Key Precautions:

# Warning: Do not perform the following operations to avoid affecting system stability
systemctl stop router.service
systemctl disable watchdog-ros.service

# Safe operations
systemctl status router.service
journalctl -u router.service

③ Removed or Uninstalled Standard Debian Components

Differences from Standard Debian Server:

ComponentStandard DebianRobustOS ProReason/Alternative
DockerOptional installNot installed by default, can be manually installedCan be installed via apt
systemd-networkdBuilt-inNot usedUses NetworkManager for network management
dhcpcdCommonNot installedNetworkManager's built-in dnsmasq provides DHCP service
firewalld/ufwCommonNot installedUses iptables-based ROSPRO-FIREWALL
chronyd/ntpdRecommended installConfigured via UCITime sync managed uniformly by router service
rsyslogTraditional loggingNot installedFully adopts journald as logging system

Impact on Developers:

  • Docker Requires Manual Installation: Docker is not installed by default, but can be installed via apt (refer to Docker installation guide).

  • Network Management: Network configuration must be done through NetworkManager, not systemd-networkd.

  • Firewall Configuration: Cannot use ufw command, must operate iptables directly.

  • Time Synchronization: Managed by router service through UCI configuration, no need to manually install NTP client.

3.2 Network Management Differences

Debian Standard Practice vs. RobustOS Pro Practice

FunctionDebian Standard PracticeRobustOS Pro Practice
Network Configuration/etc/network/interfaces or systemd-networkdNetworkManager + nmcli
WiFi ConnectionManually edit wpa_supplicant.confnmcli command or Web interface
DHCP ServerInstall isc-dhcp-server or dnsmasqNetworkManager automatically manages dnsmasq
Firewallufw or firewalldDirect iptables operation (ROSPRO-FIREWALL)
VPNManually configure OpenVPN/WireGuardNetworkManager plugin or pre-installed service

NetworkManager configuration notes, please refer to NetworkManager Integration Guide

3.3 Main Firewall System Differences

This difference requires special attention from developers.

Debian Standard Practice

# Usually uses ufw (simplified iptables frontend)
apt install ufw
ufw allow 22/tcp
ufw enable

RobustOS Pro Practice

# Use iptables directly, rules marked as "ROSPRO-FIREWALL"
iptables -L -n -v  # View existing rules

# Add rule example (requires understanding iptables syntax)
iptables -A INPUT -p tcp --dport 8080 -m comment --comment "ROSPRO-FIREWALL" -j ACCEPT

ROSPRO-FIREWALL Features:

  • Zone Isolation: Implements separation management of internal and external zones

  • SYN Flood Protection: Built-in basic attack protection mechanisms

  • QoS Support: Provides bandwidth management and traffic priority control

  • Load Balancing: Supports multi-WAN load balancing

  • Complexity: Configuration requires developers to have some understanding of iptables rule chains

Recommended Practice:

Please refer to Firewall Configuration Guide

3.4 Service Startup Order Differences

Debian Standard Startup Order:

systemd → network.target → multi-user.target → User Services

RobustOS Pro Startup Order:

systemd → router.service → NetworkManager → nginx/ssh → User Services

Key Points:

  • Core service router.service (keeper) starts before NetworkManager.

  • If your service depends on network connectivity, you should explicitly declare dependency on NetworkManager.service in the service unit file.

Service File Example:

[Unit]
Description=My Third-Party Application
# Key dependency: Ensure starts after network is ready
After=network.target NetworkManager.service
Wants=network-online.target

[Service]
Type=simple
ExecStart=/usr/local/bin/my-app
Restart=on-failure

[Install]
WantedBy=multi-user.target

4. Key Differences Developers Need to Understand

4.1 File Path Convention Differences

Standard Debian Paths vs. RobustOS Pro Paths:

PurposeDebian 11RobustOS ProDescription
Service definitions/lib/systemd/system//lib/systemd/system/Same
User services/etc/systemd/system//etc/systemd/system/Same
Configuration files/etc//etc/Same
Log files/var/log/journald (memory/persistent)Recommend using journald for log management
Temporary files/tmp//tmp/Same
Network configuration/etc/network/ or /etc/netplan//etc/NetworkManager/Different

Best Practices:

# Recommended application file storage paths
/usr/local/bin/my-app           # Executable
/etc/my-app/config.yaml         # Configuration file
/var/lib/my-app/data/           # Application data
/lib/systemd/system/my-app.service  # Service definition file

4.2 Network Programming Differences

  • Standard socket programming: Identical

  • HTTP/HTTPS client: Identical (libcurl/requests/axios, etc.)

  • MQTT client: Same (but needs to connect to external broker or self-install)

Differences:

ScenarioDebian 11RobustOS ProNotes
Listening on portsDirect bindNeed to check firewall rulesDefault policy may block external access
Multi-NIC environmentManual route configurationManaged by NetworkManagerDynamic IP addresses may change
Local MQTTInstall mosquittoNeed to connect to external broker or self-installSystem doesn't have pre-installed MQTT broker

Port Listening Example:

# Python Flask application
from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello():
    return "Hello from RobustOS Pro"

if __name__ == '__main__':
    # Listen on port 8080
    app.run(host='0.0.0.0', port=8080)

    # Note: Need to configure firewall rules to allow external access
    # iptables -A INPUT -p tcp --dport 8080 -j ACCEPT

4.3 Hardware Access Differences

Refer to Hardware Interface Quick Usage Guide

4.4 Using RobustOS Pro Application Framework (Optional)

When Do You Need to Use the RobustOS Pro Application Framework?

ScenarioNeed It?Description
Independent background serviceNosystemd alone meets the requirements
Application requiring Web interface managementRecommendedCan leverage Auto-Generated Web UI to quickly create management interface
Needs to interact with native system applicationsYesRecommend using rmsg mechanism for communication
Needs unified application configuration managementRecommendedCan use Unified Config to maintain consistency with system configuration style
Simple data collection applicationNoStandard Debian interface is sufficient

Framework Advantages:

  • Rapid Development: Automatically generate Web interface through declarative configuration, reducing frontend development work.

  • System Integration: Deep integration with NetworkManager, firewall and other system services, providing more unified management experience.

  • Consistency: Maintains consistent user experience with other Robustel native applications.

Learning Cost:

  • First-time use requires 1-2 days to familiarize with framework APIs.

  • Suitable for applications requiring deep system integration.

  • For pure background services, you can completely skip this framework.

5. Summary

5.1 Core Differences Overview

DimensionDebian 11RobustOS ProMigration Difficulty
Package Managementapt/dpkgSameNone
Service ManagementsystemdSameNone
Logging SystemjournaldSameNone
Network Managementsystemd-networkdNetworkManagerLow-Medium
Firewallufw/firewalldiptables (ROSPRO-FIREWALL)Medium
ContainerDocker availableRequires manual installationLow-Medium
Time SyncUsually configuredManaged by router serviceNone
Hardware InterfacesStandard Linux interfacesSameNone
Application DeploymentDocker/systemdBoth Docker/systemd availableLow-Medium

5.2 Quick Decision Tree

Does your application use Docker?
├─ No → Deploy directly, low migration cost
└─ Yes → Two choices:
         ├─ Option 1: Install Docker then run directly (Recommended, lowest migration cost)
         └─ Option 2: Port to systemd service
                    └─ Is application complex?
                        ├─ No → Easy to port
                        └─ Yes → Requires detailed planning

Does your application need special network configuration?
├─ No → No special handling required
└─ Yes → Need to learn NetworkManager and ROSPRO-FIREWALL usage
         └─ Reference docs: NetworkManager Integration Guide, Firewall Configuration Guide

Are you familiar with systemd?
├─ Yes → Quick to start, can complete deployment in 1-2 days
└─ No → Need to learn systemd basics

5.3 Key Precautions Summary

Three Core Differences:

  1. Docker Requires Manual Installation - Docker is not installed by default, but can be used after installation via apt.

  2. Use NetworkManager for Network Management - RobustOS Pro uses NetworkManager instead of systemd-networkd, different network configuration methods.

  3. Uses ROSPRO-FIREWALL - Firewall is based on iptables and managed using ROSPRO-FIREWALL, different configuration method from ufw.

Key Configuration Items:

  1. Understand Firewall Rules - Before opening ports for applications, first check and understand existing firewall rules.

  2. Prohibit Stopping router.service - This is a core system service responsible for managing time sync, network, etc. Stopping this service will cause system anomalies.

Aspects Consistent with Standard Debian:

  1. Package Management: Fully compatible with apt package management.

  2. Service Management: systemd service file syntax remains consistent.

  3. Logging System: journald logging system is same as standard Debian.

  4. Hardware Interfaces: GPIO/I2C and other hardware interfaces follow standard Linux specifications.

  5. Development Environment: Compatible with mainstream development environments like Python/C/C++.

6. FAQ

Q1: Can I directly reference Debian tutorials?

A:

  • Yes: Debian tutorials on system programming, systemd service management, logging system (journald), etc. can be directly applied.

  • Need Adjustments: Network configuration and firewall configuration parts must refer to RobustOS Pro guides, using NetworkManager and iptables instead of the interfaces file or ufw commonly seen in Debian tutorials.

Q2: How to use Docker on RobustOS Pro?

A: Please refer to Docker Deployment Guide

Q3: How to configure network?

A: Please refer to NetworkManager Integration Guide

Q4: How to debug my application?

A:

# 1. View service status
systemctl status myapp

# 2. View real-time logs
journalctl -u myapp -f

# 3. View recent error logs
journalctl -u myapp -p err

# 4. View logs for specified time period
journalctl -u myapp --since "5 minutes ago"

# 5. Manual run for testing
systemctl stop myapp
/usr/bin/python3 /path/to/app.py  # Run executable directly, view terminal output

Q5: Does my application need to integrate into the Web interface?

A: This is optional and depends on your specific needs:

Scenarios Not Needing Web Interface:

  • Pure background data processing service

  • Scheduled tasks

  • Hardware interface service

  • Data forwarding proxy

Scenarios Recommended for Web Interface Integration:

  • Services requiring user parameter configuration

  • Need to provide status monitoring and management functions

  • Need to interact with other Robustel native functions

Advantages of Not Integrating:

  • Shorter development cycle (no need to learn RobustOS framework).

  • Greater application independence.

  • You can also deploy an independent Web interface yourself (e.g., through nginx reverse proxy).

Refer to Web Service Integration Guide

Q6: Will Robustel's proprietary services affect my application?

A: Usually will not cause impact, but note the following:

Safe to Run Scenarios:

  • Your application only uses standard Debian interfaces.

  • Application does not modify system core configuration files.

  • Application does not conflict with router.service or watchdog functionality.

Scenarios Requiring Attention:

  • Modifying network configuration: Operations may conflict with NetworkManager.

  • Modifying firewall rules: Need to follow ROSPRO-FIREWALL management approach.

Basic Principles:

  • Prohibit stopping or disabling router.service.

  • Prohibit stopping or disabling watchdog-ros.service.

  • Allow viewing logs and status of these services.

  • Allow interacting with these services through

    • Related Articles

    • RobustOS Pro SDK

      Robustel's router allows 3rd party to develop their applications. We provide a Software Development Kit (SDK), which offers a simple and fast way to implement customer-specific functions and applications. This SDK is compatible with EG5100, LG5100, ...
    • NetworkManager Integration Guide

      1. Overview This document provides guidance for third-party application developers working on network-related development on RobustOS Pro devices. RobustOS Pro uses NetworkManager (NM) as its core network management service and provides two primary ...
    • RobustOS Pro Application Development Getting Started

      Preface 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. System Architecture ...
    • Edge Gateway Main Page

      Edge Gateway Configuration & Development Your central hub for mastering Robustel Edge Gateways, tailored for developers and system integrators. From basic device configuration to advanced application development and third-party integration, find the ...
    • RobustOS Pro SDK - Quick Start Guide

      Prerequisites Before you begin, ensure you have: Hardware: One of the supported RobustOS Pro devices (EG5100, LG5100, R1520LG, EV8100, EG5101, EG5200, EG5120, or EG3110) Network Access: SSH access to your device User Account: A sudo user account on ...