Esp32 promiscuous mode - limit callback packet data size
Posted: Sat Jan 06, 2018 11:15 am
Hello!
I was playing around with promiscuous mode on my ESP32, and noticed that it can miss a lot of packets, presumably because calling the promiscuous callback function and copying all the packet data is a fairly slow process.
I am trying to develop an app that only collects the header of the packet - I don't care about the packet contents, all I'd like is the RSSI value.
I'm thinking there must be a way to limit the data that gets sent back to the promiscuous mode callback function, but it's obvious that there's no established API function that can do this. I looked into the IDF code, and it appears that the function that copies packet data to the callback function is located in a precompiled library (libnet80211.a)
Does anyone have any thoughts about how to only get the headers of the packets, in a way that would speed up packet collection? In my tests, while transmitting about 1,200 packets per second on my computer, the ESP32 only was picking up about 1/4 of those packets, or 300 packets per second.
The thought that immediately comes to mind is to disassemble the libnet80211.a file, and modify it to limit how many bytes it sends to the callback function, but that would be getting very involved...
Anyone have any thoughts, or directions I could go to start exploring this?
Thank you!
I was playing around with promiscuous mode on my ESP32, and noticed that it can miss a lot of packets, presumably because calling the promiscuous callback function and copying all the packet data is a fairly slow process.
I am trying to develop an app that only collects the header of the packet - I don't care about the packet contents, all I'd like is the RSSI value.
I'm thinking there must be a way to limit the data that gets sent back to the promiscuous mode callback function, but it's obvious that there's no established API function that can do this. I looked into the IDF code, and it appears that the function that copies packet data to the callback function is located in a precompiled library (libnet80211.a)
Does anyone have any thoughts about how to only get the headers of the packets, in a way that would speed up packet collection? In my tests, while transmitting about 1,200 packets per second on my computer, the ESP32 only was picking up about 1/4 of those packets, or 300 packets per second.
The thought that immediately comes to mind is to disassemble the libnet80211.a file, and modify it to limit how many bytes it sends to the callback function, but that would be getting very involved...
Anyone have any thoughts, or directions I could go to start exploring this?
Thank you!