On Mon, Oct 7, 2013 at 4:21 AM, SANJAY GUPTA <gupta.san...@samsung.com> wrote:
>
> Thanks Dan,
>
>
>
> I was wrong to assume that each UsbDevice has atleast one Control Type 
> UsbEndpoint other than the default control endpoint.
>
> Can you list out
>
> 1. Some of the control device examples
>
> 2. Operations which can't be done using default control endpoint
>

I don't know what you are looking for here...if you want to know what
the standard usb control requests are, read the usb spec chapter 9.


>
>
> Sorry, if its too novice a query!!!
>
> Thanks.
> Sanjay Gupta
>
>
>
>
>
> ------- Original Message -------
>
> Sender : SANJAY GUPTA<gupta.san...@samsung.com> S5/Senior 
> Engineer/Architecture Analysis Lab./Samsung Electronics
>
> Date : Oct 04, 2013 11:29 (GMT+09:00)
>
> Title : Re: [javax-usb-devel] Unable to fine Control type UsbEndpoint on 
> UsbDevice
>
>
>
> Thanks for your reply.
>
> I am not interested in default control endpoint.
>
> I know the endpoing with address 0x00 is a default control endpoint with 
> which I am able to do control operations using UsbControlIrp.
>
> But I want to get other endpoint provided by currently active configuration 
> and interface which has type ENDPOINT_TYPE_CONTROL.
>
> For your information, the UsbDevice is a mass-storage device.
>
>
>
> On Wed, Oct 2, 2013 at 6:30 AM, SANJAY GUPTA <gupta.san...@samsung.com> wrote:
>
>
> > Hi All,
> >
> > I am trying to find the Control type UsbEndpoint using below method 
> > expecting that each UsbDevice has atlease one control endpoint. But this is 
> > unable to find the desired endpoint and returns null.
>
> You're probably talking about endpoint 0, or the "default control
> pipe", which is a special endpoint that doesn't belong to any
> configuration or interface (or, depending on how you read the spec, it
> belongs to all configurations and interfaces, but that is not the
> interpretation used by javax.usb).  You can use it via the UsbDevice
> interface methods createUsbControlIrp(), asyncSubmit() or
> syncSubmit(), etc.
>
> >
> > private UsbEndpoint getControlEndpoint(final UsbDevice usbDevice) {
> >         final UsbDeviceDescriptor usbDeviceDescriptor = 
> > usbDevice.getUsbDeviceDescriptor();
> >         for ( int i=0; i<usbDeviceDescriptor.bNumConfigurations(); i++ )
> >         {
> >                 final UsbConfiguration usbCurrentConfig = 
> > usbDevice.getUsbConfiguration((byte) (i+1));
> >                 if ( usbCurrentConfig == null) {
> >                         continue;
> >                 }
> >
> >                 final UsbConfigurationDescriptor usbCurrentConfigDescriptor 
> > = usbCurrentConfig.getUsbConfigurationDescriptor();
> >                 for ( int j=0; 
> > j<usbCurrentConfigDescriptor.bNumInterfaces(); j++ )
> >                 {
> >                         UsbInterface usbCurrentInterface = 
> > usbCurrentConfig.getUsbInterface((byte) j);
> >                         for ( int k=0; 
> > k<usbCurrentInterface.getNumSettings(); k++ )
> >                         {
> >                                 usbCurrentInterface = 
> > usbCurrentInterface.getSetting((byte) k);
> >                                 final List<?> usbEndpoints = 
> > usbCurrentInterface.getUsbEndpoints();
> >                                 for ( int l = 0; l<usbEndpoints.size(); l++ 
> > )
> >                                 {
> >                                         final UsbEndpoint 
> > usbCurrentEndpoint = (UsbEndpoint) usbEndpoints.get(l);
> >                                         if ( usbCurrentEndpoint.getType() 
> > == UsbConst.ENDPOINT_TYPE_CONTROL & 
> > usbCurrentEndpoint.getUsbEndpointDescriptor().bEndpointAddress() != (byte) 
> > 0x00 )
> >                                         {
> >                                                 return usbCurrentEndpoint;
> >                                         }
> >                                 }
> >                         }
> >                 }
> >         }
> >         return null;
> > }
> >
> > Any suggestion would be of great help.
> >
> > Thanks in Advance..
> > Sanjay Gupta
> >
> > ------------------------------------------------------------------------------
> > October Webinars: Code for Performance
> > Free Intel webinars can help you accelerate application performance.
> > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most 
> > from
> > the latest Intel processors and coprocessors. See abstracts and register >
> > http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
> > _______________________________________________
> > javax-usb-devel mailing list
> > javax-usb-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/javax-usb-devel
>
>
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
> _______________________________________________
> javax-usb-devel mailing list
> javax-usb-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/javax-usb-devel
>

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
javax-usb-devel mailing list
javax-usb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel

Reply via email to