Now, we will use the MQTT-spy GUI utility to generate another MQTT client that uses an encrypted connection to publish messages to another topic that will match the sensors/+/altitude
topic filter, sensors/drone500/altitude
. Follow the next steps:
Launch MQTT-spy.
Select Connections | New connection or Connections | Manage connections in case you were already running MQTT-spy or have saved previous settings. The Connection list dialog box will appear.
Click on the Connectivity tab and make sure MQTT 3.1.1 is selected in the Protocol version dropdown.
Click on the Security tab and on the TLS tab below the User auth. tab.
Select CA certificate& client certificate/key in the TLS/SSL mode dropdown.
Select TLSv1.2 in the Protocol dropdown.
Enter or select the full path to the
ca.crt
file that you created in thecertificates
folder in the CA certificate file textbox.Enter or select the full path to the
device001.crt
file that you created in thecertificates...