Caution! Article for developers
Information on this page is intended particularly for users with advanced technical knowledge.Update your Treon Industrial Node via Device Management (DM) interface
Sep 18, 2023 · 5 minutes to read
This article describes the process of updating your Treon Industrial Nodes and Industrial Nodes 6 to the latest Treon Aito Release for Industrial Node via Device Management (DM) interface.
DM commands get, set, and execute are used for this procedure. Val-field content is always in base64 encoded format.
Gateway will acknowledge device management commands with a message containing field “S” (Status). If the status is 0, the command is accepted for execution.
Send the DM messages to:
treon/devices/serialGW/devicebound/#
1 Set URI
Use the following URI provided to you by support@treon.fi
Message:
{"Ver": "2", "Cmd": "set","T": [33581, 0],"Res": [1], "Val": ["<Encoded URI>"], "I": 1 }
Expect reply message with “S”:0 indicating success.
{"I":1,"S":0,"Type":"dm","T":[33581,0]}
2 Check update state
Check update state regularly until update state is completed by sending this DM message:
{"Ver": "2", "Cmd": "get","T": [33581, 0],"Res": [3],"I":2 }
Gateway will reply with status:
{"Val":["Ag=="],"I":2,"Res":[3],"S":0,"T":[33581,0],"Type":"dm"}
Where Val-field includes base64 encoded update state:
- Downloading 1 (“S”:1)
- Downloaded 2 (“S”:2)
Wait for status 2 downloaded. Status 2 indicates that the download is completed, and you can proceed to the next step.
3 Execute update
After the firmware package has been downloaded, the actual update process can be started. Execute command requires a set of parameters, see details below.
Firmware update command is sent:
{"Ver": "2", "Cmd": "execute","T": [33581, 0],"Res": [2], "Val": ["<ENCODED PARAMETER SET>"], "I": 3 }
Example parameter setting for small networks:
- Using value 0 selects the default value.
- All data is presented in little‐endian format.
Parameter name | Bytes | Set value | Notes |
---|---|---|---|
Destination | 0-3 | 0x00000000 | Use default value, that is, BROADCAST. Destination address is Wirepas address, not sensor id. Using the default value 0 is recommended. |
Target | 4-11 | 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88 | Default value for targeting info is Treon Industrial Node. To update Treon Industrial Node 6, use 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x66 targeting info. |
Tcomplete | 12-13 | 0x0A00 | 10 s delay before sending complete message |
Tfrag | 14-15 | 0xC409 | 2500 ms delay between each fragment |
Trigger | 16-17 | 0x0000 | Use default |
Twait | 18-19 | 0xB400 | 180 s delay waiting for responses |
Tstart | 20-21 | 0x0A00 | 10 s delay after sending start, before first fragment (seconds) |
Destination | Target | Tcomplete | Tfrag | Trigger | Twait | Tstart |
---|---|---|---|---|---|---|
0x00 0x00 0x00 0x00 | 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88 | 0x0 0xA00 | 0xC4 0x09 | 0x00 0x00 | 0xB4 0x00 | 0x0A 0x00 |
0x00 0x00 0x00 0x00 | 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x66 | 0x0A 0x00 | 0xC4 0x09 | 0x00 0x00 | 0xB4 0x00 | 0x0A 0x00 |
Node version | hex bytes | Base64 encoded parameter set |
---|---|---|
Industrial Node | 0000000011223344556677880A00C4090000B4000A00 | MDAwMDAwMDAxMTIyMzM0NDU1NjY3Nzg4MEEwMEM0MDkwMDAwQjQwMDBBMDA= |
Industrial Node 6 | 0000000011223344556677660A00C4090000B4000A00 | MDAwMDAwMDAxMTIyMzM0NDU1NjY3NzY2MEEwMEM0MDkwMDAwQjQwMDBBMDA= |
Example parameter setting for big networks
- Depending on the network size, different parameters should be used.
- For bigger networks, the following parameters are recommend.
Parameter name | Bytes | Set value | Notes |
---|---|---|---|
Destination | 0-3 | 0x00000000 | Use default value, that is, BROADCAST. Destination address is Wirepas address, not sensor id. Using the default value 0 is recommended. |
Target | 4-11 | 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88 | Default value for targeting info is Treon Industrial Node. To update Treon Industrial Node 6, use 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x66 targeting info. |
Tcomplete | 12-13 | 0x7800 | 120 s delay before sending complete message |
Tfrag | 14-15 | 0x1027 | 10 000 ms delay between each fragment |
Trigger | 16-17 | 0x7800 | 120 s delay before updating firmware |
Twait | 18-19 | 0xB400 | 180 s delay waiting for responses |
Tstart | 20-21 | 0x3C00 | 60 s delay after sending start, before first fragment (seconds) |
Destination | Target | Tcomplete | Tfrag | Trigger | Twait | Tstart |
---|---|---|---|---|---|---|
00000000 | 1122334455667788 | 7800 | 1027 | 7800 | B400 | 3C00 |
00000000 | 1122334455667766 | 7800 | 1027 | 7800 | B400 | 3C00 |
Node version | hex bytes | Base64 encoded parameter set |
---|---|---|
Industrial Node | 000000008877665544332211780010277800B4003C00 | AAAAAIh3ZlVEMyIReAAQJ3gAtAA8AA== |
Industrial Node 6 | 000000006677665544332211780010277800B4003C00 | AAAAAGZ3ZlVEMyIReAAQJ3gAtAA8AA== |
Gateway will acknowledge the command with status reply:
{"I":3,"S":0,"Type":"dm","T":[33581,0]}
4 Check update state regularly until update state is completed
The update process may take several hours, depending on used parameters. Meanwhile, you can check the progress by sending this command:
{"Ver": "2", "Cmd": "get","T": [33581, 0],"Res": [3],"I":4 }
Reply:
{"Val":["AwDYn2y0"],"I":4,"Res":[3],"S":0,"T":[33581,0],"Type":"dm"}
Base64 value: AwDYn2y0 decodes to bytes: 0300d89f6cb4
03 ‐ state (updating)
00 ‐ progress percentage
d89f6cb4 ‐ sensor serial number of nodes that have acknowledged the start message, (bytes are in little-endian format)
Wait for state 0 (Idle). State 0 indicates that the installation is completed, and you can proceed to the next step.
5 Check update result
You can check the result by sending this command:
{"Ver": "2", "Cmd": "get","T": [33581, 0],"Res": [5],"I":5 }
Reply:
{"Val":["AdifbLQ="],"I":5,"Res":[5],"S":0,"T":[33581,0],"Type":"dm"}
Base64 value AdifbLQ= decodes to bytes: 01d89f6cb4
01 ‐ state (firmware upgraded successfully)
d89f6cb4 ‐ sensor serial number (bytes are in little-endian format)
The reply will contain serial numbers of all sensors that successfully updated its firmware. The serial numbers of sensors which were not successfully updated are not included in the reply.
6 Check the firmware version of the updated sensor
Send this command:
{"Ver": "2", "Cmd": "get","T": [3, 0],"Res": [3], "Nid":["BROADCAST"],"I":6 }
Reply:
{"Val":["AQMBbWk2YA=="],"I":6,"Res":[3],"Nid":"b46c9fd8","S":0,"T":[3,0],"Type":"dm"}
Base64 value AQMBbWk2YA== decodes to bytes: 060f0036903962
The first 3 bytes correspond to version number 6.15.0
The last 4 bytes are an encoded date
Treon Support
You still have questions? Our dedicated team of experts is happy to help you! Please contact Treon Support directly by e-mail.
Did you know? Treon offers Premium Support and Maintenance Packages for our customers. Get even more out of Treon and boost your sales - inquire now about features and prices!