How can I fix the CONNECTION_REFUSED error in my STM32 Nucleo H743ZI2 MQTT setup?

Hey guys could anyone assist me with setting up MQTT communication on my STM32 Nucleo H743ZI2? I need to establish MQTT communication over TCP/IP with another STM32 device. Currently, I am using the standard MQTT library from LWIP, but I am open to alternatives like the PAHO library or others. I can only achieve a TCP connection but get a CONNECTION_REFUSED error when attempting MQTT. I've verified network configurations and broker details. Any guidance or examples would be greatly appreciated. @Middleware & OS
Solution:
To resolve the CONNECTION_REFUSED error and establish MQTT communication: - Verify MQTT broker settings - Check network connectivity - Configure MQTT client correctly...
Jump to solution
4 Replies
Joseph Ogbonna
Joseph Ogbonna4mo ago
What device are you using to communicate with the server
Daniel kalu
Daniel kalu4mo ago
I'm using an STM32 Nucleo H743Z12 board as the MQTT client device and ethernet connection
Solution
Joseph Ogbonna
Joseph Ogbonna4mo ago
To resolve the CONNECTION_REFUSED error and establish MQTT communication: - Verify MQTT broker settings - Check network connectivity - Configure MQTT client correctly - Enable debugging for tracing - Update LWIP library if necessary If issues persist, consider firewall/router configurations, broker settings, or network congestion. Also make sure that the Ethernet port and cable are well appropriately put in place.
RED HAT
RED HAT4mo ago
Hi @Daniel kalu , The CONNECTION_REFUSED error typically indicates an issue with your MQTT broker settings or credentials. Double-check your MQTT broker’s IP address, port, username, and password. Also, ensure the broker is configured to allow connections from your device.
Want results from more Discord servers?
Add your server