M-Bus to NB-IoT - Configuration Messages
Guide to the communication protocol of the ACRIOS Systems converters ACR-CV-101N-M-D and ACR-CV-101N-M-EAC.
Introduction
This manual describes a use of the following Lua script which sets up a protocol to communicate with the ACRIOS-CV-101N-M-D and ACR-CV-101N-M-EAC converter and a server configured for this purpose. The system makes use of various payload messages (uplink and downlink) that enable both data gathering and device configuration.
First, we look at general principles used in this communication protocol, then there is an overview of uplink messages (device → server communication), then there is an overview of downlink messages (server → device communication) and finally there is a full example of communication between an ACR-CV unit and the server along with an explanation.
Payload Messages
The communication between the device and the server is achieved with help of payload messages. The payload messages are sent in two directions.
- Uplink Message
- This message type is sent from the converter to the server with the requested information.
- Downlink Message
- This message type is sent from the server to the converter with specific commands.
Uplink Command Bytes
Command Byte | Description |
---|---|
0xF4 | Gather report acked |
0xF5 | M-Bus Scan Done |
0xF0 0xF6 | M-Bus Scan Done NG |
0xF6 | M-Bus IDs Checksum |
0xF9 | Bootloader request |
0xFA | Status report |
0xFE | Configuration Acknowledge |
Downlink Command Bytes
Command Byte | Description |
---|---|
0x01 | Send IDs |
0x02 | Send config |
0x03 | Request config |
0x04 | Request scan |
0x05 | Request IDs |
0x06 | Request status |
0x07 | Request reset |
0x0F | Send initial delay config |
Communication Diagrams
The primary purpose of downlink communication is remote configuration of the target device. Configuration messages are sent in response to specific messages received from the uplink device. In this case all messages qualify for a response, with the exception of bootloader request.
For better understanding, these diagrams graphically represent the communication provided in the section Example.
Initial Start-Up
The process happening after the first initiation is explained in the diagram below.
Configuration
The process of the device configuration is explained in the diagram below.
Gathering
Data is gathered every time the device wakes up. The diagram bellow explains communication between the server and the device.
Uplink Command Bytes
This section provides description for uplink messages that are the individual payloads sent by the converter to the server.
Gather Report (0xF4)
Gather report is sent at the end of data gathering.
Payload Description
Example | Description | Size | Byte Number |
---|---|---|---|
0xF4 | Command byte | [1B] | 1 |
0x02 | Relative counter | [1B] | 2 |
0x01 | IDs received | [1B] | 3 |
If no ID was received, the payload should contain only the first 2 bytes.
Scanning Done (0xF5)
This report is sent after the scanning cycle is completed.
Payload Description
Example | Description | Size | Byte Number |
---|---|---|---|
0xF5 | Command byte | [1B] | 1 |
0x01 | Apply found devices to the filter | [1B] | 2 |
0x60 0x53 0x47 0x01 | ID 01475360 | [4B] | 3-6 |
0x42 0x04 | MAN ID 0442 | [2B] | 7-8 |
0x20 | Version | [1B] | 9 |
0x02 | Medium | [1B] | 10 |
0x31 0x57 0x54 0x01 | ID 01545731 | [4B] | 11-14 |
0x42 0x04 | MAN ID 0442 | [2B] | 15-16 |
0x20 | Version | [1B] | 17 |
0x02 | Medium | [1B] | 18 |
0xXX | N*IDs | [xB] | x |
Choose, whether you want to apply found devices to the filter:
- 00 - Do not apply found devices as new filter.
- 01 - Do apply found devices as new filter replacing the existing ones.
Scanning Done NG (0xF0 0xF6)
This report is sent after the scanning cycle is completed.
Payload Description
Example | Description | Size | Byte Number |
---|---|---|---|
0xF0 0xF6 | Command byte | [1B] | 1 |
0x02 0x00 | Number of unit loads | [1B] | 2 |
0x01 | Apply found devices to the filter | [1B] | 2 |
0x60 0x53 0x47 0x01 | ID 01475360 | [4B] | 3-6 |
0x42 0x04 | MAN ID 0442 | [2B] | 7-8 |
0x20 | Version | [1B] | 9 |
0x02 | Medium | [1B] | 10 |
0x31 0x57 0x54 0x01 | ID 01545731 | [4B] | 11-14 |
0x42 0x04 | MAN ID 0442 | [2B] | 15-16 |
0x20 | Version | [1B] | 17 |
0x02 | Medium | [1B] | 18 |
0xXX | N*IDs | [xB] | x |
Choose which found devices should be applied to the filter:
- 00 - NONE - do not add or apply any IDs.
- 01 - NORMAL - add only scanned IDs.
❗Note that if an ID is stored in the memory, but not received during the scan, it is removed from the list of devices.
- 02 - ADD_ONLY - add only newly found IDs.