qmicli working for EM7455

Bjørn Mork bjorn at mork.no
Wed Apr 1 07:56:59 UTC 2020


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


More information about the libqmi-devel mailing list