Notifications
Clear all

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

5 Posts
4 Users
2 Likes
8,679 Views
(@yurkshirelad)
Member
Joined: 3 years ago
Posts: 493
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 2 years ago by YurkshireLad

   
Jonnyr reacted
Quote
Svthb2_o
(@svthb2_o)
Member
Joined: 2 years ago
Posts: 10
 

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)
Member
Joined: 4 years ago
Posts: 35
 
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)
Member
Joined: 3 years ago
Posts: 493
Topic starter  

Thanks to both of you.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6662
 
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/

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
YurkshireLad reacted
ReplyQuote