How to connect STM32U5 ( B-U585IOT02A ) using mqtt to Local mqtt Broker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-10 1:54 PM
Hello Community,
I want to connect my STM32U5 ( B-U585IOT02A ) using mqtt to local broker which is running on ubuntu system.
I found one example running mqtt in STM32U5 ( B-U585IOT02A ).
But this example demonstration runs mqtt with tls and test broker test.mosquitto.com But in my case I just want to share sensors data using mqtt to mqtt broker running in ubuntu system over same wifi network.
Can Anyone can tell me where should I do changes in the example to achieve connection to local broker.
Thanks in advance for you valuable answer.
Solved! Go to Solution.
- Labels:
-
AzureRTOS
-
STM32U5 series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-21 7:20 AM
Hello,
In order to connect to your local MQTT broker, you have some changes to make :
- Remove Security :
- Replace nxd_mqtt_client_secure_connect function by nxd_mqtt_client_connect and make the corresponding changes.
- Define MQTT_PORT NXD_MQTT_PORT (1883) instead of NXD_MQTT_TLS_PORT (8883)
- Replace MQTT_BROKER_NAME by your local Broker IP address.
- Assign your local Broker IP to the mqtt_server_ip.nxd_ip_address.v4 variable.
- Remove DNS process.
Regards
Mahdy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-08-10 6:19 PM
Hello,
I will share your request with colleague if someone can help, let you know when I have feedbacks.
Best Regards,
Younes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-21 7:20 AM
Hello,
In order to connect to your local MQTT broker, you have some changes to make :
- Remove Security :
- Replace nxd_mqtt_client_secure_connect function by nxd_mqtt_client_connect and make the corresponding changes.
- Define MQTT_PORT NXD_MQTT_PORT (1883) instead of NXD_MQTT_TLS_PORT (8883)
- Replace MQTT_BROKER_NAME by your local Broker IP address.
- Assign your local Broker IP to the mqtt_server_ip.nxd_ip_address.v4 variable.
- Remove DNS process.
Regards
Mahdy
