edison-fw / edison-oobe

MIT License
1 stars 2 forks source link

rewrite-wip: wifi AP #10

Closed htot closed 3 years ago

htot commented 3 years ago

This seems to be working: afbeelding

Except for the unknow ip addr.

And of course it has the same problem as all other tab: pressing save make it happen immediately, instead of saving all changes and applying on the Activate tab.

mwallnoefer commented 3 years ago

And of course it has the same problem as all other tab: pressing save make it happen immediately, instead of saving all changes and applying on the Activate tab.

Yeah, please ignore that for now. This requires substantial code changes so I guess we should first focus on fixing the connman / ip address integrations.

htot commented 3 years ago

Of course, that was never implemented. Just noting here for future reference.

mwallnoefer commented 3 years ago

With respect to the Activation tab this would be the patch for enabling it on Wired and BT networks: https://github.com/mwallnoefer/edison-oobe/commit/dedb0d1fd88461abe32974fc4037ff77d5bb304f.

If you approve it I may implement it also on the wifi/ap sections (we will need to create settings subclasses for them).

htot commented 3 years ago

Yes, and that is where I got stuck, saving state, testing the selected state, reverting to the saved state and storing the selected state for the activate tab. I hope to be able to test your patch tomorrow (Thu) or Fri, thanks!

htot commented 3 years ago

I like it. I do realize now that in the bt form we say there are connections available, but we do not yet provide a selection box to choose one.

mwallnoefer commented 3 years ago

Next I will try to move also the wifi + ap stuff behind the activation button and when we achieve that we may close also this ticket.

mwallnoefer commented 3 years ago

As the next step I provide you with the AP tab patch: https://github.com/mwallnoefer/edison-oobe/commit/24b0ade133998a1aa27f69e3afddbd36132b8dd5.

Now there is only the wifi tab left, which is also the most complicated one. Let's see what we can do 😄 ...

htot commented 3 years ago

It's all starting to work nicely.

mwallnoefer commented 3 years ago

So and this one should it do for the wifi tab: https://github.com/mwallnoefer/edison-oobe/commit/43ed13eca68e03a93feb15ea39bb12a252f08689

htot commented 3 years ago

It does. Still some glitches. F.i. after turning on Wifi AP and activate. Then goto turn on Wifi and activate.

mwallnoefer commented 3 years ago

This is of course newly introduced undefined behaviour which we need to define, e.g. if both wifi and ap options were changed (or the switches enabled/disabled): What should happen in that case?

htot commented 3 years ago

IMHO only one can change at the time as they are mutually exclusive. Last one wins?

But what I tested was one change at a time (activate AP) followed by enabled wifi and activate (you can't select a wifi AP until wifi enabled, and enabling at least temporarily disables built-in AP)

mwallnoefer commented 3 years ago

Okay, I have added the last-one wins-feature. One defect that I have noticed affects the toggle between the normal wifi and AP state: more in detail, some times after AP mode disable, the normal (of course already stored) wifi connection doesn't come back. A connman state output defines the wifi if as powered and then it remains there.

Not sure if your bug disappeared or not...

htot commented 3 years ago

Ah, so you disable AP? I was trying with AP active, goto Wireless Connection. Since AP active, it doens't scan for AP's. My idea was to temporarily disable AP, scan for AP's then return to AP active. That would allow you to select AP, Save and goto Activate.

How it behave nows is: I click on the ON button, Save, Activate, then go back to Wireless Connection and in my case it's already connected (since I had --autoconnect on in connmanctl, but that's just me).

For the rest seems fine.

mwallnoefer commented 3 years ago

How it behave nows is: I click on the ON button, Save, Activate, then go back to Wireless Connection and in my case it's already connected (since I had --autoconnect on in connmanctl, but that's just me).

Yeah, this is also the case for me, since the last active wifi connection gets stored by connman. But whenever you go to the wifi tab the AP scan is repeated also when you are connected (the message please wait for 10 sec). So you are able to choose another connection and make it active with the activation handler.

But you are telling me that the AP scan doesn't work in that case? Did I get you correctly?

htot commented 3 years ago

No it's working fine. it did the scan, but was already connected. Indeed you can change to another AP.

mwallnoefer commented 3 years ago

Ok, so maybe let us close also this one since the (in my point little) glitch relies on connman s behaviour, fixing it is a bit out of scope.