Hi, On 03/08/2018 11:47 AM, Eswaran Vinothkumar (BEG/PJ-IOT-EL) wrote: > Mar 08 17:14:51 alen-eval-kit ofonod[175]: > ../ofono-1.22/drivers/qmimodem/devinfo.c:string_cb() > Mar 08 17:14:51 alen-eval-kit ofonod[175]: > ../ofono-1.22/drivers/qmimodem/devinfo.c:qmi_query_serial() > Mar 08 17:14:51 alen-eval-kit ofonod[175]: > ../ofono-1.22/drivers/qmimodem/sim.c:get_card_status_cb() > Mar 08 17:14:51 alen-eval-kit ofonod[175]: > ../ofono-1.22/src/sim.c:ofono_sim_add_state_watch() 0x198d658
You would have to check the logic inside get_card_status_cb() to figure out why the sim isn't being detected. Hi, Thanks for the hint. I looked into the source code of ofono and had identified the condition on which the sim card detection logic fails. The function handle_get_card_status_result() returns failure. The Verizon SIM I used has 4 application running. The output of qmicli is shown below: # qmicli -d /dev/cdc-wdm1 --uim-get-card-status [/dev/cdc-wdm1] Successfully got card status Provisioning applications: Primary GW: slot '0', application '2' Primary 1X: slot '0', application '0' Secondary GW: session doesn't exist Secondary 1X: session doesn't exist Card [0]: Card state: 'present' UPIN state: 'not-initialized' UPIN retries: '0' UPUK retries: '0' Application [0]: Application type: 'csim (4)' Application state: 'ready' Application ID: A0:00:00:03:43:10:02:F3:10:FF:FF:89:02:00:00:FF Personalization state: 'ready' UPIN replaces PIN1: 'no' PIN1 state: 'disabled' PIN1 retries: '3' PUK1 retries: '10' PIN2 state: 'enabled-not-verified' PIN2 retries: '3' PUK2 retries: '10' Application [1]: Application type: 'isim (5)' Application state: 'detected' Application ID: A0:00:00:00:87:10:04:F3:10:FF:FF:89:08:00:00:FF Personalization state: 'unknown' UPIN replaces PIN1: 'no' PIN1 state: 'not-initialized' PIN1 retries: '0' PUK1 retries: '0' PIN2 state: 'not-initialized' PIN2 retries: '0' PUK2 retries: '0' Application [2]: Application type: 'usim (2)' Application state: 'ready' Application ID: A0:00:00:00:87:10:02:F3:10:FF:FF:89:08:00:00:FF Personalization state: 'ready' UPIN replaces PIN1: 'no' PIN1 state: 'disabled' PIN1 retries: '3' PUK1 retries: '10' PIN2 state: 'enabled-not-verified' PIN2 retries: '3' PUK2 retries: '10' Application [3]: Application type: 'unknown (0)' Application state: 'detected' Application ID: A0:00:00:00:63:50:4B:43:53:2D:31:35 Personalization state: 'unknown' UPIN replaces PIN1: 'no' PIN1 state: 'not-initialized' PIN1 retries: '0' PUK1 retries: '0' PIN2 state: 'not-initialized' PIN2 retries: '0' PUK2 retries: '0' The sim detection logic fails in the condition : if ((index & 0xff) == i && (index >> 8) == n) { if (get_card_status(slot, info1, info2,sim_stat)) { res = GET_CARD_STATUS_RESULT_TEMP_ERROR; } else { res = GET_CARD_STATUS_RESULT_OK; } } In the condition check the slot number and application number is interchanged. After fixing this, I could see that ofono is successfully detecting the sim cards. I will send a patch in my next e-mail Regards, -Denis _______________________________________________ ofono mailing list ofono@ofono.org https://lists.ofono.org/mailman/listinfo/ofono