Configuring Sink via CLI on Gateway¶
This guide provides instructions for configuring the sink on the gateway via the CLI.
Prerequisites¶
This guide assumes you have already:
Connected to the gateway.
Installed 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 Dbus service:
$ docker volume ls | grep "dbus"
The output (e.g., docker-compose_dbus-volume) will be used in subsequent commands.
Command for setting the parameters¶
Use the volume name in the below command, replacing <name_of_the_volume>
, in the example case the name is “docker-
compose_dbus-volume”
and replace the <command-extension>
with the any of the arguments shown below in the
screenshot, and -h
is used as <command-extension>
here to list all available commands.
$ 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¶
The sinks that are connected to the gateway and their configurations can be listed by executed by the command:
$ docker run --rm -v single_transport_dbus-volume:/var/run/dbus wirepas/gateway_transport_service wm-node-conf list
It is important to run this command before the user starts configuration because the user know the sink_id, and should be used in the commands for configuring the sink, so that the system will know which sink the user wants to talk to when there are 1 or more sink(s) on a gateway.
Warning
Please make sure that you stop the sink services before starting to re-configure the parameters. However, if the user is 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 Network address¶
This command will help you set the address of the network.
$ docker run --rm -v dual_transport_dbus-volume:/var/run/dbus wirepas/gateway_transport_service wm-node-conf set -N 2bbba2 -c 10 -s sink1
<name_of_the_volume>
- Replace with the name of the volume.
<network_address>
- Network address as an int. Ex: -N 0xA1B2C3 or -N 123456
<sink_id>
- Replace with id of the sink that is to be configured.
After a successful configuration the message with text like below pops up
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. Ex: -c 5
<sink_id>
- Replace with id of the sink that is to be configured.
After a successful configuration the message with text like below pops up
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. Ex: -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.
After a successful configuration the message with text like below pops up
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. Ex: -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.
After a successful configuration the message with text like below pops up
Starting/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. Ex: -S true
<sink_id>
- Replace with id of the sink that is to be configured.
After a successful configuration the message with text like below pops up