Equipment info without SIM installed

Aleksander Morgado aleksander at aleksander.es
Wed Nov 8 08:52:19 UTC 2017


he h/w info without a SIM
>> > > > installed, but this
>> > > > seems to cause modem_load_current_capabilities() to fail
>> > > > (because "AT_CPIN?"
>> > > > errors). Hence the initialization overall fails.
>> > > > I haven't yet sussed out exactly which piece of code is
>> > > > catching the error
>> > > > (when other commands in 'capabilities' also error), but I'm
>> > > > wondering
>> > > > initially whether/why there's a need for "CPIN?" at this stage?
>> > >
>> > > Loading current capabilities is a sequence of commands:
>> > > https://cgit.freedesktop.org/ModemManager/ModemManager/tree/src/m
>> > > m-broadband-modem.c#n535
>> > >
>> > > We use AT+CPIN? among those commands to check whether the modem
>> > > is a
>> > > 3GPP modem. If we get told that any PIN/PUK is required or if
>> > > we're
>> > > already READY (e.g. SIM-PIN disabled) then we assume that the
>> > > modem is
>> > > at least a GSM/UMTS modem (as CDMA/EVDO modems don't have SIM, so
>> > > this
>> > > command should error out).
>> > >
>> > > In your case, an ERROR in that command when loading capabilities
>> > > should be harmless. Could you post debug logs to check what's
>> > > happening?
>> > >
>> >
>> > Failing log, followed by similar section with SIM present below.
>> > (I notice that with a SIM, it doesn't do the CGMM)
>> >
>> >
>> > Nov  7 16:41:59 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072919.762030] [src/mm-broadband-modem.c:739]
>> > modem_load_current_capabilities(): loading current capabilities...
>> > Nov  7 16:41:59 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072919.762456] [src/mm-port-serial.c:1252]
>> > mm_port_serial_open(): (ttyMux1) device open count is 4 (open)
>> > Nov  7 16:41:59 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072919.762907] [src/mm-port-serial-at.c:463] debug_log():
>> > (ttyMux1): --> 'AT^SLED=2,50<CR>'
>> > Nov  7 16:41:59 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072919.777766] [src/mm-port-serial-at.c:463] debug_log():
>> > (ttyMux1): <-- 'AT^'
>> > Nov  7 16:41:59 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072919.780812] [src/mm-port-serial-at.c:463] debug_log():
>> > (ttyMux1): <-- 'SLED=2,50<CR>'
>> > Nov  7 16:41:59 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072919.799413] [src/mm-port-serial-at.c:463] debug_log():
>> > (ttyMux1): <-- '<CR><LF>OK<CR><LF>'
>> > Nov  7 16:41:59 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072919.799955] [src/mm-port-serial-at.c:463] debug_log():
>> > (ttyMux1): --> 'ATE0<CR>'
>> > Nov  7 16:41:59 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072919.808517] [src/mm-port-serial-at.c:463] debug_log():
>> > (ttyMux1): <-- 'ATE0<CR>'
>> > Nov  7 16:41:59 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072919.838882] [src/mm-port-serial-at.c:463] debug_log():
>> > (ttyMux1): <-- '<CR><LF>OK<CR><LF>'
>> > Nov  7 16:41:59 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072919.839327] [src/mm-port-serial.c:1309] _close_internal():
>> > (ttyMux1) device open count is 3 (close)
>> > Nov  7 16:41:59 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072919.839698] [src/mm-port-serial-at.c:463] debug_log():
>> > (ttyMux1): --> 'AT+CMEE=1<CR>'
>> > Nov  7 16:41:59 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072919.876111] [src/mm-port-serial-at.c:463] debug_log():
>> > (ttyMux1): <-- '<CR><LF>OK<CR><LF>'
>> > Nov  7 16:41:59 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072919.876562] [src/mm-port-serial.c:1309] _close_internal():
>> > (ttyMux1) device open count is 2 (close)
>> > Nov  7 16:41:59 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072919.876922] [src/mm-port-serial-at.c:463] debug_log():
>> > (ttyMux1): --> 'AT+GCAP<CR>'
>> > Nov  7 16:41:59 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072919.915941] [src/mm-port-serial-at.c:463] debug_log():
>> > (ttyMux1): <-- '<CR><LF>+CME ERROR: 100<CR><LF>'
>> > Nov  7 16:41:59 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072919.916384] [src/mm-serial-parsers.c:364]
>> > mm_serial_parser_v1_parse(): Got failure code 100: Unknown error
>> > Nov  7 16:41:59 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072919.916824] [src/mm-port-serial-at.c:463] debug_log():
>> > (ttyMux1): --> 'ATI<CR>'
>> > Nov  7 16:41:59 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072919.956088] [src/mm-port-serial-at.c:463] debug_log():
>> > (ttyMux1): <-- '<CR><LF>Cinterion<CR><LF>EHS5-E<CR><LF>REVISION
>> > 03.001<CR><LF><CR><LF>OK<CR><LF>'
>> > Nov  7 16:41:59 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072919.956769] [src/mm-port-serial-at.c:463] debug_log():
>> > (ttyMux1): --> 'AT+CPIN?<CR>'
>> > Nov  7 16:41:59 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072919.993447] [src/mm-port-serial-at.c:463] debug_log():
>> > (ttyMux1): <-- '<CR><LF>+CME ERROR: 10<CR><LF>'
>> > Nov  7 16:41:59 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072919.993883] [src/mm-serial-parsers.c:364]
>> > mm_serial_parser_v1_parse(): Got failure code 10: SIM not inserted
>> > Nov  7 16:41:59 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072919.994320] [src/mm-port-serial-at.c:463] debug_log():
>> > (ttyMux1): --> 'AT+CGMM<CR>'
>> > Nov  7 16:42:00 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072920.027541] [src/mm-port-serial-at.c:463] debug_log():
>> > (ttyMux1): <-- '<CR><LF>EHS5-E<CR><LF>'
>> > Nov  7 16:42:00 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072920.030518] [src/mm-port-serial-at.c:463] debug_log():
>> > (ttyMux1): <-- '<CR><LF>OK<CR><LF>'
>> > Nov  7 16:42:00 w2 daemon.warn ModemManager[829]:
>> > <warn>  [1510072920.031519] [src/mm-broadband-modem.c:9880]
>> > iface_modem_initialize_ready(): Modem couldn't be initialized:
>> > couldn't load current capabilities: Failed to determine modem
>> > capabilities.
>> > Nov  7 16:42:00 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072920.032372] [src/mm-port-serial.c:1309] _close_internal():
>> > (ttyMux1) device open count is 1 (close)
>> > Nov  7 16:42:00 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072920.032756] [src/mm-broadband-modem.c:9977]
>> > iface_modem_firmware_initialize_ready(): Couldn't initialize
>> > interface: 'Firmware interface not available'
>> > Nov  7 16:42:00 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072920.033755] [src/mm-base-modem.c:858] initialize_ready():
>> > modem properly initialized
>> > Nov  7 16:42:00 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072920.039300] [src/mm-device.c:283] export_modem(): [device
>> > LinMux] exported modem at path
>> > '/org/freedesktop/ModemManager1/Modem/0'
>> > Nov  7 16:42:00 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072920.039637] [src/mm-device.c:284] export_modem(): [device
>> > LinMux]    plugin:  Cinterion
>> > Nov  7 16:42:00 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072920.039887] [src/mm-device.c:288] export_modem(): [device
>> > LinMux]    vid:pid: 0x1E2D:0x0001
>> > Nov  7 16:42:00 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072920.040170] [src/mm-port-serial.c:1309] _close_internal():
>> > (ttyMux1) device open count is 0 (close)
>> > Nov  7 16:42:00 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072920.040408] [src/mm-port-serial.c:1325] _close_internal():
>> > (ttyMux1) closing serial port...
>> > Nov  7 16:42:00 w2 daemon.warn ModemManager[829]:
>> > <warn>  [1510072920.040630] [src/mm-port-serial.c:1338]
>> > _close_internal(): (ttyMux1): serial port closing_wait was reset!
>> > Nov  7 16:42:00 w2 daemon.debug ModemManager[829]: <debug>
>> > [1510072920.049258] [src/mm-port-serial.c:1373] _close_internal():
>> > (ttyMux1) serial port closed
>> >
>>
>> In the case above none of the commands we have was successful
>> determining capabilities :/ But we could improve the +CPIN? check and
>> also assume that if it's telling us "SIM not inserted" then it means
>> it requires a SIM and therefore it's at least GSM/UMTS.
>
> I should see if any of my older CDMA or dual-mode Gobis respond to
> that.  I suspect that some of the older CDMA Huawei devices might.
>

Oh, let's see what happens with those, yes.

> There's also RUIM (the CDMA SIM-type card that was really only used in
> Russia and China) but I've never come across a device that uses one,
> and MM doesn't support them anyway.
>

Yes, we should probably not worry much about those I guess.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list