Querying WWAN iface name for each /dev/cdc-wdm device

Bjørn Mork bjorn at mork.no
Mon Jan 26 13:04:12 PST 2015


Aleksander Morgado <aleksander at aleksander.es> writes:

> Hey,
>
> QMI devices are split into /dev/cdc-wdm ports and WWAN net interfaces.
> Each /dev/cdc-wdm port is uniquely associated with a given WWAN net
> interface. When only one of each is available there's no big issue,
> but modems exposing multiple control+net ports are very common
> nowadays (e.g. MC7304).
>
>  The 'aleksander/wwan-iface' branch in upstream git allows to query
> which is the WWAN interface name for a given QmiDevice, so it allows a
> direct association between the /dev/cdc-wdm port and the net
> interface.
>
> Also developed a new '--get-wwan-iface' command in qmicli, e.g.:
>    $ qmicli -d /dev/cdc-wdm1 --get-wwan-iface
>    wwp0s29u1u6i8
>    $ qmicli -d /dev/cdc-wdm2 --get-wwan-iface
>    wwp0s29u1u6i10
>
> In order to support this, libqmi would now depend on the gudev library.
>
> Comments on this, before merging to git master?
>
> http://cgit.freedesktop.org/libqmi/log/?h=aleksander/wwan-iface

No objection, but I believe this info is easy to get from sysfs without
any additional tools:

 bjorn at nemi:~$ ls -l /sys/class/usbmisc/cdc-wdm0/device/net/
 total 0
 drwxr-xr-x 6 root root 0 Jan 26 22:00 wwan0



Bjørn


More information about the libqmi-devel mailing list