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

Add basic support for the Wi-Fi peripheral on the ESP32. #284

Merged
merged 9 commits into from
Dec 17, 2024

Conversation

Frostie314159
Copy link
Contributor

@Frostie314159 Frostie314159 commented Oct 17, 2024

Hi, this PR adds an SVD patch for the WiFi peripheral. It is based on reverse engineering efforts, by the esp32-open-mac project. I have tested these, by building a driver for the WiFi peripheral.
Status:

  • RX
  • TX
  • Rate setting
  • HT Rates
  • RX filtering
    The following will be implemented in a future PR.
  • Crypto (partial and untested)
  • Sleep
  • CSI
  • Promiscuous Mode
  • Long Range mode (Or at least the MAC specific parts of it)
  • Hardware statistics
  • Block ACK
  • AMPDU
  • Probably some I forgot

For examples and tests, see https://github.com/esp32-open-mac/esp32-wifi-hal-rs

@jessebraham jessebraham linked an issue Oct 25, 2024 that may be closed by this pull request
@Frostie314159
Copy link
Contributor Author

I've decided to reduce the scope of this PR a little, since I would love for Ferris-on-Air to be able to run on an unpatched version of esp-hal. Therefore, the current state of this PR can be seen as an MVP, which I'll extend with further PR's. I hope this is fine for everyone.
Before marking this as ready for review, I'll temporarily remove crypto support, since that's the only untested part of this SVD.

@Frostie314159 Frostie314159 marked this pull request as ready for review December 16, 2024 15:18
@Frostie314159 Frostie314159 changed the title Add support for the WiFi peripheral on the ESP32. Add basic support for the Wi-Fi peripheral on the ESP32. Dec 17, 2024
@Frostie314159
Copy link
Contributor Author

Frostie314159 commented Dec 17, 2024

I have moved crypto support to another branch, the rest of this is tested and in active use. In the future, I'll reorganize the individual components of this, like TX/RX, RX filtering, etc. into common patch files, which we can then just relocate for the other chip variants. RX and TX are extremely similar across chips, as well as the filtering, so we can support more chips that way in the future.
Also thanks a lot for considering this PR, seeing that these patches aren't official but reverse engineered knowledge!

Copy link
Member

@jessebraham jessebraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks reasonable enough to me, though we are peering into a black box 😅

Really great work on this so far, I'm glad to hear you have something usable already! Looking forward to following your work :)

@jessebraham jessebraham added this pull request to the merge queue Dec 17, 2024
Merged via the queue into esp-rs:main with commit ffbee35 Dec 17, 2024
11 checks passed
@Frostie314159
Copy link
Contributor Author

Thanks a lot for merging this! I will make a PR for esp-hal later today, updating the PACs and making the Wi-Fi peripheral non-virtual.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC] Upstream Wi-Fi registers.
2 participants