-
Notifications
You must be signed in to change notification settings - Fork 35
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 minimal support for Wi-Fi on the ESP32-S2. #309
Conversation
This reverts commit 6bc584d.
Alright, I've removed the |
I just noticed, I'll have to make some last minute changes. It won't take long. |
Alright, this is ready from my side. I had to decluster the TX parameter registers, since those offsets appear to be non-uniform across chips and I want porting to be as easy as possible. I have tested this again with esp-wifi-hal and foa, and since I still have a dancing parrot on my screen (one of the examples connects to an open network and sends a GET to parrot.live) this appears to work properly |
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.
Patches look reasonable enough, and the fact that you have working examples is a pretty good indication that things are in good shape as well 😁 Thanks again for your contributions!
Hi,
this PR adds minimal support for the ESP32-S2 and delivers improvements to the ESP32 as well. I've modularized the patches to make porting to other chips easier. I'm not quite happy, with how that patching turned out, but AFAIK that's the best that's possible with the patch format. Now it's only necessary to figure out the offsets, of the individual components for the specific chip, to add minimal support for it. This also means, that all chips can benefit from research made on another, due to the Wi-Fi peripherals being so similar. (At times I had four instances of the Ghidra CodeBrowser running to cross-reference registers between chips.) Due to this, we were able to name a bunch more registers, which makes the driver code nicer to read.
This is still in draft status, because there are a few things I'd like to add around CTS/RTS and maybe the TSF.
I've adapted esp-wifi-hal to work with these patches on my local branch, which I'll make public soon.
If anyone is interested in the process of reverse engineering this, @redfast00 and I gave a talk about this on the 38C3.
As always, thanks a lot for considering this!
PS: I've ordered devkits for the S3 and C6. When they arrive, I'll attempt to make patches for those too.