Episode 11: Pairing GUI-O with ESP32 (MQTT mode)
-
NOTE: The following tutorial applies to IoT (MQTT) connection mode only.
This tutorial will show how to easily pair ESP32 with GUI-O application in IoT (MQTT) connection mode. The pairing procedure is automated (guided) and requires only necessary user input (e.g., selecting WiFi router and inputting router password). You can even implement the pairing protocol yourself on your specific device (visit www.gui-o.com and download the developer manual for more information).
To see the ESP8266 pairing example (and other examples), navigate to https://www.gui-o.com/examples.
Prerequisites:
-
ESP32 based board
-
Download Arduino IDE
-
Download ESP32_GUI-O_pairing_libs.zip and extract the archive (the archive contains a bundle of necessary libraries, you can alternatively install them yourself using the "Arduino library manager")
-
Download ESP32_GUI-O_pairing_source.zip or ESP32_GUI-O_pairing_source_SSL_TLS.zip (for secure connection) and extract the archive
Add ESP32 board support
-
Open Arduino IDE
-
Select "File -> Preferences" and under Additional Boards Manager URLs enter: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
-
Select "Tools -> Board -> Boards manager..."
-
Search and install "esp32" by Espressif Systems
-
After installation select "Tools -> Board -> ESP32 Arduino -> ESP32 Dev Module"
Include necessary libraries
-
Select "Sketch -> Include library -> Add .ZIP library..."
-
Navigate to location, where ESP32_GUI-O_pairing_libs.zip archive was extracted
-
Select .zip library and confirm (repeat procedure until all .zip libraries are included)
Upload the code
-
Select "File -> Open"
-
Navigate to location, where ESP32_GUI-O_pairing_source.zip archive was extracted
-
Select PairingMQTT.ino and confirm
-
Make sure that ESP32 board is connected to your PC
-
Make sure that the correct port is selected
-
Press upload button to start code upload (IMPORTANT NOTE: on some ESP32 boards, the BOOT button must be pressed when the upload starts)
-
Reset ESP32 board after code upload
The video tutorial below shows the above steps.
Pair GUI-O application with ESP32 board
The pairing procedure is fully guided within GUI-O application. The important parts are described below.
-
Open GUI-O application and navigate to settings
-
Make sure that IoT connection is active (select "Connections -> IoT")
-
From main settings menu select "Quick pair -> Direct device pairing"
-
Name your ESP32 device (setting your user name is optional) and confirm
-
Wait while surrounding WiFi networks are scanned then select your (router) WiFi network and input your password
-
Put the ESP32 device into pairing mode then search and connect to guio_ device (input password 12345678 when prompted)
-
IMPORTANT NOTE: Do not switch network if prompted by Android (keep connection to guio_ device)
-
Press "back button" and wait for pairing procedure to complete successfully
-
Select your (router) WiFi network and press "back button" to start the connection test
The video tutorial below shows the above steps.
If you have any questions or run into any problems, please let me know!
Best regards,
kl3m3n -