espressif / esp-rainmaker

ESP RainMaker Agent for firmware development
Apache License 2.0
433 stars 146 forks source link

BLE and WiFi coexistence (MEGH-3683) #144

Closed jacek12345 closed 1 year ago

jacek12345 commented 1 year ago

I added BLE scanning in app. It scans advertising packets from my BLE sensors. Advertising frames are sended by sensor rarely, two frames every 10s (I can adjust interval between packets). There is problem that most of this packets are missed when I enable ESP32_WIFI_SW_COEXIST_ENABLE. If disable this flag, all advertising packets from sensor are received but wifi doesn't connect. Is any way for balance wifi-BLE reliability little more for BLE ?

jacek12345 commented 1 year ago

I disabled ESP32_WIFI_SW_COEXIST_ENABLE and set .itvl and .window in ble_gap_disc_params that there is 200ms for wifi and 300ms for BLE. My BLE sensor sends 2 packets with 280ms interval. Works very good, always receive one packet.