> On 07 November 2017 at 15:59 Aleksander Morgado <aleksan...@aleksander.es> 
> wrote:
> 
> Hey
> 
> > I'd like to be able to get the 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/mm-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



Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.670891] 
[src/mm-broadband-modem.c:739] modem_load_current_capabilities(): loading 
current capabilities...
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.671319] 
[src/mm-port-serial.c:1252] mm_port_serial_open(): (ttyMux1) device open count 
is 4 (open)
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.671768] 
[src/mm-port-serial-at.c:463] debug_log(): (ttyMux1): --> 'AT^SLED=2,50<CR>'
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.686679] 
[src/mm-port-serial-at.c:463] debug_log(): (ttyMux1): <-- 'AT^SLED='
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.689632] 
[src/mm-port-serial-at.c:463] debug_log(): (ttyMux1): <-- '2,50<CR>'
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.706926] 
[src/mm-port-serial-at.c:463] debug_log(): (ttyMux1): <-- '<CR><LF>OK<CR><LF>'
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.707565] 
[src/mm-port-serial-at.c:463] debug_log(): (ttyMux1): --> 'ATE0<CR>'
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.713145] 
[src/mm-port-serial-at.c:463] debug_log(): (ttyMux1): <-- 'AT'
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.715902] 
[src/mm-port-serial-at.c:463] debug_log(): (ttyMux1): <-- 'E0<CR>'
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.750249] 
[src/mm-port-serial-at.c:463] debug_log(): (ttyMux1): <-- '<CR><LF>OK<CR><LF>'
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.750693] 
[src/mm-port-serial.c:1309] _close_internal(): (ttyMux1) device open count is 3 
(close)
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.751060] 
[src/mm-port-serial-at.c:463] debug_log(): (ttyMux1): --> 'AT+CMEE=1<CR>'
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.790641] 
[src/mm-port-serial-at.c:463] debug_log(): (ttyMux1): <-- '<CR><LF>OK<CR><LF>'
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.791088] 
[src/mm-port-serial.c:1309] _close_internal(): (ttyMux1) device open count is 2 
(close)
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.791452] 
[src/mm-port-serial-at.c:463] debug_log(): (ttyMux1): --> 'AT+GCAP<CR>'
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.830623] 
[src/mm-port-serial-at.c:463] debug_log(): (ttyMux1): <-- '<CR><LF>+CME ERROR: 
100<CR><LF>'
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.831068] 
[src/mm-serial-parsers.c:364] mm_serial_parser_v1_parse(): Got failure code 
100: Unknown error
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.831520] 
[src/mm-port-serial-at.c:463] debug_log(): (ttyMux1): --> 'ATI<CR>'
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.871351] 
[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:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.872025] 
[src/mm-port-serial-at.c:463] debug_log(): (ttyMux1): --> 'AT+CPIN?<CR>'
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.905997] 
[src/mm-port-serial-at.c:463] debug_log(): (ttyMux1): <-- '<CR><LF>+CPIN: 
READY<CR><LF>'
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.912038] 
[src/mm-port-serial-at.c:463] debug_log(): (ttyMux1): <-- '<CR><LF>OK<CR><LF>'
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.912635] 
[src/mm-port-serial.c:1252] mm_port_serial_open(): (ttyMux1) device open count 
is 3 (open)
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.912987] 
[src/mm-port-serial.c:1309] _close_internal(): (ttyMux1) device open count is 2 
(close)
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.913336] 
[src/mm-port-serial-at.c:463] debug_log(): (ttyMux1): --> 'AT+WS46=?<CR>'
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.952428] 
[src/mm-port-serial-at.c:463] debug_log(): (ttyMux1): <-- '<CR><LF>+CME ERROR: 
100<CR><LF>'
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.952877] 
[src/mm-serial-parsers.c:364] mm_serial_parser_v1_parse(): Got failure code 
100: Unknown error
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.953488] 
[src/mm-iface-modem.c:4517] interface_initialization_step(): Modem allows up to 
1 bearers
Nov  7 16:44:43 w2 daemon.debug ModemManager[827]: <debug> [1510073083.953728] 
[src/mm-bearer-list.c:273] mm_bearer_list_new(): Creating bearer list (max: 1, 
max active: 1)
_______________________________________________
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Reply via email to