Settings
Get Settings
Section titled “Get Settings”Read settings from active or saved area.
Active area: Current settings the device is working with.Saved area: Settings saved in non-volatile memory, applied at next startup.
GET /api/settings/active/get/?key1&key2...
GET /api/settings/saved/get/?key1&key2...
Access Level: 🟨 1 / 🟥 2
Example Response:
{ "key1": "value1", "key2": "value2"}Set Settings
Section titled “Set Settings”Write settings to the saved area.
POST /api/settings/saved/set/
Access Level: 🟥 2
Example Request:
{ "key": "value"}Response:
Empty JSON upon success.
{}Available Settings Keys
Section titled “Available Settings Keys”The following keys can be used with GET and POST requests for settings.
| Key | Description | Access Level |
|---|---|---|
timeGmt | GMT time offset correction | 🟨 1 |
ethernet | Ethernet interface settings | 🟨 1 |
gsm | GSM module settings | 🟨 1 |
ownSrv | Connection to own server | 🟥 2 |
wgCloud | Cloud VPN connection settings | 🟨 1 |
wgManual | Custom WireGuard VPN parameters | 🟥 2 |
cbCloud | Cloud Modbus connection settings | 🟨 1 |
areset | Automatic reset settings | 🟨 1 |
protect | Device protection parameters | 🟥 2 |
download | File server settings | 🟨 1 |
firmware | Firmware management | 🟨 1 |
httpd | Built-in HTTP server parameters | 🟨 1 |
language | Interface language | 🟨 1 |
serial | Serial port settings | 🟥 2 |
astro | Astronomical settings (sunrise/sunset) | 🟥 2 |
ntp | NTP time synchronization settings | 🟨 1 |
tsMode | Daylight saving time mode | 🟨 1 |
tsManual | Manual daylight saving time settings | 🟨 1 |
logFlags | Logging flags | 🟨 1 |
rmSrv | Remote control server | 🟥 2 |
bodVoltage | Brown-Out Detect voltage | 🟨 1 |
forwarding | Port forwarding table | 🟥 2 |
timeGmt
Section titled “timeGmt”Time zone management (GMT offset).
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
timeGmt | integer | GMT offset in 15-minute intervals (from -96 to +96). |
Example Request:
{ "timeGmt": 8}Note: 8 means +2 hours offset (8 × 15 minutes).
ethernet
Section titled “ethernet”Ethernet interface settings.
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
ethernet | object | |
dhcpEnable | boolean | true — enable DHCP on Ethernet interface; false — disable. |
macManualEnable | boolean | true — use custom MAC address. |
dnssGateEnable | boolean | true — use gateway address as primary DNS. |
ip | string | Ethernet interface IP address. |
mask | string | Ethernet interface subnet mask. |
gate | string | Ethernet interface gateway. |
ipDnss | array | Array of DNS server IP addresses for Ethernet. |
macManual | string | Custom MAC address for Ethernet interface. |
Example Request:
{ "ethernet": { "dhcpEnable": true, "macManualEnable": false, "dnssGateEnable": true, "ip": "192.168.0.115", "mask": "255.255.255.0", "gate": "192.168.0.1", "ipDnss": ["8.8.8.8", "8.8.4.4"], "macManual": "01:02:03:04:05:06" }}GSM module settings.
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
gsm | object | |
apnAutodetectEnable | boolean | true — automatically configure APN settings based on SIM card code. |
tcpInRoamingEnable | boolean | true — allow TCP/UDP data transfer in roaming. |
smsInRoamingEnable | boolean | true — allow SMS sending in roaming. (SMS reception is always allowed). |
pinCode | integer / null | PIN code (0000-9999), or null if not set. |
apnHost | string | APN host name for manual configuration (max 34 chars). |
apnLogin | string | APN login for manual configuration (max 40 chars). |
apnPassword | string | APN password for manual configuration (max 24 chars). |
balanceUssdReq | string | USSD request for balance check (max 12 chars, e.g., *111#). |
phones | array | Array of 4 phone number strings. |
Example Request:
{ "gsm": { "apnAutodetectEnable": true, "tcpInRoamingEnable": true, "smsInRoamingEnable": false, "pinCode": null, "apnHost": "", "apnLogin": "", "apnPassword": "", "balanceUssdReq": "*111#", "phones": ["+48123456789", "", "", ""] }}ownSrv
Section titled “ownSrv”Connection to own server.
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
ownSrv | object | |
vUid | integer / null | Virtual Modbus device address (1-255), or null to disable. |
mbeRo | integer / null | Modbus exception code for access denied (1-255), or null to disable response. |
mbeTo | integer / null | Modbus exception code for timeout (1-255), or null to disable response. |
mbePu | integer / null | Modbus exception code for send error (1-255), or null to disable response. |
ethListenPort | integer | TCP server port on Ethernet interface (1-65535). |
delayForKeepaliveSec | integer / null | TCP server keep-alive time (0-36000 sec), or null to disable. |
atmListenPort | integer / null | TCP server port on GSM interface (1-65535), or null to disable. |
ethClientsProtocol | integer | Data protocol for Ethernet TCP server: 1 - RAW, 2 - ModbusTCP. |
atmClientsProtocol | integer | Data protocol for GSM TCP server: 1 - RAW, 2 - ModbusTCP. |
Example Request:
{ "ownSrv": { "vUid": 111, "mbeRo": 1, "mbeTo": 11, "mbePu": 10, "ethListenPort": 502, "delayForKeepaliveSec": 90, "atmListenPort": null, "ethClientsProtocol": 2, "atmClientsProtocol": 2 }}wgCloud
Section titled “wgCloud”Cloud VPN connection settings.
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
wgCloud | object | |
hostname | string | VPN server hostname (max 46 chars). |
connPort | integer | VPN server TCP port (1-65535). |
connMode | integer / null | Connection mode: null (disabled), 1 (Eth pref), 2 (GSM pref), 3 (Eth only), 4 (GSM only). |
delayForKeepaliveSec | integer | VPN server keep-alive time (0-36000 sec). |
delayForConnSec | integer | Delay between connection attempts (1-30000 sec). |
Example Request:
{ "wgCloud": { "hostname": "", "connPort": 34967, "connMode": 1, "delayForKeepaliveSec": 20, "delayForConnSec": 5 }}wgManual
Section titled “wgManual”Custom WireGuard VPN settings.
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
wgManual | object | |
hostname | string | VPN server hostname (max 46 chars). |
connPort | integer | VPN server TCP port (1-65535). |
connMode | integer / null | Connection mode: null (disabled), 1 (Eth pref), 2 (GSM pref), 3 (Eth only), 4 (GSM only). |
ip | string | Device IP address in VPN network. |
mask | string | Device subnet mask. |
deviceKey | string | Device private key (base64). |
peerPublicKey | string | Remote peer public key (base64). |
Example Request:
{ "wgManual": { "hostname": "", "connPort": 34967, "connMode": 1, "delayForKeepaliveSec": 20, "delayForConnSec": 5, "deviceIp": "10.0.0.111", "deviceMask": "255.255.255.0", "deviceKey": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", "peerPublicKey": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" }}cbCloud
Section titled “cbCloud”Cloud Modbus connection settings.
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
cbCloud | object | |
hostname | string | Server hostname (max 46 chars). |
connPort | integer | Server TCP port (1-65535). |
connMode | integer / null | Connection mode: null (disabled), 1 (Eth pref), 2 (GSM pref), 3 (Eth only), 4 (GSM only). |
delayForKeepaliveSec | integer | Server keep-alive time (0-36000 sec). |
delayForConnSec | integer | Delay between connection attempts (1-240 sec). |
Example Request:
{ "cbCloud": { "hostname": "", "connPort": 8502, "connMode": 1, "delayForKeepaliveSec": 120, "delayForConnSec": 5 }}areset
Section titled “areset”Automatic reset settings.
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
areset | object | |
delayMin | integer | Time before automatic restart (5-7200 min). |
mode | integer / null | null - Disabled; 1 - Reset after delayMin uptime; 2 - Reset after delayMin of no Modbus activity. |
Example Request:
{ "areset": { "delayMin": 120, "mode": 2 }}protect
Section titled “protect”Device protection parameters.
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
protect | object | |
smsWriteEnable | boolean | false - disable SMS write. |
smsReadEnable | boolean | false - disable SMS read. |
mbGateWriteEnable | boolean | false - disable write to connected Modbus devices. |
mbGateReadEnable | boolean | false - disable Modbus read. |
wgCloudAdminAuthEnable | boolean | true - grant Admin (🟥 2) access to all Cloud requests. |
wgManualAdminAuthEnable | boolean | true - grant Admin (🟥 2) access to all WireGuard VPN requests. |
passwordAdmin | string | Device administrator password (5-10 ASCII chars, no spaces). |
passwordMbGateWrite | string | Password for writing to connected Modbus devices (0-10 chars). "" disables check. |
passwordMbRead | string | Password for Modbus read (0-10 chars). "" disables check. |
passwordSmsWrite | string | Password for SMS write (3-10 chars). |
passwordSmsRead | string | Password for SMS read (3-10 chars). |
Example Request:
{ "protect": { "smsWriteEnable": true, "smsReadEnable": true, "mbGateWriteEnable": true, "mbGateReadEnable": true, "wgCloudAdminAuthEnable": true, "wgManualAdminAuthEnable": false, "passwordAdmin": "11111", "passwordMbGateWrite": "", "passwordMbRead": "", "passwordSmsWrite": "gap", "passwordSmsRead": "gap" }}download
Section titled “download”File server settings.
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
download | object | |
connMode | integer / null | Connection mode: null (disabled), 1 (Eth pref), 2 (GSM pref), 3 (Eth only), 4 (GSM only). |
loadRatio | integer | Download speed limit (1-50 % of max bandwidth). |
delayForConnSec | integer | Delay between connection attempts (1-30000 sec). |
Example Request:
{ "download": { "connMode": 1, "loadRatio": 15, "delayForConnSec": 60 }}firmware
Section titled “firmware”Firmware management.
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
firmware | object | |
checkPeriodSec | integer / null | Update check period (1-1000000 sec), or null to disable. |
downloadPeriodHr | integer / null | Automatic download period (0-1439 hours), or null to disable. |
updateHour | integer / null | Hour of day for automatic update (0-23), or null to disable. |
url | string | Update source URL (1-96 ASCII chars, no spaces). |
Example Request:
{ "firmware": { "checkPeriodSec": 900, "downloadPeriodHr": 6, "updateHour": 3, "url": "static.mcdownloads.com/firmware/mc251-6-1-current.fus" }}Built-in HTTP server parameters.
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
httpd | object | |
port | integer | Web interface port (1-65535). |
freeAccessSec | integer | Open access time after button press (5-3600 sec). |
Example Request:
{ "httpd": { "port": 80, "freeAccessSec": 600 }}language
Section titled “language”Interface language code.
Note: If the display does not support the specified code, English will be used.
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
language | string | Language code: en - English; ua - Ukrainian. |
Example Request:
{ "language": "en"}serial
Section titled “serial”Serial interface settings.
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
serial | object | |
uidRange | string | Modbus UID address range (e.g., 112-255). |
hdxMode | integer | Half-duplex mode: 0 - slave; 1 - master; 2 - raw mode. |
charFormat | integer | Byte format: 0-5 (see Modbus section). |
baudRate | integer | Baud rate (75-230400 bps). |
frameMode | integer | Frame format: 0 - RTU, 1 - ASCII. |
delayForRtuQ | integer | RTU character delay multiplier (2ⁿ): 0-5. |
delayForRtuMs | integer | RTU response delay (0-60000 ms). |
delayForAsciiMs | integer | ASCII character delay (0-60000 ms). |
Example Request:
{ "serial": { "baudRate": 38400, "charFormat": 3, "frameMode": 1, "delayForRtuMs": 200, "delayForAsciiMs": 1000, "hdxMode": 1, "uidRange": "112-255", "delayForRtuQ": 1 }}Astronomical settings (sunrise/sunset).
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
astro | object | |
longDeg | integer | Longitude degrees (0-179). |
longMin | integer | Longitude minutes (0-59). |
longSec | integer | Longitude seconds (0-59). |
latDeg | integer | Latitude degrees (0-179). |
latMin | integer | Latitude minutes (0-59). |
latSec | integer | Latitude seconds (0-59). |
quadrant | integer | Quadrant: 0 - N/E; 1 - N/W; 2 - S/E; 3 - S/W. |
sunZenithType | integer | Zenith type: 0 - Official; 1 - Civil; 2 - Nautical; 3 - Astronomical. |
Example Request:
{ "astro": { "longDeg": 30, "longMin": 19, "longSec": 0, "latDeg": 59, "latMin": 57, "latSec": 0, "quadrant": 0, "sunZenithType": 2 }}NTP time synchronization settings.
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
ntp | object | |
hostnames | array | Array of NTP server hostnames (max 20 chars each). |
connMode | integer / null | Connection mode: null (disabled), 1 (Eth pref), 2 (GSM pref), 3 (Eth only), 4 (GSM only). |
syncPeriodHr | integer | Synchronization period (0-240 hours). |
syncDiffSec | integer | Synchronization threshold (0-180 sec). |
Example Request:
{ "ntp": { "hostnames": ["ntp.time.in.ua", "ntp2.stratum1.ru"], "connMode": 1, "syncPeriodHr": 24, "syncDiffSec": 1 }}tsMode
Section titled “tsMode”Daylight saving time mode.
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
tsMode | integer / null | DST Mode: null (Disabled), 1 (Brazil), 2 (UK), 3 (Germany), 4 (Greece), 5 (Jordan), 6 (Italy), 7 (Namibia), 8 (Poland), 9 (Portugal), 10 (USA), 11 (Turkey), 12 (Ukraine), 13 (Finland), 14 (France), 15 (Manual - see tsManual). |
Example Request:
{ "tsMode": 12}tsManual
Section titled “tsManual”Manual daylight saving time settings.
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
tsManual | object | |
bwdDow | integer | Winter time transition day of week (1-7, Mon-Sun). |
bwdHour | integer | Winter time transition hour (0-23). |
bwdMonth | integer | Winter time transition month (1-12). |
bwdWeek | integer | Winter time transition week (1-5, 6=last). |
fwdDow | integer | Summer time transition day of week (1-7, Mon-Sun). |
fwdHour | integer | Summer time transition hour (0-23). |
fwdMonth | integer | Summer time transition month (1-12). |
fwdWeek | integer | Summer time transition week (1-5, 6=last). |
Example Request:
{ "tsManual": { "bwdDow": 7, "bwdHour": 2, "bwdMonth": 10, "bwdWeek": 6, "fwdDow": 7, "fwdHour": 2, "fwdMonth": 3, "fwdWeek": 6 }}logFlags
Section titled “logFlags”Logging settings.
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
logFlags | object | |
atm | boolean | GSM interface logging (true/false). |
system | boolean | System event logging (true/false). |
lwip | boolean | LWIP protocol logging (true/false). |
forwarding | boolean | Port forwarding logging (true/false). |
wireguard | boolean | WireGuard logging (true/false). |
Example Request:
{ "logFlags": { "atm": true, "system": true, "lwip": false, "forwarding": false, "wireguard": true }}TCP client settings (Remote Servers).
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
rmSrv | array | Array of 3 server objects. |
ip | string | Server IP address. |
connPort | integer | Connection port (1-65535). |
delayForRcvMs | integer | Receive delay (1-60000 ms). |
delayForConnSec | integer | Delay between connections (1-30000 sec). |
connMode | integer / null | Connection mode: null (disabled), 1 (Eth pref), 2 (GSM pref), 3 (Eth only), 4 (GSM only). |
gateUid | integer / null | MC-251 compatible gateway UID (1-255), or null if unknown. |
uidRange | string | UID range (e.g., 1-110). |
password | string | Password for MC-251 compatible gateway. |
protocol | integer | Protocol: 1 - RAW, 2 - ModbusTCP. |
virtualUids | boolean | Virtual UIDs (true/false). |
Example Request:
{ "rmSrv": [ { "ip": "192.168.0.102", "connPort": 502, "delayForRcvMs": 1000, "delayForConnSec": 20, "connMode": 3, "gateUid": 112, "uidRange": "1-110", "password": "11111", "protocol": 2, "virtualUids": false }, { "ip": "192.168.0.113", "connPort": 502, "delayForRcvMs": 1000, "delayForConnSec": 20, "connMode": null, "gateUid": null, "uidRange": "1-255", "password": "", "protocol": 2, "virtualUids": false }, { "ip": "192.168.0.114", "connPort": 502, "delayForRcvMs": 1000, "delayForConnSec": 20, "connMode": null, "gateUid": null, "uidRange": "1-255", "password": "", "protocol": 2, "virtualUids": false } ]}bodVoltage
Section titled “bodVoltage”Minimum supply voltage (Brown-Out Detect). If voltage drops below this value, the SD card will be safely unmounted.
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
bodVoltage | integer | Voltage in mV (e.g., 9000). |
Example Request:
{ "bodVoltage": 9000}forwarding
Section titled “forwarding”Port forwarding settings (Ethernet to GSM only).
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
fwd | array | Array of 4 forwarding objects. |
listenPort | integer / null | Local listening port (null to disable, or 1-65535). |
isUdp | boolean | true for UDP, false for TCP. |
serverAddr | string | Remote server host address. (If listenPort: 53 & isUdp: true & serverAddr: "", uses DNS settings). |
serverPort | integer | Remote server port (1-65535). |
Example Request:
{ "fwd": [ { "serverAddr": "www.cameronsworld.net", "serverPort": 443, "listenPort": 443, "isUdp": false }, { "serverAddr": "", "serverPort": 0, "listenPort": null, "isUdp": false }, { "serverAddr": "", "serverPort": 0, "listenPort": 53, "isUdp": true }, { "serverAddr": "time.google.com", "serverPort": 123, "listenPort": 123, "isUdp": true } ]}Export Settings
Section titled “Export Settings”Saves settings to a file in the root folder / of the SD card.
POST /api/cmd/settings/export/
Request Parameters:
| Field | Type | Description |
|---|---|---|
filename | string | Filename in FAT-32 DOS (8.3) format. |
Example Request:
{ "filename": "sgs.bin"}Import Settings
Section titled “Import Settings”Loads settings from a file in the root folder / of the SD card.
POST /api/cmd/settings/import/
Request Parameters:
| Field | Type | Description |
|---|---|---|
filename | string | Filename in FAT-32 DOS (8.3) format. |
Example Request:
{ "filename": "sgs.bin"}Reset Settings
Section titled “Reset Settings”Resets all device settings to default values.
POST /api/cmd/settings/reset/
Example Request:
{}