WIFI/BLE Simultaneously
Re: WIFI/BLE Simultaneously
In esp-idf v4.2beta1 Bluetooth and WiFi works simultaneously, but by some reason discovery services does not work from phone ... it is strange
Re: WIFI/BLE Simultaneously
Hello @ESP_Tianhao this post was the most usefull I found until now. Thanks for it. Could you please tell me how to choose Balance, prefer WiFi or prefer Bluetooth? In Menuconfig I found where to activate the SW control coexistence but I'm unable to find how to select the SW control option to any of the 3 possibilities you mentionned. I use the current master branch of IDF.ESP_Tianhao wrote: ↑Tue Aug 21, 2018 9:04 amIn software control mode, there's 3 option to modify the coexist preference(Balance, prefer to WiFi and prefer to Bluetooth).
Re: WIFI/BLE Simultaneously
I have read a lot here regarding the parallel usage of WiFi and BLE.
Since some got it working I decided to give it also a try.
My application has two tasks, one for WiFi and other stuff and one for BLE. I could get both working together. BLE scans every 5s for advertisenets and detects the ones I'm sending from my phone. WiFi does scan the SSIDs and connects to AP. Next step was to send MQTT messages via WiFI, when some advertisements are detected. This also worked.
But then I decided to add a WebServer to allow some configurations via WiFi. And here startet the problems. When I comment the code for BLE the WebServer works well. As soon I only do BLEDevice::Init(""), the request from a browser to the WebServer hangs. using the browser debugger I see the request is not fully answered. The response is a somehow long one, it has HTML, CSS ans JS all inline, but zipped. I've played a bit and if I shorten the response (only a simple "Hello Page" or even a bit more) it works. Everytime I make the reponse a bit larger, it hangs.
It seems for MQTT the packages sent are short enough to work.
Since I only have the BLEDevice::Init() statement running (the scanning is commented out temporary) I do not see a possibility to init BLE without turning on the radio. I could live with a solution to disable BLE scanning while the WebServer is responding.
Does someone have an idea how to acheave this?
One more, for my WebServer I'm using "ESPAsyncWebServer". Would it be better to use the synchronous WebServer, since in that case I have to call to handle request by my own in the loop?
Since some got it working I decided to give it also a try.
My application has two tasks, one for WiFi and other stuff and one for BLE. I could get both working together. BLE scans every 5s for advertisenets and detects the ones I'm sending from my phone. WiFi does scan the SSIDs and connects to AP. Next step was to send MQTT messages via WiFI, when some advertisements are detected. This also worked.
But then I decided to add a WebServer to allow some configurations via WiFi. And here startet the problems. When I comment the code for BLE the WebServer works well. As soon I only do BLEDevice::Init(""), the request from a browser to the WebServer hangs. using the browser debugger I see the request is not fully answered. The response is a somehow long one, it has HTML, CSS ans JS all inline, but zipped. I've played a bit and if I shorten the response (only a simple "Hello Page" or even a bit more) it works. Everytime I make the reponse a bit larger, it hangs.
It seems for MQTT the packages sent are short enough to work.
Since I only have the BLEDevice::Init() statement running (the scanning is commented out temporary) I do not see a possibility to init BLE without turning on the radio. I could live with a solution to disable BLE scanning while the WebServer is responding.
Does someone have an idea how to acheave this?
One more, for my WebServer I'm using "ESPAsyncWebServer". Would it be better to use the synchronous WebServer, since in that case I have to call to handle request by my own in the loop?
Re: WIFI/BLE Simultaneously
In last release v4.2 Ble/WiFi coexistence is working, but it depends on order of starting ...
If I first start Ble and then WiFi then only WiFi works, but if first I start WiFi and then Ble - both Ble and WiFI works, it is strange issue
If I first start Ble and then WiFi then only WiFi works, but if first I start WiFi and then Ble - both Ble and WiFI works, it is strange issue
Who is online
Users browsing this forum: No registered users and 52 guests