DA16200
Wi-Fi MQTT Client Simple Demo
Rev.1.00
Page 5 of 13
Mar, 2022
File of “pwfile.example” can be opened for confirming this setting. Close this PowerShell window means the setting
has been finished.
Reopen a PowerShell window following the previous step, input command “.\mosquitto -c .\mosquitto.conf -v” to run
this tool using mosquitto.conf as a configuration file, while enabling detailed log mode.
At this point, the MQTT broker (MQTT server) setup on PC is running.
Note: The MQTT message send by client cannot be displayed on the MQTT Server entirely, so a smartphone is
necessary to subscribe this message for monitoring the entire information.
Step 4. Download MQTTool from App Store, which is a MQTT client software on Iphone, or something like this from
Google Shop. Here use MQTTool running on Iphone as an example.
Firstly, open “settings” in Iphone, select “WLAN” and choose the name of AP which is projected a Wi-Fi signal by Wi-
Fi Router. After connecting successfully, the bridge between PC and the smartphone is established.
Then open MQTTool, input IP address of MQTT Server (Host) and select Port number 1883, define a Client Id, input
Username and Password to log in MQTT Server. The username and password for logging in MQTT Server has been set
by step3 through mosquitto.conf file. Click “Connect” to realize connection with MQTT Server.