MQTT Secure Connection Issue (Port 8883) with ESP8266 and Arduino IoT Cloud

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

  1. The ESP8266 successfully connects to WiFi and gets a local IP address.
  2. When trying to connect to mqtts.arduino.cc:8883, I get a secure MQTT connection failure.
  3. I tested with test.mosquitto.org on port 1883 (non-secure), and it works fine.
  4. 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.ccHost 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

  1. Is mqtts.arduino.cc still accessible on port 8883?
  2. Is there any specific configuration needed for ESP8266?
  3. What alternatives to Arduino IoT Cloud can I use to send data to my web page?

Thanks in advance for your help! :blush:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.