Executing the Test Subscriber

The test subscriber is a utility provided by RUCKUS to receive the GPB streaming data from the controller.

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.

Note: The test subscriber utility is designed only for test purposes and not for integrating with your application of the controller GPB-MQTT interface.

Downloading the Subscriber Software

Download the subscriber software from: https://support.ruckuswireless.com/software/4666-smartzone-7-1-1-patch1-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 Upto 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

  1. 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

  2. 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
      1. 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
      2. 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
    • If mosquitto is setup on a different device, execute the followin command:
      $ /tmp/b/scg-mock-sci-6.1.0-SNAPSHOT_20211129082535 $ ./run.sh
      1. 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
      2. 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
      3. Specify port to connect remote Mosquitto service.
        Please enter port between 1000 and 65535: 8883
        port entered is: 8883
      4. 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

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.