Skip to contentSkip to conversation

fake a sim-inserted status

PATCH In review F. Gau 2 participants 2 messages Dec 10, 2010 – Dec 20, 2010

lore
Share & tools
lore

F. Gau

author
#0 lore raw

PATCH 2/2 fake a sim-inserted status

From: M. Dietrich <[email protected]>

while the sim detection does not work this patch at least allows to use those modems. until someone has the time to work out a correct solution this is a usefull workaround.

---
 plugins/huawei.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
plugins/huawei.c +1 -0
index 25dfaca..df506d3 100644
@@ -586,6 +586,7 @@ static void huawei_pre_sim(struct ofono_modem *modem)
 	ofono_devinfo_create(modem, 0, "atmodem", data->pcui);
 	data->sim = ofono_sim_create(modem, OFONO_VENDOR_QUALCOMM_MSM,
 					"atmodem", data->pcui);
+	ofono_sim_inserted_notify(data->sim, TRUE);
 
 	data->sim_poll_count = 0;
 	query_sim_state(modem);
Signature · 1 line
1.7.2.3
#1 lore raw

Hi,

Quoted 14 lines · F. Gau

From: M. Dietrich <[email protected]>

while the sim detection does not work this patch at least allows to use those modems. until someone has the time to work out a correct solution this is a usefull workaround.

---
 plugins/huawei.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
plugins/huawei.c +0 -0
index 25dfaca..df506d3 100644

plugins/huawei.c static void huawei_pre_sim(struct ofono_modem *modem) · line 592

Quoted 7 lines
plugins/huawei.c +1 -0
@@ -586,6 +586,7 @@ static void huawei_pre_sim(struct ofono_modem *modem)
 	ofono_devinfo_create(modem, 0, "atmodem", data->pcui);
 	data->sim = ofono_sim_create(modem, OFONO_VENDOR_QUALCOMM_MSM,
 					"atmodem", data->pcui);
+	ofono_sim_inserted_notify(data->sim, TRUE);
 
 	data->sim_poll_count = 0;
 	query_sim_state(modem);

I don't want to completely bypass the sim inserted logic (which seems to work on other Huawei models) for the sake of EM770.

So I really prefer that we do this a bit smarter. Even simple model to behavior matching would be acceptable...

Regards,
-Denis