Page 15 of 37

Re: ESP-Now support for ESP32 (and ESP8266)

Posted: Tue Oct 05, 2021 7:03 pm
by davef
Hi napo7,

Thanks for the explanation. I am guessing that to achieve receive and transmit on the same WiFi channel (or frequency) on a WiFi device requires demodulation to baseband, re-modulation to RF and in different time slots. I'll hit Google as my signal processing experience is lacking.

As, I don't need simultaneous ESP-Now and WiFi I have built a test system that runs ESP-Now most of the time, ie 99.9% and then when I need the WiFi I shut ESP-Now down and fire-up WiFi.

Re: ESP-Now support for ESP32 (and ESP8266)

Posted: Wed Oct 06, 2021 6:28 am
by mattyt
Just a quick heads-up: I heard on the recent Hackaday podcast that there was a robotics effort that used a PC to do all the processing and ESP-NOW to communicate to the robot.

The interesting part is that I wasn't aware of the project to implement ESP-NOW on Linux. The repo is Linux-ESPNOW. Thought this may be useful to test comms to devices using ESP-NOW.

Apologies if this is old news!

Re: ESP-Now support for ESP32 (and ESP8266)

Posted: Wed Oct 06, 2021 7:11 am
by davef
Hi mattyt,

I downloaded Linux-ESPNOW months ago but hit a snag trying to get it to work. If you get it to work, would you let me know. :D

I wondered why they would use ESP-Now ...
it was possible to get raw packets out to robot in about 1 ms
... ah. Thanks for the links.

Re: ESP-Now support for ESP32 (and ESP8266)

Posted: Wed Oct 06, 2021 7:19 am
by napo7
mattyt wrote:
Wed Oct 06, 2021 6:28 am
aware of the project to implement ESP-NOW on Linux. T
Is there any requirements about hardware ? Wouldn't be surprised if this requires a raspberry or some specific wifi chip, so the raw frames can be sent ?

Re: ESP-Now support for ESP32 (and ESP8266)

Posted: Wed Oct 06, 2021 9:07 am
by davef
When reading messages by iterating over the ESPNow singleton object can you use ESPNow.config(param=value, ...)

If I set timeout to 10000 (10 seconds) the program hangs (probably for the default 5 minutes) if there is no received msg. I verified that timeout was actually set.

Thanks.

Re: ESP-Now support for ESP32 (and ESP8266)

Posted: Wed Oct 06, 2021 6:23 pm
by davef
Update to previous post:

- using ESPNow.irecv(), with the timeout set earlier in ESPNow.config(timeout=10000) works as expected.

Should the note in ESPNow.config()
Note: The recv buffer is allocated by ESPNow.init(). Changing these values will have no effect until the next call of ESPNow.init().
read:
Note: The rxbuffer is allocated by ESPNow.init(). Changing this value will have no effect until the next call of ESPNow.init().

Re: ESP-Now support for ESP32 (and ESP8266)

Posted: Thu Oct 07, 2021 2:07 am
by glenn20
davef wrote:
Wed Oct 06, 2021 9:07 am
When reading messages by iterating over the ESPNow singleton object can you use ESPNow.config(param=value, ...)

If I set timeout to 10000 (10 seconds) the program hangs (probably for the default 5 minutes) if there is no received msg. I verified that timeout was actually set.

Thanks.
I just ran a test:

Code: Select all

e.config(timeout=1000)
for r in e:
    print(r)
As expected this prints (None, None) every second. The C code (espnow_iternext()) just calls the espnow_irecv() function so it should behave identically to calling e.irecv()

Re: ESP-Now support for ESP32 (and ESP8266)

Posted: Thu Oct 07, 2021 4:02 am
by davef
Your snippet works for me. I'll work out why mine doesn't.

Thanks

Re: ESP-Now support for ESP32 (and ESP8266)

Posted: Mon Oct 25, 2021 5:41 pm
by Zoland
Accidentally stumbled upon the Expressif ESP-NOW source https://github.com/espressif/esp-now

Re: ESP-Now support for ESP32 (and ESP8266)

Posted: Tue Oct 26, 2021 1:05 am
by glenn20
Oooh - that's interesting. Thanks for sharing. Apache licensed and it looks like Espressif are adding a lot of functionality (although I don't yet understand why touch screen support belongs in a connectionless network protocol ;). Some interesting reading.