[PATCH] sim hot swap: improved error management
Tim Small
tim at seoss.co.uk
Tue Jul 25 08:27:58 UTC 2017
Hi Carlo,
Thanks for the patch. It doesn't seem to be working here unfortunately.
It looks like AT+CSIM=1 is issued, but the corresponding AT+CSIM=0
command isn't, so the SIM is still locked for direct interaction, so
subsequent AT commands are getting SIM not present responses. It looks
like the trouble starts when an ATV1 command is issued in the middle of
the CSIM PUK enquiries?
Just to clarify this is a Telit GE910-QUAD (most recent firmware) with a
single serial connection (via a USB to UART adaptor at the moment since
I'm debugging with my PC), without using CMUX mode.
Full trace here, with excerpts included below...
https://gist.github.com/tim-seoss/d175482c56072a0d303d315ca7353eb5#file-sim-hot-swap-debug-L795
Cheers,
Tim.
19.623477] SIM is ready, running after SIM unlock step...
19.623513] (ttyUSB0) device open count is 1 (close)
21.306803] (ttyUSB0) device open count is 2 (open)
21.306889] (ttyUSB0): --> 'AT+CSIM=1<CR>'
21.329374] (ttyUSB0): <-- '<CR>'
21.329663] (ttyUSB0): <-- '<LF>O'
21.329813] (ttyUSB0): <-- 'K<CR><LF>'
21.329858] (ttyUSB0) device open count is 3 (open)
21.329887] (ttyUSB0) device open count is 2 (close)
21.329933] (ttyUSB0): --> 'AT+CSIM=10,0020000100<CR>'
21.351378] (ttyUSB0): <-- '<CR><LF>#QSS: 0<CR><LF>'
21.351811] QSS: status changed 'sim-inserted -> sim-removed
21.352036] QSS: SIM swap detected
21.352490] load PIN unlock retries got no response: AT command was cancelled
21.352742] (ttyUSB0) device open count is 3 (open)
21.352935] (ttyUSB0) device open count is 2 (close)
21.353081] [device /sys/devices/pci0000:00/0000:00:14.0/usb1/1-9]
creating modem with plugin 'Telit' and '1' ports
21.353650] (ttyUSB0) type 'at' claimed by
/sys/devices/pci0000:00/0000:00:14.0/usb1/1-9
21.353902] (/sys/devices/pci0000:00/0000:00:14.0/usb1/1-9) tty/ttyUSB0
at (primary)
21.354059] (/sys/devices/pci0000:00/0000:00:14.0/usb1/1-9) tty/ttyUSB0
data (primary)
21.357925] (ttyUSB0) opening serial port...
21.358122] (ttyUSB0): couldn't set serial port closing_wait to none:
Inappropriate ioctl for device
21.358157] (ttyUSB0): setting up baudrate: 115200
21.358181] (ttyUSB0) device open count is 1 (open)
21.358193] (ttyUSB0): running init sequence...
21.358218] (ttyUSB0) device open count is 2 (open)
21.358244] (ttyUSB0) device open count is 3 (open)
21.358263] Modem recreated for device
'/sys/devices/pci0000:00/0000:00:14.0/usb1/1-9'
21.358546] loading current capabilities...
21.358574] (ttyUSB0) device open count is 4 (open)
21.358596] (ttyUSB0): --> 'AT+CSIM=10,002C000100<CR>'
21.358614] (ttyUSB0): --> 'ATE0<CR>'
21.366384] (ttyUSB0): <-- '<CR>'
21.366594] (ttyUSB0): <-- '<LF>'
21.366728] (ttyUSB0): <-- '+C'
21.366813] (ttyUSB0): <-- 'S'
21.366907] (ttyUSB0): <-- 'I'
21.366984] (ttyUSB0): <-- 'M'
21.367066] (ttyUSB0): <-- ':'
21.367152] (ttyUSB0): <-- ' '
21.367237] (ttyUSB0): <-- '4'
21.367330] (ttyUSB0): <-- ','
21.367432] (ttyUSB0): <-- '"'
21.367511] (ttyUSB0): <-- '6'
21.367593] (ttyUSB0): <-- '3'
21.367674] (ttyUSB0): <-- 'C'
21.367756] (ttyUSB0): <-- '3'
21.367839] (ttyUSB0): <-- '"'
21.367925] (ttyUSB0): <-- '<CR>'
21.368013] (ttyUSB0): <-- '<LF>'
21.368096] (ttyUSB0): <-- '<CR>'
21.368174] (ttyUSB0): <-- '<LF>'
21.368286] (ttyUSB0): <-- 'O'
21.368498] (ttyUSB0): <-- 'K'
21.368582] (ttyUSB0): <-- '<CR><LF>'
21.368627] (ttyUSB0): --> 'ATV1<CR>'
21.381552] load PUK unlock retries got no response: AT command was cancelled
21.381615] (ttyUSB0) device open count is 1 (close)
21.381641] load PIN2 unlock retries got no response: No AT port
available to run command
21.381665] load PUK2 unlock retries got no response: No AT port
available to run command
21.381685] Couldn't unlock SIM card: No AT port available to run command
21.381713] Couldn't load unlock retries: 'Could not get any of the SIM
unlock retries values'
21.381858] loading SIM identifier...
21.382001] loading SIM identifier...
21.382025] couldn't load SIM identifier: 'No AT port available to run
command'
21.382042] loading IMSI...
21.382063] couldn't load IMSI: 'No AT port available to run command'
21.382082] loading Operator ID...
21.382103] couldn't load Operator identifier: 'No AT port available to
run command'
21.382116] loading Operator Name...
21.382139] couldn't load Operator name: 'No AT port available to run
command'
21.382190] loading own numbers...
21.382213] couldn't load list of Own Numbers: 'No AT port available to
run command'
21.382260] couldn't load current Bands: 'No AT port available to run
command'
21.382325] couldn't initialize the modem: 'Operation was cancelled'
21.382360] (ttyUSB0) device open count is 0 (close)
21.382372] (ttyUSB0) closing serial port...
21.382383] (ttyUSB0): serial port closing_wait was reset!
21.382399] (ttyUSB0): couldn't set serial port closing_wait to none:
Inappropriate ioctl for device
21.382417] (ttyUSB0) serial port closed
21.382443] (ttyUSB0) forced to close port
21.772444] (ttyUSB0): <-- '<CR>'
21.772749] (ttyUSB0): <-- '<LF>+'
21.772834] (ttyUSB0): <-- 'CGR'
21.772909] (ttyUSB0): <-- 'E'
21.772990] (ttyUSB0): <-- 'G'
21.773060] (ttyUSB0): <-- ':'
21.773134] (ttyUSB0): <-- ' '
21.773321] (ttyUSB0): <-- '0<CR>'
21.773416] (ttyUSB0): <-- '<LF>'
24.306814] (ttyUSB0): --> 'AT+CMEE=1<CR>'
24.324637] (ttyUSB0): <-- '<CR>'
24.324963] (ttyUSB0): <-- '<LF>O'
--
South East Open Source Solutions Limited
Registered in England and Wales with company number 06134732.
Registered Office: 2 Powell Gardens, Redhill, Surrey, RH1 1TQ
VAT number: 900 6633 53 http://seoss.co.uk/ +44-(0)1273-808309
More information about the ModemManager-devel
mailing list