Arduino BLE Scanning under crowded conditions??
Has anyone attempted to use the Arduino BLE Scanner under very crowded conditions?
Tonight I attempted to run an outdoor game where players approach four separate ESP32s with designated BLE Beacons. The ESP32s each have a list of all the beacons and will display a clue once a known beacon's signal becomes strong enough.
This worked fine for the first hour but then the crowd really started to thicken. Standing in any one place with a phone BLE scanner I could see about a 1000 BLE addresses within just a few seconds.
What I found was that two ESP32s that were more in the thick of the crowd could not stay up. They kept rebooting or locking up. Two other ESP32s that were somewhat removed from the crowds were fine. They all run the same code differing only by Preferences/NVS settings.
After stopping the game, I took one of the malfunctioning ESP32s down and carried it to a field that was more removed from the crowds and it seemed to run fine in that location. So for tomorrow's session I will move these units to that field.
But, I wanted to see if other Arduino BLE Scanner users have ever had similar experiences and if they might have any advice for me. - Thanks for anything you might offer!
P.S. I also run a GATT server for administrative tasks like setting the minimum required signal strength to display a clue and entering sleep mode for a certain number of hours.
Posted Oct 22, 2022, 2:30 AM UTC
1000 BLE beacons are a tough call. I've worked with around listening to 150-200 beacon/s on NRF52 in an office setting, and it's pretty hard to make a BLE connection during such circumstances. Ive never tried ESP32 under similar With both BLE and WiFi simultaneously. If I remember correctly, 6ms intervals are the lowest possible BLE beacon limits, so you'll have to ensure an individual beacon not to transmit at a shorter interval than 6 seconds.
Also, don't get fooled by the number of beacons detected; nearby Android phones change their Mac address every once in a while, so you'll get an ever increasing number of detected beacons.
As long as the WiFi channels remain at 1/6/11, they won't interfere with BLE beacons, but any BLE connections will. Or rather, the opposite, since WiFi signals are ~15 dB stronger than BLE signals, so it should actually be any BLE connection that may be dropped.
I've also encountered an Android Xamarin-based app transmitting beacons that /occasionally/ fails to stop beacon transmissions when the app is shut down or crashes.
Thanks a bunch for the info!
Relocating the all the units to the area a bit offset from the crowds did the trick. My game went off with any technical glitches.