Notifications
Clear all

Using ESPNow and WiFi at the same time on an ESP32?


YurkshireLad
(@yurkshirelad)
Reputable Member
Joined: 1 year ago
Posts: 442
Topic starter  

Has anyone tried getting ESPNow and WiFi to work on an ESP32? I'm trying to send data from an ESP8266 to an ESP32 using ESPNow. The ESP32 would upload that data to something like the Arduino IoT Cloud.

I tried following this site, which claims to have solved this, but I can't get it to work. I get an error status of -3 when sending from the ESP8266, but I haven't yet worked out what that means.

https://www.electrosoftcloud.com/en/esp32-wifi-and-esp-now-simultaneously/

Why am I doing this? Arduino's IoT Cloud "Free" plan only allows 2 things/devices so this is an experiment to see if I can support more devices but only use 2 ESP32s to upload the cloud. If this works out, I would then upgrade to the next plan etc.

This topic was modified 4 months ago by YurkshireLad

Jonnyr liked
Quote
Svthb2_o
(@svthb2_o)
Active Member
Joined: 3 months ago
Posts: 8
 

Hello! yurkshirelad, I have worked with ESP now recently so I will share my experience hope it will help you.

Posted by: @yurkshirelad

Has anyone tried getting ESPNow and WiFi to work on an ESP32? I'm trying to send data from an ESP8266 to an ESP32 using ESPNow. The ESP32 would upload that data to something like the Arduino IoT Cloud.

First thing is that we cannot perform two protocols at same time using same antenna, so if you need to use WiFi and ESP now at same time its not possible. So you need to first receive the data with ESP-NOW and then turn off it and then again turn on the WiFi to send the data. If you still want to do it at same time I suggest you to use 2 ESP modules which are communicating serially with each other. As one will be receving the data using ESP now and another pushing data to the cloud using WiFi.

Posted by: @yurkshirelad

I tried following this site, which claims to have solved this, but I can't get it to work. I get an error status of -3 when sending from the ESP8266, but I haven't yet worked out what that means.

https://www.electrosoftcloud.com/en/esp32-wifi-and-esp-now-simultaneously/

 

I even tried with this I haven't got the output. If you still want to use only one ESP module and time isn't your constrain you can visit this GitHub repo for reference code  Link:- ESP now with gate way

 

Posted by: @yurkshirelad

Why am I doing this? Arduino's IoT Cloud "Free" plan only allows 2 things/devices so this is an experiment to see if I can support more devices but only use 2 ESP32s to upload the cloud. If this works out, I would then upgrade to the next plan etc.

If you want to stick with Arduino IoT cloud it's fine, but you can also take a look at things speak. I hope this may help you. 😀 


ReplyQuote
Jonnyr
(@jonnyr)
Eminent Member
Joined: 2 years ago
Posts: 36
 
Posted by: @yurkshirelad

Has anyone tried getting ESPNow and WiFi to work on an ESP32? I'm trying to send data from an ESP8266 to an ESP32 using ESPNow. The ESP32 would upload that data to something like the Arduino IoT Cloud.

I tried following this site, which claims to have solved this, but I can't get it to work. I get an error status of -3 when sending from the ESP8266, but I haven't yet worked out what that means.

https://www.electrosoftcloud.com/en/esp32-wifi-and-esp-now-simultaneously/

Why am I doing this? Arduino's IoT Cloud "Free" plan only allows 2 things/devices so this is an experiment to see if I can support more devices but only use 2 ESP32s to upload the cloud. If this works out, I would then upgrade to the next plan etc.

I don't know if this helps, but I got it working for esp32 to esp32. I modified the code from randomnerdtutorials.com. I had to use a getWiFIChannel function to set this up on the esp32 that wasn't connected to the wifi. 

 

I have put the code up on github. There are some auxiliary functions like motorMove() which you can ignore.

 

https://github.com/jonathanrandall/esp32-esp32-now-wifi


ReplyQuote
YurkshireLad
(@yurkshirelad)
Reputable Member
Joined: 1 year ago
Posts: 442
Topic starter  

Thanks to both of you.


ReplyQuote
Ron
 Ron
(@zander)
Noble Member
Joined: 1 year ago
Posts: 1824
 
Posted by: @yurkshirelad

Has anyone tried getting ESPNow and WiFi to work on an ESP32? I'm trying to send data from an ESP8266 to an ESP32 using ESPNow. The ESP32 would upload that data to something like the Arduino IoT Cloud.

I tried following this site, which claims to have solved this, but I can't get it to work. I get an error status of -3 when sending from the ESP8266, but I haven't yet worked out what that means.

https://www.electrosoftcloud.com/en/esp32-wifi-and-esp-now-simultaneously/

Why am I doing this? Arduino's IoT Cloud "Free" plan only allows 2 things/devices so this is an experiment to see if I can support more devices but only use 2 ESP32s to upload the cloud. If this works out, I would then upgrade to the next plan etc.

Have you seen this https://randomnerdtutorials.com/esp32-esp-now-wi-fi-web-server/

It is considered poor judgement to traverse a chasm in 2 leaps.


ReplyQuote