Closed martijnthe closed 6 years ago
I'm guessing that's the bug...?
I did a bit more experimentation, calling WLAN().init/deinit
many times in a loop. I did not hit the issue this way, so perhaps there's something else at play.
When I had hit the issue, I checked machine.info()
and there was plenty of heap space (2000KB or so).
I narrow the issue down to _thread
locks leaking memory:
https://github.com/pycom/pycom-micropython-sigfox/issues/219
I still think it may be good to call esp_wifi_deinit()
like the documentation suggests.
This Bug is already solved in Development release , esp_wifi_deinit()
is now called when you do WLAN.deinit()
I'll close the issue as it is already fixed in Dev
Thanks
@iwahdan88 thanks for the response. Re. Development release: when is the v1.19.x release going out of beta?
(sysname='LoPy', nodename='LoPy', release='1.18.1.r1', version='f5d0c68 on 2018-09-06', machine='LoPy with ESP32', lorawan='1.0.2')
-- it's a custom build, but very close to1.18.1.r1
.I'm using
WLAN().deinit()
to (attempt) to shut down the wifi stack. All is well, but after a bunch of on/off toggling, I'm seeing error messages these (I've turned on error logging in the firmware):It looks like the allocator that the wifi stack uses can no longer allocate blocks. I tried searching for where these messages are coming from, but I'm afraid it's coming from within one of the ESP32 binaries/static libraries.
Inspecting the
modwlan.c
, I noticed `esp_wifi_deinit() is not getting called. According to the header:I'm guessing that's the bug...?