<div dir="ltr">Yes I already have the value I need, and mmcli -i 0 shows it.<div><br></div><div>Thanks</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 6, 2017 at 10:45 AM, Aleksander Morgado <span dir="ltr"><<a href="mailto:aleksander@aleksander.es" target="_blank">aleksander@aleksander.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey,<br>
<span class=""><br>
On Wed, Sep 6, 2017 at 6:22 PM, Nathaniel Haggard <<a href="mailto:natester@gmail.com">natester@gmail.com</a>> wrote:<br>
> I'd like to read the IMSI just before assigning APN, but<br>
><br>
> ~# mmcli -m 0 --command="AT+CIMI"<br>
> error: command failed:<br>
> 'GDBus.Error:org.freedesktop.<wbr>ModemManager1.Error.Core.<wbr>Unauthorized: Cannot<br>
> send AT command to modem: operation only allowed in debug mode'<br>
><br>
> and sometimes:<br>
><br>
<br>
</span>mmcli --command is limited only for when ModemManager runs with --debug.<br>
<br>
But you should have the IMSI reported in the "SIM object" associated<br>
to the modem. E.g. if your SIM object is in index #0, you may already<br>
have the value you need in the "mmcli -i 0" output.<br>
<span class=""><br>
> ~# qmicli -d /dev/cdc-wdm0 --dms-uim-get-imsi | grep IMSI: | cut -d "'" -f2<br>
> error: couldn't create client for the 'dms' service: CID allocation failed<br>
> in the CTL client: Transaction timed out<br>
><br>
> other times I get this:<br>
><br>
> ~# qmicli -d /dev/cdc-wdm0 --dms-uim-get-imsi<br>
> [/dev/cdc-wdm0] UIM IMSI retrieved:<br>
> IMSI: '310410874358522'<br>
><br>
><br>
> I thought qmi-proxy took care of locking issues. How can I get the IMSI<br>
> reliably?<br>
><br>
<br>
</span>Yes, but you need to explicitly select the proxy usage, by adding "-p"<br>
in all your qmicli calls. Otherwise, you're competing with<br>
ModemManager in the communication through the cdc-wdm device.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a><br>
</font></span></blockquote></div><br></div>