Is it possible to read the EF-DIR file (part of a USIM file system) using a Linux QMI SDK API?
I am able to access ‘Transparent files’ (e.g. MF->EF-ICCID, MF->DF-GSM->IMSI) using the SLQSUIMReadTransparent() API, but this does not seem to work for accessing EF-DIR.
According to ETSI TS 102 221, EF-DIR is a mandatory file, so it should be present on the USIM, though it does state that it is a ‘Linear fixed’ file, as opposed to a ‘Transparent file’.
I seem to be able to access EF-DIR using read-transparent with libqmi with an EM7455. So I believe this should work with the QMI SDK and SLQSUIMReadTransparent too
# qmicli -p --device-open-mbim -d /dev/cdc-wdm0 --uim-read-transparent=0x3F00,0x2F00
[/dev/cdc-wdm0] Successfully read information from the UIM:
Card result:
SW1: '0x90'
SW2: '0x00'
Read result:
61:1C:4F:0C:A0:00:00:00:87:10:02:FF:49:FF:05:89:50:0C:54:65:6C:65:6E:6F:72:20:
55:53:49:4D:FF:FF:FF:FF:FF:FF:FF
Strange. I cannot test your code right now, but it looks correct to me when comparing it with the example in SampleApps/Connection_Manager/src/connectionmgr.c
It appears to be just EF-DIR that fails. I’ve tried a few different SIM cards from various MNO, but all fail.
When I use AT+CRSM to successfully read EF-DIR I have to perform ‘178’ = ‘read record’. Using AT+CRSM to read other SIM files e.g. EF-UICC (2FE2) then I have to use ‘176’ = ‘read binary’.
But there doesn’t seem to be any way of ‘telling’ the SLQSUIMReadTransparent() whether to perform a ‘record’ read or a ‘binary’ read ???
since EF-DIR is of type linear fixed it should be read with ‘READ RECORD’ for portability. The Gobi API and libqmi provide a specific UIMReadRecord method for this which maps to a different T0 APDU. If the Linux QMI SDK does not provide a corresponding SLQUIMReadRecord() API function you would have to open a feature request with Sierra Wireless.