As the title says... Chat on...

User avatar
By dnc40085
#14995 Today I decided to get the esp8266 SDK toolchain working(https://github.com/pfalcon/esp-open-sdk) and compile the nodemcu firmware from the dev096 tree of the git repo (commit:d5731dd9bd) so I could burn it to try it out and interestingly enough it dropped my memory use down to 256 bytes and on subsequent runs it doesn't change by too much (~64 bytes)
Code: Select all> =node.heap()
20000
> dofile("CheckAP.lua")
> Linksys_dd-wrt:        00:1d:7e:XX:XX:XX,-54

myssid:     1a:fe:34:XX:XX:XX,-1

xfinitywifi:        c6:27:95:XX:XX:XX,-45

=node.heap()
19736
>

While I was at it, I decided to pull the source for release 20150406 (commit: ba836cf5de) and I compared the functions(wifi_station_listap(), wifi_scan_done(), wifi_scan_succeed) and found no differences.
User avatar
By dnc40085
#15855
cal wrote:Moin,

may I suggest to try setting value to 0 or "" instead of function?

Do just want to get it fixed or do you want to understand the issue and probably fix it yourself?

Carsten


Sorry about the long delay on my reply, didn't realize the thread already had a second page.

As for just fixing it or understanding the issue, I'll take option B as I've been trying to figure it out on my own with no avail.

My apologies, I never posted the results of my attempt to use your previous solution (wifi.sta.getap(nil))

Code: Select all> =node.heap()
21784
> dofile("CheckAP.lua")
> myssid:      1a:fe:34:xx:xx:xx,-3

xfinitywifi:      96:1a:ca:xx:xx:xx,-88

Linksys_dd-wrt:      00:1d:7e:xx:xx:xx,-69

=node.heap()
return node.heap()
> =node.heap()
18048

The reason I ended up with (wifi.sta.getap(function() return end)) instead of (wifi.sta.getap(nil)) is because for some reason when I put anything else other than a function in the parentheses, the function doesn't terminate right and just echoes the next command I enter and never releases the memory.