Post about your Basic project here

Moderator: Mmiscool

User avatar
By kolban
#31996 If I am reading the ESP8266 SDK information correctly, there is a communication mode available to ESP8266s called "ESP-NOW". This apparently allows peer to peer communication between up to 20 ESP8266 instances. Unlike WiFi and TCP, it appears to be a proprietary Espressif protocol. It appears that devices are identified by their advertized MAC addresses.

The API seems to have send and receive APIs but how the devices find each other is still a mystery. For example, if I have two ESP8266's and they don't know about each other, I can't determine how each would learn the MAC address of the other.

I sense also that there is no concept of an "access point" in this story. The devices are simply "existent" and if the MAC addresses are know to each other, they can communicate.

There are still many other mysteries here including the concepts of slave vs controller ... but if you need peer to peer communication between devices, this may be the way to go.
User avatar
By livetv
#47390
kolban wrote:The API seems to have send and receive APIs but how the devices find each other is still a mystery. For example, if I have two ESP8266's and they don't know about each other, I can't determine how each would learn the MAC address of the other.


I think there is an "add_peer" function so you can specify a MAC address as a peer and do a "soft" connection that way. The problem is that this seems to be blind as a user may or may not exist within range and could enter/leave. The ESP8266 has mesh support (which I can't figure out) and it would all make sense if the ESP-NOW layer operated on top of a mesh layer. But I doubt it.

Still, to be able to add peers by MAC address and communicate with them directly would be a fantastic addition to the Basic interpreter! If one can scan for nearby devices and get MAC addresses, they can be added (or removed) as peers and you could do your own mesh. Only problem is that this does not offer TCP/IP throughput unless you could dynamically build and modify AP chains according to the state of the mesh.
User avatar
By forlotto
#47455 deleted wrong post
Last edited by forlotto on Sat May 14, 2016 11:05 pm, edited 1 time in total.