qmicli working for EM7455

Ulrich Ölmann u.oelmann at pengutronix.de
Thu Apr 2 08:13:23 UTC 2020


Hi Brandon,

On Thu, Apr 02 2020 at 09:47 +0200, Brandon Lee <blee0518 at gmail.com> wrote:
> For the dhcp,
> i run the qmi-network command for the modem, and then restart
> systemd-networkd to get IP on wwan*.

within systemd's pull request [1] (contained in v244 for the first time)
they created the subcommands "reload" & "reconfigure" (see [2] &[3]) for
systemd-networkd/networkctl to be able to change single settings without
the need to completely restart systemd-networkd. Without helping you
with respect to the issue of this thread, perhaps it could be of general
interest to make those changes in the network setup more "smooth".

Best regards
Ulrich


[1] https://github.com/systemd/systemd/pull/13452
[2] https://www.freedesktop.org/software/systemd/man/networkctl.html#%0A%20%20%20%20%20%20%20%20%20%20reconfigure%0A%20%20%20%20%20%20%20%20
[3] https://www.freedesktop.org/software/systemd/man/networkctl.html#%0A%20%20%20%20%20%20%20%20%20%20reload%0A%20%20%20%20%20%20%20%20

> Is there another command i should use to get ip on wwan interface?
>
> For the driver change, yes. I am aware i can not change driver name. I do
> not want to do this. The kernel is now selecting the driver i want, qmi,
> since i changed the composition on the modem to qmi.
>
> I will give netdev a try in assigning /dev port by unique name ATTR. To
> keep startup script stable for modems.
>
> On Wed, Apr 1, 2020, 12:57 AM Bjørn Mork <bjorn at mork.no> wrote:
>
>> Brandon Lee <blee0518 at gmail.com> writes:
>>
>> > also Bjorn, you are obviously highly more skilled in all this than I am.
>> I
>> > did not even think to dig into the code, and i probably wouldnt
>> understand
>> > most of it.  I am curious, what you would recommend over systemd to
>> > acquire an IP from the wwan interfaces using dhcp?
>>
>> I don't recommend DHCP for MBIM or QMI devices.  The DHCP server is a
>> sloppy workaround added to the modem firmware. Sometimes. It may or may
>> not work.  It's mostly untested (by vendor or anyone else) for MBIM
>> devices, since Windows doesn't use it.
>>
>> Us the native managment protocol (QMI or MBIM) to get the address info
>> and let NetworkManager, or similar alternatives, configure the IP
>> interface accordingly.
>>
>> > One final question for Bjorn, as i am taken back by his detail in coding.
>> > I am having issues with the port being assigned to the proper cdc-wdm*.
>> > Most of the time it boots with the same assignment but maybe 1 in 10 it
>> > switches them. I tried a symlink rule but it didnt help. Can you give
>> > proper advice on how to assign the device to a cdc-wdm on reboot/startup?
>> > what i tried and it didnt work:
>> >
>> > # assign module1 to cdc-wdm0
>> > KERNEL=="cdc-wdm0", \
>> > ATTR{idProduct}=="9071", \
>> > SYMLINK+="cdc-wdm0"
>> >
>> > Looking to try this but it would be a port assignment not device to udev
>> > assignment
>> > KERNEL=="cdc-wdm0*", KERNELS=="1-4:1.0", SYMLINK+="cdc-wdm0"
>>
>> As Aleksander already explained:  You cannot change this name.  It is
>> assigned by the driver/kernel based on order of discovery. Neither the
>> driver nor the tools support renaming.
>>
>> But what you can do is look up the character device name based on the
>> network device name, which systemd will keep stable for you based on bus
>> and port. If not, then it is possible to create an udev rule to achive a
>> stable netdev name.
>>
>> If your cdc_mbim or qmi_wwan netdev is named "foo0bar3", then the
>> matching cdc-wdmX device is
>>
>>  $ basename /sys/class/net/foo0bar3/device/usbmisc/*
>>  cdc-wdm42
>>
>>
>>
>> Bjørn
>>
> _______________________________________________
> libqmi-devel mailing list
> libqmi-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libqmi-devel


--
Pengutronix e.K.                           | Ulrich Ölmann               |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


More information about the libqmi-devel mailing list