test failed using Huawei E3276

Bjørn Mork bjorn at mork.no
Wed Aug 29 03:11:24 PDT 2012


Tommy Cheng <tommy7765 at yahoo.com> writes:

>>> I:  If#= 1 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=02 Prot=16 Driver=qmi_wwan
>>> E:  Ad=82(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
>>> I:* If#= 1 Alt= 1 #EPs= 3 Cls=ff(vend.) Sub=02 Prot=16 Driver=qmi_wwan
>>> E:  Ad=82(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
>>> E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>>> E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
>
>> Are you sure this is a QMI interface? Do you have a Windows driver .inf
>> file indicating that it is?  I've not yet deciphered what Huawei use the
>> subclass for, but we should assume that there is an important difference
>> between subclass 1 and 2.
>
>> It may very well be some sort of NDIS interface, but we have no
>> indications that it supports QMI.
>
> I'm sure it is a QMI interface.

Typo noted: "NOT sure"

> The windows driver .inf file mentions that it is a CDC ECM & NCM
> driver.


OK, I looked at the hw_cdc_driver.c mess from Huawei, and found this:

/*Add for PID optimized liaojianping 20100811*/
#define HUAWEI_NCM_OPTIMIZED_INTERFACE_JUNGO \
        .bInterfaceClass        = 0xFF, \
        .bInterfaceSubClass     = 0x02, \
        .bInterfaceProtocol     = 0x16

Which would indicate that it is in fact using CDC NCM with firmware from
Jungo.  This means that it won't work with qmi_wwan, as that only
supports CDC ECM framing.  There is also some special startup code in
the driver:


int hw_send_tlp_download_request(struct usb_interface *intf)
{
        struct usb_device *udev = interface_to_usbdev(intf);
        struct usb_host_interface *interface = intf->cur_altsetting;
        struct usbdevfs_ctrltransfer req = {0};
        unsigned char buf[256] = {0};
        int retval = 0;
        req.bRequestType = 0xC0;
        req.bRequest = 0x02;//activating the download tlp feature request
        req.wIndex = interface->desc.bInterfaceNumber;
        req.wValue = 1;
        req.wLength = 1;
        req.data = buf;
        req.timeout = 1000;
        retval = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), req.bRequest,  
                req.bRequestType, req.wValue, req.wIndex, 
                req.data, req.wLength, req.timeout);
        /*check the TLP feature is activated or not, response value 0x01 indicates success*/
        if (0 < retval && 0x01 == buf[0]){
                return retval;
        }else{
                return 0;
        }
}


I have no idea what this TLP feature is, but I assume this is a required
startup sequence making the standard cdc-ncm Linux driver fail.

And I see that your device has:
> P: Vendor=12d1 ProdID=1506 Rev= 1.02

The Huawei driver does a strange test against the revision before
attempting QMI:

#define HW_JUNGO_BCDDEVICE_VALUE 0x0102
..
        if (HW_JUNGO_BCDDEVICE_VALUE != dev->udev->descriptor.bcdDevice) {
                dev->qmi_sync = 0;
                INIT_DELAYED_WORK(&dev->status_work, hw_cdc_check_status_work);
                schedule_delayed_work(&dev->status_work, 10*HZ);
        }


I believe this all points to firmware supporting CDC NCM, possibly with
a special initialization sequence, and completely without any QMI
support.  Sorry.

You could always try the driver from
http://www.huaweidevice.com/worldwide/downloadCenter.do?method=toDownloadFile&flay=software&softid=NDAzMjM=

You could also try adding the device to the standard Linux cdc-ncm
driver.  It would be great if you could get it to work with that one.  I
assume the special initialization will be accepted there, if it is
required.



Bjørn


More information about the libqmi-devel mailing list