NemoPi data transfer unit firmware of AIR780X CAT-1 Modem
Hardware: Hezhou AIR780XX CAT-1 Modem based on EC618 silicon
Host operating system: Win10, Win11
Firmware flashing tool: Luatools_v2
Note: AIR780 uses a Microsoft defined COM PORT driver which availables in Windows 10. This driver only seems to work on native Window 10 machine. All COM PORTS can be recognised in Virtual Machine (VirtualBox), but the firmware flashing tool (Luatools_v2) cannot establish connection with the hardware in bootloader mode.
- LuatOS API manual: https://wiki.luatos.org/api/index.html
- LuatOS source code and examples: https://gitee.com/openLuat/LuatOS
- Firmware over the air update (Chinese): https://doc.openluat.com/wiki/40?wiki_page_id=4632
Due to the cost of outbound SMS and challenges in handling international mobile number, most of the SMS commands will not respond over SMS.
PING command is designed to return OK over SMS for functionality checking. Please use this API with care.
COMMAND | ARGUMENT | RETURN | NOTE |
---|---|---|---|
PING | N/A | OK | |
REBOOT | N/A | N/A | |
CREDENTIALS | URL | N/A | URL has to start with http:// or https:// |
OTA | URL | N/A | URL has to start with http:// or https://, firmware has to be generated by luatools in .bin format |
client_id | <IMEI> |
publish to | buoys/<IMEI>/d2c/# |
subscribe to | buoys/<IMEI>/c2d/# |
- endpoint:
buoys/\<IMEI>/d2c/telemetry
- msg_type: connection
- schema:
{ "msg_type": "connect", "firmware": str, "ticks": int, "imei": str, "power_on_reason": [int, int, int], "version": "x.x.x" }
- endpoint:
buoys/\<IMEI>/d2c/telemetry
- msg_type: detect
- schema:
{ "msg_type": "detect", "sensors": [ { "model": "DS18B20-LOGGER", "feature": { "ch2": true, "ch1": false }, "address": 2, "interface": "rs485" } ] }
- endpoint:
buoys/\<IMEI>/d2c/telemetry
- msg_type: data
- schema:
{ "msg_type": "data", "sensors": [ { "model": "DS18B20-LOGGER", "interface": "rs485", "address": 2, "data": [ { "channel": "ch1", "value": 1.234, // float or null "fault": "string (empty string when no fault detected)" }, { "channel": "ch2", "value": null, // float or null "fault": "string (empty string when no fault detected)" } ] } ] }
- endpoint:
buoys/\<IMEI>/d2c/telemetry
- msg_type: diagnosis
- schema:
{ "msg_type": "diagnosis", "lat_lon": { "lon": float, "lat": float }, "vbat": float, "cell": [<Tower Info Dict>, <Tower Info Dict>, ...] }
- endpoint:
buoys/\<IMEI>/c2d/cmd
- msg_type: credentials
- schema:
{ "msg_type": "credentials", "credentials": { "username": str, "password": str, "cert": str, "key": str, } }
- response: device will reboot after applying the new credentials, server should expect a new logon message with new credentials
- endpoint:
buoys/\<IMEI>/c2d/cmd
- msg_type: config
- schema:
{ "msg_type": "config", "config": { "read_interval_ms": float } }
- response: device will reboot after applying the new config, server should expect a new logon message
- endpoint:
buoys/\<IMEI>/c2d/cmd
- msg_type: config
- schema:
{ "msg_type": "ota", # This needs to be the .bin file produced by luatools "url": "http:/xxxxx/xxx.bin" }
- response: device will reboot after applying the new firmware, server should expect a new logon message
- endpoint:
buoys/\<IMEI>/c2d/cmd
- msg_type: config
- schema:
{ "msg_type": "reboot" }
- response: device will reboot immediately
- endpoint:
buoys/\<IMEI>/c2d/cmd
- msg_type: config
- schema:
{ "msg_type": "ping" }
- response:
{ "msg_type": "ping", "imei": "<IMEI>" }