Skip to main content

CHESTER Serial

This article describes the core functionality, hardware description, default configuration, and example JSON message of the catalog application CHESTER Serial.

caution

Some of the basics are not provided, as they are common for all CHESTER catalog applications. Please see:

Application Overview

CHESTER Serial is a universal application for industrial serial communications. It works as a flexible gateway for integrating industrial devices (sensors, energy meters) into the cloud via LTE-M/NB-IoT or LoRaWAN.

The application supports two communication interfaces, depending on the installed extension module:

  • RS-485 (with Module CHESTER-X2) — Modbus RTU Master, multi-drop bus, up to 8 slave devices
  • RS-232 (with Module CHESTER-X12) — point-to-point connection, 1 device

It supports 10 device types including energy meters, environmental sensors, and generic Modbus devices. Data is transmitted via LTE (CBOR encoding) or LoRaWAN (optimized binary encoding with multi-device packing).

Application Variants

CHESTER Serial can be ordered in one of these variants:

CHESTER Serial RS-485

This variant is equipped with the CHESTER-X2 extension module. It is designed for standard industrial bus communication where multiple devices are connected in a daisy-chain topology.

  • Interface: Non-isolated RS-485
  • Topology: Multi-drop bus
  • Capacity: Up to 8 Modbus RTU slave devices

The hardware of this application consists of the following ordering codes:

  • CHESTER-M-CGLS - Standard mainboard
  • CHESTER-X2 - RS-485 interface module
  • CHESTER-X10 - External power input (5-28V DC)
  • CHESTER-E2-LP - Enclosure with SMA pigtail

See Ordering Codes for more details.

CHESTER Serial RS-232

This variant is equipped with the CHESTER-X12 extension module. It is intended for point-to-point communication with a single peripheral device, legacy equipment, or sensors requiring a direct serial link.

  • Interface: Non-isolated RS-232
  • Topology: Point-to-point connection
  • Capacity: Single device (1:1 connection)

The hardware of this application consists of the following ordering codes:

  • CHESTER-M-CGLS - Standard mainboard
  • CHESTER-X12 - RS-232 interface module
  • CHESTER-E2-LP - Enclosure with SMA pigtail

See Ordering Codes for more details.

caution

CHESTER Serial requires an external power supply (5–28 V DC) for continuous operation. Sensors and the serial interface are powered continuously.

Supported Devices

The firmware includes native support for the following devices:

DeviceType StringInterfaceMeasurements
MicroSENS 180-HSmicrosens_180hsRS-232 (ASCII)CO2 (Vol.-%), Temperature, Pressure
SenseCAP S1000 / S500sensecap_s1000RS-485 ModbusTemperature, Humidity, Pressure, Light, Wind
CUBIC 6303cubic_6303RS-485 ModbusPM1.0, PM2.5, PM10
LambrechtlambrechtRS-485 ModbusWeather station data
Generic ModbusgenericRS-485 ModbusCustom register mapping
Carlo Gavazzi EM1XXem1xxRS-485 ModbusVoltage, Current, Power, Frequency, Energy in/out (single-phase)
Carlo Gavazzi EM5XXem5xxRS-485 ModbusVoltage, Current, Power, Frequency, Energy per phase (three-phase)
ORNO OR-WE-504or_we_504RS-485 ModbusVoltage, Current, Power, Energy (single-phase)
ORNO OR-WE-516or_we_516RS-485 ModbusVoltage, Current, Power per phase, Energy (three-phase)
Schneider iEM3000iem3000RS-485 ModbusVoltage, Current, Power, Energy per phase (three-phase)
tip

You can also use short aliases for some device types: microsens, sensecap, cubic, em111, em540.

Application Behavior

Modbus RTU Mode

In Modbus mode, CHESTER acts as the Modbus RTU Master and periodically polls all configured slave devices:

  • Devices are sampled with a configurable period (parameter interval-sample).
  • Collected measurements are sent in batch during the report interval (parameter interval-report).
  • Up to 8 devices can be configured simultaneously on the RS-485 bus.
  • Supported Modbus functions: FC01, FC02, FC03, FC04, FC05, FC06, FC0F, and FC10.

Transparent Mode

In Transparent mode, CHESTER acts as a bidirectional bridge between the serial port and the cloud:

  • Data received on the serial line is forwarded to the cloud.
  • Only one device can be connected (device-0 slot only).
  • Useful for debugging, legacy equipment, or non-standard protocols.

LoRaWAN Multi-Device Packing

When using LoRaWAN, the application uses adaptive multi-device packing (Protocol v2) to optimize airtime:

  • Dynamically queries the current Data Rate to determine available MTU.
  • Batches multiple device readings into single uplinks where possible.
  • First uplink contains system data (battery, temperature, accelerometer) plus device data.
  • Subsequent uplinks contain only device data.

Technical Specifications

FeatureValue
Operating SystemZephyr RTOS
Physical InterfaceRS-232 (Module X12), RS-485 (Module X2)
Application ProtocolsTransparent (RAW), Modbus RTU
Cloud FormatsCBOR (LTE), Optimized Binary (LoRaWAN)
Power SupplyExternal source (5–28V DC) required

