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 |
benpicco
left a comment
There was a problem hiding this comment.
Tested both on esp32 and esp8266, please squash!
Two unrelated things:
- esp8266 prints
scandoneevery 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
netdevs can be enabled by theesp-now,esp-wifi,esp-ethpseudo modules.Since
esp-wifirequires additional configuration settings andesp-ethis not available on each board,esp-nowis defined as defaultnetdevif none of the othernetdevmodules is enabled explicitly.It is possible to use multiple
netdevs.GNRC_NETIF_NUMOFis determined automatically as long as dynamic approaches in PR #9903 and #12308 are not available.Testing procedure
Test the following configurations:
esp-nowas defaultnetdevesp-nowshould be used as defaultnetdevand the statistics should contain a L2-PDU size of 249.esp-wifias defaultnetdevesp-wifishould be used as defaultnetdevand the statistics should contain a L2-PDU size of 1500.esp-ethas defaultnetdevCheck with command
that module
esp_ethis used.Multiple
netdevsThere should be two
netdevs with theifconfigcommand.Tests 1, 2 and 3 for
esp32-wroom-32board should also work foresp8266-esp-12xboard.Issues/PRs references
Makes #12756 obsolete