Setting Up Mosquitto

About this task

Eclipse Mosquitto is a lightweight MQTT message broker you can use to test your SOTI Connect system.

While Mosquitto is suitable for testing purposes, it is not considered a production solution that supports a larger number of devices. For production environments, you should use a commercial MQTT message broker such as HiveMQ or VerneMQ.

Procedure

  1. Download and install Mosquitto.

    You can download Mosquitto at https://mosquitto.org.

  2. Run the Mosquitto server in the virtual machine or computer where SOTI Connect is installed.
    1. Copy the Mosquitto folder to the desired VM or computer, for example C:\IOT\mosquitto.
    2. Ports 1883 (not secure) and 8883 (secure) may need to be opened in the firewall.
    3. Modify the Mosquitto configuration file mosquitto_tls_client_auth.conf to point to the right certificates:
      • cafile: C:\IOT\mosquitto\certs\ca.crt
      • certfile: C:\IOT\mosquitto\certs\server.crt
      • keyfile: C:\IOT\mosquitto\certs\server.key
    4. Start the command prompt as an Administrator.
    5. Run Mosquitto from the command prompt by entering the following command:

      .\mosquitto.exe -v -c mosquitto_tls_client_auth.conf

  3. Register the MQTT/SDK in the SOTI Connect console.
    1. Log into the SOTI Connect console.
    2. Navigate to Administration > System Management.
    3. Click the menu button for Soti-Sdk-Mqtt and select Register.

      In the Register dialog box, enter the following:

      • In the Host Address field, enter the IP address of the VM or computer where the Mosquitto server is running, using port 8883.
      • In the PA Client Certificate field, enter mqtt-pa.client.pfx.
      • In the CA Certificate field, enter ca.crt.
      When you are done, click OK to close the dialog box.