Re: [PATCH] USB: option: Add USB ID for Novatel Ovation MC551

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2012-06-22 at 11:53 +0200, Bjørn Mork wrote:
> Dan Williams <dcbw@xxxxxxxxxx> writes:
> 
> > This was just a comment to let others (Bjorn!) know that we'll *also*
> > probably need some more ids in cdc_wdm.  I'm not 100% certain the device
> > does QMI, but I'm 95% sure.
> 
> Thanks for the confidence, but I don't see how I can guess this at
> all. The only way to know for sure is if one of you with the device can
> test it.
> 
> I am attaching my perl example of how QMI support can be tested without
> any driver support or other QMI utilities. It creates a CDC embedded
> QMI_CTL "Get Version" request and sends that using libusb to all possible
> interfaces on a device.  No magic.  If we get a response, then the
> interface supports QMI.  Otherwise it doesn't.
> 
> The requirements are simply the Device::USB libusb perl wrapper and
> access rights to the device. No specific drivers or kernel versions
> (except for the libusb support).  Note that the script will unbind any
> kernel driver from the interfaces it wants to test, and won't rebind
> them when finished.  Simply replugging the device after testing should
> reset everything.
> 
> 
> A short demo:
> 
> 1) These are my USB devices:
> 
>  bjorn@nemi:/tmp$ lsusb
>  Bus 001 Device 003: ID 17ef:4807 Lenovo UVC Camera
>  Bus 002 Device 002: ID 08ff:2810 AuthenTec, Inc. AES2810
>  Bus 006 Device 043: ID 1199:68a2 Sierra Wireless, Inc. 
>  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>  Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
>  Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
>  Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
>  Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
>  Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>  Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
>  Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> 
> 2) Need full access to the device under test, but don't want to let the
>    script run as root.  Taking the bus and device number from lsusb
>    output:
> 
>  nemi:/tmp# chown bjorn /dev/bus/usb/006/043 
> 
> 
> 3) Run the script and let it test every possible interface on this
>    device:
> 
>  bjorn@nemi:/tmp$ ./qmiver.pl --device=1199:68a2
>  Debugging: off
>  Device: 1199:68a2
>  Unsupported endpoint configuration on ifnum=0
>  Unsupported endpoint configuration on ifnum=2
>  Candidate: ifnum=3
>  unbinding interface 3 from kernel driver "qcserial"
>  control_msg() failed (-32): Broken pipe
>  Candidate: ifnum=8
>  unbinding interface 8 from kernel driver "qmi_wwan"
>  supports 17 QMI subsystems:
>    QMI_CTL (1.5)
>    QMI_WDS (1.12)
>    QMI_DMS (1.7)
>    QMI_NAS (1.16)
>    QMI_QOS (1.3)
>    QMI_WMS (1.4)
>    QMI_PDS (1.10)
>    QMI_AUTH (1.1)
>    QMI_AT (1.1)
>    QMI_VOICE (2.1)
>    QMI_CAT (2.0)
>    QMI UIM (1.4)
>    QMI PBM (1.4)
>    QMI_SAR (1.0)
>    0x1a (1.0)
>    QMI_CAT (2.0)
>    QMI_RMS (1.0)
> 
> 
> 
> That's all.  Unplug and replug the device to have both access rights
> reset and drivers rebound.
> 
> I believe that is about as simple test as you can get, though I am sure
> you can rewrite it as a much nicer python script :-)

Sigh... I completely failed getting the script to work, because
Device::USB fails to build it's shared library, because it wants the old
libusb (0.9?) but happily enough when building it finds libusb-1.0 (the
new version) and uses that, proceeding to segfault when running.  And of
course, attempting to build it against the new library (with headers
in /usr/include/libusb-1.0) fails because it can't find the headers, and
I'm not manly enough to figure out how to patch CPAN stuff.  And yes,
both libusb (0.9) and libusb1 (1.0) have to be installed in parallel
because half the distro depends on one, half on the other.  Whee.

So in short, do you have an older version that doesn't require
Device::USB somewhere?  ISTR a few months ago you did.

Dan

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux