Hello,
I am facing an issue connecting my ESP8266 to Arduino IoT Cloud via MQTT over a secure connection (port 8883). My goal is to publish data to my web page using Arduino IoT Cloud, but my ESP8266 fails to establish the MQTT connection.
Hardware & Configuration
- Board: Wemos D1 Mini (ESP8266)
- WiFi: Tested on multiple networks (Hotspot and home WiFi)
- MQTT Broker:
mqtts.arduino.cc
(port 8883) - Libraries used:
ESP8266WiFi.h
WiFiClientSecure.h
PubSubClient.h
Issue Details
- The ESP8266 successfully connects to WiFi and gets a local IP address.
- When trying to connect to
mqtts.arduino.cc:8883
, I get a secure MQTT connection failure. - I tested with
test.mosquitto.org
on port 1883 (non-secure), and it works fine. - When testing with telnet and OpenSSL from my PC, the connection to
mqtts.arduino.cc:8883
also fails (see logs below).
Tests Performed
- Tried different WiFi networks → Same issue
- Tested with OpenSSL on PC (
openssl s_client -connect mqtts.arduino.cc:8883
) → Connection failed - Pinged
mqtts.arduino.cc
→ Host not found - Checked firewall and network restrictions → Nothing is blocked
ESP8266 Logs
🔹 Connecting to WiFi...
✅ Connected to WiFi!
IP Address: 192.168.1.16
🔹 Connecting to secure MQTT server (Arduino Cloud)...
❌ Secure MQTT connection failed with Arduino IoT Cloud.
⚠️ Retrying connection...
Questions
- Is
mqtts.arduino.cc
still accessible on port 8883? - Is there any specific configuration needed for ESP8266?
- What alternatives to Arduino IoT Cloud can I use to send data to my web page?
Thanks in advance for your help!