From 4462bde1f26f1edc6e1e377a2d5b01902d150e3e Mon Sep 17 00:00:00 2001 From: Khaled Romdhani Date: Thu, 3 Jan 2019 17:05:40 +0100 Subject: [PATCH] gemalto: Move atoms to post_online when the voice call driver is probing, I noticed sometimes a CME Error with the code = 4 (operation not supported) related to AT commands "AT+CSSN=1,1" and "AT^SLCC=1". In the current voice call implementation for Gemalto modems the ofono_voicecall_create() is called on the gemalto_pre_sim(). The sim is not totaly readed by the module, it is not yet online which is causing a sporadic problem at driver intialization also when launching some outgoing/incoming calls. This change moves the ofono_voicecall_create() to the gemalto_post_online() to be sure that sim is well registred and online. Several other call related atoms are also moved to post_online state. --- plugins/gemalto.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/gemalto.c b/plugins/gemalto.c index 2f842587..297aaea3 100644 --- a/plugins/gemalto.c +++ b/plugins/gemalto.c @@ -573,9 +573,6 @@ static void gemalto_pre_sim(struct ofono_modem *modem) ofono_devinfo_create(modem, 0, "atmodem", data->app); ofono_location_reporting_create(modem, 0, "gemaltomodem", data->app); - ofono_modem_set_integer(modem, "GemaltoVtsQuotes", 1); - ofono_voicecall_create(modem, 0, "gemaltomodem", data->app); - data->sim = ofono_sim_create(modem, OFONO_VENDOR_GEMALTO, "atmodem", data->app); @@ -604,11 +601,6 @@ static void gemalto_post_sim(struct ofono_modem *modem) ofono_ussd_create(modem, 0, "atmodem", data->app); - ofono_call_forwarding_create(modem, 0, "atmodem", data->app); - ofono_call_settings_create(modem, 0, "atmodem", data->app); - ofono_call_meter_create(modem, 0, "atmodem", data->app); - ofono_call_barring_create(modem, 0, "atmodem", data->app); - if (!g_strcmp0(model, GEMALTO_MODEL_ALS3_PLS8x)) ofono_lte_create(modem, OFONO_VENDOR_GEMALTO, "atmodem", data->app); @@ -621,6 +613,14 @@ static void gemalto_post_online(struct ofono_modem *modem) DBG("%p", modem); ofono_netreg_create(modem, OFONO_VENDOR_GEMALTO, "atmodem", data->app); + + ofono_modem_set_integer(modem, "GemaltoVtsQuotes", 1); + ofono_voicecall_create(modem, 0, "gemaltomodem", data->app); + + ofono_call_forwarding_create(modem, 0, "atmodem", data->app); + ofono_call_settings_create(modem, 0, "atmodem", data->app); + ofono_call_meter_create(modem, 0, "atmodem", data->app); + ofono_call_barring_create(modem, 0, "atmodem", data->app); } static struct ofono_modem_driver gemalto_driver = {