mqtt_publisher on nucleo_stm32f429zi #55360
-
I'm trying to run the mqtt_publisher sample on Nucleo_STM32F429zi but getting mqtt_connect: -116 error returned. I am attempting to connect to https://test.mosquitto.org/ (IP address 91.121.93.94) on port 1883. I changed the IP from the one given in the sample (37.187.106.16) as it's outdated. I set the static IP of the zephyr client to 192.168.0.13. I verified the sample works OK with a mosquitto broker running on my local machine. Has anyone had similar issues? TIA! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I got it working by adding the following to my prj.conf file: CONFIG_NET_CONFIG_MY_IPV4_ADDR should be set to some unused IP address on your local network Hope this helps someone in the future! |
Beta Was this translation helpful? Give feedback.
I got it working by adding the following to my prj.conf file:
CONFIG_NET_CONFIG_SETTINGS=y
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.168.0.13"
CONFIG_NET_CONFIG_PEER_IPV4_ADDR="91.121.93.94"
CONFIG_NET_CONFIG_MY_IPV4_GW="192.168.0.1"
CONFIG_NET_CONFIG_MY_IPV4_ADDR should be set to some unused IP address on your local network
CONFIG_NET_CONFIG_PEER_IPV4_ADDR should be set to the IP address of https://test.mosquitto.org/
CONFIG_NET_CONFIG_MY_IPV4_GW should be set to your routers gateway address
Hope this helps someone in the future!