MQTT connection fails when using static IP
Posted: Mon Dec 14, 2020 5:36 am
hi
i am using MQTT example from ESP -IDF, when i first tested it worked very well , it connected well with server and published DATA,
I am using Ethernet, but to my need i set ethernet IP as static , and after that MQTT connection fails.
idf version: 4.0
folowing is log from file,
D (13538) emac_esp32: receive len= 249[0m
[0;32mI (13558) eth_example: free heap: 179932[0m
D (13698) emac_esp32: receive len= 78[0m
D (13698) emac_esp32: receive len= 86[0m
D (14498) emac_esp32: receive len= 60[0m
D (15128) emac_esp32: receive len= 60[0m
D (16138) emac_esp32: receive len= 60[0m
D (16628) MQTT_CLIENT: Reconnecting...[0m
[0;32mI (16628) MQTT_API: Other event id:7[0m
[0;31mE (16628) MQTT_CLIENT: Error transport connect[0m
[0;32mI (16628) MQTT_API: MQTT_EVENT_ERROR[0m
D (16628) MQTT_CLIENT: Reconnect after 10000 ms[0m
[0;32mI (16638) MQTT_API: MQTT_EVENT_DISCONNECTED[0m
i am using MQTT example from ESP -IDF, when i first tested it worked very well , it connected well with server and published DATA,
I am using Ethernet, but to my need i set ethernet IP as static , and after that MQTT connection fails.
idf version: 4.0
folowing is log from file,
D (13538) emac_esp32: receive len= 249[0m
[0;32mI (13558) eth_example: free heap: 179932[0m
D (13698) emac_esp32: receive len= 78[0m
D (13698) emac_esp32: receive len= 86[0m
D (14498) emac_esp32: receive len= 60[0m
D (15128) emac_esp32: receive len= 60[0m
D (16138) emac_esp32: receive len= 60[0m
D (16628) MQTT_CLIENT: Reconnecting...[0m
[0;32mI (16628) MQTT_API: Other event id:7[0m
[0;31mE (16628) MQTT_CLIENT: Error transport connect[0m
[0;32mI (16628) MQTT_API: MQTT_EVENT_ERROR[0m
D (16628) MQTT_CLIENT: Reconnect after 10000 ms[0m
[0;32mI (16638) MQTT_API: MQTT_EVENT_DISCONNECTED[0m