WIFI/BLE Simultaneously

Pcborges
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.
Thanks
Paulo

Ritesh
Posts: 1150
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

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?

Thanks,
Tipo
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.
Regards,
Ritesh Prajapati

jimhelios
Posts: 33
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.

Dmytro
Posts: 1
Joined: Fri Jul 31, 2020 1:57 pm

Re: WIFI/BLE Simultaneously

Postby Dmytro » Fri Jul 31, 2020 2:01 pm

jimhelios wrote:
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.
Did you cope with your task, because I also have such a task and do not know where to even look for answers? :(

dherrington
Posts: 1
Joined: Sun Aug 02, 2020 7:54 pm

Re: WIFI/BLE Simultaneously

Postby dherrington » Sun Aug 02, 2020 7:59 pm

I am stuck on this WIFI/BLE Coexistence challenge. There are good comments and ideas here, but I can't find any working coexistence examples, so I can try and implement some of the suggestions made here. Can anyone post a link to a working WIFI/BLE Coexistence working example? Thanks in advance.

wayne_peacock
Posts: 1
Joined: Tue Sep 22, 2020 5:50 am

Re: WIFI/BLE Simultaneously

Postby wayne_peacock » Tue Sep 22, 2020 7:37 am

dherrington wrote:
Sun Aug 02, 2020 7:59 pm
I am stuck on this WIFI/BLE Coexistence challenge. There are good comments and ideas here, but I can't find any working coexistence examples, so I can try and implement some of the suggestions made here. Can anyone post a link to a working WIFI/BLE Coexistence working example? Thanks in advance.
I notice Espressif has an example in the esp-idf. Found at esp-idf/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/

Has anyone successfully got this example working? I can get it to compile and load into my ESP-WROVER-Kit V1.4. From the terminal I can connect to my wi-fi successfully and get a IP and that's about all I can get working.

I can run 'iperf -s -i 3 -t 1000' on the ESP32, but every time I try to connect to it from a PC (tried Linux/Win10 and Yes, iperf 2.X) I get connection refused. I can run iperf between two different PC's without issues, so it's not firewall networking issues. The problem seems to be the ESP32 side. I have tried different settings, making the ESP32 the server and client without any luck.

I can run the example /wifi/iperf without any issues, proving the issue is with the ble_mesh_wifi_coexist example.

Also on the BLE_Mesh side (ble_mesh_wifi_coexist example), I can see the ESP32 broadcasting a beacon "ESP-BLE_MESH" which I can connect to via Nordic's nRF connect, but Espressif's "ESP-Mesh" app on Android will never find it. Why? My Android device only supports BLE 4, however as nRF connect on the same Android device works, I don't think this is the issue.

Many Thanks
Wayne Peacock

Who is online

Users browsing this forum: ESP_Sprite and 42 guests