--- Alan Stern <[EMAIL PROTECTED]> wrote:
> On Sat, 20 Aug 2005, Ivy wrote:
> 
> > Hi,
> > 
> >           I am tring to find isochronous endpoints in an Interface and 
> > claim the particular interface. I m using the following code. It does the 
> > same. But i am not able to receive isochronous packets ...  my kernel 
> > version 2.6.9.
> > 
> >            i found difference in /proc/bus/usb/devices file when i m 
> > loading hci_usb and my module seperatly.. 
> > 
> >              The difference is, when hci_usb module is loaded, one hub 
> > device  shows like some bandwidth allocated .
> > 
> > 
> > T:  Bus=04 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
> > B:  Alloc= 27/900 us ( 3%), #Int=  1, #Iso=  2
> > D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
> > P:  Vendor=0000 ProdID=0000 Rev= 2.06
> > S:  Manufacturer=Linux 2.6.9-1.667 uhci_hcd
> > S:  Product=UHCI Host Controller
> > S:  SerialNumber=0000:00:1d.3
> > C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
> > I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
> > E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms
> > 
> >              But when i loaded my module, it is displaying as Alloc 0% 
> > (Remaining all device are same). I think i am missing some thing.  Any 
> > suggestions ... 
> 
> Don't worry about bandwidth allocation for now.
> 
> > code snap: 
> >                               usb_fill_isoc_urb (bluetooth->isoc_read_urb, 
> > bluetooth->dev,
> >                               usb_rcvisocpipe(bluetooth->dev,131),
> >                               bluetooth->isoc_in_buffer,
> >                               bluetooth->isoc_in_buffer_size,
> >                               bluetooth_read_isoc_callback, 
> > bluetooth,bluetooth->isoc_in_interval);
> >                                                                             
> >                                                  
> >                         result = usb_submit_urb(bluetooth->isoc_read_urb, 
> > GFP_KERNEL);
> >                          if (result < 0)
> >                                 err("Error in isoc submit ");
> 
> What is this usb_fill_isoc_urb?  It doesn't look like there's any value 
> specified for isoc_read_urb->number_of_packets or for the iso_frame_desc 
> array.
> 

This is my usb_fill_isoc_urb function

               static void usb_fill_isoc_urb(struct urb *urb, struct usb_device 
*dev, unsigned int pipe, void *transfer_buffer,int buffer_length, usb_comple
te_t complete, void *context,int interval)
{
                 int offset=0,i,len;
                 spin_lock_init(&urb->lock);
                 urb->dev = dev;
                 urb->pipe = pipe;
                 urb->transfer_buffer = transfer_buffer;
                 urb->transfer_buffer_length = buffer_length;
                 urb->transfer_flags = URB_ISO_ASAP;
                 urb->complete = complete;
                 urb->context = context;
                 urb->interval = interval;
                 len = buffer_length;


                 for (i=0; i < 1  && len >= buffer_length; i++, offset += 
buffer_length, len -= buffer_length) {
                urb->iso_frame_desc[i].offset = offset;
                urb->iso_frame_desc[i].length = buffer_length;
                dbg("desc %d offset %d len %d", i, offset, buffer_length);
        }
        if (len && i < 1 ) {
                urb->iso_frame_desc[i].offset = offset;
                urb->iso_frame_desc[i].length = len;
               dbg("desc %d offset %d len %d", i, offset, len);
                i++;
        }
        urb->number_of_packets = i;

}

> Alan Stern
> 
               i have loaded module. i m getting some data at the first 
isoc_read callback. after that completely zeros.


Aug 19 16:53:47 localhost kernel: usb 4-1: new full speed USB device using 
uhci_hcd and address 6
Aug 19 16:53:48 localhost kernel: usb 4-1: Product: SiW
Aug 19 16:53:48 localhost kernel: usb 4-1: Manufacturer: SiW
Aug 19 16:53:48 localhost kernel: usb 4-1: SerialNumber: 8630040D0B00
Aug 19 16:53:48 localhost kernel: drivers/usb/class/bluetty.c: USB Bluetooth 
support registered
Aug 19 16:53:48 localhost kernel: drivers/usb/class/bluetty.c: USB Bluetooth 
converter detected
Aug 19 16:53:48 localhost kernel: drivers/usb/class/bluetty.c: isoc ifnum 1 
alts 2
Aug 19 16:53:48 localhost kernel: drivers/usb/class/bluetty.c: Bluetooth 
converter now attached to ttyUB0 (or usb/ttub/0 for devfs)
Aug 19 16:53:48 localhost kernel: usbcore: registered new driver bluetty-iso
Aug 19 16:53:48 localhost kernel: drivers/usb/class/bluetty.c: USB Bluetooth 
tty driver v0.13
Aug 19 16:53:56 localhost blue: Initiating signal handler
Aug 19 16:53:56 localhost blue: Opening dev /dev/ttyUB0
Aug 19 16:53:56 localhost kernel: drivers/usb/class/bluetty.c: bluetooth_write 
- 4 byte(s)
Aug 19 16:53:58 localhost kernel: drivers/usb/class/bluetty.c: bluetooth_write 
- 4 byte(s)
Aug 19 16:53:58 localhost kernel: drivers/usb/class/bluetty.c: bluetooth_write 
- 5 byte(s)
Aug 19 16:53:58 localhost kernel: drivers/usb/class/bluetty.c: bluetooth_write 
- 5 byte(s)
Aug 19 16:54:00 localhost udev[6130]: creating device node '/udev/ttyUB0'
Aug 19 16:54:05 localhost kernel: drivers/usb/class/bluetty.c: bluetooth_write 
- 11 byte(s)
Aug 19 16:54:05 localhost kernel: drivers/usb/class/bluetty.c: bluetooth_write 
- 10 byte(s)
Aug 19 16:54:05 localhost kernel: drivers/usb/class/bluetty.c: bluetooth_write 
- 27 byte(s)
Aug 19 16:54:07 localhost kernel: drivers/usb/class/bluetty.c: bluetooth_write 
- 8 byte(s)
Aug 19 16:54:07 localhost kernel: drivers/usb/class/bluetty.c: bluetooth_write 
- 11 byte(s)
Aug 19 16:54:07 localhost kernel: 00 01 30 00 00 00 00 03 00 01 00 01 00 01 00 
ff ff
Aug 19 16:54:07 localhost kernel: SCO PACKET SIZE IS 48
Aug 19 16:54:07 localhost kernel: ff ff ff ff fe ff fe ff fd ff fe ff fe ff fe 
ff fe
Aug 19 16:54:07 localhost kernel: SCO PACKET SIZE IS 48
Aug 19 16:54:07 localhost kernel: ff fe ff fe ff fe ff fe ff fe ff fe ff fe ff 
fe ff
Aug 19 16:54:07 localhost kernel: SCO PACKET SIZE IS 48
Aug 19 16:54:07 localhost kernel: 00 01 30 fe ff fe ff fe ff fe ff fe ff fe ff 
00 00
Aug 19 16:54:07 localhost kernel: SCO PACKET SIZE IS 48
Aug 19 16:54:07 localhost kernel: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00
Aug 19 16:54:07 localhost kernel: SCO PACKET SIZE IS 48
Aug 19 16:54:07 localhost kernel: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00
Aug 19 16:54:07 localhost kernel: SCO PACKET SIZE IS 48

-Ivy

__________________________
Free 2500MB email. Stops spam 100%. No banner ads. No popup ads. 
http://www.cashette.com


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to