Caution! Article for developers

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

Change the Wirepas Network Parameters

Sep 6, 2023 · 4 minutes to read

Treon Gateway Treon Gateway 2 Treon Gateway in Protective Enclosure

Introduction

Please note: This article is for Treon Gateways with a Treon Aito release version of 6.0 or higher and a Wirepas network release version 5.x.

Please note: Make sure you know what network you are changing your devices to. There is no possible way to hardware reset the Nodes to undo the changes afterwards!

First you will have to connect to the Treon Gateway via SSH. You need root user rights which you can acquire by typing ‘sudo -i’ in the command interface. This example shows you how to move your Treon Gateway and the connected nodes to another Wirepas network.

First you should check that all the nodes are currently connected to the Treon Gateway. (See How to check the Node data flow) Only then should you change the network, channel, keys etc. of your nodes. As the last step, move the Treon Gateway to the same network as the nodes.

 

Configuring the nodes

To configure the nodes, the script located in “python3 /opt/nodeconfig/remote_command.py -h” needs to be used.

Example:

Command to read the network address:

python3 /opt/nodeconfig/remote_command.py -r 2

Command to change the node with the id ‘1234abcd’ to network ‘12345678’ in channel ‘26’ with the encryption key disabled:

python3 /opt/nodeconfig/remote_command.py -w 2=12345678,3=26,13=ffffffffffffffffffffffffffffffff, 14=ffffffffffffffffffffffffffffffff -i 1234abcd

 

Configuring Treon Gateway

Use the command configure_sink, which requires sudo as first step to make changes to the Treon Gateway. The main commands to use are r- to read the current configuration and -r –json if you want it in JSON format.

You can use -h for help and explanations.

Apply a new configuration with -c FILE.JSON. There is an example configuration in /usr/treon/wirepas/node_config.json, this file can be copied to a different folder and edit there. Any field missing in the json should be left as it was.

The most important fields needed are:

{
“network_address”: “12345678”,
“network_channel”: “26”,
“cipher_key”:“ffffffffffffffffffffffffffffffff”,
“authentication_key”:“ffffffffffffffffffffffffffffffff”
}

For the cipher_key and the authentification_key, if 32 times the letter f is used, the result is equivalent to disabling the encryption key.

CommandDescription
-hHelp
-rRead the values
-wWrite
-iSpecify a target

 

The most likely values to be used here are:

FieldValue
network_address2
network_channel3
cipher_key13
authentication_key14

 

Routing nodes & Non-routing nodes

A Treon Industrial Node can be either routing, meaning it forwards data from other nodes within the mesh network, or non-routing.

By default, all Treon Industrial Nodes are routing.

To set a node to non-routing, the node role attribute needs to be changed. By default, the attribute has a value of 130 (0x82). To set a node to non-routing, it needs to be changed to 0x03.

After connecting to the Treon Gateway via SSH, enter the following command to read the current value of the attribute:

sudo /opt/nodeconfig/remote_command.py -r 4 -i BROADCAST

In order to changes the value of the attribute, type:

sudo /opt/nodeconfig/remote_command.py -w 4=3 -a WIREPAS_ADDRESS

To figure out the Wirepas address from the previous broadcast, use to specifically request it:
sudo /opt/nodeconfig/remote_command.py -r 1 -i BROADCAST

Please note: It is recommended not to use broadcast when writing but it can be done.

 

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.