Device Configuration
The Gateway supports applying OS-level configuration to runtimes via the os_config field in each runtime’s runtime.json. When a runtime connects, the Service Hub automatically pushes the device configuration to it.
Overview
Device configuration covers four areas:
- Ethernet interfaces — static IP, DHCP, gateway, DNS
- Serial interfaces — baud rate, parity, stop bits, data bits
- NTP — time synchronisation servers
- Device-specific — hardware-vendor extensions (e.g. Moxa)
All fields are optional; omit any section that does not apply.
Ethernet Interfaces
Configure network interfaces under ethernet_interfaces. Each entry maps a logical name to a physical OS interface and its addressing.
See schema reference for all fields and constraints.
255.255.255.0 is valid; 255.0.255.0 is not). The configuration will be rejected on load if an invalid mask is provided.
Serial Interfaces
Configure serial ports under serial_interfaces. Each entry maps a logical name to a physical device path and its communication parameters.
See schema reference for all fields and allowed values.
NTP
Configure time synchronisation servers under ntp_config.
See schema reference for all fields.
Device-Specific Configuration
Device-specific sections apply hardware-vendor extensions. The type field selects the vendor.
Moxa
Moxa industrial computers expose serial port mode selection via a proprietary setinterface utility. The Moxa device-specific block configures the electrical mode for each ttyM port.
setinterface binary to be present on the target device.
See schema reference for all fields and supported modes.
Complete Example
{
"runtime_name": "field_device",
"os_config": {
"ethernet_interfaces": [
{
"name": "LAN1",
"interface": "eth0",
"dhcp": false,
"gateway": "10.0.0.1",
"ipv4": [{ "address": "10.0.0.10", "mask": "255.255.255.0" }]
}
],
"serial_interfaces": [
{
"name": "ModbusPort",
"interface": "/dev/ttyM0",
"baud_rate": "9600"
}
],
"ntp_config": {
"servers": ["pool.ntp.org"]
},
"device_specific": {
"type": "Moxa",
"/dev/ttyM0": "RS-485 2-wire",
"/dev/ttyM1": "RS-232"
}
}
}