[PATCH] sim hot swap: improved error management

Aleksander Morgado aleksander at aleksander.es
Tue Jul 25 11:47:03 UTC 2017


> More importantly, after SIM hot swap is set up, an 'ATZ' command is
> issued which resets the modem to power on state and so turns off sim hot
> swap notification.
>
> 41.395075] (ttyUSB0): --> 'AT+CESQ=?<CR>'
> 41.414255] (ttyUSB0): <-- '<CR>'
> 41.414400] (ttyUSB0): <-- '<LF>'
> 41.414426] (ttyUSB0): <-- 'E'
> 41.414514] (ttyUSB0): <-- 'R'
> 41.414582] (ttyUSB0): <-- 'R'
> 41.414665] (ttyUSB0): <-- 'O'
> 41.414765] (ttyUSB0): <-- 'R'
> 41.414787] Got failure code 100: Unknown error
> 41.414808] Extended signal support check failed: 'Unknown error'
> 41.414824] Couldn't initialize interface: 'Extended Signal information
> not supported'
> 41.414959] (ttyUSB0) device open count is 1 (close)
> 41.414984] (ttyUSB0): <-- '<CR><LF>'
> 41.415004] Couldn't initialize interface: 'OMA not supported'
> 41.415052] Couldn't initialize interface: 'Firmware interface not available'
> 41.415076] Creating ports context for SIM hot swap
> 41.415089] (ttyUSB0) device open count is 2 (open)
> 41.415161] Modem: state changed (unknown -> disabled)
> 41.415210] modem properly initialized
> 41.415543] [device /sys/devices/pci0000:00/0000:00:14.0/usb1/1-9]
> exported modem at path '/org/freedesktop/ModemManager1/Modem/0'
> 41.415573] [device /sys/devices/pci0000:00/0000:00:14.0/usb1/1-9]
> plugin:  Telit
> 41.415585] [device /sys/devices/pci0000:00/0000:00:14.0/usb1/1-9]
> vid:pid: 0x067B:0x2303
> 41.415599] (ttyUSB0) device open count is 1 (close)
> 41.420844] Modem /org/freedesktop/ModemManager1/Modem/0: state changed
> (disabled -> enabling)
> 41.421031] (ttyUSB0) device open count is 2 (open)
> 41.421053] Flashing primary AT port before enabling...
> 41.421300] (ttyUSB0): port attributes not fully set
> 41.442758] Simple connect started...
> 41.442816]    PIN: unspecified
> 41.442831]    Operator ID: unspecified
> 41.442843]    Allowed roaming: yes
> 41.442854]    APN: internetm2m.air.com
> 41.442866]    IP family: ipv4
> 41.442888]    Allowed authentication: unspecified
> 41.675882]    User: unspecified
> 41.675927]    Password: unspecified
> 41.675949]    Number: *99#
> 41.675961] Simple connect state (4/8): Wait to get fully enabled
> 41.676218] Running modem initialization sequence...
> 41.676251] (ttyUSB0) device open count is 3 (open)
> 41.676299] (ttyUSB0): --> 'ATZ<CR>'
> 41.691085] (ttyUSB0): <-- '<CR>'
> 41.691257] (ttyUSB0): <-- '<LF>'
> 41.691383] (ttyUSB0): <-- 'OK<CR>'
> 41.691424] (ttyUSB0): <-- '<LF>'
> 41.691464] Giving some time to settle the modem...
> 41.691481] (ttyUSB0) device open count is 2 (close)
>

Oops... although this is unrelated to this patch itself if I'm not
mistaken; the issue was there before as well?
Does this mean that we were not getting SIM removal notifications as
soon as the modem was enabled?

A quick solution would be to subclass the enabling_modem_init() step
and after running the parent method, run a Telit specific setup to
check #CSS? and if disabled due to the ATZ, re-set it, would that
work?

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list