problem sim status
hi,
i make an embedded platform with a 3G modem from Sierra Wireless (SL808x series).
i have a problem with ofono (v1.14) that ask sim status too fast after modem added resulting in CME Error 14 (SIM busy).
is there a way to delay the sim status query (+CPIN) ??
thank you all !
Eric.
Hi Eric,
Quoted 9 lines · Eric BOUXIROT
hi,
i make an embedded platform with a 3G modem from Sierra Wireless (SL808x series).
i have a problem with ofono (v1.14) that ask sim status too fast after modem added resulting in CME Error 14 (SIM busy).is there a way to delay the sim status query (+CPIN) ??
Try adding OFONO_VENDOR_SIERRA to the list of vendors that require CPIN? retry logic. See drivers/atmodem/sim.c:1256
Regards,
-Denis
Denis Kenzior a pensé très fort :
Quoted 10 lines
Hi Eric,
Quoted 7 lines · Eric BOUXIROT
hi,
i make an embedded platform with a 3G modem from Sierra Wireless (SL808x series).
i have a problem with ofono (v1.14) that ask sim status too fast after modem added resulting in CME Error 14 (SIM busy).
Quoted 8 lines
Quoted 2 lines
is there a way to delay the sim status query (+CPIN) ??
Try adding
OFONO_VENDOR_SIERRAto the list of vendors that require CPIN? retry logic. Seedrivers/atmodem/sim.c:1256Regards,
-Denis
ok, i will add this, but if i understand well, this is for +CPIN request AFTER sending a PIN. (but i mean my modem need this too.)
my problem is when modem is added throught dbus/ofono, ofono send somes init commands and finaly i mean sim-manager send an +CPIN request to know if SIM is locked or not... THIS request fail with CME error 14 because of too fast query.
i will try to put a log in few minutes..
Hi Eric,
Quoted 8 lines
ok, i will add this, but if i understand well, this is for +CPIN request AFTER sending a PIN. (but i mean my modem need this too.)
my problem is when modem is added throught dbus/ofono, ofono send somes init commands and finaly i mean sim-manager send an +CPIN request to know if SIM is locked or not... THIS request fail with CME error 14 because of too fast query.
Ah, its one of those modems that doesn't have a sim ready notification.
In that case you probably need to run CPIN queries as part of the modem
power-up procedure. See examples in plugins/zte.c and plugins/speedup.c (cfun_enable & sim_state_cb)
Regards,
-Denis
Quoted 4 lines
Ah, its one of those modems that doesn't have a sim ready notification.
In that case you probably need to run CPIN queries as part of the modem
power-up procedure. See examples inplugins/zte.candplugins/speedup.c(cfun_enable&sim_state_cb)
yes ! that's work !
do you mean this patch can be integrated in one ofono release ? for thoses interested, i will send my patch in next minutes. (let me make it clean)
Quoted 2 lines
for thoses interested, i will send my patch in next minutes. (let me make it clean)
this make an SL8083 Sierra modem to work with ofono. i mean that do not change anything for others modems.
drivers/atmodem/sim.c +1 -0
@@ -1254,6 +1254,7 @@ static void at_pin_send_cb(gboolean ok,case OFONO_VENDOR_ALCATEL :case OFONO_VENDOR_HUAWEI :case OFONO_VENDOR_SIMCOM : +case OFONO_VENDOR_SIERRA :/* * On ZTE modems, after pin is entered, SIM state is checked * by polling CPIN as their modem doesn't provide unsolicited
plugins/sierra.c +12 -0
@@ -48,6 +48,7 @@ static const char *none_prefix[] = { NULstruct sierra_data {GAtChat *modem; +struct at_util_sim_state_query *sim_state_query; };static void sierra_debug (const char *str,void *user_data)
@@ -119,6 +120,17 @@ static GAtChat *open_device(struct ofonoreturn chat; } +static void sim_state_cb (gboolean present,gpointer user_data) +{ +struct ofono_modem *modem = user_data; +struct sierra_data *data =ofono_modem_get_data (modem); + +at_util_sim_state_query_free (data->sim_state_query); + data->sim_state_query =NULL ; + +ofono_modem_set_powered (modem, TRUE); +} + static void cfun_enable(gboolean ok, GAtResult *result, gpointer
user_data)
{
struct ofono_modem *modem = user_data;
@@ -129,9 +141,13 @@ static void cfun_enable(gboolean ok, GAt
if (!ok) {
g_at_chat_unref(data->modem); data->modem = NULL;
+
+ ofono_modem_set_powered(modem, FALSE);
}
- ofono_modem_set_powered(modem, ok);
+ data->sim_state_query = at_util_sim_state_query_new(data->modem,
+ 2, 20, sim_state_cb, modem,
+ NULL);
}
static int sierra_enable(struct ofono_modem *modem)
Quoted 11 lines · Denis Kenzior
Hi Eric,
Quoted 8 lines
ok, i will add this, but if i understand well, this is for +CPIN request AFTER sending a PIN. (but i mean my modem need this too.)
my problem is when modem is added throught dbus/ofono, ofono send somes init commands and finaly i mean sim-manager send an +CPIN request to know if SIM is locked or not... THIS request fail with CME error 14 because of too fast query.
Quoted 7 lines
Ah, its one of those modems that doesn't have a sim ready notification.
In that case you probably need to run CPIN queries as part of the modem
power-up procedure. See examples inplugins/zte.candplugins/speedup.c(cfun_enable&sim_state_cb)Regards,
-Denis
hi Denis,
is it normal that pre_sim function is called before ofono get modem manufacturer and model ?
ofonod[406]: plugins/sierra.c:open_device() Modem /dev/ttyUSB2 ofonod[406]: Modem: > ATE0 &C0\r
ofonod[406]: Modem: < ATE0 &C0\r
ofonod[406]: Modem: < \r\nOK\r\n
ofonod[406]: Modem: > AT+CMEE=1\r
ofonod[406]: Modem: < \r\n+CREG: 2\r\n
ofonod[406]: Modem: < \r\n+CIEV: 2,1\r\n
ofonod[406]: Modem: < \r\n+CIEV: 4,1\r\n
ofonod[406]: Modem: < \r\nOK\r\n
ofonod[406]: Modem: > AT+CFUN=4\r
ofonod[406]: Modem: < \r\nOK\r\n
ofonod[406]: plugins/sierra.c:cfun_enable()
ofonod[406]: src/modem.c:get_modem_property() modem 0x12d290 property Model
ofonod[406]: src/modem.c:modem_change_state() old state: 0, new state:
1
ofonod[406]: plugins/sierra.c:sierra_pre_sim() 0x12d290 ofonod[406]: src/modem.c:get_modem_property() modem 0x12d290 property Model
ofonod[406]: plugins/sierra.c:sierra_pre_sim()
ofonod[406]: Modem: > AT+GCAP\r
ofonod[406]: src/sim.c:ofono_sim_add_state_watch() 0x12e628 ofonod[406]: src/sim.c:ofono_sim_add_state_watch() 0x12e628 ofonod[406]: src/sim.c:ofono_sim_add_state_watch() 0x12e628 ofonod[406]: Modem: < \r\nERROR\r\n
ofonod[406]: Modem: > AT+CRSM=192,12258,0,0,255\r ofonod[406]: Modem: < \r\n+CME ERROR: 3\r\n
ofonod[406]: Modem: > AT+CGMI\r
ofonod[406]: Modem: < \r\nSierra Wireless, Incorporated\r\n\r\nOK\r\n ofonod[406]: Modem: > AT+CGMM\r
ofonod[406]: Modem: < \r\nSL8083\r\n\r\nOK\r\n
ofonod[406]: Modem: > AT+CGMR\r
ofonod[406]: Modem: < \r\nS4_0_0_7AP R1384 CNSZXD00000155 2012/09/29 10:26:17\r\n\r\nOK\r\n
ofonod[406]: Modem: > AT+CGSN\r
ofonod[406]: Modem: < \r\n355131041136262\r\n\r\nOK\r\n ofonod[406]: Modem: > AT+CRSM=192,28421,0,0,255\r ofonod[406]: Modem: < \r\n+CIEV: 2,0\r\n\r\n+CIEV: 4,0\r\n\r\n+CREG:
0\r\n\r\n+CME ERROR: 3\r\n
ofonod[406]: Modem: > AT+CRSM=192,12037,0,0,255\r ofonod[406]: Modem: < \r\n+CME ERROR: 3\r\n
ofonod[406]: Modem: > AT+CPIN?\r
ofonod[406]: Modem: < \r\n+CME ERROR: 14\r\n
ofonod[406]: Querying PIN authentication state failed
i would like to get model in presim to make a better patch using modem model with a new enum in vendor list (like simcom)
how i can make pre_sim to wait for theses information available ?
Quoted 48 lines
hi Denis,
is it normal that
pre_simfunction is called before ofono get modem manufacturer and model ?ofonod[406]: plugins/sierra.c:open_device() Modem
/dev/ttyUSB2ofonod[406]: Modem: > ATE0 &C0\r
ofonod[406]: Modem: < ATE0 &C0\r
ofonod[406]: Modem: < \r\nOK\r\n
ofonod[406]: Modem: > AT+CMEE=1\r
ofonod[406]: Modem: < \r\n+CREG: 2\r\n
ofonod[406]: Modem: < \r\n+CIEV: 2,1\r\n
ofonod[406]: Modem: < \r\n+CIEV: 4,1\r\n
ofonod[406]: Modem: < \r\nOK\r\n
ofonod[406]: Modem: > AT+CFUN=4\r
ofonod[406]: Modem: < \r\nOK\r\n
ofonod[406]: plugins/sierra.c:cfun_enable()
ofonod[406]: src/modem.c:get_modem_property() modem0x12d290property Model ofonod[406]: src/modem.c:modem_change_state() old state: 0, new state: 1 ofonod[406]: plugins/sierra.c:sierra_pre_sim()0x12d290ofonod[406]: src/modem.c:get_modem_property() modem0x12d290property Model ofonod[406]: plugins/sierra.c:sierra_pre_sim()
ofonod[406]: Modem: > AT+GCAP\r
ofonod[406]: src/sim.c:ofono_sim_add_state_watch()0x12e628ofonod[406]: src/sim.c:ofono_sim_add_state_watch()0x12e628ofonod[406]: src/sim.c:ofono_sim_add_state_watch()0x12e628ofonod[406]: Modem: < \r\nERROR\r\n
ofonod[406]: Modem: > AT+CRSM=192,12258,0,0,255\r
ofonod[406]: Modem: < \r\n+CME ERROR: 3\r\n
ofonod[406]: Modem: > AT+CGMI\r
ofonod[406]: Modem: < \r\nSierra Wireless, Incorporated\r\n\r\nOK\r\n ofonod[406]: Modem: > AT+CGMM\r
ofonod[406]: Modem: < \r\nSL8083\r\n\r\nOK\r\n
ofonod[406]: Modem: > AT+CGMR\r
ofonod[406]: Modem: < \r\nS4_0_0_7AP R1384 CNSZXD00000155 2012/09/29 10:26:17\r\n\r\nOK\r\n
ofonod[406]: Modem: > AT+CGSN\r
ofonod[406]: Modem: < \r\n355131041136262\r\n\r\nOK\r\n ofonod[406]: Modem: > AT+CRSM=192,28421,0,0,255\r
ofonod[406]: Modem: < \r\n+CIEV: 2,0\r\n\r\n+CIEV: 4,0\r\n\r\n+CREG:
0\r\n\r\n+CME ERROR: 3\r\n
ofonod[406]: Modem: > AT+CRSM=192,12037,0,0,255\r
ofonod[406]: Modem: < \r\n+CME ERROR: 3\r\n
ofonod[406]: Modem: > AT+CPIN?\r
ofonod[406]: Modem: < \r\n+CME ERROR: 14\r\n
ofonod[406]: Querying PIN authentication state failed
Quoted 3 lines
i would like to get model in presim to make a better patch using modem model with a new enum in vendor list (like simcom)
how i can makepre_simto wait for theses information available ?
sorry mistake.. (like wavecom modem)
Hi Eric,
Quoted 3 lines
is it normal that
pre_simfunction is called before ofono get modem manufacturer and model ?
Yes. If you note, the devinfo atom is added in pre-sim.
Quoted 3 lines
i would like to get model in presim to make a better patch using modem model with a new enum in vendor list (like simcom)
how i can makepre_simto wait for theses information available ?
Simply query the model/whichever numbers as part of your initialization procedure. e.g. run AT+FOO for the information that you need. See how the huawei plugin uses AT+ATI for example.
Regards,
-Denis
Quoted 3 lines
Simply query the model/whichever numbers as part of your initialization procedure. e.g. run AT+FOO for the information that you need. See how the huawei plugin uses AT+ATI for example.
ok !
here the patch i used to support Sierra Wireless SL808x series modem. *add retries for +CPIN waiting SIM is ready
*add +CPINC to get PIN retry count
*add OFONO_VENDOR_SIERRA_SL808X vendor for theses specifics Sierra models. *change to new vendor automaticaly at modem_enable using +CGMM to get modem model
I mean it can be added in next release of ofono ?
drivers/atmodem/sim.c +47 -0
@@ -63,6 +63,7 @@ static const char *zpinpuk_prefix[] = {static const char *pinnum_prefix[] = {"%PINNUM:" ,NULL };static const char *oercn_prefix[] = {"_OERCN:" ,NULL };static const char *cpinr_prefixes[] = {"+CPINR:" ,"+CPINRE:" ,NULL }; +static const char *cpinc_prefix[] = {"+CPINC:" ,NULL };static const char *epin_prefix[] = {"*EPIN:" ,NULL };static const char *spic_prefix[] = {"+SPIC:" ,NULL };static const char *pct_prefix[] = {"#PCT:" ,NULL };
@@ -165,6 +166,7 @@ static void at_sim_read_info(struct ofoncase OFONO_VENDOR_ZTE :case OFONO_VENDOR_HUAWEI :case OFONO_VENDOR_SIERRA : +case OFONO_VENDOR_SIERRA_SL808X :case OFONO_VENDOR_SPEEDUP :case OFONO_VENDOR_QUALCOMM_MSM :case OFONO_VENDOR_SIMCOM :
@@ -616,6 +618,45 @@ error:CALLBACK_WITH_FAILURE (cb,NULL , cbd->data); } +static void at_cpinc_cb (gboolean ok,GAtResult *result,gpointer user_data) +{ +struct cb_data *cbd = user_data; +ofono_sim_pin_retries_cb_t cb = cbd->cb; +const char *final =g_at_result_final_response (result); +GAtResultIter iter; +struct ofono_error error; +int retries[OFONO_SIM_PASSWORD_INVALID ]; +size_t i; +static enum ofono_sim_password_type password_types[] = { +OFONO_SIM_PASSWORD_SIM_PIN , +OFONO_SIM_PASSWORD_SIM_PIN2 , +OFONO_SIM_PASSWORD_SIM_PUK , +OFONO_SIM_PASSWORD_SIM_PUK2 , + }; + +decode_at_error (&error, final); + +if (!ok) { +cb (&error,NULL , cbd->data); +return ; + } + +g_at_result_iter_init (&iter, result); + +if (!g_at_result_iter_next (&iter,"+CPINC:" )) + goto error; + +BUILD_PIN_RETRIES_ARRAY (password_types,ARRAY_SIZE (password_types), + retries); + +cb (&error, retries, cbd->data); + +return ; + +error: +CALLBACK_WITH_FAILURE (cb,NULL , cbd->data); +} +static void xpincnt_cb (gboolean ok,GAtResult *result,gpointer user_data) {struct cb_data *cbd = user_data;
@@ -1023,6 +1064,11 @@ static void at_pin_retries_query(struct at_pct_cb, cbd, g_free) > 0)return ;break ; +case OFONO_VENDOR_SIERRA_SL808X : +if (g_at_chat_send (sd->chat,"AT+CPINC" , cpinc_prefix, + at_cpinc_cb, cbd, g_free) >0 ) +return ; +break ;case OFONO_VENDOR_ALCATEL :if (g_at_chat_send (sd->chat,"AT+PNNM?" , pnnm_prefix, at_pnnm_cb, cbd, g_free) >0 )
@@ -1254,6 +1300,7 @@ static void at_pin_send_cb(gboolean ok,case OFONO_VENDOR_ALCATEL :case OFONO_VENDOR_HUAWEI :case OFONO_VENDOR_SIMCOM : +case OFONO_VENDOR_SIERRA_SL808X :/* * On ZTE modems, after pin is entered, SIM state is checked * by polling CPIN as their modem doesn't provide unsolicited
drivers/atmodem/vendor.h +1 -0
@@ -31,6 +31,7 @@ enum ofono_vendor {OFONO_VENDOR_ZTE ,OFONO_VENDOR_HUAWEI ,OFONO_VENDOR_SIERRA , +OFONO_VENDOR_SIERRA_SL808X ,OFONO_VENDOR_NOVATEL ,OFONO_VENDOR_WAVECOM , OFONO_VENDOR_NOKIA,
drivers/swmodem/gprs-context.c +7 -2
@@ -41,6 +41,7 @@#include "gattty.h" #include "swmodem.h" +#include <drivers/atmodem/vendor.h> static const char *none_prefix[] = {NULL };
@@ -49,6 +50,7 @@ struct gprs_context_data {unsigned int active_context;ofono_gprs_context_cb_t cb;void *cb_data; +unsigned int vendor; }; static void at_scact_down_cb(gboolean ok, GAtResult *result,
@@ -100,8 +102,10 @@ static void at_scact_up_cb(gboolean ok,snprintf (buf,sizeof (buf),"AT!SCPADDR=%u" , gcd->active_context);g_at_chat_send (gcd->chat, buf, none_prefix,NULL ,NULL ,NULL ); -snprintf (buf,sizeof (buf),"AT+CGCONTRDP=%u" , gcd->active_context); -g_at_chat_send (gcd->chat, buf, none_prefix,NULL ,NULL ,NULL ); +if (gcd->vendor ==OFONO_VENDOR_SIERRA ) { +snprintf (buf,sizeof (buf),"AT+CGCONTRDP=%u" , gcd->active_context); +g_at_chat_send (gcd->chat, buf, none_prefix,NULL ,NULL ,NULL ); + } modem =ofono_gprs_context_get_modem (gc); interface =ofono_modem_get_string (modem,"NetworkInterface" );
@@ -227,6 +231,7 @@ static int sw_gprs_context_probe(structreturn -ENOMEM ; gcd->chat =g_at_chat_clone (chat); + gcd->vendor = vendor;ofono_gprs_context_set_data (gc, gcd);
plugins/sierra.c +52 -5
95 lines not on this page · raw message
Hi Eric,
Quoted 6 lines · Eric BOUXIROT
Quoted 3 lines
Simply query the model/whichever numbers as part of your initialization procedure. e.g. run AT+FOO for the information that you need. See how the huawei plugin uses AT+ATI for example.
ok !
Quoted 7 lines
here the patch i used to support Sierra Wireless SL808x series modem. *add retries for +CPIN waiting SIM is ready
*add +CPINC to get PIN retry count
*addOFONO_VENDOR_SIERRA_SL808Xvendor for theses specifics Sierra models. *change to new vendor automaticaly atmodem_enableusing +CGMM to get modem modelI mean it can be added in next release of ofono ?
Please break up your patches and submit them using git send-email. Refer to HACKING document inside ofono's git tree for more details. Browse previous patch submissions for ample examples of how we like our patches to be structured.
Your patches should probably look roughly like this:
1. drivers/atmodem/vendor.h changes
2. drivers/atmodem/sim.c changes
3. drivers/swmodem/gprs-context.c changes
4. plugins/sierra.c changes
<snip>
Quoted 20 lines
diff -uprN
a/drivers/swmodem/gprs-context.cb/drivers/swmodem/gprs-context.cdrivers/swmodem/gprs-context.c +2
-0@@ -41,6 +41,7 @@#include "gattty.h" #include "swmodem.h" +#include <drivers/atmodem/vendor.h> static const char *none_prefix[] = {NULL };@@ -49,6 +50,7 @@ struct gprs_context_data {unsigned int active_context;ofono_gprs_context_cb_t cb;void *cb_data; +unsigned int vendor; }; static void at_scact_down_cb(gboolean ok, GAtResult *result,
drivers/swmodem/gprs-context.c static void at_scact_up_cb(gboolean ok, · line 108
Quoted 9 lines
drivers/swmodem/gprs-context.c +4
-2@@ -100,8 +102,10 @@ static void at_scact_up_cb(gboolean ok,snprintf (buf,sizeof (buf),"AT!SCPADDR=%u" , gcd->active_context);g_at_chat_send (gcd->chat, buf, none_prefix,NULL ,NULL ,NULL ); -snprintf (buf,sizeof (buf),"AT+CGCONTRDP=%u" , gcd->active_context); -g_at_chat_send (gcd->chat, buf, none_prefix,NULL ,NULL ,NULL ); +if (gcd->vendor ==OFONO_VENDOR_SIERRA ) { +snprintf (buf,sizeof (buf),"AT+CGCONTRDP=%u" , gcd->active_context); +g_at_chat_send (gcd->chat, buf, none_prefix,NULL ,NULL ,NULL ); + }
I'm confused why you need this change. The CGCONTRDP command has no effect, so it is safe to leave it in there even if it fails.
Quoted 24 lines
drivers/swmodem/gprs-context.c +1
-0modem =ofono_gprs_context_get_modem (gc); interface =ofono_modem_get_string (modem,"NetworkInterface" );@@ -227,6 +231,7 @@ static int sw_gprs_context_probe(structreturn -ENOMEM ; gcd->chat =g_at_chat_clone (chat); + gcd->vendor = vendor;ofono_gprs_context_set_data (gc, gcd);diff -uprN
a/plugins/sierra.cb/plugins/sierra.cplugins/sierra.c +2
-0@@ -48,6 +48,8 @@ static const char *none_prefix[] = { NULstruct sierra_data {GAtChat *modem; +enum ofono_vendor vendor; +struct at_util_sim_state_query *sim_state_query; };static void sierra_debug (const char *str,void *user_data)
plugins/sierra.c static GAtChat *open_device(struct ofono · line 130
Quoted 10 lines
plugins/sierra.c +7
-0@@ -119,6 +121,17 @@ static GAtChat *open_device(struct ofonoreturn chat; } +static void sim_state_cb (gboolean present,gpointer user_data) +{ +struct ofono_modem *modem = user_data; +struct sierra_data *data =ofono_modem_get_data (modem); + +at_util_sim_state_query_free (data->sim_state_query); + data->sim_state_query =NULL ;
You don't set whether the SIM is present or not. Isn't this what you want?
Quoted 26 lines
plugins/sierra.c +16
-1+ +ofono_modem_set_powered (modem, TRUE); +} +static void cfun_enable (gboolean ok,GAtResult *result,gpointer user_data) {struct ofono_modem *modem = user_data;@@ -129,9 +142,44 @@ static void cfun_enable(gboolean ok, GAtif (!ok) {g_at_chat_unref (data->modem); data->modem =NULL ; + +if (data->vendor ==OFONO_VENDOR_SIERRA_SL808X ) +ofono_modem_set_powered (modem, FALSE); } -ofono_modem_set_powered (modem, ok); +if (data->vendor ==OFONO_VENDOR_SIERRA_SL808X ) + data->sim_state_query =at_util_sim_state_query_new (data->modem, +2 ,20 , sim_state_cb, modem, +NULL ); +else +ofono_modem_set_powered (modem, ok); +} + +static void get_model (gboolean ok,GAtResult *result,gpointer user_data)
plugins/sierra.c static void cfun_enable(gboolean ok, GAt · line 168
Quoted 10 lines
plugins/sierra.c +10
-0+{ +struct ofono_modem *modem = user_data; +struct sierra_data *data =ofono_modem_get_data (modem); +struct ofono_error error; +const char *attr; +enum ofono_vendor vendor =0 ; + +DBG ("" ); + + data->vendor=OFONO_VENDOR_SIERRA ;
This is not according to our coding style.
plugins/sierra.c static void cfun_enable(gboolean ok, GAt · line 178
Quoted 10 lines
plugins/sierra.c +10
-0+decode_at_error (&error,g_at_result_final_response (result)); + +if (!ok) + goto done; + +if (at_util_parse_attr (result,"" , &attr) == TRUE) +if (!strncmp (attr,"SL808" ,5 )) { + data->vendor=OFONO_VENDOR_SIERRA_SL808X ; +DBG ("Modem is SL808X series" ); + }
Again, fix the coding style here.
It would be better to rewrite this piece as:
if (at_util_parse_attr(...) == FALSE)
goto done;
if (!strncmp(...)) {
....
}Quoted 28 lines
plugins/sierra.c +6
-3+ +done: +g_at_chat_send (data->modem,"AT+CFUN=4" , none_prefix, + cfun_enable, modem,NULL ); }static int sierra_enable (struct ofono_modem *modem)@@ -148,8 +196,7 @@ static int sierra_enable(struct ofono_mo/* This is separate because it is not supported by all modems. */ g_at_chat_send (data->modem,"AT+CMEE=1" ,NULL ,NULL ,NULL ,NULL ); -g_at_chat_send (data->modem,"AT+CFUN=4" , none_prefix, - cfun_enable, modem,NULL ); +g_at_chat_send (data->modem,"AT+CGMM" ,NULL , get_model, modem,NULL );return -EINPROGRESS ; }@@ -219,7 +266,7 @@ static void sierra_pre_sim(struct ofono_DBG ("%p" , modem);ofono_devinfo_create (modem,0 ,"atmodem" , data->modem); - sim =ofono_sim_create (modem,OFONO_VENDOR_SIERRA , + sim =ofono_sim_create (modem, data->vendor,"atmodem" , data->modem);if (sim)
plugins/sierra.c static void sierra_post_sim(struct ofono · line 290
Quoted 8 lines
plugins/sierra.c +1
-1@@ -237,7 +284,7 @@ static void sierra_post_sim(struct ofonoofono_phonebook_create (modem,0 ,"atmodem" , data->modem); gprs =ofono_gprs_create (modem,0 ,"atmodem" , data->modem); - gc =ofono_gprs_context_create (modem,0 ,"swmodem" , data->modem); + gc =ofono_gprs_context_create (modem, data->vendor,"swmodem" , data->modem);if (gprs && gc)ofono_gprs_add_context (gprs, gc);
Regards,
-Denis