Communication Protocols for NB-IoT
This article describes possible communication protocols used for NB-IoT converters ACR-CV-NI-W-D and ACR-CV-N-M-D.
WORK IN PROGRESS: This manual is currently being updated and may not contain all the necessary information.
Introduction
This is an overview of communication protocols used in ACRIOS Systems NB-IoT converters ACR-CV-NI-W-D and ACR-CV-N-M-D. Our philosophy is to allow our customers to pick the most convenient way of using our converters and receiving the information, be it simple or advanced.
Article Overview
The following article showcases following:
- Overview of general communication options and examples
- Showcases of other scenarios, both for simple and convenient use and for advanced users
- Use of MQTT and its specifications
- Overall overview of the options
Current Data Formats
Following data sending is possible:
- Data can be sent in JSON, CSV, and raw data - Hex formats.
JSON
JSON is a format designed for convertibility and ease of use - has many use cases.
JSON Output Example
{
"IMSI": "901288911137278",
"type": "scanCycleReport",
"data": [
{
"timestamp": "2023-11-23T09:20:01.783000",
"unit": "901288911137278",
"meterId": "19822733",
"found": true,
"data": "0XhgdvNmtT3asRtIB9NnpIqXDZn2uMEM7THCQJIC",
"parsed": {
"type": "water",
"value": 125.977
}
},
{
"timestamp": "2023-11-23T09:39:18.876000",
"unit": "901288911137278",
"meterId": "11AAEA53",
"found": false,
"parsed": {
"status": "failed",
"reason": "empty data - meter not found?"
}
},
{
"timestamp": "2023-11-23T09:39:18.876000",
"unit": "901288911137278",
"meterId": "3C66147F",
"found": false,
"parsed": {
"status": "failed",
"reason": "empty data - meter not found?"
}
},
{
"timestamp": "2023-11-23T09:41:22.876000",
"unit": "901288911137278",
"meterId": "17229344",
"data" : "qMfOFV3BGQK+8uQYncTCoppPAvblxEAlNNGhBrws",
"found": true,
"parsed": {
"type": "water",
"value": 31.220000000000002,
"flags": [
"Mechanical Fraud Was",
"Magnetic Fraud Was"
]
}
},
{
"timestamp": "2023-11-23T09:44:49.872000",
"unit": "901288911137278",
"meterId": "17849550",
"data" : "3e0bxzR+me3BdtsHla6FQH8XtEMky6VyVmwA4DSq",
"found": true,
"parsed" : {
"type": "ITN",
"value": 0
}
},
{
"timestamp": "2023-11-23T09:50:11.446000",
"unit": "901288911137278",
"meterId": "17833361",
"data" : "meLwPprmrcwj14f4ZrlNBZsYbrg+MBe7UZFZpm/W",
"found": true,
"parsed": {
"type": "water",
"value": 66.43,
"flags": [
"OK"
]
}
}
]
}
CSV File
CSV file is an Excel compatible file that sorts the data in columns and rows. It can be used both for forwarding:
- Raw (unparsed)
- Parsed data
Raw Payload Example
count | Ident | Data | date_of_reading |
---|---|---|---|
1 | 19822733 | 0XhgdvNmtT3asRtIB9NnpIqXDZn2uMEM7THCQJIC | 2023-07-31 |
2 | 11AAEA53 | 2023-07-31 | |
3 | 3C66147F | 2023-07-31 | |
4 | 17229344 | qMfOFV3BGQK+8uQYncTCoppPAvblxEAlNNGhBrws | 2023-07-31 |
5 | 17849550 | 3e0bxzR+me3BdtsHla6FQH8XtEMky6VyVmwA4DSq | 2023-07-31 |
6 | 17833361 | meLwPprmrcwj14f4ZrlNBZsYbrg+MBe7UZFZpm/W | 2023-07-31 |
Parsed Payload Example
count | apartment_number | meter | Address | Ident | Serial_number | Status | unit_of_measurement | date_of_reading | error_code | error_description |
---|---|---|---|---|---|---|---|---|---|---|
1 | 201 | TV | address | 19822733 | 125.977 | m3 | 2023-07-31 | 0 | OK | |
2 | 201 | address | 11AAEA53 | 2023-07-31 | ||||||
3 | 201 | address | 3C66147F | 2023-07-31 | ||||||
4 | 202 | SV | address | 17229344 | 31.22 | m3 | 2023-07-31 | 255 | Mechanical Fraud Was | |
5 | 202 | ITN | address | 17849550 | 0 | units | 2023-07-31 | 0 | OK | |
6 | 202 | TV | address | 17833361 | 66.43 | m3 | 2023-07-31 | 0 | OK |
How Is Data Sent
- Data are sent in from of HTTP POST requests via FTP/S, SFTP and e-mail.
- Data can be sent at specific intervals (daily, monthly, weekly), at your leisure via HTTP GET or directly.
Individual Case Examples
In the following section you are going to find these examples, sorted from simple user experience to advanced:
- Using Miotiq and preconfigured devices
- Using your own SIM provider and parser
- Using our devices to redirect raw encrypted data directly to you
Miotiq
Note that your country may not have coverage of Miotiq. Please check the availability here.
This scenario is ideal for users who prefer plug and play solutions. All they need to do is to provide us with necessary details to preconfigure the devices and means by which they would like to receive data, how often and in what format. All you need to know is:
- At what rate you want to receive the data - e.g. every day, week, month etc.
- In what format you want to receive them - CSV file, JSON, raw data
- How you want to receive them - via E-mail, HTTPS etc.
Using Your own Provider and Parser
In this case we may talk about a customer, that has already developed methods to data gathering and considers our devices as an ideal solution to implement into their system.
Let's assume that the company already uses T-Mobile SIM cards for NB-IoT, they already have their own parser and they prefer to receive their data once a week. We can both implement their parser and make sure our devices work together with the preferred NB-IoT provider.
Sending Encrypted Data To Your Backend
In this case a customer may be used to handling highly sensitive data, which they want to encrypt in such way that only they can access them. Our devices can with help of DTLS keep the data encrypted and directly forward them to your backend, where you can decrypt them using your own keys and parse them to work with them.
MQTT
MQTT is a protocol fit for ease of use and immediate access to all required data.
MQTT makes use of MQTT broker which is a server that receives all messages from the clients and then routes the messages to the appropriate destination clients. The broker is responsible for receiving all messages, filtering the messages, deciding who is interested in them, and then publishing the message to all subscribed clients.
Main benefits are:
- Ease of use
- Simple and direct access to data
Main downsides are:
- Slightly higher power consumption
- Using public broker means that your data is available to all subscribers
Overview of the Communication
General Principles
Following diagram showcases all the comunication protocol possibilities for NB-IoT converters ACR-CV-NI-W-D and ACR-CV-N-M-D.
This does not involve MQTT, which can be seen above.
The processes happening could be simplified into these steps:
- Converters gather data from meters and send them to our backend service.
We personally recommend using Miotiq services as it is tried and tested solution.
- Once data reach our backend service, they are forwarded towards the customers.
- Data is sent at specific intervals.
- Either its parsed with a parser into JSON or CSV file.
- Or the data is sent in form of raw payloads in Hex.
- Data is sent directly via HTTPS POST.
- Either its parsed with a parser into JSON or CSV file.
- Or the data is sent in form of raw payloads in Hex.
- Data can be requested as needed via HTTPS GET.
- Either its parsed with a parser into JSON or CSV file.
- Or the data is sent in form of raw payloads in Hex.
- Data is sent at specific intervals.
- Once data reaches a customer, they can use it to its purpose.
Diagram
Conclusion
The whole system is designed for versatility and therefore may look more complicated than it is. As was shown in the examples above, the process of using our devices can be as simple as integrating them and then receiving the data at specific intervals your desired way.
We support:
- UDP
- UDP + DTLS
- HTTPS
- MQTT via UDP/UDP + DTLS, TCP or SSL
The data is provided to you synchronized, asynchronous or sent directly via:
- HTTPS POST/GET
- FTPS
- S/FTP
And in formats:
- JSON/S
- CSV raw/CSV parsed