2024-08-30 02:44 AM - last edited on 2024-08-30 04:23 AM by SofLit
Hi ,
Recently, I`m using STM32H7 MCU to implement Ethernet Application. I have try TCP Client Echo from example code and it works. Then I want to try with MQTT and it always gets fault.
And using mqtt_client_connect function, it will return ERR_RTE (Routing Problem)
I have doing the works like,
- Ping from PC to my board, so it seems well connection.
- Set the static IP for connection port.
- Open the 1883 port from firewall.
- Set the MQTT broker and test at local PC with static IP Address.
So I think is there something I miss. Setting? or Connection?
I`m a beginner on internet knowledge.
Appreciate any help!
2024-09-02 02:23 AM
Hello @Charlie CHEN ,
If you can share with us more details about the example used for the implementation of MQTT client from MCU side (library used ...) and the exact STM32H7 microcontroller used.
in the meanwhile, her are some general advice about the implementation of MQTT client you should take into consideration:
you can get inspired from some implementations:
GitHub - eziya/STM32F4_HAL_ETH_MQTT_CLIENT: STM32 + FREERTOS + LWIP + MQTT example
Regards
2024-09-04 11:12 PM
Hi @STea,
Sorry for lately busy.
Thanks for your reply.
For more information below,
1. Set MPU in 0x30040000 region for protect as the most setting.
2. Enable LWIP in all default setting. Only set the Static IP Address
3. API Reference to Erik Andersson Example.
New client space > Connect to Broker address(Failed here) > Publish to a topic
Up the operation, it always get ERR_RTE back.
And I`m not sure about your advice.
Thanks again.
2024-09-05 01:52 AM
Hello @Charlie CHEN ,
Which microcontroller are you using H723 or H743 for example.
Regards
2024-09-05 02:09 AM - edited 2024-09-05 02:45 AM
Hi @STea ,
I work with H750. And using external flash with bootloader.
And as attachment, is my setting for MQTT applicatoin.
Best regards,