Secure Hivemq connection using Ethernet W550 with ESP32

I am able to connect with my Hivemq cluster URL : 865c5779b51940bd883f75a227fefd05.s1.eu.hivemq.cloud using AsynchMQTT library with Wifi but unable to connect with Ethernet Module W5500 module. Although it connects to the free mqtt without TLS successfully but not using TLS using Asynch MQTT. Please help me in connecting using Ethernet module. I get following log on serial port: Ethernet.localIP()=192.168.0.47

Ethernet.dnsServerIP()=192.168.0.1

Ethernet.gatewayIP()=192.168.0.1

Ethernet.subnetMask()=255.255.255.0

Connecting to MQTT…

[ATCP] connect: error = -6

Hello @Rizwan

Thank you for reaching out.
Based on the information provided, it appears that your Ethernet module is obtaining the correct network configuration, but encountering an error when attempting to establish the MQTT connection.
The error code “-6” suggests a connection issue. Here are some troubleshooting steps you could try:

  1. Verify TLS Configuration: Ensure that the TLS configuration on the Ethernet module matches the requirements of HiveMQ MQTT broker. Double-check the TLS settings such as certificates, encryption protocols, and port numbers to ensure they are correctly configured.

  2. Check TLS Support: Confirm that the AsynchMQTT library supports TLS connections with the W5500 module. Review the library documentation or check for any known issues related to TLS connections.

  3. Firewall or Network Restrictions: Ensure that there are no firewall rules or network restrictions preventing the Ethernet module from establishing a TLS connection with the HiveMQ cluster URL. Check if any port forwarding or network configurations are needed for TLS connections.

  4. Update Firmware/Drivers: Make sure that your Ethernet module’s firmware and drivers are up to date. Sometimes, compatibility issues or bugs in older firmware versions can cause connection problems.

We hope this helps. Feel free to reach us in case of any questions.

Regards,
Sheetal from HiveMQ team

Problem is still unresolved. Some SSL codes to communicate with HIVEMQ using Ethernet connection are available. But these codes either require serevr finger print like : const uint8_t MQTT_SERVER_FINGERPRINT = {0xCA,0xBD,0x2A,0x79,0xA1,0x07,0x6A,0x31,0xF2,0x1D,0x25,0x36,0x35,0xCB,0x03,0x9D,0x43,0x29,0xA5,0xE8};// or Private key in addition to Root_Ca certificate. These are not available for HIVEMQ cluster account as we can get easily in AWS MQTT. Please help/guide.

Hello @Rizwan

Thank you for reaching out. We appreciate your prompt response. To acquire the root certificate, you can easily download it here. However, it’s essential to mention that since it’s a root CA certificate, there isn’t a private key available.

To provide you with the most accurate assistance regarding the issue you’re encountering, could you kindly share the complete code with us? Having access to this additional information will enable us to gain a clearer understanding of the challenges you are facing and assist you more effectively.

Regards,
Sheetal from HiveMQ Team

Hi, did you solve this problem? Please clarify if you have solved it.