-
Notifications
You must be signed in to change notification settings - Fork 96
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
AP-STA mode #299
AP-STA mode #299
Conversation
On the technical side, this seems to be working - I managed to set up AP-STA mode to serve a website while occasionally scanning for networks. Due to the controller APIs requiring mutable access, it's not very easy to use, but since the AP and STA modes aren't much affected by it, maybe it's a decent first stab at the problem. |
a0f7961
to
2c94292
Compare
I'm definitely not touching the examples right now. @bjoernQ / @MabezDev I'd love to hear your opinions on the open questions and the last commit that implements the type-state device stuff. This got a bit hairy just to avoid some runtime branching, though an added benefit is that now users won't be able to mix up STA and AP devices/interfaces. I should probably hide a bunch of methods in WifiDeviceMode, that'll come later if this is a good approach. |
I'll be frank, the examples are slapped together by merging dhcp and access_point examples, but they seem to be working. I'll put this up for review, though I'm happy to make any changes if you have ideas where this could be improved. |
9b4aaa7
to
fada531
Compare
af868c9
to
c196024
Compare
Code looks good and the new examples work fine for me with the exception of ESP32-C2. The |
Thanks - amended and shrunk the other embassy AP example, too |
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.
LGTM - thanks!
Built on top of #298
Open questions:
new_with_mode
? The AP-STA mode needs two devices (and consequently, two Stacks due to different link state, rx queues, etc.). We can return an enum (user needs to match), we can return a struct (ugh), or we can have different constructors (which removes the need forembedded_svc::wifi::Configuration
which I consider a + because I don't like its None option and our need to handle it).WifiDevice
, which would allow keeping it zero-sized but with a bit of user-facing complexity bump.TODO:
set_configuration
shouldn't change the type of configurationCloses #190