Ublox TOBY-L210 needs two retries to connect

Penalva, Salvador Salvador.Penalva at digi.com
Fri May 5 15:53:17 UTC 2017


Hey,

I don't mind testing these changes, but I may need a little further guidance to do the changes. The files mm-broadband-modem-pantech.c and mm-broadband-modem-ublox.c are quite different...

I have copied in the ublox file the whole block of after_sim_unlock (the three fucntions). However the pantech file call these functions inside the function " iface_modem_init " that is really different to the same function in the ublox program. 

Is it enough just coping the lines 

    iface->modem_after_sim_unlock = modem_after_sim_unlock;
    iface->modem_after_sim_unlock_finish = modem_after_sim_unlock_finish;

at the end of the modem_init function in the ublox plugin? 

Thank you,

Salvador.
 
-----Original Message-----
From: Aleksander Morgado [mailto:aleksander at aleksander.es] 
Sent: viernes, 05 de mayo de 2017 11:46
To: Penalva, Salvador
Cc: ModemManager (development)
Subject: Re: Ublox TOBY-L210 needs two retries to connect

Hey,

On Fri, May 5, 2017 at 11:18 AM, Penalva, Salvador <Salvador.Penalva at digi.com> wrote:
> I'm testing Ublox TOBY-L210 with MM-master branch and a SIM with PIN Lock. I can connect it but only after issuing the simple-connect command twice. The first time I receive an message saying that the SIM is locked.
> With an unlocked SIM the connection is establish at the first attempt.
>
> These is the simple connect procedure:
>
> root at ccimx6ulsbc:~# mmcli -m 0 --simple-connect="apn=ac.vodafone.es,pin=8770,number=*99#"
> ModemManager[917]: <info>  Simple connect started...
> ModemManager[917]: <info>  Simple connect state (1/8): Unlock check
> error: couldn't connect the modem: 'GDBus.Error:org.freedesktop.ModemManager1.Error.MobileEquipment.SimPin: Device is locked: 'sim-pin''

We're sending the PIN correctly, but the modem is still replying that SIM-PIN is needed if we query it right away after sending the PIN:

<debug> [1493975621.397922] [../../git/src/mm-port-serial-at.c:459]
debug_log(): (ttyACM0): --> 'AT+CPIN="8770"<CR>'
<debug> [1493975621.484268] [../../git/src/mm-port-serial-at.c:459]
debug_log(): (ttyACM0): <-- '<CR><LF>OK<CR><LF>'
<debug> [1493975621.485273] [../../git/src/mm-broadband-modem.c:1339]
modem_load_unlock_required(): checking if unlock required...
<debug> [1493975621.485618] [../../git/src/mm-port-serial.c:1250]
mm_port_serial_open(): (ttyACM0) device open count is 2 (open) <debug> [1493975621.486500] [../../git/src/mm-port-serial.c:1307]
_close_internal(): (ttyACM0) device open count is 1 (close) <debug> [1493975621.486979] [../../git/src/mm-port-serial-at.c:459]
debug_log(): (ttyACM0): --> 'AT+CPIN?<CR>'
<debug> [1493975621.513303] [../../git/src/mm-port-serial-at.c:459]
debug_log(): (ttyACM0): <-- '<CR><LF>+CPIN: SIM PIN<CR><LF>'
<debug> [1493975621.515441] [../../git/src/mm-port-serial-at.c:459]
debug_log(): (ttyACM0): <-- '<CR><LF>OK<CR><LF>'
<debug> [1493975621.517437] [../../git/src/mm-port-serial.c:1307]
_close_internal(): (ttyACM0) device open count is 0 (close) <debug> [1493975621.517703] [../../git/src/mm-port-serial.c:1323]
_close_internal(): (ttyACM0) closing serial port...
<debug> [1493975621.523061] [../../git/src/mm-port-serial.c:1371]
_close_internal(): (ttyACM0) serial port closed

This means we would need to introduce an arbitrary timeout after sending SIM-PIN before we re-check whether it is required or not.

Could you add a custom "after_sim_unlock" step to the u-blox plugin which just does a timeout of some seconds? You can basically copy & paste the "after_sim_unlock" step from e.g. the Pantech plugin (mm-broadband-modem-pantech.c), which has a 5s timeout.

--
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list