Will ESPNOW + WIFI + BLE work simultaneously

rwel59
Posts: 97
Joined: Thu Oct 12, 2017 3:32 pm

Will ESPNOW + WIFI + BLE work simultaneously

Postby rwel59 » Wed Sep 22, 2021 12:45 pm

I have an application with multiple ESP32's connected with ESPNOW to a master device that also connects to wifi. This all works great. I am now trying to add BLE functionality to the mix (for all devices).

In the wifi + espnow setup, esp_wifi_set_ps is set to WIFI_PS_NONE. When I remove this, most of the espnow transmissions get lost.

In the wifi + espnow + ble setup, I get 'Error! Should enable WiFi modem sleep when both WiFi and Bluetooth are enabled!!!!!!'.

Have not been able to find a definitive answer on whether these will work together but it doesn't look like it. Any input?

rwel59
Posts: 97
Joined: Thu Oct 12, 2017 3:32 pm

Re: Will ESPNOW + WIFI + BLE work simultaneously

Postby rwel59 » Wed Sep 22, 2021 1:54 pm

Set wifi mode (esp_wifi_set_mode) to WIFI_MODE_APSTA from WIFI_MODE_STA. This resulted in the error going away and seems like espnow packet loss has gone away. So all 3 services are now running simultaneously.

Haven't looked at the ramifications of making this change yet.f

FlorianR
Posts: 28
Joined: Fri Mar 12, 2021 2:00 pm

Re: Will ESPNOW + WIFI + BLE work simultaneously

Postby FlorianR » Thu Jun 30, 2022 5:46 am

rwel59 wrote:
Wed Sep 22, 2021 1:54 pm
Set wifi mode (esp_wifi_set_mode) to WIFI_MODE_APSTA from WIFI_MODE_STA. This resulted in the error going away and seems like espnow packet loss has gone away. So all 3 services are now running simultaneously.

Haven't looked at the ramifications of making this change yet.f
Hi there,
I now it is an old topic, but I do have the same problem here...
Using ESP-IDF v4.4.1
"coexist: [1089473] Error! Should enable WiFi modem sleep when both WiFi and Bluetooth"
I have:
  • mode set to WIFI_MODE_APSTA
  • Bluetooth enabled
  • ESPNOW: tried peer->ifidx = WIFI_IF_STA; and peer->ifidx = WIFI_IF_AP
But the espnow packets get lost and when I try to set esp_wifi_set_ps(WIFI_PS_NONE), it throws the coexist error.

I hope I can get some help here :)
Best regards from Germany!
Florian

lgpww123
Posts: 7
Joined: Tue Feb 08, 2022 9:46 am

Re: Will ESPNOW + WIFI + BLE work simultaneously

Postby lgpww123 » Sat Jul 02, 2022 9:51 am

I also want to get answers

FlorianR
Posts: 28
Joined: Fri Mar 12, 2021 2:00 pm

Re: Will ESPNOW + WIFI + BLE work simultaneously

Postby FlorianR » Wed Jul 06, 2022 4:28 am

rwel59 wrote:
Wed Sep 22, 2021 1:54 pm
Set wifi mode (esp_wifi_set_mode) to WIFI_MODE_APSTA from WIFI_MODE_STA. This resulted in the error going away and seems like espnow packet loss has gone away. So all 3 services are now running simultaneously.

Haven't looked at the ramifications of making this change yet.f
Would you be willing to share a code snippled of your configuration, where the setup works?
That would be super great :)

FlorianR
Posts: 28
Joined: Fri Mar 12, 2021 2:00 pm

Re: Will ESPNOW + WIFI + BLE work simultaneously

Postby FlorianR » Tue Jul 12, 2022 10:38 am

Did no one else get this to work?
This is the last puzzle peace of my project :(
I really don't know what else to try.

Momin786
Posts: 13
Joined: Mon Jul 11, 2022 7:52 am
Contact:

Re: Will ESPNOW + WIFI + BLE work simultaneously

Postby Momin786 » Wed Jul 13, 2022 5:39 am

I have found many tutorials online where they used both WIFI and ESP-NOW simultaneously with Arduino IDE. In this tutorial, they are receiving data from other esp devices over esp-now and sending to a web server with WiFi in STA mode. https://microcontrollerslab.com/esp32-e ... eb-server/
I create ESP32 tutorials and Projects using ESP-IDF https://esp32tutorials.com/

FlorianR
Posts: 28
Joined: Fri Mar 12, 2021 2:00 pm

Re: Will ESPNOW + WIFI + BLE work simultaneously

Postby FlorianR » Thu Jul 14, 2022 6:04 am

Momin786 wrote:
Wed Jul 13, 2022 5:39 am
I have found many tutorials online where they used both WIFI and ESP-NOW simultaneously with Arduino IDE. In this tutorial, they are receiving data from other esp devices over esp-now and sending to a web server with WiFi in STA mode. https://microcontrollerslab.com/esp32-e ... eb-server/
Hi There,
thank you :) This is not a problem to make it work. the main problem is all three together. I sadly finally found this Dokument:
https://docs.espressif.com/projects/esp ... exist.html
where it says that ESPNOW is not compatible with BLE.....
The wired thing is that I am pretty sure that I did have that running together (BLE+ESPNOW).
Adding another ESP would be soo much more complex in many ways :(

cndgeek
Posts: 3
Joined: Sun Jul 17, 2022 1:27 pm

Re: Will ESPNOW + WIFI + BLE work simultaneously

Postby cndgeek » Sun Oct 29, 2023 3:06 pm

where it says that ESPNOW is not compatible with BLE.....
no it doesn't (it's a confusing table, but read the fine-print at the bottom) - it says espnow and ble and wifi (STA mode only) can all co-exist and are stable.

Who is online

Users browsing this forum: No registered users and 127 guests