WIFI/BLE Simultaneously

Posts: 31
Joined: Thu Aug 09, 2018 9:56 pm

Re: WIFI/BLE Simultaneously

Postby Pcborges » Fri Oct 04, 2019 11:50 pm

Hi, it is said above that using BT and WiFi at the same time as long as they are not used simultaneously may work.

I cannot make it work even when only one is used at any one time.

I have a ESP32-CAM that sends emails with photos but needs WiFi connection.
Wifi credentials are stored on SD card.
Asking users to remove the SD card to configure WiFi credentials is quite a pain, most cannot do it.

So I decided that I could use Bluetooth to setup a config.txt file with the necessary credentials and the problem would be solved.

The problem is that I cannot make ESP32 WiFi and Bluetooth (serial) work activated (even not transmuting) at the same time.

I would like to keep Bluetooth on for about 2 minutes when the the system is powered up then switch off Bluetooth and let WiFi take over.

I can indeed switch off Bluetooth using the command btStop(); but, although Bluetooth disconnects and WiFi can connect back to the router connection with the mail server always fail.

Removiing the following line from Setup() solves the problem.
// inti Bluetooth
SerialBT.begin("myBT"); //Bluetooth device name

Assistance welcome.

Posts: 1126
Joined: Tue Sep 06, 2016 9:37 am
Location: India

Re: WIFI/BLE Simultaneously

Postby Ritesh » Sun Oct 27, 2019 11:22 am

tipo1000 wrote:
Tue Mar 12, 2019 6:10 am
ESP32 needs to collect heart rate data at the same time it is sending previously collected data over wifi.

Heart rate sensor sends heart rate data to ESP32 once every second.
Forming wifi connection to router and sending previously collected data to database takes about 4 seconds.

Would this work?

Hello Tipo,

Sorry for late reply. Yes. It is possible as per your requirements.

Let me know if you have any concern or query for same.
Ritesh Prajapati

Posts: 18
Joined: Sun Nov 10, 2019 2:35 pm

Re: WIFI/BLE Simultaneously

Postby jimhelios » Mon Feb 10, 2020 7:17 am

Along the same lines, I'm planning an ESP32 project that will stream data through wifi to a web client using web sockets, but also I want to monitor BLE to detect that a remote button has been pressed. If I understand the problem correctly, the issue is that the ESP32 uses the same radio and antenna for both wifi and BLE. So do I have to switch the radio back and forth or will the ESP32 handle that? It's important that I don't miss a button press. I would appreciate comments, thank you.

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 27 guests