Problem with AirCard 340U on embedded Linux
Aleksander Morgado
aleksander at aleksander.es
Tue Aug 16 14:55:12 UTC 2016
On Tue, Aug 16, 2016 at 4:45 PM, Evade Flow <evadeflow at gmail.com> wrote:
>> What about this just after plugging the device, without having run
>> qmi-network?
>>
>> $ qmicli -d /dev/cdc-wdm0 --wda-get-data-format
>>
>> If it says "raw-ip"; then it may make sense what happened to you.
>
> Thanks, Aleksander. It does, indeed, show 'raw-ip':
>
> root at mel-automotive-gr-mrb $ qmicli -d /dev/cdc-wdm0 --wda-get-data-format
> [/dev/cdc-wdm0] Successfully got data format
> QoS flow header: no
> Link layer protocol: 'raw-ip'
> Uplink data aggregation protocol: 'disabled'
> Downlink data aggregation protocol: 'disabled'
> NDP signature: '0'
> Uplink data aggregation max size: '0'
> Downlink data aggregation max size: '0'
>
> For my own education, can you elaborate as to how it makes sense?
So. qmi-network now checks 2 things:
* The kernel expected data format (by default 802-3)
* The device expected data format (by default raw-ip in your case).
If the kernel allows updating the data format, as it is the case in
your setup, qmi-network will run --set-expected-data-format=raw-ip so
that both device and kernel match the data format; raw-ip in this
case. Given that not all devices support all data formats (newer
devices only do raw-ip) we always prefer the DEVICE data format.
The problem is that dhclient doesn't work with an interface in raw-ip
format; so you need to configure the interface "manually" with e.g.
iproute2 commands. This is what we do in ModemManager nowadays; if the
device is by default in raw-ip, we just request static ip addressing
instead of DHCP.
You were able to make the setup work with dhclient because you changed
the expected data format of the device to 802-3 before qmi-network did
its own check.
--
Aleksander
https://aleksander.es
More information about the libqmi-devel
mailing list