cyberman54 / ESP32-Paxcounter

Wifi & BLE driven passenger flow metering with cheap ESP32 boards
https://cyberman54.github.io/ESP32-Paxcounter/
Other
1.69k stars 397 forks source link

Wifi scan cycle too fast #749

Closed embeeweezer closed 3 years ago

embeeweezer commented 3 years ago

Somehow my board scans all wifi channels in under a second, and finds only 3 to 5 items (running airodump on my laptop finds over 20 randomized mac addresses on average). The strange thing is that changing WIFI_CHANNEL_SWITCH_INTERVAL (from 50 to 100 or even 200) in paxcounter.conf does not show any slow down at all. Terminal output shows no errors. I compiled the latest zip from github and I'm running on a 'TOOGOO' board (https://www.amazon.de/gp/product/B07NKY9PNW) and even though it has TTGO printed on the back it's not a TTGO Lora32 v1 but it seems to be a Heltec v1. The LED's (it has at least a blue and a red one) don't light up when running. Since I have not configured TTN yet I've compiled without Lora active. Compiling without BLE does not change the fast scanning bahaviour. Compiling itself is without errors, only this warning: BLERemoteService.cpp:246:89: warning: parameter 'pCharacteristicMap' set but not used [-Wunused-but-set-parameter]

cyberman54 commented 3 years ago

Thank you for reporting this behaviour, and sorry that you had trouble running this software.

You indeed spotted a major bug, making wifi channel rotation 10 times too fast!

So you probably could not recognize the impact after you modified the WIFI_CHANNEL_SWITCH_INTERVAL setting. The bug came in on 10th Dec 2020 with this commit. I fixed it in master.

/cc @spmrider @FlorianLudwig

embeeweezer commented 3 years ago

Danke sehr & keep up the good work!

Studio Mike Breeuwer | Amsterdam +31 6 8155 8787

Op do 25 feb. 2021 om 19:10 schreef Verkehrsrot notifications@github.com:

Thank you for reporting this behaviour, and sorry that you had trouble running this software.

You indeed spotted a major bug, making wifi channel rotation 10 times too fast!

So you probably could not recognize the impact after you modified the WIFI_CHANNEL_SWITCH_INTERVAL setting. The bug came in on 10th Dec 2020 with this commit https://github.com/cyberman54/ESP32-Paxcounter/commit/28d30493fde556cee758891049d79ea313a35434#diff-2db3344377dee921191944995ae67d7c14ca62cedad71d8c5c57e4ad04d65dd1 . I fixed it in master.

/cc @spmrider https://github.com/spmrider @FlorianLudwig https://github.com/FlorianLudwig

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cyberman54/ESP32-Paxcounter/issues/749#issuecomment-786098486, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKP4W6LNRMVH4QV36GQQXTTA2HA3ANCNFSM4YGVMCLQ .