Before you begin
Ensure you have the following:
- Latest version of HiveMQ
- MQTT Certificates
- Text editor software (Notepad or similar)
- Keystore creation tool (Portecle or similar)
- Java Runtime Environment (JRE) 8+
- Java SE Development 11+
About this task
HiveMQ is an enterprise-ready MQTT broker you can use to test your SOTI Connect system.
We recommend using Hive MQ Professional edition for long-term use or using the HiveMQ Community edition if you want to test the broker first.
Procedure
-
Download and install HiveMQ.
-
Add your security certificate to a Java keystore repository (JKS).
-
Open your keystore creation tool.
-
Create a new keystore file. Ensure JKS is the selected type.
-
Select Import Key Pair.
-
Select server-cert.pfx from your SOTI Connect certificate folder. The default path is Program Files\SOTI\Connect\MQTT Certificates.
-
Enter the password you created for the MQTT certificate when installing SOTI Connect.
-
Enter an alias for the key pair.
-
Enter and confirm a new password for the key pair.
-
Select the key pair and click Set Keystore Password.
-
Enter and confirm a password for the keystore.
Note: This password will be used by the HiveMQ server.
-
Enter a name for the keystore and click Save.
-
Copy the JKS file to the HiveMQ configuration folder. The default location is Program Files\HiveMQ\conf.
-
In the same folder, open the config.xml file using your text editor.
-
Add the following inside the listeners tag, where
HiveMQ_MQTT.jks
is the JKS file you just created, JKS_Password
is the password you created for it, and PrivateKey_Password
is the private key you setup for SOTI Connect:
<tls-tcp-listener>
<port>8883</port>
<bind-address>0.0.0.0</bind-address>
<tls>
<keystore>
<path>.conf/HiveMQ_MQTT.jks</path>
<password>JKS_Password</password>
<private-key-password>PrivateKey_Password</private-key-password>
</keystore>
<truststore>
<path>.conf/HiveMQ_MQTT.jks</path>
<password>JKS_Password</password>
</truststore>
<client-authentication-mode>NONE</client-authentication-mode>
</tls>
</tls-tcp-listener>
-
Save the config.xml file.
-
In your Program Files\HiveMQ\bin folder, run run.bat.
-
Register the MQTT PA in SOTI Connect.
-
Login to SOTI Connect.
-
Select Administration from the main menu.
-
In the left pane, select System Management.
-
Open the menu for Soti-Sdk-Mqtt and select Register.
-
In the Register dialog, fill in the required fields:
- Host address: MQTT server address
- Port: 8883
- PA Client Certificate: Client certificate in PFX format
- PA Client Certificate Password: The password you entered in the MQTT certificate page during the installation
- CA Certificate: root-cert.pem
-
Click OK.
Your HiveMQ server is now connected to your SOTI Connect instance.