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

Web workflow skip init when no password, freeing socket. Also reconnect wifi on reload. #8367

Merged
merged 2 commits into from
Sep 5, 2023

Conversation

bill88t
Copy link

@bill88t bill88t commented Sep 5, 2023

If no password is passed via settings.toml, the wifi connection will occur, but the web workflow will not start at all.
This frees up a (as it turns out, very precious) socket.

Closes #7598

@bill88t bill88t changed the title When no password is passed, connect to wifi but do not init web_workf… Web workflow skip init when no password, freeing socket. Sep 5, 2023
@anecdata
Copy link
Member

anecdata commented Sep 5, 2023

I think this would close #7598

@bill88t
Copy link
Author

bill88t commented Sep 5, 2023

I do think so too. Adding it to the first message to have it take effect.

@anecdata
Copy link
Member

anecdata commented Sep 5, 2023

@bill88t
Copy link
Author

bill88t commented Sep 5, 2023

Wifi now is auto-connecting on reload.
The web-workflow will not init on a reload, only on boot.
This matches raspberrypi behaviour, treating wifi as always enabled when it's set via settings.toml.

@bill88t bill88t changed the title Web workflow skip init when no password, freeing socket. Web workflow skip init when no password, freeing socket. Also reconnect wifi on reload. Sep 5, 2023
@anecdata
Copy link
Member

anecdata commented Sep 5, 2023

If I understand correctly, the raspberrypi behavior (wifi connection surviving reload with or without Web Workkflow) will change if MicroPython fixes issue 9505 (and we merge it), but this PR would auto-[re]connect wifi on either port if Web Workflow is enabled.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Thanks! This will go in for 9.x.

@tannewt tannewt merged commit e776f38 into adafruit:main Sep 5, 2023
@bill88t bill88t deleted the web_workflow_disable branch September 5, 2023 20:50
@bill88t
Copy link
Author

bill88t commented Sep 5, 2023

If I understand correctly, the raspberrypi behavior (wifi connection surviving reload with or without Web Workkflow) will change if MicroPython fixes issue 9505 (and we merge it), but this PR would auto-[re]connect wifi on either port if Web Workflow is enabled.

@anecdata cyw43 is a persistent object we just never reset.
Our implementation is just not bothering disconnecting it, so it persists.
That's all there is to that.
Our picow wifi stuff is all of our own, not really taking any of micropy's work.
I have used them as a reference, but not copied code directly.
So future changes of theirs will not affect us.

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

Successfully merging this pull request may close these issues.

Separate Web Workflow and Auto Connect
3 participants