ESP take turns between BLE and Wi-Fi? esp-idf
Posted: Wed Jun 19, 2019 3:30 pm
Hello,
I am working on a project in which I want to do some operations over BLE with a gatt client (smart phone). At some point in operation, the ESP can be sent a command to switch to Wi-Fi so it connects to an AP. While it's connected to the AP, the BLE functionality would be disabled. So I am wondering, what is a good method to do this? I do not want to use Blufi, Arduino, nor Kolban c++ since I want to learn how to do it using esp-idf. At this point in the project I have the BLE functionality set up, but when I try to switch to Wi-Fi, I send the command which disables the bt controller and up to that point everything works. But as soon as I add any mention of the Wi-Fi initialization, literally anywhere in the code editor (I was trying to add that right after I disable the bt controller) the esp can be flashed but I check the monitor and it's going crazy rebooting over and over.
If I want to use Wi-Fi, would I have to completely deinitialize, disable, nuke, ect. the bluetooth??
My code is pretty much the gatt server + gatt security server + service table examples all mashed together
I was trying to add wifi station example, except that it was triggered by "connect to AP" command (which is coming in through BLE characteristic write)
Any help is appreciated!
I am working on a project in which I want to do some operations over BLE with a gatt client (smart phone). At some point in operation, the ESP can be sent a command to switch to Wi-Fi so it connects to an AP. While it's connected to the AP, the BLE functionality would be disabled. So I am wondering, what is a good method to do this? I do not want to use Blufi, Arduino, nor Kolban c++ since I want to learn how to do it using esp-idf. At this point in the project I have the BLE functionality set up, but when I try to switch to Wi-Fi, I send the command which disables the bt controller and up to that point everything works. But as soon as I add any mention of the Wi-Fi initialization, literally anywhere in the code editor (I was trying to add that right after I disable the bt controller) the esp can be flashed but I check the monitor and it's going crazy rebooting over and over.
If I want to use Wi-Fi, would I have to completely deinitialize, disable, nuke, ect. the bluetooth??
My code is pretty much the gatt server + gatt security server + service table examples all mashed together
I was trying to add wifi station example, except that it was triggered by "connect to AP" command (which is coming in through BLE characteristic write)
Any help is appreciated!