Should be usb_sndctrlpipe, but regardless, I am still experiencing the same thing.
ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), SET_IDLE, (0x01 << 5) + 0x01, 0xaa00, 0, data, 0, USB_CTRL_SET_TIMEOUT); On 7/17/07, Gabriel Maganis <[EMAIL PROTECTED]> wrote: > Hello, > I am trying to send commands to a keyboard to set the idle rate and > confirm that it's been set like below, > #define SET_IDLE 0x0A > #define GET_IDLE 0x02 > > unsigned char data[1] = {0}; > > ret = usb_control_msg(dev, > usb_rcvctrlpipe(dev, 0), > SET_IDLE, > (0x01 << 5) + 0x01, > 0xaa00, 0, data, 0, USB_CTRL_SET_TIMEOUT); > > ret = usb_control_msg(dev, > usb_rcvctrlpipe(dev, 0), > GET_IDLE, > (0x01 << 7) + (0x01 << 5) + 0x01, > 0x0000, 0, data, 1, USB_CTRL_GET_TIMEOUT); > > printk("%02x\n", data[0]); > > The printk always gives me a zero but the value of ret for GET_IDLE is > always 1. I've been able to do all of this using libusb in user space > but have no success within a kernel module. I've also looked at > devio.c for reference and have run out of ideas of what could be > wrong. Also, when I try to do a SET_REPORT using usb_control_msg in > the kernel just like with libusb, my host controller shuts down and > breaks like I sent _it_ the command. > > Thanks.. > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel