-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
[STM32-F2] - mqtt connect fails on latest builds. #5071
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the report. I can reproduce something similar with socket read not returning data. It looks like it might have something to do with mDNS and the latest version of lwIP. As a temporary workaround you can try disabling mDNS via: --- a/ports/stm32/lwip_inc/lwipopts.h
+++ b/ports/stm32/lwip_inc/lwipopts.h
@@ -28,8 +28,8 @@
#define LWIP_DHCP_CHECK_LINK_UP 1
#define DHCP_DOES_ARP_CHECK 0 // to speed DHCP up
#define LWIP_DNS 1
-#define LWIP_DNS_SUPPORT_MDNS_QUERIES 1
-#define LWIP_MDNS_RESPONDER 1
+#define LWIP_DNS_SUPPORT_MDNS_QUERIES 0
+#define LWIP_MDNS_RESPONDER 0
#define LWIP_IGMP 1
#define LWIP_NUM_NETIF_CLIENT_DATA 1 // mDNS responder requires 1 |
It turns out the lwIP TCP timer was not being scheduled because there was not enough buffers left to allocate its slot in the system timer list, and so TCP data was never being sent (UDP was fine). This was because mDNS took an extra slot in the timer list. This bug should be fixed by b0e17bb |
First, my apologies in following up; new to esp32 but been around (lots) in other arenas. Was using esp32-20190802-v1.11-187-g00e7fe8ab.bin in my initial moves to esp32 fr rpis (esp is more straightforward for some analog work). Wasn't getting simple mqtt to connect (socket failures). Found this post (just now - 9/13 ~6AM EST). Using HUZZAH32 – ESP32 Feather Board (hope acceptable to state). Expecting perhaps new bin will fix. But (newbie I guess): What specific bin to use? I think I 'could' go back to esp32-20180511-v1.9.4 which herein states does work. Or move ahead to esp32-20190913-v1.11-312-g22099ab88 which I've d/l'd from http://www.micropython.org/download. But is fix mentioned in 312 build? Don't know how to determine. Thank you for your patience in replying. |
Follow-up (FWIW): I loaded the 1.11 312 build and the adaptation of pacmac's simple test into my code and it works just fine (using mosquitto's test site). So to all, thank you - 312 appears to fix this. FYI, I wrote several data collectors using mostly rpiz-Ws with GOLANG. The collector code runs on any of W10s, Macs, Ubuntu (17, 18), also in GOLANG. So my next step is to do more analog 'stuff' using the ESP32s (been mostly DS18b20s n I2C data gathering). Given the collector / local controller comm uses MQTT with formatted data reporting, I needed to extend that infrastructure to include several ESP32s. The DB uses MySQL; have ~60m rows in it. Again, thank you. Had been trying this on 1.11 187 for several weeks (on n off). Given my newbie 'status' I was exhausting everything I could think of before posting here. Then saw this post. Was seeing socket problems but just 'was sure' it was my problem somewhere. |
@WadeJA note that the error reported here, and the fix, is for stm32, not esp32 boards. |
Thanks Damien and sorry for the delay, yes confirmed the issue is now fixed. |
…n-main Translations update from Weblate
When using build MicroPython v1.9.3-1869-ga9b1d3ca3, the mqtt transaction succeeds:
On latest release: MicroPython v1.11-274-g06661890d - it fails:
This is my test code:
This is the code in mqtt_simple / robust that is debugged & failing:
This is also reported here: https://forum.micropython.org/viewtopic.php?f=2&t=6890
The text was updated successfully, but these errors were encountered: