Dual SIM mangament in QMI or AT commands



I am using the EM7565 that supports 2 SIM cards.
I planned to develop management code in QMICLI as it is more simple and more easily readable than AT commands.

But looking at the QMICLI ref guide, I only found 2 commands directly providing access to SIM slot1 or slot2 (–uim-sim-power-on and uim-sim-power-off).
Other uim related QMICLI commands do not allow to set a slot id as parameter (I have even look in the qmicli code from linux and in fact, in the command tehmselves, they force the slot number to slot 1 so thta it seems those commands only access slot 1 SIM card).
And QMICLI commands from other group than uim are not dependent on the slot id at all.

Is there any way to address both SIM cards in QMICLI command ? Selecting any of them and connecting on it ?

Otherwise, I think about a mix of AT and QMICLI commands.
Concerning AT commands, I think about using “at!uimsX” AT command where X = 0 for first slot and X = 1 for second slot (next command whether QMICLI or AT commands will be directed to the slot id I ahve juts idenfied as the rpimary SIM with the previous AT command). And most probably also managing the SIM card activation via PIN by AT command also as the QMICLI uim related command hardcode a slot 1 target (so I could not activate a slot 2 SIM card using its PIN code with a QMICLI command).

Is it correct ?
As far as I understand, the QMICLI seems developped to manage only slot 1 SIM card for most of the commands ? At leats fro the QMICLI version I look at the code).



I have been able to go further.
Two points :
(1) The SLOT1 thta is hardcoded in SQMICLI commands do not correspond to the physical SLOT1 where the SIM card is inserted. It corresponds to the primary SIM. The SIM that is used to connect.
(2) AT commad “AT!UIMS=X” where X=0 or 1 allow to set physical SIM slot 1 or physical SIM slot 2 as primary SIM.

So before executing any connection, I first execute an AT command “AT!UIMS=X” to set physical SLOT 1 or physical SLOT2 as primary SIM slot. And then all the QMICLI commands work correctly with this SIM card.

But I still have one question. I did not find QMICLI command to set the primary SIM slot. If possible I would prefer to do evrything in QMICLI commnd instead of miwing QMICLI and AT commands.
Any idea on a QMICLI command that would allow to configure the primary SIM SLOT ?