This document serves as a general reference manual for the UCI configuration interface of the Robustel RobustOS Pro system.
Important Notice: UCI configuration parameters vary depending on device model and firmware version. The parameter lists, value ranges, and default values in this document are for reference only. Please refer to your actual device for specific configuration parameters and support ranges.
It's recommended to verify before configuration by:
Using sudo uci print to view the current device's actual configuration
Logging into the Web management interface to view supported configuration options (recommended)
Checking configuration definition files in the /etc/router/uci/ directory
UCI (Unified Configuration Interface) is the unified configuration interface for the RobustOS Pro system, used to manage all device configuration parameters. UCI provides a standardized set of command-line tools for reading, modifying, and saving configurations.
Configuration file storage location: /app/config/config.xml
Configuration parameter definitions: /etc/router/uci/*.xml
Permission requirements: All UCI commands require root privileges or sudo
UCI Command Behavior Characteristics:
Checks if all required parameters are set
Verifies if parameter values are within allowed ranges
Only saves to configuration file after passing validation
uci get command: Can only read configurations that have been committed; newly set but uncommitted configurations cannot be read via get
List operations: Dynamic lists (such as firewall rules, GPS servers, etc.) need to use uci add to add list items first, then use uci set to set parameters
Configuration validation failure troubleshooting:
If uci commit fails, use sudo journalctl -t uci -f to view error details in real-time
Error logs will clearly indicate which parameter is missing or invalid
See Chapter 6 "Troubleshooting" for details
# View all UCI configuration
sudo uci print
# View specific configuration item
sudo uci get <module>.<parameter>
# Example
sudo uci get vrrp.enable
# Set single parameter
sudo uci set <module>.<parameter> <value>
# Example
sudo uci set vrrp.enable true
# Get list item (index starts from 1)
sudo uci get <module>.<list>[<index>].<field>
# Example
sudo uci get wan_links.link[1].type
# Add list item (need to specify ID, ID is usually the next sequence number of the list)
sudo uci add <module>.<list> <id>
# Example: Add firewall custom rule
sudo uci add firewall.custom_list 3
sudo uci set firewall.custom_list[3].desc "My Rule"
sudo uci set firewall.custom_list[3].family ipv4
sudo uci set firewall.custom_list[3].rule " -A INPUT -p tcp --dport 8080 -j ACCEPT"
# Example: Add GPS server
sudo uci add gps.server 1
sudo uci set gps.server[1].enable true
sudo uci set gps.server[1].protocol "tcp_client"
sudo uci set gps.server[1].server_addr "192.168.1.100"
sudo uci set gps.server[1].server_port 9000
# Example: Add DHCP static lease
sudo uci add lan_links.static_lease_list 1
sudo uci set lan_links.static_lease_list[1].interface "br_lan"
sudo uci set lan_links.static_lease_list[1].mac "00:11:22:33:44:55"
sudo uci set lan_links.static_lease_list[1].ip "192.168.1.100"
# Delete list item
sudo uci del <module>.<list> <index>
# Example
sudo uci del firewall.custom_list 2
# Save all UCI configuration to disk
sudo uci commit
Note: The following module list covers most functions supported by Robustel devices. Different device models may support different modules, and some modules may not be available on specific models. Please refer to your actual device configuration.
cellular - Cellular network configuration
wan_links - WAN link configuration
lan_links - LAN link configuration
ethernet - Ethernet port configuration
wireless - Wireless network configuration
vlan - VLAN configuration
bridge - Bridge configuration
openvpn - OpenVPN configuration
ipsec - IPSec VPN configuration
dmvpn - DMVPN configuration
gre - GRE tunnel configuration
pptp - PPTP VPN configuration
l2tp - L2TP VPN configuration
wireguard - WireGuard VPN configuration
firewall - Firewall configuration
webfilter - Web content filtering
access_control - Access control
ssh - SSH service configuration
route - Static routing configuration
policy_route - Policy routing configuration
vrrp - VRRP virtual router redundancy
qos - QoS quality of service configuration
ddns - Dynamic DNS configuration
ntp - Time synchronization service
serial_port - Serial port configuration
dido - Digital input/output configuration
gps - GPS configuration
ai - Analog input configuration
system - Basic system configuration
devcfg - Device configuration
user_management - User management
web_server - Web server configuration
syslog - System log configuration
snmp - SNMP configuration
sms - SMS configuration
email - Email notification configuration
event - Event management configuration
smart_roaming - Smart roaming configuration
rcms - RCMS cloud management configuration
captive_portal - Captive portal configuration
software_update - Software update configuration
backup_restore - Backup and restore configuration
reboot - Reboot schedule configuration
do_scheduler - DO scheduler
bluetooth - Bluetooth configuration
usb - USB configuration
Important Reminder: The parameter lists, types, value ranges, and default values provided in this chapter are for reference only. Due to differences in device models and firmware versions:
Some parameters may not exist on specific devices
Parameter value ranges may be adjusted with firmware versions
Default values may differ by device model
Please refer to your actual device, use sudo uci print or Web interface to view the current device's actual configuration
Module Path: cellular
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| primary_sim | enum | sim1, sim2 | sim1 | Primary SIM card selection |
| auto_switch | bool | true, false | true | Enable SIM card failover |
| auto_switch_return | bool | true, false | false | Enable SIM card fallback |
| auto_switch_time | int | 1..65535 | 30 | Fallback interval (minutes) |
| switch_by_signal | bool | true, false | false | Switch by signal strength |
| switch_while_roaming | bool | true, false | false | Switch SIM while roaming |
Command Examples:
# View primary SIM configuration
sudo uci get cellular.primary_sim
# Set primary SIM to sim2
sudo uci set cellular.primary_sim sim2
# Enable SIM auto-switch
sudo uci set cellular.auto_switch true
# Set fallback interval to 60 minutes
sudo uci set cellular.auto_switch_time 60
# Save configuration
sudo uci commit
Module Path: cellular.sim[index] (index starts from 1)
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| id | int | 1..2 | - | SIM card index |
| card | enum | sim1, sim2 | - | SIM card slot |
| auto_apn | bool | true, false | true | Automatic APN selection |
| apn | string | - | internet | Access Point Name |
| username | string | - | - | Username |
| password | string | - | - | Password (encrypted) |
| auth_type | enum | none, chap, pap | chap | Authentication type |
| phone_number | string | - | - | Phone number |
| pin_code | string | 4-8 digits | - | PIN code |
| network_type | enum | auto, 2g_only, 3g_only, 4g_only, 5g_sa_only, 5g_nsa_only | auto | Network type |
| band_select_type | enum | all, specify | all | Band selection type |
| mtu | int | 1280..1500 | 1500 | MTU size |
| auto_mtu | bool | true, false | true | Automatic MTU |
| ip6_enable | bool | true, false | false | Enable IPv6 |
| traffic | bool | true, false | true | Traffic statistics |
| data_allowance | int | 0..2147483647 | 0 | Data allowance (MB, 0=disabled) |
| billing_day | int | 1..31 | 1 | Billing day |
| debug_enable | bool | true, false | true | Enable debug |
Command Examples:
# View SIM1 APN settings
sudo uci get cellular.sim[1].apn
# Set SIM1 APN
sudo uci set cellular.sim[1].auto_apn false
sudo uci set cellular.sim[1].apn "cmnet"
sudo uci set cellular.sim[1].username "user"
sudo uci set cellular.sim[1].password "pass"
sudo uci set cellular.sim[1].auth_type "chap"
# Set network type to 4G first
sudo uci set cellular.sim[1].network_type "4g_first"
# Set data allowance to 10GB
sudo uci set cellular.sim[1].data_allowance 10240
# Save configuration
sudo uci commit
Module Path: cellular.sim[index].band_settings
Important Notice: The supported frequency bands differ across device models. The list below contains common frequency bands. Please refer to the Web UI of your actual device for the supported bands.
Supported band parameters include:
GSM Bands:
WCDMA Bands:
LTE Bands:
5G NSA Bands:
5G SA Bands:
Command Examples:
# Set band selection type to specify
sudo uci set cellular.sim[1].band_select_type specify
# Enable specific LTE bands
sudo uci set cellular.sim[1].band_settings.lte_band1 true
sudo uci set cellular.sim[1].band_settings.lte_band3 true
sudo uci set cellular.sim[1].band_settings.lte_band7 true
sudo uci set cellular.sim[1].band_settings.lte_band20 true
# Save configuration
sudo uci commit
Module Path: wan_links.link[index]
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| id | int | 1..10 | - | Link index |
| name | string | 3-32 chars | - | Link name |
| type | enum | modem, ethernet, vlan, wifi | - | Link type |
| interface_modem | enum | wwan | - | Modem interface |
| interface_ethernet | enum | eth0, eth1 | - | Ethernet interface |
| interface_vlan | enum | - | - | VLAN interface |
| interface_wifi | enum | wlan0 | - | WiFi interface |
| desc | string | - | - | Description |
| weight | int | 0..10 | 0 | Weight (0=not in load balancing) |
| firewall_zone | enum | external, internal | external | Firewall zone |
Command Examples:
# View first WAN link type
sudo uci get wan_links.link[1].type
# Set WAN link weight
sudo uci set wan_links.link[1].weight 5
# Set WAN link description
sudo uci set wan_links.link[1].desc "Primary WAN"
# Save configuration
sudo uci commit
Module Path: wan_links.link[index].ipv4
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| connection_type | enum | dhcp, pppoe, manual, disabled | dhcp | Connection type |
| address | string | IP/netmask | - | IPv4 address (manual mode) |
| gateway | string | IP address | - | Gateway (manual mode) |
| dns1 | string | IP address | - | Primary DNS (manual mode) |
| dns2 | string | IP address | - | Secondary DNS (manual mode) |
| pppoe_username | string | - | - | PPPoE username |
| pppoe_password | string | - | - | PPPoE password |
Command Examples:
# Set to DHCP mode
sudo uci set wan_links.link[1].ipv4.connection_type dhcp
# Set to static IP mode
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 set wan_links.link[1].ipv4.gateway "192.168.1.1"
sudo uci set wan_links.link[1].ipv4.dns1 "8.8.8.8"
sudo uci set wan_links.link[1].ipv4.dns2 "8.8.4.4"
# Set to PPPoE mode
sudo uci set wan_links.link[1].ipv4.connection_type pppoe
sudo uci set wan_links.link[1].ipv4.pppoe_username "user@isp.com"
sudo uci set wan_links.link[1].ipv4.pppoe_password "password"
# Save configuration
sudo uci commit
Module Path: wan_links.link[index].ping
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| enable | bool | true, false | true | Enable ping detection |
| ip4_primary_server | string | IP/Domain | 8.8.8.8 | IPv4 primary server |
| ip4_secondary_server | string | IP/Domain | 1.2.4.8 | IPv4 secondary server |
| ip6_primary_server | string | IPv6/Domain | 2001:4860:4860::8888 | IPv6 primary server |
| ip6_secondary_server | string | IPv6/Domain | 2400:3200:baba::1 | IPv6 secondary server |
| interval | int | 10..1800 | 300 | Detection interval (seconds) |
| timeout | int | 1..10 | 3 | Timeout (seconds) |
| reconnect_tries | int | 1..10 | 3 | Reconnect tries |
| recover_tries | int | 1..10 | 3 | Recover tries |
Command Examples:
# Enable ping detection
sudo uci set wan_links.link[1].ping.enable true
# Set detection servers
sudo uci set wan_links.link[1].ping.ip4_primary_server "8.8.8.8"
sudo uci set wan_links.link[1].ping.ip4_secondary_server "114.114.114.114"
# Set detection interval to 60 seconds
sudo uci set wan_links.link[1].ping.interval 60
# Set reconnect tries
sudo uci set wan_links.link[1].ping.reconnect_tries 5
# Save configuration
sudo uci commit
Module Path: lan_links.link[index]
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| id | int | 1..10 | - | Link index |
| name | string | 3-32 chars | - | Link name |
| type | enum | bridge, ethernet, vlan | bridge | Link type |
| interface_bridge | enum | br_lan | br_lan | Bridge interface |
| interface_ethernet | enum | eth0, eth1 | - | Ethernet interface |
| interface_vlan | enum | - | - | VLAN interface |
| desc | string | - | - | Description |
| firewall_zone | enum | internal, external | internal | Firewall zone |
Command Examples:
# View LAN configuration
sudo uci get lan_links.link[1].name
sudo uci get lan_links.link[1].type
# Save configuration
sudo uci commit
Module Path: lan_links.link[index].ip4_setting
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| ip4_addrs.ip4_addr[n] | string | IP/netmask | 192.168.0.1/24 | IPv4 address list |
Command Examples:
# Set LAN IP address
sudo uci set lan_links.link[1].ip4_setting.ip4_addrs.ip4_addr[1] "192.168.1.1/24"
# Add an additional IP address
sudo uci set lan_links.link[1].ip4_setting.ip4_addrs.ip4_addr[2] "192.168.2.1/24"
# Save configuration
sudo uci commit
Module Path: lan_links.link[index].dhcp
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| enable | bool | true, false | true | Enable DHCP server |
| pool_start | string | IP address | 192.168.0.2 | Pool start address |
| pool_end | string | IP address | 192.168.0.100 | Pool end address |
| primary_dns | string | IP address | - | Primary DNS server |
| secondary_dns | string | IP address | - | Secondary DNS server |
| lease_time | int | 10..10080 | 120 | Lease time (minutes) |
Command Examples:
# Enable DHCP server
sudo uci set lan_links.link[1].dhcp.enable true
# Set DHCP pool
sudo uci set lan_links.link[1].dhcp.pool_start "192.168.1.100"
sudo uci set lan_links.link[1].dhcp.pool_end "192.168.1.200"
# Set DNS servers
sudo uci set lan_links.link[1].dhcp.primary_dns "8.8.8.8"
sudo uci set lan_links.link[1].dhcp.secondary_dns "8.8.4.4"
# Set lease time to 1440 minutes (24 hours)
sudo uci set lan_links.link[1].dhcp.lease_time 1440
# Save configuration
sudo uci commit
Module Path: lan_links.static_lease_list[index]
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| id | int | 1..50 | - | Index |
| interface | enum | - | - | Interface |
| mac | string | MAC address | - | MAC address (XX:XX:XX:XX:XX:XX) |
| ip | string | IP address | - | IP address |
Command Examples:
# Add a static DHCP lease (add list item first, then set parameters)
sudo uci add lan_links.static_lease_list 1
sudo uci set lan_links.static_lease_list[1].interface "br_lan"
sudo uci set lan_links.static_lease_list[1].mac "00:11:22:33:44:55"
sudo uci set lan_links.static_lease_list[1].ip "192.168.1.100"
# Add more static leases
sudo uci add lan_links.static_lease_list 2
sudo uci set lan_links.static_lease_list[2].interface "br_lan"
sudo uci set lan_links.static_lease_list[2].mac "00:11:22:33:44:66"
sudo uci set lan_links.static_lease_list[2].ip "192.168.1.101"
# Save configuration
sudo uci commit
Module Path: ethernet.port_setting[index]
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| id | int | 1..5 | - | Port index |
| name | string | 3-32 chars | - | Port name |
| port | enum | eth0, eth1, eth2, eth3, eth4 (range depends on actual physical ports) | - | Physical port |
| port_enable | bool | true, false | true | Enable port |
| port_speed | enum | auto, 10h, 10f, 100h, 100f, 1000f | auto | Port speed |
| mtu | int | 1280..1500 | 1500 | MTU size |
Speed Options:
auto: Auto-negotiation
10h: 10M half-duplex
10f: 10M full-duplex
100h: 100M half-duplex
100f: 100M full-duplex
1000f: 1000M full-duplex
Command Examples:
# View Ethernet port configuration
sudo uci get ethernet.port_setting[1].port
sudo uci get ethernet.port_setting[1].port_speed
# Set port speed to 100M full-duplex
sudo uci set ethernet.port_setting[1].port_speed "100f"
# Set MTU
sudo uci set ethernet.port_setting[1].mtu 1450
# Disable port
sudo uci set ethernet.port_setting[1].port_enable false
# Save configuration
sudo uci commit
Module Path: serial_port.port_setting[index]
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| id | int | 1..6 | - | Serial port index |
| port | enum | com1, com2, com3, com4, com5, com6 (depends on actual hardware) | - | Serial port number |
| enable | bool | true, false | false | Enable serial port |
| port_type | enum | RS232, RS485 | RS232 | Port type |
| baud_rate | enum | 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 | 115200 | Baud rate |
| data_bits | enum | 7, 8 | 8 | Data bits |
| stop_bits | enum | 1, 2 | 1 | Stop bits |
| parity | enum | none, odd, even | none | Parity |
| flow_ctrl | enum | none, hardware, software | none | Flow control |
| packing_timeout | int | 10..1000 | 50 | Packing timeout (ms) |
| packing_length | int | 1..3000 | 1200 | Packing length |
| application_mode | enum | transparent, modbus_rtu_gateway, modbus_ascii_gateway | transparent | Application mode |
| protocol | enum | tcp_client, tcp_server, udp | tcp_client | Network protocol |
| local_ip | string | IP address | - | Local IP (tcp_server mode) |
| local_port | int | 1..65535 | - | Local port (tcp_server mode) |
| server_addr | string | IP/Domain | - | Server address (tcp_client mode) |
| server_port | int | 1..65535 | - | Server port (tcp_client mode) |
| keep_alive | int | 0..18000 | 0 | Keep-alive time (seconds) |
Command Examples:
# Enable serial port 1
sudo uci set serial_port.port_setting[1].enable true
# Set serial port parameters
sudo uci set serial_port.port_setting[1].port_type "RS232"
sudo uci set serial_port.port_setting[1].baud_rate 115200
sudo uci set serial_port.port_setting[1].data_bits 8
sudo uci set serial_port.port_setting[1].stop_bits 1
sudo uci set serial_port.port_setting[1].parity "none"
sudo uci set serial_port.port_setting[1].flow_ctrl "none"
# Set to TCP client mode
sudo uci set serial_port.port_setting[1].protocol "tcp_client"
sudo uci set serial_port.port_setting[1].server_addr "192.168.1.100"
sudo uci set serial_port.port_setting[1].server_port 8000
# Set packing parameters
sudo uci set serial_port.port_setting[1].packing_timeout 100
sudo uci set serial_port.port_setting[1].packing_length 512
# Save configuration
sudo uci commit
Module Path: dido.io[index]
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| id | int | 1..8 (depends on actual hardware) | - | IO index |
| enable | bool | true, false | false | Enable |
| dido_mode | enum | di, do | di | Mode (input/output) |
| mode | enum | on_off, counter | on_off | DI mode |
| inversion | bool | true, false | false | Invert logic |
| threshold | int | 0..65535 | 0 | Counter threshold |
| alarm_on_content | string | 1..256 chars | Alarm On | Alarm on content |
| alarm_off_content | string | 1..256 chars | Alarm Off | Alarm off content |
| alarm_on_action | enum | high, low, pulse | high | DO alarm on action |
| alarm_off_action | enum | high, low, pulse | low | DO alarm off action |
| initial_state | enum | last, high, low | last | DO initial state |
| delay | int | 0..3000 | 0 | Delay (100ms units) |
| hold_time | int | 0..3000 | 0 | Hold time (seconds) |
| pulse_low | int | 1000..3000 | 1000 | Pulse low width (ms) |
| pulse_high | int | 1000..3000 | 1000 | Pulse high width (ms) |
| di_trigger | bool | true, false | true | DI trigger |
| alarm_source | enum | none, di1_alarm, di2_alarm, di3_alarm, di4_alarm | none | Alarm source |
Command Examples:
# Configure DI (Digital Input)
sudo uci set dido.io[1].enable true
sudo uci set dido.io[1].dido_mode "di"
sudo uci set dido.io[1].mode "on_off"
sudo uci set dido.io[1].inversion false
sudo uci set dido.io[1].alarm_on_content "Door Open"
sudo uci set dido.io[1].alarm_off_content "Door Closed"
# Configure DI as counter mode
sudo uci set dido.io[2].enable true
sudo uci set dido.io[2].dido_mode "di"
sudo uci set dido.io[2].mode "counter"
sudo uci set dido.io[2].threshold 1000
# Configure DO (Digital Output)
sudo uci set dido.io[3].enable true
sudo uci set dido.io[3].dido_mode "do"
sudo uci set dido.io[3].alarm_on_action "high"
sudo uci set dido.io[3].alarm_off_action "low"
sudo uci set dido.io[3].initial_state "low"
sudo uci set dido.io[3].delay 10
sudo uci set dido.io[3].hold_time 5
# Configure DO in pulse mode
sudo uci set dido.io[4].enable true
sudo uci set dido.io[4].dido_mode "do"
sudo uci set dido.io[4].alarm_on_action "pulse"
sudo uci set dido.io[4].pulse_low 1000
sudo uci set dido.io[4].pulse_high 2000
# Save configuration
sudo uci commit
Module Path: gps
Applies only to devices that support GPS.
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| enable | bool | true, false | false | Enable GPS |
| sync_gps_time | bool | true, false | false | Sync GPS time |
| report_to_rs232 | bool | true, false | false | Report to RS232 |
| rs232_num | enum | com1, com2 | com1 | RS232 port |
| rs232_nmea_gpgga | bool | true, false | false | Report GGA sentences |
| rs232_nmea_gpvtg | bool | true, false | false | Report VTG sentences |
| rs232_nmea_gprmc | bool | true, false | false | Report RMC sentences |
| rs232_nmea_gpgsv | bool | true, false | false | Report GSV sentences |
| remove_lf_character | bool | true, false | true | Remove CR/LF characters |
| self_define_gpsid | enum | None, prefix, suffix | None | Custom GPS ID |
| self_define_gpsid_header | string | 7 uppercase letters | - | GPS ID header |
| add_sn_as_gpsid | bool | true, false | false | Add SN as GPS ID |
| transmit_interval | int | 0..604800 | 1 | Transmit interval (sec, 0=disable) |
GPS Server Configuration:
Module Path: gps.server[index]
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| id | int | 1..5 | - | Server index |
| enable | bool | true, false | true | Enable |
| protocol | enum | tcp_client, tcp_server, udp | tcp_client | Protocol |
| local_addr | string | IP address | - | Local address (tcp_server mode) |
| local_port | int | 1..65535 | - | Local port (tcp_server mode) |
| server_addr | string | IP/Domain | - | Server address (tcp_client mode) |
| server_port | int | 1..65535 | - | Server port (tcp_client mode) |
| nmea_gpgga | bool | true, false | false | Send GGA sentences |
| nmea_gpvtg | bool | true, false | false | Send VTG sentences |
| nmea_gprmc | bool | true, false | false | Send RMC sentences |
| nmea_gpgsv | bool | true, false | false | Send GSV sentences |
Command Examples:
# Enable GPS
sudo uci set gps.enable true
sudo uci set gps.sync_gps_time true
# Configure RS232 reporting
sudo uci set gps.report_to_rs232 true
sudo uci set gps.rs232_num "com1"
sudo uci set gps.rs232_nmea_gpgga true
sudo uci set gps.rs232_nmea_gprmc true
# Add GPS server (add list item first, then set parameters)
sudo uci add gps.server 1
sudo uci set gps.server[1].enable true
sudo uci set gps.server[1].protocol "tcp_client"
sudo uci set gps.server[1].server_addr "gps.server.com"
sudo uci set gps.server[1].server_port 9000
sudo uci set gps.server[1].nmea_gpgga true
sudo uci set gps.server[1].nmea_gprmc true
# Add another GPS server
sudo uci add gps.server 2
sudo uci set gps.server[2].enable true
sudo uci set gps.server[2].protocol "tcp_client"
sudo uci set gps.server[2].server_addr "backup.gps.server.com"
sudo uci set gps.server[2].server_port 9000
# Set transmit interval to 5 seconds
sudo uci set gps.transmit_interval 5
# Save configuration
sudo uci commit
Module Path: firewall
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| syn_flood_protection_enable | bool | true, false | true | SYN flood protection |
| ping_forward_limit_enable | bool | true, false | false | Ping forwarding limit |
| input_policy | enum | accept, drop | accept | Input policy |
| output_policy | enum | accept, drop | accept | Output policy |
| forward_policy | enum | accept, drop | drop | Forward policy |
Command Examples:
# Set firewall policies
sudo uci set firewall.input_policy "accept"
sudo uci set firewall.output_policy "accept"
sudo uci set firewall.forward_policy "drop"
# Enable SYN flood protection
sudo uci set firewall.syn_flood_protection_enable true
# Enable ping forwarding limit
sudo uci set firewall.ping_forward_limit_enable true
# Save configuration
sudo uci commit
Module Path: firewall.zone_list[index]
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| id | int | 1..50 | - | Zone index |
| name | string | - | - | Zone name |
| input_action | enum | accept, drop | accept | Input action |
| output_action | enum | accept, drop | accept | Output action |
| forward_action | enum | accept, drop | accept | Forwarding action |
| masquerading_enable | bool | true, false | false | Enable masquerading (NAT) |
| mss_clamping_enable | bool | true, false | false | MSS clamping |
| dmz_enable | bool | true, false | false | Enable DMZ |
| dmz_host | string | IP address | - | DMZ host IP |
| dmz_source | string | IP/range | - | DMZ source address |
| dmz_destination | string | IP address | - | DMZ destination address |
| ssh_access | bool | true, false | true | Allow SSH access |
| http_access | bool | true, false | true | Allow HTTP access |
| https_access | bool | true, false | true | Allow HTTPS access |
| ping_respond | bool | true, false | true | Respond to ping |
Command Examples:
# Configure external zone
sudo uci set firewall.zone_list[1].name "external"
sudo uci set firewall.zone_list[1].input_action "drop"
sudo uci set firewall.zone_list[1].output_action "accept"
sudo uci set firewall.zone_list[1].forward_action "drop"
sudo uci set firewall.zone_list[1].masquerading_enable true
# Configure DMZ
sudo uci set firewall.zone_list[1].dmz_enable true
sudo uci set firewall.zone_list[1].dmz_host "192.168.1.100"
sudo uci set firewall.zone_list[1].dmz_source "0.0.0.0/0"
# Configure access control
sudo uci set firewall.zone_list[1].ssh_access true
sudo uci set firewall.zone_list[1].http_access false
sudo uci set firewall.zone_list[1].https_access true
sudo uci set firewall.zone_list[1].ping_respond false
# Save configuration
sudo uci commit
Module Path: firewall.port_forwards[index]
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| id | int | 1..50 | - | Rule index |
| desc | string | - | - | Description |
| ip4_addrs.ip4_addr[n] | string | IP address | - | IPv4 source address list |
| protocol | enum | tcp, udp, tcpudp | tcpudp | Protocol |
| source_zone | enum | - | None | Source zone |
| internet_port | string | Port/range | - | External port |
| destination_zone | enum | - | None | Destination zone |
| local_ip | string | IP address | - | Internal IP address |
| local_port | string | Port/range | - | Internal port |
Command Examples:
# Add port forwarding rule (add list item first, then set parameters)
sudo uci add firewall.port_forwards 1
sudo uci set firewall.port_forwards[1].desc "Web Server"
sudo uci set firewall.port_forwards[1].protocol "tcp"
sudo uci set firewall.port_forwards[1].source_zone "external"
sudo uci set firewall.port_forwards[1].internet_port "80"
sudo uci set firewall.port_forwards[1].destination_zone "internal"
sudo uci set firewall.port_forwards[1].local_ip "192.168.1.100"
sudo uci set firewall.port_forwards[1].local_port "8080"
# Add port range forwarding
sudo uci add firewall.port_forwards 2
sudo uci set firewall.port_forwards[2].desc "Port Range"
sudo uci set firewall.port_forwards[2].protocol "tcp"
sudo uci set firewall.port_forwards[2].internet_port "8000:8010"
sudo uci set firewall.port_forwards[2].local_ip "192.168.1.200"
sudo uci set firewall.port_forwards[2].local_port "8000:8010"
# Save configuration
sudo uci commit
Module Path: firewall.traffic_rules[index]
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| id | int | 1..50 | - | Rule index |
| desc | string | - | - | Description |
| family | enum | ipv4, ipv6, ipv4ipv6 | ipv4ipv6 | Address family |
| protocol | enum | all, tcp, udp, tcpudp, icmp, igmp | tcpudp | Protocol |
| source_zone | enum | - | None | Source zone |
| source_ip | string | IP/range | - | IPv4 source address |
| source_ip_ipv6 | string | IPv6 address | - | IPv6 source address |
| source_port | string | Port/range | - | Source port |
| src_mac | string | MAC address | - | Source MAC address |
| destination_zone | enum | - | None | Destination zone |
| destination_ip | string | IP/range/domain | - | IPv4 destination address |
| destination_ip_ipv6 | string | IPv6 address | - | IPv6 destination address |
| destination_port | string | Port/range | - | Destination port |
| action | enum | accept, drop | drop | Action |
Command Examples:
# Add traffic rule - block specific IP (add list item first, then set parameters)
sudo uci add firewall.traffic_rules 1
sudo uci set firewall.traffic_rules[1].desc "Block Bad IP"
sudo uci set firewall.traffic_rules[1].family "ipv4"
sudo uci set firewall.traffic_rules[1].protocol "all"
sudo uci set firewall.traffic_rules[1].source_zone "external"
sudo uci set firewall.traffic_rules[1].source_ip "1.2.3.4"
sudo uci set firewall.traffic_rules[1].action "drop"
# Add traffic rule - allow specific port
sudo uci add firewall.traffic_rules 2
sudo uci set firewall.traffic_rules[2].desc "Allow SSH"
sudo uci set firewall.traffic_rules[2].protocol "tcp"
sudo uci set firewall.traffic_rules[2].destination_port "22"
sudo uci set firewall.traffic_rules[2].action "accept"
# Save configuration
sudo uci commit
Module Path: firewall.custom_list[index]
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| id | int | 1..50 | - | Rule index |
| desc | string | - | - | Description |
| family | enum | ipv4, ipv6, ipv4ipv6 | ipv4 | Address family |
| rule | string | - | - | iptables rule |
Command Examples:
# Add custom iptables rule
sudo uci set firewall.custom_list[1].desc "Drop to 192.168.2.20"
sudo uci set firewall.custom_list[1].family "ipv4"
sudo uci set firewall.custom_list[1].rule "-A OUTPUT -d 192.168.2.20 -j DROP"
# Add another custom rule
sudo uci set firewall.custom_list[2].desc "Allow incoming port 8080"
sudo uci set firewall.custom_list[2].family "ipv4"
sudo uci set firewall.custom_list[2].rule "-A INPUT -p tcp --dport 8080 -j ACCEPT"
# Save configuration
sudo uci commit
Module Path: system
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| device_name | string | - | Edge-Gateway | Device name |
| usr_led_type | enum | none | none | User LED type |
Command Examples:
# Set device name
sudo uci set system.device_name "My-Router"
# Save configuration
sudo uci commit
Module Path: user_management
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| username | string | - | admin | Username |
| password | string | - | - | Password (encrypted) |
| idle_timeout | int | - | 600 | Idle timeout (seconds) |
| sudo_enable | bool | true, false | false | Enable sudo |
| sudo_username | string | - | - | sudo username |
| sudo_password | string | - | - | sudo password (encrypted) |
Command Examples:
# Note: Admin password should be changed via Web interface or a specific command.
# Set idle timeout to 1800 seconds (30 minutes)
sudo uci set user_management.idle_timeout 1800
# Save configuration
sudo uci commit
Module Path: ssh
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| enable | bool | true, false | true | Enable SSH |
| port | int | 1..65535 | 22 | SSH port |
| PermitRootLogin | bool | true, false | false | Allow root login |
| root_disable_passwd_login | bool | true, false | false | Disable root password login |
Command Examples:
# Disable root login
sudo uci set ssh.PermitRootLogin false
# Change SSH port
sudo uci set ssh.port 2222
# Save configuration
sudo uci commit
Module Path: ntp
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| client_enable | bool | true, false | true | Enable NTP client |
| primary_server | string | - | pool.ntp.org | Primary NTP server |
| secondary_server | string | - | - | Secondary NTP server |
| update_interval | int | - | 0 | Update interval (0=default) |
| timezone | string | - | Asia0Shanghai | Timezone |
| server_enable | bool | true, false | false | Enable NTP server |
Command Examples:
# Set NTP server
sudo uci set ntp.client_enable true
sudo uci set ntp.primary_server "time.google.com"
sudo uci set ntp.secondary_server "time.cloudflare.com"
# Set timezone
sudo uci set ntp.timezone "Asia0Shanghai"
# Save configuration
sudo uci commit
Module Path: syslog
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| enable | bool | true, false | true | Enable system log |
| level | enum | emerg, alert, crit, err, warning, notice, info, debug | debug | Log level |
| save_position | enum | ram, nvm | ram | Save location |
| log_to_remote | bool | true, false | false | Send to remote server |
| remote_ip | string | IP address | - | Remote server IP |
| remote_port | int | 1..65535 | 514 | Remote server port |
| backup_remote_ip | string | IP address | - | Backup remote server IP |
| backup_remote_port | int | 1..65535 | 514 | Backup remote server port |
| add_identifier | bool | true, false | false | Add identifier |
Command Examples:
# Enable remote logging
sudo uci set syslog.enable true
sudo uci set syslog.level "info"
sudo uci set syslog.log_to_remote true
sudo uci set syslog.remote_ip "192.168.1.100"
sudo uci set syslog.remote_port 514
# Save configuration
sudo uci commit
Module Path: web_server
| Parameter Name | Type | Value Range | Default | Description |
|---|---|---|---|---|
| http_port | int | 1..65535 | 80 | HTTP listening port |
| https_port | int | 1..65535 | 443 | HTTPS listening port |
| https_ca_cert | enum | - | None | Web service CA certificate (user uploaded) |
| https_private_keys | enum | - | None | Web service private key (user uploaded) |
| http_redirect_to_https | bool | true, false | true | Redirect HTTP to HTTPS |
Command Examples:
# Change system Web listening ports
sudo uci set web_server.http_port 8080
sudo uci set web_server.https_port 8443
sudo uci commit
# Backup the current configuration
sudo cp /app/config/config.xml /app/config/config.xml.backup
#!/bin/bash
# Configure cellular
sudo uci set cellular.primary_sim sim1
sudo uci set cellular.auto_switch true
sudo uci set cellular.sim[1].apn "internet"
sudo uci set cellular.sim[1].network_type "auto"
# Configure LAN
sudo uci set lan_links.link[1].ip4_setting.ip4_addrs.ip4_addr[1] "192.168.1.1/24"
sudo uci set lan_links.link[1].dhcp.enable true
sudo uci set lan_links.link[1].dhcp.pool_start "192.168.1.100"
sudo uci set lan_links.link[1].dhcp.pool_end "192.168.1.200"
# Configure firewall
sudo uci set firewall.input_policy "accept"
sudo uci set firewall.forward_policy "drop"
# Commit all changes
sudo uci commit
echo "Configuration completed!"
# Use grep to filter for a specific module
sudo uci print | grep "^cellular\."
sudo uci print | grep "^firewall\."
When uci commit fails, the most effective troubleshooting method is to check the UCI logs using journalctl.
Recommended Practice: Before making configuration changes, run the following command in a separate terminal window:
# Follow UCI logs in real-time
sudo journalctl -t uci -f
Then, execute your UCI configuration commands in the first terminal. The second terminal will display any validation errors in real-time.
If uci commit has already failed, you can view the historical logs:
# View the last 50 UCI log entries
sudo journalctl -t uci -n 50
# View UCI logs from the last 5 minutes
sudo journalctl -t uci --since "5 minutes ago"
# View today's UCI logs
sudo journalctl -t uci --since today
# View logs from a specific time range
sudo journalctl -t uci --since "2025-10-20 11:00:00" --until "2025-10-20 12:00:00"
# Restore the backed-up configuration
sudo cp /app/config/config.xml.backup /app/config/config.xml
# Reboot the system to apply the configuration
sudo reboot
Error 1: Insufficient Permissions
# Error message: Permission denied
# Solution: Use sudo or switch to the root user.
sudo uci get ...
Error 2: Incorrect List Index
# Note: List indices start from 1, not 0.
# Incorrect: uci get cellular.sim[0].apn
# Correct: uci get cellular.sim[1].apn
Error 3: Invalid Parameter Format
# IP address requires the correct format with a subnet mask.
# Incorrect: uci set lan_links.link[1].ip4_setting.ip4_addrs.ip4_addr[1] "192.168.1.1"
# Correct: uci set lan_links.link[1].ip4_setting.ip4_addrs.ip4_addr[1] "192.168.1.1/24"
| Type | Format | Example |
|---|---|---|
| bool | true/false | true |
| int | Integer | 100 |
| enum | Enumerated value | auto, manual |
| string | String | "test" |
| IP_ADDR | IPv4 address | 192.168.1.1 |
| IP6_ADDR | IPv6 address | fd00::1 |
| IP_ADDR_AND_SUBNET_LEN | IPv4 address/subnet length | 192.168.1.1/24 |
| IP6_ADDR_AND_PREFIX_LEN | IPv6 address/prefix length | fd00::1/64 |
| MAC_ADDR | MAC address | 00:11:22:33:44:55 |
| NET_PORT | Port number | 8080 |
| NET_PORTS | Port or port range | 8000:8010 |
Important Notes:
All UCI commands require root privileges or sudo.
After modifying the configuration, you must run sudo uci commit to save the changes.
List indices start from 1, not 0.
It is recommended to back up the current configuration before making significant changes.