Skip to content

Update your Treon Gateway via DM Commands

Legacy documentation

This page is preserved from the previous knowledge base and describes older Treon products and manual configuration workflows. It is kept for reference and is not maintained against current Treon Connect releases.

Caution! Article for developersInformation on this page is intended particularly for users with advanced technical knowledge.

Update your Treon Gateway via DM Commands

Treon Gateway Treon Gateway 2 Treon Gateway in Protective Enclosure

Introduction

This article describes how to update Treon Gateway and Treon Gateway 2 software 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 Gateway software release version, 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 Gateway software

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.

Resource ID Value Field Operation Description
Package URI 1 string Set Firmware package download URI
Update 2 string Execute Updates the downloaded software
State 3 string Get Firmware update status
Update result 5 string Get Firmware update status

Update state:

Value Description
0 Idle (before downloading or after successful update)
1 Downloading
2 Downloaded
3 Updating

Update result:

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

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

Error code Name Description
16 CMD_FAILED Package download failed or exec update failed
17 CMD_FAILED_UPDATE_ACTIVE Trying to set uri while updating
18 CMD_FAILED_SSL_ERROR Verification of SSL-certificates failed
19 CMD_CONNECTION_ERROR Connection failed
20 CMD_FAILED_INCORRECT_STATE State is incorrect to perform given operation
Software Management Object (ID:9)

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

Resource ID Type Operation Description
Package URI 3 string Set URI for fetching FW image
Install 4 N/A Execute Start installation of downloaded FW image
Update state 7 uint16 Get FW update status

Firmware Update Status:

Value Description
0 Initial state, before downloading
1 The downloading process has started and is on-going
2 The package has been completely downloaded
3 The package has been correctly downloaded and is ready to be installed
4 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:

Value Description
0 Main OS