Discussion:
ConnMan doesn't clear rfkill softblock when Wi-Fi plugged in after start-up
Craig McQueen
2015-10-30 01:28:37 UTC
Permalink
Consider this pre-condition:

* ConnMan is configured for Wi-Fi enabled and tethered.
* USB Wi-Fi device is not plugged in.
* Linux rfkill softblock is enabled for wlan.

Now, consider this scenario:

* ConnMan was not running.
* USB Wi-Fi device is plugged in.
* ConnMan is started.

In that scenario, ConnMan detects the Wi-Fi technology, enables it, turns off the rfkill softblock for wlan, and starts tethering. Good!

Now consider this alternative scenario:

* ConnMan is running.
* USB Wi-Fi device is plugged in.

In this scenario, ConnMan detects the Wi-Fi technology, but doesn't enable it because of the rfkill softblock for wlan.

In this second scenario, I would wish for ConnMan to turn off the rfkill softblock for wlan (since it is configured for Wi-Fi enabled and tethered), and start tethering. What code change would be needed to achieve that?
--
Craig McQueen
Patrik Flykt
2015-10-30 07:56:32 UTC
Permalink
Post by Craig McQueen
* ConnMan is configured for Wi-Fi enabled and tethered.
* USB Wi-Fi device is not plugged in.
* Linux rfkill softblock is enabled for wlan.
ConnMan follows the external softblock state. So if something else
enabled rfkill on WiFi, ConnMan should have disabled the technology at
this point. Please verify the state of WiFi technology at this point.
Post by Craig McQueen
* ConnMan was not running.
* USB Wi-Fi device is plugged in.
* ConnMan is started.
In that scenario, ConnMan detects the Wi-Fi technology, enables it,
turns off the rfkill softblock for wlan, and starts tethering. Good!
When ConnMan starts it will know that its last technology state for WiFi
was 'enabled' and therefore disables rfkill on startup.
Post by Craig McQueen
* ConnMan is running.
* USB Wi-Fi device is plugged in.
In this scenario, ConnMan detects the Wi-Fi technology, but doesn't
enable it because of the rfkill softblock for wlan.
If this starts from the precondition above, we have all of the following
events taking place:
- ConnMan was started
- rfkill enabled for wifi by some external entity
- ConnMan updates technology to 'disabled' in response
- USB WiFi device plugged in
- Nothing happens as the technology is disabled

If this is the scenario, please check that WiFi got disabled after
rfkill was enabled for WiFi.
Post by Craig McQueen
In this second scenario, I would wish for ConnMan to turn off the
rfkill softblock for wlan (since it is configured for Wi-Fi enabled
and tethered), and start tethering. What code change would be needed
to achieve that?
ConnMan follows external settings of rfkill events, see above.

Cheers,

Patrik

Loading...