Comment 11 for bug 1413316

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

Probably the problem is due to timing issues. ofono-setup issues a DBus request to ofono to retrieve the list of modems. But it might be the case that ofono is running but the modems have not been created yet. In fact many times there is a delay between ofono starting and modem creation, because even though ofono starts only when "/dev/socket/rild" exists, in some cases the rild daemon starts accepting connection a few seconds later. Even more, in some extreme cases it takes so long for rild to start that ofono exits and upstart re-spawns it, and this second ofono instance is the one that finally connects to rild. syslog might help here to confirm this hypothesis.

Therefore, ofono-setup needs to be quite more complicated than it is currently is to handle:

1. Delay between ofono starting and modem creation. An option would be to wait for ofono events that signal modem creation, but we need to know how many events we need to wait for (ril.num_slots Android property would help here).
2. Possible re-spawns of ofono. ofono-setup should be aware of ofono stopping it DBus interface.

A simpler solution would be to always create the accounts without the DBus call to get the modems. Using ril.num_slots we know the number of accounts, so this is feasible if we do not need any more information from ofono.