Open auladinamica opened 6 years ago
Not that I'm aware of, I've not been able to get that to work anyway.
I've seen the ESP32 be able to do this, receive ESP Now packets but also connected as a station to a WiFi network so the received ESP Now packets can be forwarded as an MQTT publish, for example.
I have some code for that here: https://github.com/bertrik/EspNowSkip . The 'skipbutton' project sends ESP Now messages using an ESP8266, and the 'skipreceiver' runs on an ESP32 forwarding the received message.
The way the skipbutton finds the skipreceiver is by the name of the SoftAP running on the skipreceiver. The skipbutton can scan once for a particular AP name (agreed in advance), so it knows the wifi MAC and channel of the skipreceiver. When it needs to send a message, it can just wake up, fire off the ESP Now message to the wifi MAC/channel stored in EEPROM, receive the ACK and be back asleep in about 200 ms. Only if no ACK is received, it knows it has to do the discovery procedure for wifi MAC and channel again.
Interesting, I'll give it a try. I've a bunch of ESP32's and try them every now and then but never been able to get one running long (hours or days) without crashing. Do you use the Arduino ESP32 code and how long have you had one up for?
I have a "Wemos LOLIN32 v1.0.0" ESP32 board, I don't have that much experience with it but so far it seems to run stable. I use platformio to build, upload code and monitor serial output messages.
For me, ESP Now on the ESP8266 seems to run really well only on channel 1. Since the ESP32 connects to an AP, and I think the AP and ESP Now reception should be on the same channel, I guess the external AP that we connect to also has to run on channel 1.
can you use wifi sta mode and ap mode to receive espnow at the same time ? .
Wifi STA to publish data to mqtt and AP to receive data from espnow ?