Default Configuration

This is the default configuration (printed using the app config show command):

app config mode none
app config interval-sample 60
app config interval-aggreg 300
app config interval-report 1800
app config interval-poll 0
app config serial-mode transparent
app config serial-baudrate 9600
app config serial-data-bits 8
app config serial-parity none
app config serial-stop-bits 1
app config device-0
app config device-1
app config device-2
app config device-3
app config device-4
app config device-5
app config device-6
app config device-7

Specific Commands

info

You can easily explore the whole command tree structure — start with the help command.

caution

To apply a new configuration, you need to call config save, which applies the new configuration parameters and reboots the device.

Action Commands

Command to trigger sample immediately (and store the result in the sample buffer):

sample

Command to send data immediately:

send

Network Mode

Command to set the communication mode:

app config mode <none/lte/lrw>

Reporting

Command to set sample interval in seconds:

app config interval-sample <1-86400>

Command to set aggregation interval in seconds:

app config interval-aggreg <1-86400>

Command to set report interval in seconds:

app config interval-report <30-86400>

Command to set LTE polling interval in seconds (0 = disabled):

app config interval-poll <0-86400>

Serial Line

Command to set serial operating mode:

app config serial-mode <transparent/modbus>

Command to set baud rate:

app config serial-baudrate <1200-115200>

Command to set data bits:

app config serial-data-bits <7-9>

Command to set parity:

app config serial-parity <none/odd/even>

Command to set stop bits:

app config serial-stop-bits <1-2>

Device Configuration

Configure device slots 0–7 using the format type[,addr[,timeout]]:

app config device-<n> "<type>,<addr>,<timeout>"

Where:

  • n — device slot index (0–7)
  • type — device type string (see Supported Devices table)
  • addr — Modbus slave address (1–247), required in Modbus mode
  • timeout — response timeout in seconds (default: 1)

Example configurations:

# Gavazzi EM111 single-phase meter at address 1
app config device-0 "em1xx,1,1"

# ORNO OR-WE-516 three-phase meter at address 2
app config device-1 "or_we_516,2,1"

# Schneider iEM3000 at address 10 with 3s timeout
app config device-2 "iem3000,10,3"

# MicroSENS CO2 sensor (RS-232, no address needed)
app config device-0 "microsens_180hs"

# Clear a device slot
app config device-3 ""
tip

In Modbus mode, the Modbus slave address is required for all devices. In Transparent mode, only device-0 can be configured.

Modbus Commands

Read Modbus registers from a slave device:

modbus read <slave> <addr> <count> [holding|input]

Write a value to a Modbus register:

modbus write <slave> <addr> <value>

Sample the configured Modbus device:

modbus sample

Serial Commands

Send hex data on the serial line and wait for a response:

serial send <hex> [timeout_s]

Read data from the serial RX buffer:

serial recv [timeout_s]

Device Commands

List all configured devices:

device list

Sample a specific device by its slot index:

device sample <0-7>

Reset a specific device:

device reset <0-7>

Access device-specific commands (per device type):

device microsens_180hs <subcommand>
device em1xx <subcommand>
device or_we_504 <subcommand>
device or_we_516 <subcommand>
device em5xx <subcommand>
device iem3000 <subcommand>

Firmware

The latest firmware is available in the Catalog Applications Firmware chapter.

Example JSON Message

{
"message": {
"version": 1,
"sequence": 42,
"timestamp": 1738627200
},
"attribute": {
"vendor_name": "HARDWARIO",
"product_name": "CHESTER-M",
"hw_variant": "CGLS",
"hw_revision": "R3.4",
"fw_version": "v1.0.0",
"serial_number": "2159018267"
},
"system": {
"uptime": 86400,
"voltage_rest": 3.65,
"voltage_load": 3.42,
"current_load": 28
},
"network": {
"imei": 351358815180770,
"imsi": 901288910018982,
"parameter": {
"rsrp": -85,
"rsrq": -6,
"snr": 12,
"plmn": 23003,
"cid": 939040,
"band": 20
}
},
"thermometer": {
"temperature": 23.45
},
"accelerometer": {
"accel_x": 0.012,
"accel_y": -0.008,
"accel_z": 1.002,
"orientation": 2
},
"devices": [
{
"device": 0,
"type": 7,
"type_name": "em1xx",
"addr": 1,
"data": [
{
"timestamp": 1738627200,
"voltage": 230.5,
"current": 5.23,
"power": 1198.0,
"frequency": 50.01,
"energy_in": 12345,
"energy_out": 0
}
]
},
{
"device": 1,
"type": 8,
"type_name": "or_we_516",
"addr": 2,
"data": [
{
"timestamp": 1738627200,
"voltage_l1": 230.1,
"voltage_l2": 231.2,
"voltage_l3": 229.8,
"current_l1": 4.12,
"current_l2": 3.89,
"current_l3": 4.35,
"power_l1": 948.0,
"power_l2": 901.2,
"power_l3": 996.5,
"power_total": 2845.7,
"energy": 98765
}
]
}
]
}