esp-wifi: DHCP example fails to get an IP address on ESP32-C3
Hi, I tried running the DHCP example (commit a0a6b5fbcf7) on my esp32-c3-mini and it appears as though the code is racy. It fails to get an ip address, unless I do some random permutation of dump_packets, wifi_logs, and manually putting in for i in 1000 {} style loops.
I’m working with @ImUrX and he also cannot get the example working on his PCB, although his is a lolin_c3_mini v1.0.0 (which may have hardware issues with wifi, so could be a red herring).
If I use --release it works consistently.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (16 by maintainers)
Ok - probably the sentence “In general you should use the release profile since otherwise the performance is quite bad.” isn’t scary enough - will update the README in the linked pull-request
If it is able to connect or not in dev-mode (i.e. with debug-assertions) probably depends on how strict an AP is about timeouts
I was able to get it working for me again in #90
In general dev-mode isn’t really expected to work - some targets won’t even get over the connect step and for BLE even basic advertising won’t work