ESP-NOW on the Arduino Nano ESP32 - Wireless communication without Wi-Fi or Bluetooth!

  Рет қаралды 23,109

Gary Explains

Gary Explains

Күн бұрын

Пікірлер: 52
@horiciOwO
@horiciOwO Жыл бұрын
Used esp32 on a few projects but never realized this is a thing. Amazing.
@highvis_supply
@highvis_supply Жыл бұрын
If you're serious about implementing ESP-NOW, I recommend using the ESP-MDF framework which adds extra functionality to ESP-NOW (its called Mespnow idk who names these things...), namely retransmission filter, Cyclic Redundancy Check (CRC), and data fragmentation features
@eos1d3
@eos1d3 Жыл бұрын
ESP-MDF is another thing and Espressif has given it up for at least 2 years.
@RWB123
@RWB123 Жыл бұрын
Great overview 🎉 Glad you can use wifi normally and ESPNOW at the same time as long as they are on the same channel. So i can use this Arduino code with the ESP32 + Platform IO as long as im compiling uisng the Arduino compiler vs the ESP Compiler right?
@Arduino
@Arduino Жыл бұрын
Great video, Gary! Thanks for sharing!
@GaryExplains
@GaryExplains Жыл бұрын
You are very welcome! 🤗
@AnesuC
@AnesuC Жыл бұрын
When you said if there was a way to do device to device without a router, you missed the fact that you can host a Wi-Fi hotspot on one of the devices (of cause needs to support it, most Wi-Fi chips nowadays do though) which is what i.e cameras do to have a fast wireless transfer of high res photos
@GaryExplains
@GaryExplains Жыл бұрын
Yes, obviously, but if you want to connect 3 devices what do you do then? Route everything through one of the microcontrollers? You are just basically adding adding a router.
@AnesuC
@AnesuC Жыл бұрын
@@GaryExplains I mean yeah. Wi-Fi chips are pretty powerful if the ones in phones are a benchmark. I know this because for a long time I used one of my old phones as a Wi-Fi extender (bad Wi-Fi signal, student accommodation) and it was perfectly fine handling several devices. If you wanted to connect 3 devices, we can create a similar mechanism where we pass the relevant information that device X is hosting. Yes you are creating a router behind the scenes, but I don't think it matters in this case since it's not a literal physical router you need to configure, it's handled in the background. That way you can have the benefits of speed, reliability of data sent etc. I just feel that since we have a whole WIFI chip in there from what you are describing, seems like a missed opportunity of creating a more robust protocol. I do understand this makes it rather simple to implement, so that might be why
@GaryExplains
@GaryExplains Жыл бұрын
And the power usage of having one board act permanently as an AP? With it routing everything will it still be able to perform its own tasks?
@AnesuC
@AnesuC Жыл бұрын
@@GaryExplains It wouldn't be permanently on though. What I am suggesting is an implementation that uses this as a form of communication to initiate connections, but use the normal Wi-Fi standard to do the actual data transfers. An example to this is how Samsung implemented a file transfer a bit ago (it might have changed now) where it used Bluetooth for discovery and transferring the appropriate information between the relevant devices and then just did a Wi-Fi direct connection between the devices to handle the rest because Bluetooth is too slow for the task (I mean as in Wi-Fi is obviously faster for that task). Once again, this is fine for like small bits of data you don't need to confirmation for that it indeed arrived. You could technically implement this mechanism but it would probably slow things down dramatically considering the limitations of how much data you can send at a time.
@sennabullet
@sennabullet 9 ай бұрын
excellent, excellent, excellent explanation! THIS is the go to video on ESP NOW. Thank you for sharing your knowledge and makeing the video
@GaryExplains
@GaryExplains 9 ай бұрын
Glad it was helpful!
@Dima_793
@Dima_793 Жыл бұрын
A topic suggestion/request: wifi file transfer. I've been using Windows' shared folder feature to transfer files between PC and Android phone for years, but it always annoyed me how slow it is, about 6-7 MBytes/s. Both WiFi and storage are capable of much, much more, but I haven't encountered software that could saturate even the good old WiFi 4 (n) bandwidth (300 Mbit/s for 2x2), most I saw was about 100 Mbit/s over WiFi 5. WiFi Direct often just doesn't work for no apparent reason between devices that aren't similar enough, even between two Android phones from different brands. Is there any software to transfer files over WiFi at least close to WiFi 5 bandwidth, considering properly capable WiFi modules and storage? Not even speaking of 6/6e/7 speeds or proper file management and streaming like with shared folders. I believe with modern hardware we should be able to move past the days of having to plug a cable to have a decent file transfer, and I think it might be a good QoL improvement for a fair amount of people. Thanks for your work on Gary Explains project!
@davepauljones
@davepauljones Жыл бұрын
Wish ESPNOW was out 12 years ago, then I wouldn't have had to write my own command & control protocol for my UPAS project, or a least, it would have made it easier, will have to encorporate ESPNOW into UPAS, nice easy explaination, thanks for sharing. Oh do you know if you can use ESPNOW with normal WiFi functions ?
@bazoo513
@bazoo513 Жыл бұрын
So, from the programmer's point of view, we essentially get the functionality of UDP communication between two devices with direct connection and hard-coded IP addresses. Isn't "normal" WiFi (with all the usual layers above it) capable of point-to-point communication? Also, we could have put that device featuring the LED in AP mode and connect that way, right? Granted, this protocol is more lightweight, but I fail to see what essentially new it brings.
@GaryExplains
@GaryExplains Жыл бұрын
Yes, obviously, but if you want to connect 3 devices what do you do then? Route everything through one of the microcontrollers? You are just basically adding a router. And what of the power usage of the board that is acting as a router? It will need to be permanently on. Will it be able to handle its own tasks as well as route?
@bazoo513
@bazoo513 Жыл бұрын
@@GaryExplains OK, so "keep in mind that being lightweight _does_ count"... Again, I know too little about WiFi protocols, but in wired world devices can communicate via IP (and, presumably, UDP atop it) through any kind of shared medium. After all, that's "ether" in the "ethernet", isn't it (and ALOHAnet worked over radio.) Routing is only needed when we cross the boundaries of shared media. Then again, this actually looks like a simpler replacement for IP... Thanks.
@dawsonpate7385
@dawsonpate7385 Ай бұрын
Its routerless is what it brings. U can have 2 devices communicate in the field the same way u can have 2 walkie talkies communicating (figuratively). U don't need an access point to route communications for u.
@bazoo513
@bazoo513 Ай бұрын
@@dawsonpate7385 See my replies - routers are only needed if you pass the boundaries of shared medium - that has been pioneered many decades ago in ALOHAnet.
@UdoHartmann
@UdoHartmann Жыл бұрын
I wonder if this will help in using less energy (certainly more than Bluetooth LE, but maybe much less than an ordinary WLAN?)
@mars3142
@mars3142 Жыл бұрын
Why do you do the SSID broadcast instead of ESP-Now broadcast?
@GaryExplains
@GaryExplains Жыл бұрын
I am not aware of an "ESP-NOW broadcast" can you please post a link to that API call.
@RixtronixLAB
@RixtronixLAB Жыл бұрын
Nice video, well done, thank you for sharing it with us :)
@SG-wj3nk
@SG-wj3nk Жыл бұрын
Amazing video❤️
@hectori.montano9479
@hectori.montano9479 Жыл бұрын
Great video Mr.Gary! Thank you for your knowledge. I’m a enthusiastic arduino project creator wish to speak with you soon cheers!
@SzBenedek2006
@SzBenedek2006 Жыл бұрын
You didn't mention WiFi direct
@GaryExplains
@GaryExplains Жыл бұрын
Do you think it was necessary to mention? In what part of the video?
@SzBenedek2006
@SzBenedek2006 Жыл бұрын
It isn't that important, but I thought you should have mentioned it at the section at 1:04 where you were talking about the alternatives to a central wifi router.
@simonabunker
@simonabunker Жыл бұрын
Is this a type of mesh network? What is the range?
@JohnnieHougaardNielsen
@JohnnieHougaardNielsen Жыл бұрын
Not a mesh, unless you code such functionality yourself. Range is just normal WiFi range, it is the same radios.
@antibulling2551
@antibulling2551 Жыл бұрын
thank you for your very interesting video. but (lol) y will probably being less satisfied two months after. when i begin to make the programm....
@iot_enthusiast
@iot_enthusiast Жыл бұрын
nicely explained !
@GaryExplains
@GaryExplains Жыл бұрын
Glad you liked it
@manfredbogner9799
@manfredbogner9799 7 ай бұрын
very good
@sundhaug92
@sundhaug92 Жыл бұрын
Kinda sounds like it's still WiFi just not dependent on infrastructure mode
@GaryExplains
@GaryExplains Жыл бұрын
It uses the first two layers of Wi-fi as I said in the video. Action frames are part of 802.11, as I say in the video.
@sundhaug92
@sundhaug92 Жыл бұрын
@@GaryExplains Yeah I just think the title is a bit off
@GaryExplains
@GaryExplains Жыл бұрын
But it isn't Wi-Fi pe se and you can use "normal Wi-Fi" alongside and with ESP-NOW.
@peircedan
@peircedan Жыл бұрын
@@GaryExplains Well I think that Wi-Fi is defined by the physical layer. The rest of the details you give sound correct to me. I'd say that ESP-Now is using wi-fi but not using TCP/IP. Looking at espressif examples they have espnow under wifi espressif/esp-idf/tree/release/v5.0/examples/wifi/espnow Actually looking at your example at 9:35 you show using a wi-fi mode before initializing esp-now yourself.
@skf957
@skf957 Жыл бұрын
@@GaryExplains Wait, what - can these boards connect to an AP and while connected use ESP-NOW?
@PhilippBlum
@PhilippBlum Жыл бұрын
So god help me. Why can't we just use some of the many IEEE standards?
@uzlonewolf
@uzlonewolf Жыл бұрын
Why support an interoperable standard such as WiFi Ad-Hoc mode or WiFi Direct when you can put a huge amount of time and effort into creating your own proprietary crap!
@PhilippBlum
@PhilippBlum Жыл бұрын
@@uzlonewolf Why doing it the easy way, when you can have it complicated, right? :D
@paulsimpson6290
@paulsimpson6290 Жыл бұрын
I am a little concerned that you perpetuate the term "WiFi Router" and imply that it is the same thing as an Access Point. It isn't! A Router is a Layer 3 device. It is not necessary for a device to be operating at Layer 3 to connect between WiFi and Ethernet, as you indicate near the start of the video. It's a common mistake for an amateur to make, but you are not an amateur 😉 Now, whilst it is true that many of these devices, particularly those used on the domestic market, combine the functionality of an Access Point and a Router, it is not so common for them to Route between WiFi and Ethernet (instead, they usually have a port to connect to the ISP and route between that an the home network, Ethernet and WiFi combined.) Indeed, if they were to route between these topologies, many home devices would cease to function. (For example, if you have Roku streaming device wired in to your ethernet, and you wish to control it from the phone app, connected wirelessly, this requires both devices to be on she same IP subnet, which therefore means no Router!) A device that merely connects WiFi and Ethernet together is a Layer 2 device, and is more correctly referred to as a Bridge, or if it has multiple Ethernet ports, a Switch. This may seem like a petty gripe, but you are an educational channel and I believe accuracy is important - the devil is in the detail! Otherwise, good video! (As usual.) 😁
@GaryExplains
@GaryExplains Жыл бұрын
I think your reply is actually longer than my video 😜
@paulsimpson6290
@paulsimpson6290 Жыл бұрын
@@GaryExplains LOL. Not quite, but fair.
@chrisleon7312
@chrisleon7312 Жыл бұрын
Learn to pronounce the letter h''!
@GaryExplains
@GaryExplains Жыл бұрын
Eh? You feeling ok? Try reading www.bbc.com/news/magazine-11642588
ESP-NOW - Peer to Peer ESP32 Network
43:02
DroneBot Workshop
Рет қаралды 378 М.
Forget WiFi! This Wireless Method is WAY Better?
12:14
GreatScott!
Рет қаралды 682 М.
The Ultimate Sausage Prank! Watch Their Reactions 😂🌭 #Unexpected
00:17
La La Life Shorts
Рет қаралды 8 МЛН
Long Nails 💅🏻 #shorts
00:50
Mr DegrEE
Рет қаралды 16 МЛН
How To Choose Mac N Cheese Date Night.. 🧀
00:58
Jojo Sim
Рет қаралды 95 МЛН
كم بصير عمركم عام ٢٠٢٥😍 #shorts #hasanandnour
00:27
hasan and nour shorts
Рет қаралды 10 МЛН
ESP NOW: Espressif's Wireless-Communication Protocol
9:20
Espressif Systems
Рет қаралды 120 М.
Exploring the Arduino Nano ESP32 | MicroPython & IoT Cloud
57:43
DroneBot Workshop
Рет қаралды 179 М.
Arduino Nano ESP32 Review - Official ESP32-S3 Board from Arduino
12:34
Bluetooth Classic & BLE with ESP32
38:00
DroneBot Workshop
Рет қаралды 38 М.
How to Run Linux on an ESP32
18:53
element14 presents
Рет қаралды 162 М.
YOU can Learn the ESP32 in 15 Minutes:  Hello World!
22:52
Dave's Garage
Рет қаралды 332 М.
ESPNOW mix with #ESP32 and #ESP8266
25:37
Programming Electronics Academy
Рет қаралды 41 М.
ESP-Now Range Test: Real-World Results for ESP32 Devices!
8:01
465 Rutgers University Confirmed: Meshtastic and LoRa are dangerous
13:27
You’ve Never Seen WiFi Like This
20:43
Data Slayer
Рет қаралды 1 МЛН
The Ultimate Sausage Prank! Watch Their Reactions 😂🌭 #Unexpected
00:17
La La Life Shorts
Рет қаралды 8 МЛН