Hello, I'm using a SIM7600 USB modem (QMI) with Connman and Ofono, however I've found that I don't get a connection on first boot. I've debugged this and have some clues as to why...
On first boot (or every boot with a read-only filesystem), I observe the following: ofonod[406]: LTE attach IP type: 0 ofonod[406]: src/gprs.c:ofono_gprs_cid_activated() cid 1 ofonod[406]: src/gprs.c:ofono_gprs_cid_activated() cid 1 activated before atom registered This occurs because of a bail condition (!__ofono_atom_get_registered(gprs->atom)) - the git commit for this ("gprs: Ignore activated contexts during init, list them later") suggests that this was added to avoid duplicate contexts in the case where a context gets activated before provisioning (perhaps in the case of LTE). The commit also calls driver->list_active_contexts to handle this - however list_active_contexts has only been implemented for the atmodem driver. Therefore should the qmi driver be updated to implement a list_active_contexts call that will run get_default_profile_cb and then share this via ofono_gprs_cid_activated ? Without this we seem to get a race condition. In the function drivers/qmimodem/gprs.c:create_wds_cb we rely on the callback related to QMI_NAS_GET_SS_INFO to eventually call ofono_gprs_cid_activated - however this must happen before ofono_gprs_register (also in reate_wds_cb) completes. My observation is that on first boot, there are no settings in /var/lib/ofono, thus ofono_sim_add_spn_watch is called to provision contexts - this takes time and results in the "activated before atom registered" error. If I kill ofono and start it again - then this time there are settings, gprs_load_settings no longer returns NULL and so ofono_gprs_register returns quicker - resulting in everything working. Is my understanding correct? What is the correct way to address this? Thanks, Andrew Muray _______________________________________________ ofono mailing list -- ofono@ofono.org To unsubscribe send an email to ofono-le...@ofono.org