<div dir="ltr">I assumed you need to parse it for a program, but if you just need a human-readable version, you can also use<br>mmcli -i 0<br>For a quick overview, and to filter it, grep for the line that you are interested in.<br><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Kind regards,</span><br style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Filip</span></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 24, 2023 at 12:58 PM Filip Kubicz <<a href="mailto:filip.kubicz@tier.app">filip.kubicz@tier.app</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Brendan,<div><br></div><div>There are a few approaches but a convenient method to retrieve values from mmcli is to use -J flag to get the JSON output.<br><br>For example, to get modem IMEI, you can do (in bash):<br>        modem="$(mmcli --list-modems -J | jq '."modem-list"[0]' -r)"<br>        imei="$(mmcli -m ${modem} -J | jq '.modem."3gpp".imei' -r)"<br></div><div>        echo ${imei}<br><br>You should be able to do the same with SIM card information, which you can obtain by running<br>        mmcli -i 0 -J<br>and then parsing it with jq tool to obtain exactly the value you need. Note that the SIM may be available under different number/path, which you can get from mmcli -m <modem number> and parsing "primary sim path"</div><div><br clear="all"><div><div dir="ltr"><div dir="ltr"><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Kind regards,</span><br style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Filip</span></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 24, 2023 at 12:34 PM Brendan Simon <<a href="mailto:brendan.simon@ind-technology.com.au" target="_blank">brendan.simon@ind-technology.com.au</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>





<div lang="EN-AU">
<p style="font-family:Calibri;font-size:10pt;color:rgb(0,0,0);margin:5pt" align="Center">
IND.T Classification: Public<br>
</p>
<br>
<div>
<div>
<p class="MsoNormal"><span style="color:rgb(32,56,100)">Is there a way to get the modem SIM properties via the mmcli command?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(32,56,100)">e.g. the ICCID or SimIdentifier<u></u><u></u></span></p>
<p class="MsoNormal"><a href="https://www.freedesktop.org/software/ModemManager/doc/latest/ModemManager/gdbus-org.freedesktop.ModemManager1.Sim.html#gdbus-property-org-freedesktop-ModemManager1-Sim.SimIdentifier" target="_blank">org.freedesktop.ModemManager1.Sim: ModemManager
 Reference Manual (www.freedesktop.org)</a><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="color:rgb(32,56,100)">I couldn’t find anything in the help.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(32,56,100)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(32,56,100)">These docs mention the methods (such as sendpin, sendpuk, enablepin, changepin, setpreferrednetworks), which are available via mmcli.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(32,56,100)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(32,56,100)">It also mentions various properties (such as Active, SimIdentifier, IMSI, …), but I can’t find a way to retrieving those via mmcli (except
 maybe via issue AT commands).<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><a href="https://www.freedesktop.org/software/ModemManager/doc/latest/ModemManager/gdbus-org.freedesktop.ModemManager1.Sim.html" target="_blank">org.freedesktop.ModemManager1.Sim: ModemManager Reference Manual (www.freedesktop.org)</a><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="color:rgb(32,56,100)">Are these properties easily obtainable via mmcli?  I would think they should be, but I can’t find out how.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(32,56,100)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(32,56,100)">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(32,56,100)">Brendan.</span><u></u><u></u></p>
</div>
</div>
</div>

</div></blockquote></div>
</blockquote></div>