Hi Denis,
> The SIM busy stuff is tricky. oFono reads lots of files from the SIM > before even checking CPIN. So you need to check the CPIN SIM busy > condition before signaling that the SIM is inserted. As I said, check how > other Qualcomm based devices are doing this. E.g. Huawei, ZTE, etc. > I've checked this, and i think we're talking about different things. From what i understand you're talking about the sim being busy at early sim initialization (after enabling the modem it must wait for the sim to be ready before notifying the core a sim is inserted). I'm talking about the sim being busy right after entering the pin. The sim is initialized, and "AT+CPIN?" returns " +CPIN: SIM PIN". Then i enter the pin with AT+CPIN="xxxx". Right after this the pin is checked with "AT+CPIN?" and now it returns "+CME ERROR: 14". In at_pin_send_cb i see that for ZTE the state is polled with at_util_sim_state_query_new, i think this also must be done for Alcatel. And for huawei this should probably look at ^SIMST. I've added a log showing the issue (reproduced with a huawei dongle) ofonod[3481]: src/modem.c:modem_change_state() old state: 0, new state: 1 ofonod[3481]: plugins/huawei.c:huawei_pre_sim() 0x8bf3b00 ofonod[3481]: PCUI: > AT^USSDMODE?\r ofonod[3481]: src/sim.c:ofono_sim_add_state_watch() 0x8bf8f20 ofonod[3481]: src/sim.c:ofono_sim_add_state_watch() 0x8bf8f20 ofonod[3481]: PCUI: < \r\n^USSDMODE: 1\r\n\r\nOK\r\n ofonod[3481]: PCUI: > AT^DIALMODE?\r ofonod[3481]: PCUI: < \r\n^DIALMODE:0,2\r\n\r\nOK\r\n ofonod[3481]: Modem support (CDC support: NDIS port) ofonod[3481]: PCUI: > AT+GCAP\r ofonod[3481]: PCUI: < \r\n+CME ERROR: 100\r\n ofonod[3481]: PCUI: > AT+CRSM=192,12258,0,0,255\r ofonod[3481]: PCUI: < \r\n+CME ERROR: 11\r\n ofonod[3481]: PCUI: > AT+CGMI\r ofonod[3481]: PCUI: < \r\nHuawei Technologies Co., Ltd.\r\n\r\nOK\r\n ofonod[3481]: PCUI: > AT+CRSM=192,28421,0,0,255\r ofonod[3481]: PCUI: < \r\n+CME ERROR: 11\r\n ofonod[3481]: PCUI: > AT+CGMM\r ofonod[3481]: PCUI: < \r\nE369\r\n\r\nOK\r\n ofonod[3481]: PCUI: > AT+CRSM=192,12037,0,0,255\r ofonod[3481]: PCUI: < \r\n+CME ERROR: 11\r\n ofonod[3481]: PCUI: > AT+CGMR\r ofonod[3481]: PCUI: < \r\n41.102.18.00.00\r\n\r\nOK\r\n ofonod[3481]: PCUI: > AT+CPIN?\r ofonod[3481]: PCUI: < \r\n+CPIN: SIM PIN\r\n\r\nOK\r\n ofonod[3481]: drivers/atmodem/sim.c:at_cpin_cb() crsm_pin_cb: SIM PIN ofonod[3481]: drivers/atmodem/sim.c:at_pin_retries_query() ofonod[3481]: PCUI: > AT+CGSN\r ofonod[3481]: PCUI: < \r\n868414001268790\r\n\r\nOK\r\n ofonod[3481]: PCUI: > AT^CPIN?\r ofonod[3481]: PCUI: < \r\n^SRVST: 0\r\n ofonod[3481]: PCUI: < \r\n^CPIN: SIM PIN,3,10,3,10,2\r\n\r\nOK\r\n ofonod[3481]: drivers/atmodem/sim.c:huawei_cpin_cb() retry counter id=9, val=10 ofonod[3481]: drivers/atmodem/sim.c:huawei_cpin_cb() retry counter id=1, val=3 ofonod[3481]: drivers/atmodem/sim.c:huawei_cpin_cb() retry counter id=11, val=10 ofonod[3481]: drivers/atmodem/sim.c:huawei_cpin_cb() retry counter id=4, val=2 ofonod[3481]: PCUI: > AT+CPIN="1111"\r ofonod[3481]: PCUI: < \r\nOK\r\n ofonod[3481]: PCUI: > AT+CPIN?\r ofonod[3481]: PCUI: < \r\n+CME ERROR: 14\r\n ofonod[3481]: Querying PIN authentication state failed ofonod[3481]: PCUI: < \r\n^SIMST: 1,0\r\n ofonod[3481]: plugins/huawei.c:simst_notify() 0 -> 1 Regards, Cedric
_______________________________________________ ofono mailing list [email protected] http://lists.ofono.org/listinfo/ofono
