[PATCH] ublox: use ID_MM_UBLOX_PORT_READY_DELAY udev flag as init

Aleksander Morgado aleksander at aleksander.es
Sat May 5 12:30:32 UTC 2018


>> > > How about having a single call reading the udev tag value in
>> > > ublox_custom_init() and passing the value to wait_for_ready()?
>> > >
>> > > E.g.
>> > > static void
>> > > wait_for_ready (GTask *task,
>> > >                 guint wait_timeout_secs)
>> > > {
>> > > ...
>> > > }
>> > >
>> >
>> > The only issue with that is wait_for_ready() is also called by the
>> quick_at_ready() function which is a callback function, so I can't pass in the
>> wait_timeout_secs to that instance.  I was thinking instead of adding
>> wait_timeout_secs to the CustomInitContext struct since that is already
>> available to the wait_for_ready() function no matter how it is called. Then
>> ctx->wait_timeout_secs can be set in the ublox_custom_init() function,
>> unless you have another recommendation.
>>
>> Oh, that's totally fine. Just read it once and store it in the
>> CustomInitContext.
>>
>
> One additional item is I found to reliably get the TOBY-R200 to initialize with ModemManager I needed to have it use a 2 second delay using the ID_MM_UBLOX_PORT_READY_DELAY udev flag in the 77-mm-ublox-port-types.rules file.  Without this the modem is sometimes never initialized by MM.  I am planning on adding that to the new patch I will be sending too.
>

Humm.... but does the TOBY-R200 send the +READY URC before those 2s?
I don't understand why that would be needed really. Could you send
some logs with/without the 2s timeout to see the differences?

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list