mbimcli has trouble with MBIM device file symlinks created by udev rules, "Couldn't find udev device" and "Couldn't get descriptors file path"

Ed Peguillan edp at d6labs.com
Mon Jul 1 20:26:49 UTC 2019


I created an issue on MBIM's GitLab. You can see it here: https://gitlab.freedesktop.org/mobile-broadband/libmbim/issues/6
But I will restate it:

I am working on a device that will have several MBIM devices connected. In order to guarantee persistent device file naming under /dev, I am in the process of writing a udev rule to create symbolic links to the cdc-wdm[n] interfaces--you can see it attached to this post. However, invoking mbimcli --device=/dev/SYMLINK-TO-MODEM throws a couple of errors.

Here invoking on the original device file:

# mbimcli --device-open-proxy --device=/dev/cdc-wdm0 --query-registration-state
[/dev/cdc-wdm0] Registration status:
                 Network error: 'unknown'
                Register state: 'home'
                 Register mode: 'automatic'
        Available data classes: 'lte'
        Current cellular class: 'gsm'
                   Provider ID: '311480'
                 Provider name: 'Verizon'
                  Roaming text: 'unknown'
            Registration flags: 'packet-service-automatic-attach'

and now on the symbolic link to the device file. It hangs and I send SIGINT:

$ mbimcli --device-open-proxy --device=/dev/cdc-wdm-HL7618-MBIM0 --query-registration-state
[01 Jul 2019, 20:47:42] -Warning ** [/dev/cdc-wdm-HL7618-MBIM0] Couldn't find udev device
[01 Jul 2019, 20:47:42] -Warning ** [/dev/cdc-wdm-HL7618-MBIM0] Couldn't get descriptors file path
^Ccancelling the operation...
error: couldn't open the MbimDevice: Operation was cancelled

$ ls -l /dev/cdc*
crw------- 1 root root 180, 176 Jul  1 19:03 /dev/cdc-wdm0
lrwxrwxrwx 1 root root        8 Jul  1 19:03 /dev/cdc-wdm-HL7618-MBIM0 -> cdc-wdm0

$ mbimcli --version

mbimcli 1.18.0
Copyright (C) 2013-2019 Aleksander Morgado
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html><http://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

--------------------------------

Interesting thing: I rebooted and now the symlink works, but the original device file does not. The symlink still shows the error mentioned in my OP. It times out if I try to use it.

Symlink:

$ mbimcli --device-open-proxy --device=/dev/cdc-wdm-HL7618-MBIM0 --query-registration-state
[01 Jul 2019, 21:18:07] -Warning ** [/dev/cdc-wdm-HL7618-MBIM0] Couldn't find udev device
[01 Jul 2019, 21:18:07] -Warning ** [/dev/cdc-wdm-HL7618-MBIM0] Couldn't get descriptors file path
[/dev/cdc-wdm-HL7618-MBIM0] Registration status:
                 Network error: 'unknown'
                Register state: 'home'
                 Register mode: 'automatic'
        Available data classes: 'lte'
        Current cellular class: 'gsm'
                   Provider ID: '311480'
                 Provider name: 'Verizon'
                  Roaming text: 'unknown'
            Registration flags: 'packet-service-automatic-attach'


Original:

$ mbimcli --device-open-proxy --device=/dev/cdc-wdm0 --query-registration-state
error: couldn't open the MbimDevice: Transaction timed out

Thank you,

Ed Peguillan III

Contents of udev rule (work in progress): https://gist.github.com/yankee14/f361f8b7dee211faaed0e8ea69620ac9
Whisker.io and D6 Labs are trademarks of Digital Six Laboratories, Inc. This e-mail message, including any attachments, is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged and/or confidential. If you are not the intended recipient or the employee or agent responsible for delivering the communication to the intended recipient, please notify us immediately by replying to this message and then delete this message from your system. You are hereby notified that any use, dissemination, distribution and/or reproduction of this message and/or any attachments by unintended recipients is unauthorized and may be unlawful. Furthermore, although we have taken precautions to minimize the risk of transmitting software viruses, we advise you to perform your own virus checks on any attachment to this message. We do not accept liability for any loss or damage caused by software viruses.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libmbim-devel/attachments/20190701/518eaa27/attachment.html>


More information about the libmbim-devel mailing list