USB Driver: get encapsulated response

mamat

Registered
Hello

I have to write a driver for a USB DSL modem, for that I want to implement some control functions.

To implement these function I do request to the modem using DeviceRequest, I send to the driver sendEncapsulatedCommand containing the command I want the modem perform for me. Whenn it's done the modem send to the driver a response_available notification.
Then the driver must send getEncapsulatedresponse still with DeviceRequest, and there is my question, how do I get the datas back from the modem, are they in the structure IOUSBDevRequest I pass to DeviceRequest or somewhere else ??

I really don't know and the documanetation about these functions s very poor :-(

if someone got a clue about this, let me know

Mathieu
 
I am in no way a USB driver guru, but a brief look at the documentation for IOUBDevRequest showed me this:

wLength
Length of data part of request, 16 bits, host endianess
pData
Pointer to data for request - data returned in bus endianess

see:
http://developer.apple.com/document...OKit/USB/Structs/Structs.html#IOUSBDevRequest

I would think that the pData pointer is where your response data would come.

Again though, I'm not a USB guy - so don't assume I'm right - check with others who are USB developers and test the theory on your own.

Wade
 
Back
Top