-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cpu/esp*: define esp_now as default netdev #12787
Conversation
The number of thread priority levels has to be 32 if esp_eth is used.
Since Makefile.dep files are included as last files multiple times to resolve all module dependencies, GNRC_NETIF_NUMOF is handled here.
Works like a charm! This is unrelated to this PR, but the
|
No reason. Should we rename the PR to |
Sure, go ahead! |
@benpicco I have added the same for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested both on esp32 and esp8266, please squash!
Two unrelated things:
- esp8266 prints
scandone
every 10s which is a bit annoying - no link-local address after boot, but they can communicate after manually assigning an address
Yes. Sinec ESP-NOW is an ad-hoc network, ESP-NOW nodes scan every 10 seconds for new peers. Unfortunately, these messages come from the depth of the vendor binary blobs and I couldn't figure out til now how to disable them in the ESP8266 RTOS SDK. It's the same with the other messages like
I will place it on the open issue list in issue #12707.
That's clear.
to get a link local address assigned automatically which works definitely. |
If the user or the board definition doesn't enable `esp_wifi` or `esp_eth`, `esp_now` is defined as default netdev. fixup! cpu/esp32: defines esp_now as default netdev
If the user or the board definition doesn't enable `esp_wifi`, `esp_now` is defined as default netdev.
8579ff6
to
500c5f4
Compare
Yea it took me a bit but then I noticed there was also a message printed about it:
And indeed with |
ESP-NOW nodes are so-called But, indeed the default behavior has changed for ESP-NOW nodes which got a link local address automatically before PR #10499 was merged. @miri64 Makes it sense to define |
@benpicco Thanks for reviewing, testing and merging. |
Contribution description
For ESP32 and ESP8266 boards, various on-board
netdev
s can be enabled by theesp-now
,esp-wifi
,esp-eth
pseudo modules.Since
esp-wifi
requires additional configuration settings andesp-eth
is not available on each board,esp-now
is defined as defaultnetdev
if none of the othernetdev
modules is enabled explicitly.It is possible to use multiple
netdev
s.GNRC_NETIF_NUMOF
is determined automatically as long as dynamic approaches in PR #9903 and #12308 are not available.Testing procedure
Test the following configurations:
esp-now
as defaultnetdev
esp-now
should be used as defaultnetdev
and the statistics should contain a L2-PDU size of 249.esp-wifi
as defaultnetdev
esp-wifi
should be used as defaultnetdev
and the statistics should contain a L2-PDU size of 1500.esp-eth
as defaultnetdev
Check with command
that module
esp_eth
is used.Multiple
netdev
sThere should be two
netdev
s with theifconfig
command.Tests 1, 2 and 3 for
esp32-wroom-32
board should also work foresp8266-esp-12x
board.Issues/PRs references
Makes #12756 obsolete