From 60d5aefa1b46e625075a9bf310e14a9230427641 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Fri, 13 Sep 2019 16:35:37 +0200 Subject: [PATCH] broadband-modem: increase default CPIN? timeout The Telit LE922 seems to take just a bit more than 3s to reply. Let's increase it up to 10s to be on the safe side. [1568385270.124866] (ttyUSB3): --> 'AT+CPIN?' [1568385273.396659] Couldn't check if unlock required: 'Serial command timed out' [1568385273.396847] Modem couldn't be initialized: Couldn't check unlock status: Serial command timed out [1568385273.397009] Modem: state changed (unknown -> failed) [1568385273.397215] (ttyUSB3) device open count is 1 (close) [1568385273.397268] Creating ports context for SIM hot swap [1568385273.397289] (ttyUSB3) device open count is 2 (open) [1568385273.397309] (ttyUSB4) opening serial port... [1568385273.397676] (ttyUSB4): setting up baudrate: 57600 [1568385273.397699] (ttyUSB4): no flow control explicitly requested for device [1568385273.397724] (ttyUSB4): port attributes not fully set [1568385273.397760] (ttyUSB4) device open count is 1 (open) [1568385273.397776] (ttyUSB4): running init sequence... [1568385273.397856] Extended signal information reporting disabled [1568385273.397927] Couldn't finish initialization in the current state: 'Modem is unusable, cannot fully initialize' [1568385273.398432] [device /sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.4/1-11.4.1] exported modem at path '/org/freedesktop/ModemManager1/Modem/0' [1568385273.398464] [device /sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.4/1-11.4.1] plugin: Telit [1568385273.398484] [device /sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.4/1-11.4.1] vid:pid: 0x1BC7:0x1040 [1568385273.398509] (ttyUSB3) device open count is 1 (close) [1568385273.398546] (ttyUSB4): --> 'ATE0' [1568385273.400412] (ttyUSB3): <-- '+CPIN: READYOK' [1568385273.404870] (ttyUSB4): <-- 'OK' --- src/mm-broadband-modem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index 0b9b5d5a..553b8315 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -1338,7 +1338,7 @@ modem_load_unlock_required (MMIfaceModem *self, mm_dbg ("checking if unlock required..."); mm_base_modem_at_command (MM_BASE_MODEM (self), "+CPIN?", - 3, + 10, FALSE, (GAsyncReadyCallback)cpin_query_ready, task);