On Mon, Jul 03, 2006 at 06:48:49PM +0200, mgr@xxxxxxxxxxx wrote: > Hi, > > I am writing a USB device driver on the host side for sending and > receiving messages to and from a specific device. > > I am using the USB skeleton template in the kernel source code > (2.6.16.16)(/drivers/usb/usb_skeleton.c). > > I filled in the vendor ID and product ID values to fit my device and I can > use the device driver for sending and receiving messages from user space > (using the system calls open, read, write, close). > > Now I want to change the usb_skeleton.c to use interrupt endpoints instead > of the bulk endpoints used in usb_skeleton.c. > > I just changed all the "bulk" to "int", but I get errors from the probe > function, telling that it "Could not find both int-in and int-out > endpoints". That's expected, if you don't have both an int in and int out endpoint. > What do I have to do to make it work? Do I have to create a new setting > for the interface? How do I do that? I want to understand the whole > picture- it seems like the default for my device would be to use bulk > endpoints. How was this decided? For instance- a mouse should use > interrupt endpoints and this seem to be "hardwired" in the mouse. Would it > be possible to change the settings to make the mouse send bulk transfers, > and how would I do it in that case? I think you need to do a bit more research on what exactly the USB protocol is, and how it works. Endpoints are the most basic thing for USB devices, and the different types are used depending on what the hardware designers want to do. But first off, why create a new kernel driver? Can't you do everything you want to with libusb/usbfs from userspace? thanks, greg k-h -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/