I have a cheap MSM8916 based USB dongle running android 4.4. I paired it with a removable eUICC adapter (5ber) and wrote a program that communicates with the baseband via QMI in order to operate eSIM profiles (since relevant AT commands do not exist or are limited); It works fine, however after I enable a profile the modem does not ‘see’ the change. Even AT+CFUN=1,1 won’t make it re-read the card (AT+ICCID would return ICCID of the previous active profile). Strange, as this command should reboot the module and was the solution for some other modems (though I’d prefer to use QMI). Only physically replugging the device or adb reboot does the job, which obviously is not a good solution.
Is there any QMI message that will make the modem fully re-read the SIM card so changes become visible?
Forcing re-connection can be requested by the eSIM to the baseband using the REFRESH Proactive command (See §6.4.7 of ETSI TS 102.223). This Refresh command should be issued by the eSIM when you switch profile.
Are you able to collect the communication between the modem of the device, to see if this APDU command (80120000xxD0xx81030101xx82028182… ) occurs?
If it occurs, then the modem might not be handling that command it properly. If you share the trace, I can look if something odd occurs.
Thanks,
Greg
The previous response is of course correct. But as far as I recall, the REFRESH is not sent unconditionally by an eUICC upon eSIM activation; The LPA must set the refreshFlag as part of the EnableProfileRequest, see SGP.22 section 5.7.16 - only then will the ISD-R on the eUICC generat the REFRESH as stated in SGP.22 section 3.2.1 Item 6 through 8.
Good point. Maybe that refreshFlag is not set in @rdtmaster program.
How is the profile switch done? I assume it uses ES10.EnableProfile, right? Worth comparing your command with what is specified in the section @laforge referenced.
I had to connect a GPIO pin to the SIM presence pin on the modem. The LPA code had to enable the new profile, then pulse the presence pin, then issue AT+CFUN=1,1 (or power cycle the modem on a later design). It also may help for your code to issue AT+COPS=2, then AT+CFUN=4, before switching profiles.
Depending on the SoC, it is possible to do
qmicli --uim-sim-power-on/off with the specific slot.