Executing the Test Subscriber
The test subscriber utility is written in Java. It uses the Java classes, which is compiled with RUCKUS GPB .proto to read the content of GPB message.
Downloading the Subscriber Software
Download the subscriber software from: https://support.ruckuswireless.com/software/4772-smartzone-7-2-0-ga-mocksci-tls-sz-to-sci-mqtt-subscriber-software-for-centos-ubuntu.
Execution Script to Start Mosquitto MQTT
Execute the following command to start the Mosquitto MQTT broker .
mosquitto -c /etc/mosquitto/mosquitto.conf -p 1883 &
Execution Script for Subscriber Software Version Up to 3.6.x
Execute the following script to write all received messages to the SciTlsMessages folder in the program execution directory.
/execute-normal.sh <mqtt broker IP address> <mqtt port number of security channel> <s/n>
The option s/n refers to:
- s—Scaling mode that shows the statistical counter result.
- n— Normal mode that writes to the receiving file from the MQTT broker.
The following example shows where the script connects to a MQTT broker on 172.17.18.144:8883 in scaling mode.
./execute-normal.sh 172.17.18.144 8883 s
Execution Script for Subscriber Software Version 5.0.x and Above
Start the Mock SCI using the below scripts for different types of topic service subscriber.
- For SCI topic service, execute the below startup
command with the arguments of MQTT broker IP address, port number, and to enable
(true) or disable (false) the scaling mode.
# Execute in Normal Mode ./execute-sci.sh 172.17.18.144 8883 false
# Execute in Scaling Mode ./execute-sci.sh 172.17.18.144 8883 true
- For GStation topic service, execute the below startup command with the arguments of MQTT broker IP address, port number, and to enable (true) or disable (false) the scaling mode.
# Execute in Normal Mode ./execute-gstation.sh 172.17.18.144 8883 false
# Execute in Scaling Mode ./execute-gstation.sh 172.17.18.144 8883 true
Execution Script for Subscriber Software Version 6.x and Above
- Open the .tar file. For example,
zxvf scg-mock-sci-6.1.0-20211129.082645-79.tar.gz$ /tmp/b/scg-mock-sci-6.1.0-SNAPSHOT_20211129082535 $ tree ./ ./ ├── run_localhost.sh ├── run.sh └── scg-mock-sci-6.1.0-SNAPSHOT.jar 0 directories, 3 files
- Execute Mock SCI.
- If mosquitto is setup on the same device,
execute the following
command:
$ /tmp/b/scg-mock-sci-6.1.0-SNAPSHOT_20211129082535 $ ./run_localhost.sh
- Choose topic to
subscribe.
Please choose topic to subscribe: 1.sci-topic 2.gstation-topic Please enter 1 or 2: 1 Topic selected is: sci-topic hostname/IP entered is: localhost port entered is: 8883
- Enable or disable
scaling mode (enable : show subscribed data statistics on StdOut
rather than writing detailed data to file
system).
Please enter yes/no to enable/disable scaling mode: no
- Choose topic to
subscribe.
- If mosquitto is setup on a different
device, execute the following
command:
$ /tmp/b/scg-mock-sci-6.1.0-SNAPSHOT_20211129082535 $ ./run.sh
- Choose topic to
subscribe.
Please choose topic to subscribe: 1.sci-topic 2.gstation-topic Please enter 1 or 2: 1 Topic selected is: sci-topic
- Specify hostname
or IP address to connect to the remote Mosquitto
service.
Please enter hostname or IP (characters length < 100): 10.206.79.133 hostname/IP entered is: 10.206.79.133
- Specify port to
connect remote Mosquitto
service.
Please enter port between 1000 and 65535: 8883 port entered is: 8883
- Enable or disable
scaling mode (enable : show subscribed data statistics on StdOut
rather than writing detailed data to
filesystem).
Please enter yes/no to enable/disable scaling mode: no
- Choose topic to
subscribe.
- If mosquitto is setup on the same device,
execute the following
command:
Exit from the Test subscriber
Type EXIT and click on the Enter key to leave the test subscriber.
Execution Result
All receiving GPB messages from MQTT's publisher (example: controller) will be saved to the SciTlsMessages folder.