le_sim_GetIMSI doesn't seem to work


#1

le_sim_GetIMSI doesn’t return the IMSI from the SIM, and logs says it can’t retrieve it. Command line “cm info” doesn’t show it either. This is on a WP7601, R7 Verizon software, Legato 17.11.


#2

With the latest legato version, can able to retrieve ‘IMSI’ Value.
root@swi-mdm9x28:~# cm sim info
Type: EXTERNAL_SLOT_1
ICCID: 8991440459006589640
Home Network Operator: IDEA
EID:
IMSI: 404445900658964
Phone Number:
root@swi-mdm9x28:~# legato version
18.02.0.rc1_83ceda15f0be33aa3f626dc9ebb8be5e_modified

Need to upgrade legato version. If still faces the issue please provide logs.


#3

Hi @Manikanta,
I’m assuming that the c/c++ the call le_GetIMSI will then work, since cm is an application?

Thanks,
Steve


#4

Hi @EvetsMostel,
Yes, le_sim_GetIMSI() will work when called from c file. But to access any API through c file, it should be created as an application. To access le_sim_GetIMSI() API, le_sim.api file should be binded using the .adef file. As below

bindings:
{
<executable>.<component>.le_sim -> modemService.le_sim
}

Taken @ref: http://legato.io/legato-docs/latest/defFilesAdef.html
To develop Apps, @ref: http://legato.io/legato-docs/latest/basicApps.html

Thanks