Hi Bas,
This is what I use to make vendor interface urb (which is just a simple control message, but you have to have the good parameters...) :
result=usb_control_msg(dev,
(in_out_flag)?usb_rcvctrlpipe(dev, 0):usb_sndctrlpipe(dev,0), /* to have an input or output pipe, that's maybe the answer to your 2nd question, in fact you use the default endpoint here (0)*/
request,
in_out_mask|USB_RECIP_INTERFACE|USB_TYPE_VENDOR, /*this is the masks used to make a vendor interface USB, and this is where you can add a mask for the reserved bits (it is the bmRequestType field)*/
value,
index,
buf,
buf_length,
HZ * 5 /*the timeout*/);
in_out_mask and in_out_flag can have 0x80 or 0x00 value (look at the usb specs v1.1 chapter 9 )
For my use I don't have reserved bits, but you can put a mask where I said, look at the usb specs v1.1 chapter 9 to build your own bmRequestType field.
This should be ok. If you have the broken pipe error, it is because you have an "in" pipe instead of an "out" pipe if my memory is good.
Eric.
-----Message d'origine-----
De: [EMAIL PROTECTED]
A: [EMAIL PROTECTED]
Date: 09/05/01 09:07
Objet: [linux-usb-devel] How to submit a Vendor Command to a USB device
Hi all,
I'm working on writing a driver for the D-Link DWL-120. I've got a
driver
that can recognize the device, claim it, and release it.
I'd like to know how to construct an URB with the following parameters:
Function Type: Vendor Interface
Flags: IN and SHORT
Reserved bits: 0xC1
Request Code: 0x22
Value: Command ID (integer or char, not sure)
Index: 0
Buffer: 6 byte buffer
I'd also like to know where to find the endpoints in a device.
I've looked at several drivers, but can't quite find out where they find
them.
Thanks for any help you all can give me,
Bas Vermeulen
--
"God, root, what is difference?"
-- Pitr, User Friendly
"God is more forgiving."
-- Dave Aronson
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel