Wirepas sink configuration on the gateway (CLI)¶
Use the gateway’s command line to inspect Wirepas sinks and set their parameters.
Prerequisites¶
This guide assumes you have already:
Connected to the gateway.
Deployed the Wirepas gateway services on the gateway.
Connected the sink to the gateway.
If these prerequisites are met, you can proceed with the configuration.
Getting the Docker volume name¶
First, identify the Docker volume name associated with the D-Bus service:
$ docker volume ls | grep "dbus"
You’ll use the volume name from the output, for example docker-compose_dbus-volume, in
the following commands.
Command for setting the parameters¶
Use the volume name in the command below. Replace <name_of_the_volume> with it, in
this example docker-compose_dbus-volume. Replace <command-extension> with one of
the arguments described below. To list all available commands, use -h as
<command-extension>.
$ docker run --rm -v <name_of_the_volume>:/var/run/dbus wirepas/gateway_transport_service wm-node-conf {list,set} <command-extension>
Listing the sinks on the gateway¶
To list the sinks connected to the gateway and their configurations, run:
$ docker run --rm -v <name_of_the_volume>:/var/run/dbus wirepas/gateway_transport_service wm-node-conf list
Run this command before you start the configuration. It shows the sink_id of each
sink. You need it in the configuration commands, so that the gateway knows which sink you
want to configure when there is more than one.
Warning
Stop the sink services before you reconfigure the parameters. If you’re configuring the sink for the first time, the stack on the sink is already stopped.
Setting the node address¶
This command will help you to set the address of the node.
<name_of_the_volume> - Replace with the name of the volume
<node_address> - Replace with integer number for the address of the node you want to configure.
<sink_id> - Replace with id of the sink that is to be configured.
$ docker run --rm -v <name_of_the_volume>:/var/run/dbus wirepas/gateway_transport_service wm-node-conf set -n <node_address> -s <sink_id>
Setting the node role¶
This command will help you to set the role of the node.
$ docker run --rm -v <name_of_the_volume>:/var/run/dbus wirepas/gateway_transport_service wm-node-conf set -r <node_role> -s <sink_id>
Parameters
<name_of_the_volume>— The name of the Docker volume to mount (where the D-Bus socket is located).<node_role>— The node role, defined as a string combining:one base role:
sink|router|non-routeroptional flags from the list
[csma-ca, autorole]
Example values:
-r "sink csma-ca"-r "router csma-ca autorole"
<sink_id>— The ID of the sink to be configured.
If the configuration succeeds, you see:
Setting the network address¶
This command will help you set the address of the network.
$ docker run --rm -v <name_of_the_volume>:/var/run/dbus wirepas/gateway_transport_service wm-node-conf set -N <network_address> -s <sink_id>
<name_of_the_volume> - Replace with the name of the volume.
<network_address> - Network address as an int. For example: -N 0xA1B2C3 or -N 123456
<sink_id> - Replace with id of the sink that is to be configured.
If the configuration succeeds, you see:
Setting the network channel¶
$ docker run --rm -v <name_of_the_volume>:/var/run/dbus wirepas/gateway_transport_service wm-node-conf set -c <network_channel> -s <sink_id>
<name_of_the_volume> - Replace with the name of the volume.
<network_channel> - Network channel as an int. For example: -c 5
<sink_id> - Replace with id of the sink that is to be configured.
If the configuration succeeds, you see:
Setting the authentication key¶
$ docker run --rm -v <name_of_the_volume>:/var/run/dbus wirepas/gateway_transport_service wm-node-conf set -ak <authentication_key> -s <sink_id>
<name_of_the_volume> - Replace with the name of the volume.
<authentication_key> - Network wide 128 bytes authentication key. For example: -ak 112233445566778899AABBCCDDEEFF11 or -ak 11,22,33,44,55,66,77,88,99,AA,BB,CC,DD,EE,FF,11
<sink_id> - Replace with id of the sink that is to be configured.
If the configuration succeeds, you see:
Setting the cipher key¶
$ docker run --rm -v <name_of_the_volume>:/var/run/dbus wirepas/gateway_transport_service wm-node-conf set -ck <cipher_key> -s <sink_id>
<name_of_the_volume> - Replace with the name of the volume.
<cipher_key> - Network wide cipher key. For example: -ck 112233445566778899AABBCCDDEEFF11 or -ck 11,22,33,44,55,66,77,88,99,AA,BB,CC,DD,EE,FF,11
<sink_id> - Replace with id of the sink that is to be configured.
If the configuration succeeds, you see:
Starting and stopping the sink¶
$ docker run --rm -v <name_of_the_volume>:/var/run/dbus wirepas/gateway_transport_service wm-node-conf set -S <bool> -s <sink_id>
<name_of_the_volume> - Replace with the name of the volume.
<bool> - True/False to start/stop sink. For example: -S true
<sink_id> - Replace with id of the sink that is to be configured.
If the configuration succeeds, you see: