Sim added / extracted not detected
Alejandro Vega
alexvega48 at gmail.com
Thu Oct 17 13:04:44 UTC 2019
Hello ,
>>>
>>> >> I am developing an application which makes use of the libmm-glib
high level API and I have been making some tests and I have not been able
to detect when a SIM is added or removed (I know its not very common to
>>add/extract it on runtime but I want to be aware of this in my app).
>>> >>
>>>
>>> >What modem are you using? We don't support SIM hotplug events on every
>>> > device out there. If I'm not mistaken, it's only available/enabled for
>>> > Telit and all MBIM based devices for now.
>>
>>
>> At the moment I am trying to achieve this with a EM7455 Sierra
Wireless modem.
>>
>>
>
>Is the modem being managed in MBIM or QMI mode? If you switch the
>modem to MBIM mode, you may get SIM hotswap supported.
>
>E.g. in my case my MC7455 is in AT+QMI mode:
>
>$ sudo qmicli -d /dev/cdc-wdm1 -p --dms-swi-get-usb-composition
>[/dev/cdc-wdm1] Successfully retrieved USB compositions:
> [*] USB composition 6: DM, NMEA, AT, QMI
> USB composition 8: DM, NMEA, AT, MBIM
> USB composition 9: MBIM
>
>And I can switch it to AT+MBIM like this:
>$ sudo qmicli -d /dev/cdc-wdm1 -p --dms-swi-set-usb-composition=8
>$ sudo qmicli -d /dev/cdc-wdm1 -p --dms-set-operating-mode=offline
>$ sudo qmicli -d /dev/cdc-wdm1 -p --dms-set-operating-mode=reset
It seems like it was not a hardware related problem apparently but it was
due to the hotswap support , which does not seem to exist in QMI mode as
you stated before.
I tried switching my modem to MBIM mode and it worked. Now it is possible
to guess when sim is added/removed while using the device .As you mentioned
,the modemmanager removes the modem from the list and creates another modem
with sim-missing and modem failed state.
However, now I am not able to retrieve a valid ip for my modem and I would
like to ask you the following : how shall I connect my modem now ?
Previously I launched DHCP after the modem manager reported "connected"
state , but now it returns a timeout. I found this old post which may cover
this issue :
https://lists.freedesktop.org/archives/libmbim-devel/2015-May/000557.html .
Shall I assign the IP to the interface manually now ? Is it enough with the
following commands ?
*ifconfig <interface_name> <ip>*
*ifconfig <interface_name> up *
Will I find any other "differences" related to the connection or other
elements when operating under QMI mode or MBIM mode ?
Thank you again.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20191017/dc1de74e/attachment.html>
More information about the ModemManager-devel
mailing list