Skip to content
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

[HELP] Using espnow on NuttX for espressif devices #15347

Open
1 task done
Laczen opened this issue Dec 26, 2024 · 7 comments
Open
1 task done

[HELP] Using espnow on NuttX for espressif devices #15347

Laczen opened this issue Dec 26, 2024 · 7 comments
Labels
Community: Question Further information is requested

Comments

@Laczen
Copy link
Contributor

Laczen commented Dec 26, 2024

Description

Hi, I would like to use the espnow from expressif to communicate between different esp32 based nodes. Can this be done using the raw packets net interface or is it better to create a dedicated driver?

If the raw packets net interface would work, has anyone already done this or has a good example on how to do this?

If a dedicated driver would be a better approach, can this driver be created while still maintaining normal wifi operation (of course on the same wifi channel)?

Verification

  • I have verified before submitting the report.
@Laczen Laczen added the Community: Question Further information is requested label Dec 26, 2024
@Laczen Laczen changed the title [HELP] Using espnow on NuttX for expressif devices [HELP] Using espnow on NuttX for espressif devices Dec 26, 2024
@acassis
Copy link
Contributor

acassis commented Dec 29, 2024

@tmedicci @eren-terzioglu please take a look ^

@tmedicci
Copy link
Contributor

tmedicci commented Jan 2, 2025

Hi @Laczen,

It is not on our roadmap. But if this is really important for your application and you decide to get hands on, open a dedicated branch so we can help with ideas and suggestions.

As a starting point for your reference, please consider ESP-IDF's release/v5.1 branch: if a feature is supported by this version, It'd be virtually possible to be adapted for NuttX.

@Laczen
Copy link
Contributor Author

Laczen commented Jan 2, 2025

Hi @tmedicci thanks for your reply.

I think this would be a good addition for nuttx. From the ESP-IDF release/v5.1 branch it seems that espnow is supported and has its own library.

Do you think it is a good idea to add support for espnow in a similar way as cc1101 and nrf24l01 ?

@tmedicci
Copy link
Contributor

tmedicci commented Jan 2, 2025

Do you think it is a good idea to add support for espnow in a similar way as cc1101 and nrf24l01 ?

It would be the easiest approach, but I don't think it's the most appropriate...

In my opinion, I think it should be registered as a network device (possibly as a NET_LL_PKTRADIO). Can you take a look at this approach, please?

@Laczen
Copy link
Contributor Author

Laczen commented Jan 2, 2025

In my opinion, I think it should be registered as a network device (possibly as a NET_LL_PKTRADIO). Can you take a look at this approach, please?

Thanks, I will have a look at this approach.

@Laczen
Copy link
Contributor Author

Laczen commented Jan 3, 2025

Hi @tmedicci I have been studying the NET_LL_PKTRADIO (I am still new in NuttX).

I would think that to add espnow as a network device I should take a similar approach to the spirit_netdev.c (https://github.com/apache/nuttx/blob/master/drivers/wireless/spirit/drivers/spirit_netdev.c) and create a espnow_netdev.c. But where in the three should espnow_netdev.c be added?

Should espnow_netdev.c be added at the same location of esp_wifi_adapter.c ?

Thanks in advance.

@tmedicci
Copy link
Contributor

tmedicci commented Jan 3, 2025

Hi @Laczen,

Usually, NuttX drivers are split into a lower-half and upper-half, as described here. Network drivers, however, doesn't seem to follow the same path. If you check about spirit_netdev.c's spirit_netdev_initialize function is being called directly from the board-level (from nuttx/boards/arm/stm32l4/b-l475e-iot01a/src/stm32_spirit.c, for instance).

That being said, as ESPnow is specific for Espressif devices, I think you should implement it on nuttx/arch/xtensa/src/common/espressif (once it can be used by more Espressif's SocS) in a similar way it's done for Wi-Fi (check esp32s3_net_initialize function, for instance).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community: Question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants