2024-07-30 10:05 PM
Hi Team,
I am currently working on a project involving the STM32F407G microcontroller, where I have configured MQTT to connect to a server. However, I am encountering persistent issues and have been unable to establish a successful connection.
The specific error messages I receive are:
My setup includes:
Despite spending over a week troubleshooting, I have been unable to resolve these issues. I have attached the relevant sections of my code for your reference. Could someone please provide guidance or suggestions on how to overcome these errors?
Best Regards,
Gagan Gowda
2024-09-11 04:28 AM
Hello @ggowd.1 ,
If you are able to ping the host then the problem seems to be the connection to the MQTT server so make sure it is reachable on your local network (check port 1883 accessibility).
Regards
2024-09-12 04:51 AM
Hi @STea ,
Upon launching the program, I am unable to connect this broker from another device. I have confirmed that I am in the same network and that the server name is correct. I have also created a server on a different device and subscribed to the stm32f407g controller; however, when I attempt to publish from stm32f407 and attempt to connect to stm32f407 from a different device, I receive an error message.Error ConnectionRefused: [WinError 10061] Because the target machine actively refused to connect, no connection could be established.
Port was open
Best Regards,
Gagan Gowda
2024-09-18 12:23 AM
Hi @STea
I wanted to follow up on my earlier message regarding the connection issue I’m experiencing while trying to publish to an MQTT broker using the STM32F407G controller. Here’s what I’ve done so far:
When I create the MQTT broker on a different device, I can subscribe to it successfully from the STM32F407G controller. However, when I attempt to publish from the STM32F407G and try to connect to it from a different device, I receive the following error:
"Error ConnectionRefused: [WinError 10061] The target machine actively refused to connect."
Could you please provide guidance on why the connection might be refused when using the STM32F407G as the broker, and any settings I may need to check or adjust?
Best Regards,
Gagan Gowda