ESP-Now support for ESP32 (and ESP8266)
Re: ESP-Now support for ESP32 (and ESP8266)
Thanks for the heads-up and for the pre-compiled image. I have a link using UDP on two ESP-01S that I might change to ESP-NOW to test.
I hope that I can change one end of the link to normal WiFi mode to send alarms and datalogs to a 3G hotspot. I do not need simultaneous operation.
I hope that I can change one end of the link to normal WiFi mode to send alarms and datalogs to a 3G hotspot. I do not need simultaneous operation.
Re: ESP-Now support for ESP32 (and ESP8266)
Is the esp8266 image generic_1M? The image with <make board=GENERIC_1M> that I was able to build is 623524 and yours at 593348.
Re: ESP-Now support for ESP32 (and ESP8266)
Ah - of course - the link I provided is to instructions for building fro the ESP32.davef wrote: ↑Wed Dec 16, 2020 6:19 amHi Glenn,
Thanks for your work on this implementation. As soon as some ESP-07S arrive I will try out firmware-combined.bin
I hadn't seen that link. Would it not require quite a few changes for a different compiler? I followed some instructions that I found for building esp-open-sdk on this site, mainly to set up the toolchain, and then modified it to build your fork.
The instructions I used for the ESP8266 are at https://github.com/micropython/micropyt ... ts/esp8266, which is much closer to the instructions you used.
Re: ESP-Now support for ESP32 (and ESP8266)
Glenn, thank you and well done for implementing ESP-NOW. Have been waiting for this for a long time, could be a game changer for me in using ESP's with micropython.
Sorry haven't had a chance to look at all of the documentation or play with it yet, but is it possible to assign arbitrary Mac address rather than using factory assigned Mac address?
This has been discussed and addressed on some other platforms including Arduino.
one example https://randomnerdtutorials.com/get-cha ... s-arduino/
Reason for arbitrary Mac address assignment is more flexibility when configuring the network and more importantly if there is a need to replace actual ESP chip in a particular node due to fault or whatever. New ESP chip/module can just drop in and Arbitrary mac address is totally controlled by the firmware developed for that node.
Best Regards
John
Sorry haven't had a chance to look at all of the documentation or play with it yet, but is it possible to assign arbitrary Mac address rather than using factory assigned Mac address?
This has been discussed and addressed on some other platforms including Arduino.
one example https://randomnerdtutorials.com/get-cha ... s-arduino/
Reason for arbitrary Mac address assignment is more flexibility when configuring the network and more importantly if there is a need to replace actual ESP chip in a particular node due to fault or whatever. New ESP chip/module can just drop in and Arbitrary mac address is totally controlled by the firmware developed for that node.
Best Regards
John
Re: ESP-Now support for ESP32 (and ESP8266)
Hi John.
You can set the mac address using the standard esp32 network code (I haven't tested this personally. I believe it should work), eg:
Code: Select all
import network
w = network.WLAN(network.STA_IF)
w.config(mac=b'\xaa\xaa\xaa\xaa\xaa\xaa')
Code: Select all
from esp import espnow
e = espnow.ESPNow()
e.init()
w.active(True)
Cheers,
Glenn.
Re: ESP-Now support for ESP32 (and ESP8266)
ESP8266 ESPNow support now merged into micropython PR#6515
I have update the code base for PR #6515 (https://github.com/micropython/micropython/pull/6515).
The update includes the esp8266 support, some code simplifications for the esp32 support and some documentaton fixes.
So ESP32 and ESP8266 users can get their code from the same place now (https://github.com/glenn20/micropython/tree/espnow-g20).
As always, if you find some problems, let me know.
Note that I have squashed some commits on the espnow-g20 branch. Apologies if this disrupts anyone else using the branch. I am trying to keep the PR as clean as possible in the hope that is does get merged into the main micropython code base.
I have update the code base for PR #6515 (https://github.com/micropython/micropython/pull/6515).
The update includes the esp8266 support, some code simplifications for the esp32 support and some documentaton fixes.
So ESP32 and ESP8266 users can get their code from the same place now (https://github.com/glenn20/micropython/tree/espnow-g20).
As always, if you find some problems, let me know.
Note that I have squashed some commits on the espnow-g20 branch. Apologies if this disrupts anyone else using the branch. I am trying to keep the PR as clean as possible in the hope that is does get merged into the main micropython code base.
Re: ESP-Now support for ESP32 (and ESP8266)
I am generating a brief description of the available methods from https://github.com/glenn20/micropython/ ... ee466e7e75
Is there an automated way of getting the methods available rather than manually editing that file?
Thanks,
Dave
Is there an automated way of getting the methods available rather than manually editing that file?
Thanks,
Dave
Re: ESP-Now support for ESP32 (and ESP8266)
@davef - not that I am aware of. I document the methods in the docs/library/espnow.rst file. You can build those doc's with . The latest version clarifies what is available on esp8266 and esp32.
Code: Select all
cd docs ; make html
Re: ESP-Now support for ESP32 (and ESP8266)
Xubuntu said I needed to install sphinxsearch, but sphinx_build is nowhere to be found.
I'll do more reading later. For now I'll just edit the file.
Thanks,
Dave
I'll do more reading later. For now I'll just edit the file.
Thanks,
Dave