GORAN RADIVOJEVIC wrote:
>
> interface[0].altsetting[0]: num endpoints = 0
>    Class.SubClass.Protocol: FF.FF.FF
> interface[0].altsetting[1]: num endpoints = 6
>    Class.SubClass.Protocol: FF.FF.FF
>        endpoint[0].address: 81
>            max packet size: 0040
>           polling interval: 01
>        endpoint[1].address: 02
>            max packet size: 0040
>           polling interval: 01
>        endpoint[2].address: 83
>            max packet size: 0040
>           polling interval: 00
>        endpoint[3].address: 04
>            max packet size: 0040
>           polling interval: 00
>        endpoint[4].address: 85
>            max packet size: 0100
>           polling interval: 01
>        endpoint[5].address: 06
>            max packet size: 0100
>           polling interval: 01

What are the types of the pipes here?  Bulk pipes in full-speed are
limited to 64 bytes, so those last two (at least) must be either
interrupt or isochronous.  Is it possible you don't have enough
bandwidth to reserve that much?


> When libusb_set_interface_alt_setting command is send on my serial
> console instead expected USB_REQ_TYPE_VENDOR received
> is USB_REQ_TYPE_STANDARD with alt settings set to 0:
> ............
> udi_vendor_disable alt_settings 0
> udi_vendor_setup_out
> USB_REQ_TYPE_STANDARD

You are making the mistake of assuming that "vendor class device" and
"vendor requests" are somehow related.  That is simply not true, and you
must unlearn that.  There are two bits in the request code that identify
whether the request is a "standard" request, or a "class" request, or a
"vendor" request.  All possible standard and class requests are spelled
out in the USB specs.  Vendor requests can be anything at all.  ANY type
of device can have its own vendor requests.


> ...........
> This is from udi_vendor_setup function generated by Atmel ASF 3.5.0:
> ......
> if (Udd_setup_is_out())
> {
>         if ((Udd_setup_type() == USB_REQ_TYPE_VENDOR)
>                 && (udd_g_ctrlreq.req.bRequest == 0)
>                 && (0 != udd_g_ctrlreq.req.wLength))
>         {
>             return UDI_VENDOR_SETUP_OUT_RECEIVED();
>         }
>         return false;  // Not supported request
> }
>
> Clearly this function only expect USB_REQ_TYPE_VENDOR request with
> altsettings set to 1.

Your conclusion is not supported by the code.  Your firmware probably
has a section of code that says:

    if( request type is "standard" )
        go handle standard requests;
    else if( request type is "class" )
        go handle class requests;
    else
        go handle vendor requests;

and the code above is probably in the "vendor request" section.

It is clear that your firmware handles the SetInterface request.  The
"set alternate setting" function sends the EXACT SAME REQUEST.  There's
just one field that identifies the alternate setting to enable.

-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to