Hi Jonas
>
> This is where I think adding a data item in udevng would be in order.
> ...set_int(..., "PoweredTimeout", 60)... or something like that.  It's a
> device quirk, after all.  I've dealt with modems that were slow to boot,
> but usually they don't present the USB interfaces until they are ready
> to go.

I had in mind a plugin function that would return the timeout it needs
(to be called between .probe and .enable), something like .get_params.

Your parameter should be set in a udev rule, otherwise it would apply
to all modems connected, and so it is marginally better than the
current hardcoding.
Adding udev rules is tedious, USB devices are supposed to work 'out of
the box', without manual tweaks.

So, eventually it is easier to just increase the timeout :)

Regards,
Giacinto

>
> /Jonas
>
> >>
> >> /Jonas
> >
> > Giacinto
> >
> >>
> >> On 23/10/18 09:50, Giacinto Cifelli wrote:
> >>> Changed the connection timeout to 60 seconds (from 20 seconds),
> >>> to accomodate for chipset that take time to boot-up.
> >>> ---
> >>>    src/modem.c | 4 ++--
> >>>    1 file changed, 2 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/src/modem.c b/src/modem.c
> >>> index 124a5192..e7978bb0 100644
> >>> --- a/src/modem.c
> >>> +++ b/src/modem.c
> >>> @@ -1060,7 +1060,7 @@ static DBusMessage *set_property_lockdown(struct 
> >>> ofono_modem *modem,
> >>>                }
> >>>
> >>>                modem->pending = dbus_message_ref(msg);
> >>> -             modem->timeout = g_timeout_add_seconds(20,
> >>> +             modem->timeout = g_timeout_add_seconds(60,
> >>>                                                set_powered_timeout, 
> >>> modem);
> >>>                return NULL;
> >>>        }
> >>> @@ -1138,7 +1138,7 @@ static DBusMessage 
> >>> *modem_set_property(DBusConnection *conn,
> >>>                                return __ofono_error_failed(msg);
> >>>
> >>>                        modem->pending = dbus_message_ref(msg);
> >>> -                     modem->timeout = g_timeout_add_seconds(20,
> >>> +                     modem->timeout = g_timeout_add_seconds(60,
> >>>                                                set_powered_timeout, 
> >>> modem);
> >>>                        return NULL;
> >>>                }
> >>>
_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono

Reply via email to