Why ESPNow is awesome - hint: ACKs & Retries!
Вставка
- Опубліковано 2 жов 2024
- Let's dig a bit deeper into ESPNow and explore unicast, broadcast and how they affect acknowledgements and retransmissions.
Get 10 PCBs for $5 USD at www.pcbway.com
Explore my sensors series - • My Ultra Low Power Wir...
GET THE WEMOS D1 MINI
==================================
╚═ Wemos d1 mini (4M version)
■ AliExpress - s.click.aliexp...
■ Amazon.com - amzn.to/35ii3tw
■ Amazon.ca - amzn.to/2ViSXcC
■ MrDIY store - store.mrdiy.ca...
Music: www.bensound.com
DISCLAIMER: Some of the links found here may be affiliate links, meaning I will make commission on sales you make through my link. This is at no extra cost to you to use my links/codes, it's just one more way to support me and my work. Much of the information contained is based on personal knowledge and experience. It is the responsibility of the viewer to independently verify all information.
For unicast packets, retransmissions are at 6mbps, 2 mpbs and 1 mbps -different data rates. All packets have the same sequence number and all but the first packet have retransmission flag set. Can't explain the mystery of ghost ACK packets. ? Broadcast packets being self ACK?
That is very possible.
@@MrDIYca I had the same idea. Because the broadcast is sent to all addresses (it does not exclude the address of the sender), the node sending the broadcast will receive one on itself and since this node is actually powered on, it will send an acknowledgement (not that the sender cares about it). Just an idea though.
This is a brilliant video. First of all it was entirely logical and straight forward and secondly it gave me all the information I needed to know, which is, as you say, not clear with many other discussions of the protocol. One other point worth mentioning is the protocol works in conjunction with standard WiFi, so it apparently does not cause frames to clash according to Espressif's Ivan Grokhotkov, (the person who wrote most of the code). In fact broadcast mode only transmitting the once is exactly what I need it to do. You can then be flexible and add your own network control. I need to synchronise clocks, so I need to know the precise time it takes.
Great video, thank you for clearing up a few questions I had about ESPNow!
MrDIY: I don't know about ESPNOW persay, but usually 2.4Ghz chipsets with proprietary protocol capability allow for TTL modifications, etc.. Maybe a register or code? Very interesting video thanks for sharing
Very useful video ! Clears up a lot of concepts. I have one query though : In Unicast if the packet is not ACKed, there is a re-transmit. Is this in control of the code ? How does it decide how many retries ?
Thanks for a very good video. i wanted to trace espnow packets on mac laptop, but i cannot get any of espnow 802.11 packets...what version of wireshark and what option did you use to capture these espnow 802.11 packets.. thanks in advance..
Nicely explained, thanks for making video.
great video. really appreciate you setting up wireshark and showing the packets. thanks!
Glad it was useful!
Great video! I have few questions, if I may. the 1st: Do you think I can start with a broadcast (send the xFF*), and then each slave alive will respond back with a pre-set package? So the master could collect all MAC IDs of the slaves. Then to change mode tp unicast? This way the system I try to design will not need to hard code the MAC IDs of the slaves, as they may change over system life time.
Yes this setup would work
Hi, I've tried to replicate the Wireshark capture but nothing was captured! Any leads? Thanks for the great video!
Try putting your card into 'monitoring mode'. Google it for your wifi card and OS.
Few more questions: on 4:35 you show a PCB with ESP32 on your own PCB design. So far I used the DEV-kits only, which are big and ugly, yet include the USB connection. Can you share the PCB design? How do you program it when needed? Do you solder the ESP32 yourself or do you order it with the PCB? (So far I use TH only with PCBs I made, perhaps it's time to move to SMT).
Hi, MrDIY excellent video I love your work very well explained. Would you be so kind explaining the following? In the broadcast mode, it is effectively firing, and forget, do the sender pair with the receiver? The reason I ask I would like to have many senders and this would mean I don't get to the maximum of 20 pairs. Thank You
correct
Thank you for your quick response, do you know if there is some collision avoidance system in the ESPNow protocol, eg CDMA or listen before talking?
cool. very helpful :)
Can you exclude there's no other esp-now device within range? As far as it seems the protocol is embedded in many devices.
Self ack it's kinda dumb behavior ...but still possible
“Self ack” 😂. I had the exact same thought but was too embarrassed to put it in a comment, and then I saw yours!!
@@tvm73827I admit I was just asking since I've no experience into ESP-NOW protocol, but it still remains something strange to investigate
Last question (for today): what batteries do you use? Sometimes a small size one is needed, sometimes lots of power is needed (like with motors). Do you charge while connected to the ESP? while in work? or only separated?
Thank you well explained
Great content
Hi MrDIY, thank you for your quick response, do you know if there is some collision avoidance system in the ESPNow protocol, eg CDMA or listen before talking?
did you find an answer for that?
The ACK packages are from other esp8266 devices. Home automation etc. I was using broadcast, however, so many people use that format, that i hade to include encoded security, to make sure my messages were only from my devices.
Great VIDEO MrDIY,
@ismzaxxon, how are you using security, can you pl. elaborate. Do you mean encryption provided by esp-now?
@@rvtub Encryption doesn't work on broadcast. I just use a structure to send my data. At the beginning i have a 16bit number. Whenever i get a message, i look for this number. If the number matches, then the data is for me, otherwise i just ignore the message. Nothing fancy, but it works to filter out other peoples esp-now stuff being sent in my area.
espnow is short range....not longer that the esp in AP mode. Don't get fooled into all these videos claiming long range.
True. I see videos calming KMs of range. I am lucky if I get coverage in the basement.
Great video! You deserve way more subscribers!
Thank you for sharing ❤
nice....😄
Thanks. Do you know how I can change the channels? I have yet to see an example where anyone does this, every video just uses the example code.
I need to make sure I have different channels. thanks