<div dir="ltr">> You were able to make the setup work with dhclient because you changed                                   <br>> the expected data format of the device to 802-3 before qmi-network did<br>> its own check.<br><br>Makes sense, thanks for the detailed explanation! I really wish I could<br>use ModemManager, and perhaps I will, eventually. Unfortunately, the<br>embedded stack I'm working with is using connman + ofono, which I don't<br>have any experience with, and haven't been able to find much<br>documentation for. This, frankly, wasn't very helpful in getting the AC<br>340U to work:<br><br>  - <a href="https://01.org/connman/documentation">https://01.org/connman/documentation</a><br><br>I may have the freedom on this project to replace connman/ofono with<br>NetworkManager/ModemManager (or perhaps *just* ModemManager). If quality<br>of documentation were the only consideration, ModemManager would win<br>hands-down:<br><br>  - <a href="https://www.freedesktop.org/software/ModemManager/api/latest/">https://www.freedesktop.org/software/ModemManager/api/latest/</a><br>  - <a href="http://ofono.sourcearchive.com/documentation/0.36-1/main.html">http://ofono.sourcearchive.com/documentation/0.36-1/main.html</a><br><br>But that's a battle for another day. Right now I just need to get a<br>4G/LTE pipe connected! `:-o<br><br>On a slightly different subject, I wonder if I could trouble you to<br>comment on which of the patches you mention in this post:<br><br>  - <a href="https://lists.freedesktop.org/archives/libqmi-devel/2015-December/001477.html">https://lists.freedesktop.org/archives/libqmi-devel/2015-December/001477.html</a> <br><br>would be beneficial to include on an embedded device running kernel<br>version 4.1.13 with a Sierra Wireless AC 340U?<br><br>> 34a55d5 net: qmi_wwan: ignore bogus CDC Union descriptors<br>> 6c73008 net: qmi_wwan: should hold RTNL while changing netdev type<br>> 32f7adf net: qmi_wwan: support "raw IP" mode<br>> 81e0ce7 usbnet: allow mini-drivers to consume L2 headers<br>> 544c8f6 net: qmi_wwan: remove 1199:9070 device id<br>> 9372514 net: qmi_wwan: MDM9x30 specific power management<br>> 68242a5 net: qmi_wwan: add XS Stick W100-2 from 4G Systems<br>> b3d8cf0 USB: qmi_wwan: Add quirk for Quectel EC20 Mini PCIe module<br>> 7091079 qmi_wwan: fix entry for HP lt4112 LTE/HSPA+ Gobi 4G Module<br>> 0db65fc qmi_wwan: add Sierra Wireless MC74xx/EM74xx<br>> e704059 net: qmi_wwan: Sierra Wireless MC73xx -> Sierra Wireless MC7304/MC7354<br><br>I applied all of them (in desperation, to be honest) to see if they<br>might fix my problem. Since it turns out to have been something<br>unrelated, I reverted them all. And I *am* still able to connect; but I<br>noticed at least one difference. This command no longer works:<br><br>root@embedded-dev $ qmicli -d /dev/cdc-wdm0 --get-expected-data-format<br>error: couldn't create QmiDevice: Couldn't query file info: Error when<br>getting information for file '/dev/cdc-wdm0': No such file or directory<br><br>Since I can still connect, anyway, I'm wondering whether I should bother<br>with any patches. It's easy enough to include them, I'm just worried I<br>don't have the expertise to vet them properly. If you have a minute, and<br>can say off the top of your head, I'd be very interested to know your<br>opinion.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 16, 2016 at 10:55 AM, Aleksander Morgado <span dir="ltr"><<a href="mailto:aleksander@aleksander.es" target="_blank">aleksander@aleksander.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Aug 16, 2016 at 4:45 PM, Evade Flow <<a href="mailto:evadeflow@gmail.com">evadeflow@gmail.com</a>> wrote:<br>
>> What about this just after plugging the device, without having run<br>
>> qmi-network?<br>
>><br>
>> $ qmicli -d /dev/cdc-wdm0 --wda-get-data-format<br>
>><br>
>> If it says "raw-ip"; then it may make sense what happened to you.<br>
><br>
> Thanks, Aleksander. It does, indeed, show 'raw-ip':<br>
><br>
> root@mel-automotive-gr-mrb $ qmicli -d /dev/cdc-wdm0 --wda-get-data-format<br>
> [/dev/cdc-wdm0] Successfully got data format<br>
>                    QoS flow header: no<br>
>                Link layer protocol: 'raw-ip'<br>
>   Uplink data aggregation protocol: 'disabled'<br>
> Downlink data aggregation protocol: 'disabled'<br>
>                      NDP signature: '0'<br>
>   Uplink data aggregation max size: '0'<br>
> Downlink data aggregation max size: '0'<br>
><br>
> For my own education, can you elaborate as to how it makes sense?<br>
<br>
</span>So. qmi-network now checks 2 things:<br>
<br>
 * The kernel expected data format (by default 802-3)<br>
 * The device expected data format (by default raw-ip in your case).<br>
<br>
If the kernel allows updating the data format, as it is the case in<br>
your setup, qmi-network will run --set-expected-data-format=<wbr>raw-ip so<br>
that both device and kernel match the data format; raw-ip in this<br>
case. Given that not all devices support all data formats (newer<br>
devices only do raw-ip) we always prefer the DEVICE data format.<br>
<br>
The problem is that dhclient doesn't work with an interface in raw-ip<br>
format; so you need to configure the interface "manually" with e.g.<br>
iproute2 commands. This is what we do in ModemManager nowadays; if the<br>
device is by default in raw-ip, we just request static ip addressing<br>
instead of DHCP.<br>
<br>
You were able to make the setup work with dhclient because you changed<br>
the expected data format of the device to 802-3 before qmi-network did<br>
its own check.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a><br>
</font></span></blockquote></div><br></div>