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

Non-open softAP not supported #1610

Open
bugadani opened this issue Oct 26, 2023 · 11 comments
Open

Non-open softAP not supported #1610

bugadani opened this issue Oct 26, 2023 · 11 comments
Labels
package:esp-wifi Issues related to the esp-wifi package

Comments

@bugadani
Copy link
Contributor

I know the readme already has a point about not supporting non-open softAP but there is no open issue about the general thing. https://github.com/esp-rs/esp-wifi/issues/454 exists but for WPA2-Enterprise, which is a subset that requires some authmode-specific code.

@bugadani
Copy link
Contributor Author

bugadani commented Oct 26, 2023

Let's start by stating that I've tried the obvious: copying config values from esp-idf-svc. Unfortunately, it looks like this issue isn't as easy as a misconfigured softAP.

@AnthonyGrondin
Copy link
Contributor

My $0.02
Last time I tried to use the SoftAP with an auth method, I fell on the gettimeofday() that wasn't implemented. This has been fixed in esp-rs/esp-wifi-sys#304, but this makes me think since a certain number of extern "c" fn are being called to initialize it, we should see if there isn't an issue there. It would have normally panicked, if we fell on an unimplemented one, but maybe an implemeted one doesn't return the right value that the precompiled libs expect. I also don't know what's the actual issue after copying the value, so my comment above might be off tracks.

Can we use this issue to track the implementation, and debugging? And post what bits of code you changed? Or maybe open a Draft PR.

@bjoernQ
Copy link
Contributor

bjoernQ commented Oct 27, 2023

I guess the problem is that we compile wpa_supplicant with TinyCrypt - not mbed-tls: https://github.com/esp-rs/esp-wireless-drivers-3rdparty/blob/master/patch/esp32c3/sdkconfig.defaults

The reason for that is mbed-tls is quite huge and pulls in a lot of stuff from esp-idf

This is also causing esp-rs/esp-wifi#109

My ultimate dream solution would be esp-rs/esp-wifi#158 ... but that's a huge thing

@bugadani
Copy link
Contributor Author

bugadani commented Oct 27, 2023

TinyCrypt

is that basically a no-op thing that makes things compile but break as soon as anything needs crypto? this is essentially what we seem to be experiencing

at any rate, this might probably be a blocker for esp-wifi based commercial projects

@bjoernQ
Copy link
Contributor

bjoernQ commented Oct 27, 2023

TinyCrypt only includes support for a subset of crypto that is needed for more advanced things: https://github.com/intel/tinycrypt/tree/master/lib/source

Probably the missing parts are no-ops then

Ah seems it's actually not TinyCrypt but some crypto impls in wpa_supplicant itself: https://github.com/espressif/esp-idf/blob/b4268c874a4cf8fcf7c0c4153cffb76ad2ddda4e/components/wpa_supplicant/CMakeLists.txt#L104-L161

@bjoernQ
Copy link
Contributor

bjoernQ commented Oct 27, 2023

But the thing about the crypto is just guessing currently - probably we need to test that with an ESP-IDF example and see what config options are really needed

@noahbliss
Copy link

Just bumping this up in the fresh list. :P

@noahbliss
Copy link

Is there a workaround for this? Even one that imports an inconveniently-large lib?

@AnthonyGrondin
Copy link
Contributor

I think the best bet would be to get esp-rs/esp-wifi-sys#394 working, and implement the crypto functions.

@bjoernQ bjoernQ transferred this issue from esp-rs/esp-wifi-sys May 27, 2024
@bjoernQ bjoernQ added the package:esp-wifi Issues related to the esp-wifi package label May 27, 2024
@MabezDev
Copy link
Member

@bjoernQ Now that we support WPA enterprise (which IIRC forced us to pull in the crypto libs), is this more feasible to fix?

@bjoernQ
Copy link
Contributor

bjoernQ commented Sep 25, 2024

@bjoernQ Now that we support WPA enterprise (which IIRC forced us to pull in the crypto libs), is this more feasible to fix?

Not yet unfortunately - we have some more crypto functions now but IIRC non-open AP would need mbedtls - but worth to double check definitely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:esp-wifi Issues related to the esp-wifi package
Projects
Status: Todo
Development

No branches or pull requests

5 participants