Comment 9 for bug 1427439

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

It is difficult to reproduce this, I was able to arrive to a bad state following these steps:

1. Boot system with 2 SIMs, normal state
2. Offline both modems using ofono scripts
        $ cd /usr/share/ofono/scripts
        $ ./offline_modem /ril_0
        $ ./offline_modem /ril_1
3. Toggle on flight mode
4. Toggle off flight mode. The modems are not onlined, and soft=true for WWAN, but not for ALL in saved-states file.

urfkill is keeping the previous state of the modems (the state before FM was set). I wonder if for some reason/bug the modems were offline when the bug happened. The "searching" status could be for one modem, but the other could be offline, which is enough for triggering the bug. Or, the searching status was wrong and the modem was actually offline.

This PR makes WWAN state == flight mode (ALL) state, fixes the situation described in this comment and as a minimum would let us recover with a reboot in case we come across again with a "saved-states" with content as in comment #2:

https://github.com/cyphermox/urfkill/pull/19