RPIEasy · Devices · ESPNOW

Moderators: grovkillen, Stuntteam, TD-er, enesbcs

Post Reply
Message
Author
AlphaOne
New user
Posts: 4
Joined: 21 Oct 2022, 14:50

RPIEasy · Devices · ESPNOW

#1 Post by AlphaOne » 21 Oct 2022, 15:23

My setup: Raspberry Pi 4 (server) and ESP8266 (client) with BME280. I would like to send data to the server via the ESPNOW protocol. The server wifi MAC address is stored in the client, but I can't get the server to receive the data. What do I have to do or am I doing wrong?

User avatar
Ath
Normal user
Posts: 3508
Joined: 10 Jun 2018, 12:06
Location: NL

Re: RPIEasy · Devices · ESPNOW

#2 Post by Ath » 21 Oct 2022, 15:58

AFAICS, ESP-Now is an Espressif specific protocol, based on WiFi, that doesn't have a direct counterpart on other platforms, but while doing a quick google search I found this: https://raspberrypi.stackexchange.com/q ... ce-working
Maybe that helps you further.

In ESPEasy, the proposed solution (ESP-Now is called ESPEasy-Now, but still in alpha stage) is to use ESP-Now protocol to create a mesh of ESP's that can exchange data, and 1 gateway ESP that connects to the outside world, either via WiFi or Ethernet.
/Ton (PayPal.me)

AlphaOne
New user
Posts: 4
Joined: 21 Oct 2022, 14:50

Re: RPIEasy · Devices · ESPNOW

#3 Post by AlphaOne » 21 Oct 2022, 19:44

I had already seen the link before, but I have to admit that the following quote "The first five upper layers in OSI are simplified to one layer in ESP-NOW" opened my eyes. ESPNOW is geared towards the hardware, with a Raspberry Pi you would have to rebuild the five layers.

TD-er
Core team member
Posts: 8748
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: RPIEasy · Devices · ESPNOW

#4 Post by TD-er » 21 Oct 2022, 20:27

ESP-NOW is actually very similar to what some wireless mice use.

It is an extention to the 802.11 standard allowing vendor specific packets (upto 255 bytes) to be sent.
However Espressif's implementation also added some more specifications to it, like you need to define whether you're a controller, or just a node (or both)
This defines whether the AP or STA interface is used and this also affects whether you're constantly listening or just sending a quick message.
But you have to realize both AP and STA interface have a different MAC address and since the communication is purely on MAC address, you need to be aware of what the other one is using.
Also an AP interface can set a channel (and keep it), a STA interface can't.

This means you cannot use ESP-NOW between 2 nodes running in STA mode. (or you must be extremely lucky with the timings)
You also need to define a peer before you can send anything to it. The peer configuration needs to have a channel defined and if it changes, you need to redefine the peer.

This kind of information you will not see in the documentation (or at least not when I started experimenting with ESP-NOW)

To be honest, I doubt non-Espressif devices will support ESP-NOW.

AlphaOne
New user
Posts: 4
Joined: 21 Oct 2022, 14:50

Re: RPIEasy · Devices · ESPNOW

#5 Post by AlphaOne » 22 Oct 2022, 12:47

And as I see now, with the libespnow.a file, ESP-NOW has no interest in others understanding what is happening internally.

With the file _C013_ESPEasyP2P.py you tried to create a new approach? It is very impressive what has already been achieved.

The company builds ESPNOW to make the world a better place, in a community that thrives on shared code. This company only gives us small pieces of good cheese, delights in how good the cheese turned out, but lets the mice starve in the long run.

TD-er
Core team member
Posts: 8748
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: RPIEasy · Devices · ESPNOW

#6 Post by TD-er » 22 Oct 2022, 20:13

Let's not confuse the excellent work done by enesbcs for the RpiEasy with the C++ ESPEasy.
Thus I did nothing with the Python code, that's the work of enesbcs.

AlphaOne
New user
Posts: 4
Joined: 21 Oct 2022, 14:50

Re: RPIEasy · Devices · ESPNOW

#7 Post by AlphaOne » 22 Oct 2022, 21:39

It was a translation error. I didn't mean you alone, but the entire community has already achieved a lot of good things.

I'm in the process of testing two links below.

https://hackaday.io/project/161896-linu ... ementation
https://hackaday.io/project/161896-linu ... ng-example

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests