Caution! Article for developers

Information on this page is intended particularly for users with advanced technical knowledge.

Update your Treon Gateway via DM Commands

Feb 27, 2024 · 3 minutes to read

Treon Gateway Treon Gateway 2 Treon Gateway in Protective Enclosure


This article describes how to update your Treon Aito Release for Gateway via DM commands.

For a full guide on working with DM Commands on the Treon Gateway, please read this article.

Please Note: In case you have a custom Treon Aito Release for Gateway configuration, or you are not sure which Treon Aito Release for Gateway version to install, please contact Treon Support.

If you have files and settings stored on your Treon Gateway that should persist after the update, please read our article on Persist Move.

In case you would like to run software on the Treon Gateway after the update process has been successful, please read our article on Update Hooks.


Update Treon Aito Release for Gateway

The update is performed by setting an update URI which will initiate the download. After the download has completed, the actual update can be performed. The Treon Gateway has a so called A/B partition update, meaning that during the last part of the update the gateway will reboot and is not able to respond.

Supported access protocols are http and https. Treon hosts images at https server which does mutual authentication using device and server certificates.

Result of the update should be checked finally by reading FW image version (Object: 3, Resource : 3)

Fig.: DM_Server and Treon Gateway


Firmware Update Object (ID:5)

The Treon Gateway firmware can be updated by using this object.

ResourceIDValue FieldOperationDescription
Package URI1stringSetFirmware package download URI
Update2stringExecuteUpdates the downloaded software
State3stringGetFirmware update status
Update result5stringGetFirmware update status


Update state:

0Idle (before downloading or after successful update)


Update result:

0Initial value. Once the updating process is initiated (download/update)
1Firmware updated successfully
2Not enough memory for the new firmware package
3Out of RAM during downloading process
4Connection lost during downloading process
5Integrity check failure for new downloaded package
6Unsupported package type
7Invalid URI
8Firmware update failed
9Unsupported protocol


Error codes

These are additional error codes returned with the E:[<Error code>] field.

Error codeNameDescription
16CMD_FAILEDPackage download failed or exec update failed
17CMD_FAILED_UPDATE_ACTIVETrying to set uri while updating
18CMD_FAILED_SSL_ERRORVerification of SSL-certificates failed
19CMD_CONNECTION_ERRORConnection failed
20CMD_FAILED_INCORRECT_STATEState is incorrect to perform given operation


Software Management Object (ID:9)

This object is used to manage single software packages in the Treon Gateway.

Package URI3stringSetURI for fetching FW image
Install4N/AExecuteStart installation of downloaded FW image
Update state7uint16GetFW update status


Firmware Update Status:

0Initial state, before downloading
1The downloading process has started and is on-going
2The package has been completely downloaded
3The package has been correctly downloaded and is ready to be installed

If executing the Install Resource failed, the state remains at 3.
If executing the Install Resource was successful, the state changes from 3 to 4.


Object instances:

0Main OS


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!


Was this article helpful? Let us know.