ESP-Now slave with WiFi station+soft-AP mode
-
- Posts: 11
- Joined: Thu Oct 08, 2015 2:31 pm
ESP-Now slave with WiFi station+soft-AP mode
Postby torntrousers » Thu Aug 04, 2016 5:06 pm
Should that scenario work? The point is to be able to have a ESP-Now slave be a gateway to a WiFi access point for other ESP-Now controller nodes.
TIA.
Re: ESP-Now slave with WiFi station+soft-AP mode
Postby pratik » Fri Aug 05, 2016 12:17 am
It should all work just fine as long as all the devices are connected to the same local network.
What do you get if you use esp_now_is_peer_exist() to check whether a device exists?
If your device does not receive "most of the messages", then I would expect this API to return inconsistent results.
-
- Posts: 11
- Joined: Thu Oct 08, 2015 2:31 pm
Re: ESP-Now slave with WiFi station+soft-AP mode
Postby torntrousers » Fri Aug 05, 2016 9:20 pm
-
- Posts: 11
- Joined: Thu Oct 08, 2015 2:31 pm
Re: ESP-Now slave with WiFi station+soft-AP mode
Postby torntrousers » Tue Aug 09, 2016 5:17 pm
Re: ESP-Now slave with WiFi station+soft-AP mode
Postby waiweng83 » Wed Aug 10, 2016 11:07 am
If the device is not connected to WiFi router, the ESP-NOW connection is very stable.
-
- Posts: 11
- Joined: Thu Oct 08, 2015 2:31 pm
Re: ESP-Now slave with WiFi station+soft-AP mode
Postby torntrousers » Sun Feb 05, 2017 12:39 am

Posting here again with what I found in case anyone else can find anything.
I don't think its that the range is short when in AP+STA i think its that there are lots of packet losses due to collisions or something but when you have the two EPS's really close together then the esp-now packets signal is so strong it drowns out the collision.
It seems like esp-now is request-response. The controller sends a message and the slave receives that and and sends an acknowledgement and the controller receives that acknowledgement and all is good and the esp-now send_cb is called with a status of 0. If the controller doesn't get the acknowledgment then the callback gets called with a non-zero status.
So if you have the controller send a message wait for the callback to be called and if the status is not 0 then retry the send again then it will eventually work. And the further away the two ESPs are the more attempts it usually takes before it works. Sometimes you see the slave does get the sent message but the controller keeps re-sending so the slave acknowledgement can get lost too.
Yesterday I wondered if using different channels made a difference and was messing about with that it started working and the messages were always going through successfully on the first send, and that was left running for a few hours sending a message every 15 seconds. But I can't recreate that today and it always takes dozens or even hundreds or retries before a successful send.
No idea. Has anyone got this working?
Who is online
Users browsing this forum: No registered users and 60 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.