-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
[Fixed backport]: Add WPS and netstatus #4464
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
base: master
Are you sure you want to change the base?
Conversation
f47ac8e
to
364a6eb
Compare
ports/esp32/modnetwork.c
Outdated
// This function is called by the system-event task and so runs in a different | ||
// thread to the main MicroPython task. It must not raise any Python exceptions. | ||
static esp_err_t event_handler(void *ctx, system_event_t *event) { | ||
switch(event->event_id) { | ||
case SYSTEM_EVENT_STA_START: | ||
ESP_LOGI("wifi", "STA_START"); | ||
break; | ||
case SYSTEM_EVENT_STA_GOT_IP: | ||
wifi_sta_status = STATION_GOT_IP; |
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.
(formatting) Inconsistent indentation; just drop four spaces.
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.
Fixed:)
The code looks really good, thanks for your efforts! WPS is actually a neat solution for establishing connectivity in the IoT space so I think this feature could be quite useful. This weekend I'll build and test it against my router. |
@mattytrentini thank you! You can use the code example I've attached to the first comment here to test it (it worked on my ESP32 perfectly). I would like to see it merged someday. Have a good day! |
Pulled code into a checkout of master:head, rebuilt and tried your example code (changing the pin to something more convenient on my board)...and it appears to work!
Nice job! The only thing that remains is some documentation. A WPS entry in the QuickStart would be the way to go...I could add it but would certainly appreciate it if you were able to make a first-pass! |
@mattytrentini ok, for sure. |
@mattytrentini I've added docs under the networking part of quickref: Can you please read it through and tell me whether it is ok? |
Hello, @mattytrentini! How can I help you to make this PR merged? |
Thanks @volodymyrlut for the contribution. I agree with @mattytrentini that this would be a nice addition, but we should think a bit how the user facing API looks in Python so that it can be made the same on other ports (eg esp8266). At first thought WPS (enrollee) is just another way to connect to an AP, so could simply be exposed as So you could reconnect next time without using WPS there would need to be a way to get the SSID and password (from the successful WPS connection), to save them, to reuse them. Exposing them through The other way to think about it is with WPS as a completely separate, independent feature which is used to retrieve the SSID and password of the AP. This could be exposed using the existing config method like What is done in this PR seems to be a bit of both of the above, adding a new method |
Any update about WPS support ? |
@gmli unfortunately I cannot currently help with this issue. If the problems mentioned by @mattytrentini would be resolved by someone, I think it could be merged. Anyways, there is no technical limitations to make it work. |
This would be awesome to have straight out of the box! Any news? What does need to be solved? |
Thanks so much for your valuable work. I wanted to ask you about this code example for WPS which is followed by an error "AttributeError: 'WLAN' object has no attribute 'start_wps'". |
update logic for displayio.TileGrid's transform_xy
Hello, |
The branch is outdated, I would like to see this update. |
This is an automated heads-up that we've just merged a Pull Request See #13763 A search suggests this PR might apply the STATIC macro to some C code. If it Although this is an automated message, feel free to @-reply to me directly if |
This PR is basically a fixed version of @mactijn port of @jhgoebbert PR#218 which had conflicts with master and haven't passed the CI check.
We've fixed issues, merged code and tested functionality on our ESP-32 boards, but I would kindly ask maintainers to properly review the code.
It can be used as follows: