MQTT Connection Guide
WIZ5xxSR-RP MQTT Connection Overview
WIZ5xxSR-RP supports MQTT client and MQTTS client mode.
Required Hardware and Software
- WIZ5xxSR-RP Evaluation Board (WIZ510SR-RP can be used without WIZ5xxSR-RP Evaluation Board.)
- 5V Power adapter
- Cables (Ethernet / Serial)
- WIZnet S2E Configuration Tool
How to Connect to MQTT Broker through Mosquitto
WIZ5xxSR-RP supports MQTT client and MQTTS client mode, but this section guides how to connect to MQTT broker through Mosquitto based on MQTT client mode.
Note : MQTTS client mode requires additional security-related settings, unlike MQTT client mode.
Step 1: Setup Environment to Use WIZ5xxSR-RP
The process of setup environment to use the WIZ5xxSR-RP each product is available at the 'Getting Started' document below.
Step 2: Setup Mosquitto
Depending on the Mosquitto version, you may need to setup Mosquitto, so refer to the below to setup.
- In Mosquitto versions earlier than 2.0 the default is to allow clients to connect without authentication.
- In 2.0 and up, you must choose your authentication options explicitly before clients can connect.
Therefore, if you are using version 2.0 or later, refer to following link to setup 'mosquitto.conf' in the directory where Mosquitto is installed.
Step 3: Run MQTT Broker through Mosquitto
mosquitto -c mosquitto.conf -p 1883 -v
|Figure: Run MQTT broker through Mosquitto|
Step 4: Setup WIZ5xxSR-RP through WIZnet S2E Configuration Tool for MQTT Broker Connection
- Select MQTT client mode in the Operation mode setting section
|Figure: Select MQTT client mode|
- Setup the remote host IP (or URL) and remote port in the Remote host / port section
|Figure: Setup remote host IP and remote port|
- Setup MQTT options
|Figure: Setup MQTT options|
- Click the Apply Settings button to save the settings
|Figure: Click Apply Settings button|
|Figure: Saved settings|
Step 5: Done
WIZ5xxSR-RP is successfully connected to the MQTT broker!
|Figure: Connect to MQTT broker|