This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

HID feature

HID Feature

I have implemented a detach feature in a HID device which report descriptor is:

const BYTE IPLB_ReportDescriptor[IPLB_SIZ_REPORT_DESC] = {

0x06, 0xA0, 0xFF, // USAGE_PAGE (Consumer Page) 0x09, 0x01, // USAGE (Consumer Control Usage 0x01) 0xA1, 0x01, // COLLECTION (Application)

//INPUT 0x09, 0x03, 0x15, 0x00, // LOGICAL_MINIMUM(0) 0x26, 0xFF, 0x00, // LOGICAL_MAXIMUM(255) 0x75, 0x08, // REPORT_SIZE 0x95, BUFFER_SIZE, // REPORT_COUNT 0x81, 0x02, // INPUT (Data, Variable,Abs)

//OUTPUT 0x09, 0x04, 0x15, 0x00, // LOGICAL_MINIMUM(0) 0x26, 0xFF, 0x00, // LOGICAL_MAXIMUM(255) 0x75, 0x08, // REPORT_SIZE 0x95, BUFFER_SIZE, // REPORT_COUNT 0x91, 0x02, // OUTPUT (Data, Variable,Abs)

//Feature 0x09, 0x05, 0x15, 0x00, // LOGICAL_MINIMUM(0) 0x26, 0xFF, 0x00, // LOGICAL_MAXIMUM(255) 0x75, 0x08, // REPORT_SIZE 0x95, BUFFER_SIZE, // REPORT_COUNT 0xB1, 0x02, // Feature (Data, Variable,Abs)

//DETACH FEATURE 0x06,0x00,0xFF, 0x09,0x55, 0x15,0x00, 0x26,0xFF,0x00, 0x75,0x08, 0x95,BUFFER_SIZE, 0xB1,0x82, 0xC0 // END_COLLECTION
}

In my software I am able to detect the device, to recognize the detach feature ability using:

while ((cnt < pWalk->Caps.NumberFeatureValueCaps)
{ if (pValue->UsagePage == VENDOR_USAGE_PAGE) { HidDetachFound = true; break; }
cnt ++;
pValue++;
}

but when I send the Set_feature request I have no answer from the device?!

if (!HidD_SetFeature(pWalk->HidDevice, Feature,64)) HandleTxtError("Unable to enter DFU mode: Set Feature HID Detach failed !");
else
{ Sleep(1000); HandleTxtSuccess("Successfully entered DFU Mode !"); AfxMessageBox("Detach command successful ! Device list refresh will be done...\n\nPlease re-select your device in DFU mode"); Refresh();
}

This set_feature request uses a control transfer (EP0) but debugging in my firmware on the USB_CORE I see no data arriving.

Does someone have an idea where the problem can be, any help will be welcome!