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-08-02 04:23 AM
Hello @ggowd.1 ,
Your attachment was not included in the post can you add it. also is it possible to test that your Hardware setup is working by trying to run a simple TCP echo example to make sure that you are establishing a connection correctly with your external PHY .
Regards
2024-08-05 11:29 PM
Hello @STea ,
Thank you for your suggestion. I was able to ping the IP address in the command prompt, which indicates that the hardware setup is working to some extent. However, I am encountering an issue where I cannot subscribe to the MQTT server using Mosquitto.
Could you please provide guidance or documentation, procedures, or links to MQTT protocol.
Best Regards,
Gagan Gowda
2024-08-14 06:21 AM
Hello @ggowd.1 ,
You can see the following eziya/STM32F4_HAL_ETH_MQTT_CLIENT: STM32 + FREERTOS + LWIP + MQTT example (github.com)
which implement an MQTT client on STM32F4 using Lwip and FreeRtos which is very similar to your usecase
see also How to Implement Embedded Mqtt Client Using W5500 IC. : 5 Steps - Instructables
you can see also an implementation of pubsubclient MQTT using STM32duino which is a very simple and quick way to establish a client with very little time and effort STM32Examples/examples/Communication/MQTT/PubSubClient/mqtt_STM32Ethernet/mqtt_STM32Ethernet.ino at main · stm32duino/STM32Examples (github.com)
Regards
2024-08-20 11:51 PM
Hi @STea ,
Thank you for sharing links about the MQTT protocol. I am currently working on Ethernet and MQTT protocol without using RTOS. If it's not feasible to implement them without RTOS, I will transition to working with RTOS on the ENC28J60. Once Ethernet is functioning with RTOS, I will then proceed to implement MQTT.Is there a procedure to configure the ENC28J60 with RTOS on the STM32F407G board?
Best Regards,
Gagan Gowda