Replies: 1 comment 2 replies
-
The ESP32 works well with both BLE and WiFi active and transmitting/receiving. No need to turn one off to use the other. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all - running into an issue trying to use BLE and WiFi together on my ESP32. From a high level, I want my board to be able to advertise data via a BLE server and also be able to periodically send some data in a WiFi request in a couple of different async loops. I have each of the two loops working the way I want when running them in isolation, but combining them together is where things are getting a bit tricky for me.
From my understanding, the ESP32 uses the same radio to transmit bluetooth and WiFi, so you actually are not able to connect to either one while the other is active. My issue is with trying to turn off BLE server advertising, connect to WiFi, disconnect from WiFi, and then restart the BLE advertising.
My code snippets are above. From my testing, it seems like I am able to successfully initially start the server, turn it off via aioble.stop(), connect to wifi, disconnect from wifi, but when trying to restart the ble server in advertise(), I am getting unexpected behavior, and the error is this:
Error during advertisement: [Errno 116] ETIMEDOUT
EXITING FINALLY
E (25130) BLE_INIT: controller init failed
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
I'm fairly new to this and just looking to sanity check that I am on the right path. Is aioble.stop() the correct way to free up the bluetooth/wifi radio for my goal? Or am I going completely off in the wrong direction.
Beta Was this translation helpful? Give feedback.
All reactions