Maximum AP for Wifi Scan

Posts: 2
Joined: Fri Jun 15, 2018 2:24 am

Maximum AP for Wifi Scan

Postby gooseneck » Fri Jun 15, 2018 2:31 am

Hello all,

Does anyone have any metrics for the maximum number of Access Points you can scan? I am scanning in wifi congested areas and I am running into issues with reliable repetitive scanning. I estimate that there may be over 150 WAP's in the local vicinity. Looking through the code, I see that memory is dynamically allocated to hold the scan results. Scanning usually works for me, but every once in a while I get the following error message:

08:21:04.864 CORRUPT HEAP: Bad head at 0x3ffe611c. Expected 0xabba1234 got 0x3ffe80e4
08:21:04.869 assertion "head != NULL" failed: file "/Users/ficeto/Desktop/ESP32/ESP32/esp‑idf‑public/components/heap/./multi_heap_poisoning.c", line 199, function: multi_heap_free
08:21:04.886 abort() was called at PC 0x40122b8f on core 0
08:21:04.892 Backtrace: 0x4008af50:0x3ffdcf30 0x4008b04f:0x3ffdcf50 0x40122b8f:0x3ffdcf70 0x4008ac61:0x3ffdcfa0 0x40083faa:0x3ffdcfc0 0x400872fd:0x3ffdcfe0 0x4000bec7:0x3ffdd000 0x401581c6:0x3ffdd020 0x40150b10:0x3ffdd040 0x40152e0f:0x3ffdd080 0x40187b2e:0x3ffdd0a0
08:21:04.918 Rebooting...

I am trying to either cap the number of WAP's that get scanned before giving up, or to try to increase the amount of memory available for the scan. I am currently running in ESP32-Arduino at the moment. Any thoughts?


User avatar
Posts: 126
Joined: Thu Jun 29, 2017 2:15 am

Re: Maximum AP for Wifi Scan

Postby hassan789 » Sun Jun 17, 2018 11:58 pm

Must you be in station mode to do this?
In promiscuous mode, there is a call back for wifi packets. Here you can do an infinite number of AP (as you would get a call back on each beacon frame).
Last edited by hassan789 on Tue Jun 19, 2018 4:47 am, edited 1 time in total.

Posts: 2
Joined: Fri Jun 15, 2018 2:24 am

Re: Maximum AP for Wifi Scan

Postby gooseneck » Mon Jun 18, 2018 2:15 pm

Hi Hassan,

Thank you for the reply and the hint on the promiscuous mode. It's a more in-depth change for what I'm doing now, but it looks like that may work well. Any other memory issue might be in the ESP32-Arduino framework so I'm digging there as well.

Who is online

Users browsing this forum: JoaoLopesF and 10 guests