qmi-network fails to start

JM jmmec2014 at yahoo.com
Sat Oct 14 12:50:13 UTC 2017

> Many thanks for the tips, I confirmed to you that this works correctly!
> But, a question as sooon as I got the IP Configuration it seems that the
> connection breaks, I have no time to put the IP address to the
> interface...
> I will try to script it, but I am still not sure the reason why the
> connection stops working as soon as I request the ip configuration.
> PLease don't hesitate if you have any idea :)

This is just a wild guess based on what I've experiencedwhen using Verizon LTE.  I don't know enough to prove that this is really what happens in my case, so this may notbe correct at all.

If I connect to the network, get the assigned IP address, and then configure it on the wwan interface & configure a default route to send all outgoing traffic over the wwan interface, then everything is OK.  Data will then start to be sent over the wwan interface tagged with the expected source IP address.

However, if the network changes the assigned IP address *before* my script detects that it has changed (which will cause it to remove the old IP, and add the new IP tothe wwan interface), then an attempt might be made to send packets out the wwan using the *old* IP address.  It seems to me that the network (at least Verizon) detects this as an error and drops the connection.
Therefore, when my script detects that the assigned IP address has changed (it polls qmicli every few seconds), then it does something like this:
1. Remove the default route & old IP address for the wwaninterface.

2. Sleep for a few seconds in case previous traffic was in process of being sent & the connection is again beingdropped and reestablished with yet another IP address.
3. Get the newly assigned IP address, add it to the wwaninterface, and then re-add the default route.
This seems to make things much more stable.
Maybe someone else will know more or have other ideas.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libqmi-devel/attachments/20171014/564324a2/attachment.html>

More information about the libqmi-devel mailing list