signal11 / m-stack

Free USB Stack for PIC 16F, 18F, 24F, and 32MX Microcontrollers
http://www.signal11.us/oss/m-stack/
Other
182 stars 94 forks source link

Correct the Microsoft OS string that indicates this device supports extended feature descriptors #28

Open Planet911 opened 3 years ago

Planet911 commented 3 years ago

FYI Last byte of this structure must be 0x01

struct microsoft_os_descriptor os_descriptor = { 0x12, / bLength / 0x3, / bDescriptorType / {'M','S','F','T','1','0','0'}, / qwSignature / MICROSOFT_OS_DESC_VENDOR_CODE, / bMS_VendorCode / 0x01, / bPad Must be 0x01 / };

ddavidebor commented 3 years ago

Hi @Planet911 Do you remember what issue the wrong descriptor caused?

Planet911 commented 3 years ago

@ddavidebor Hmmm, it's been a while, but as I recall the device would not enumerate as a WCID WinUSB device (i.e. WinUSB assigned as the driver automatically) on Win10 until I changed that last byte to 0x01. I saw that 0x01 was used in several examples on the web, and it definetly works with that. Maybe other numbers work too, not sure. My fork of m-stack includes a working WCID example.

ddavidebor commented 3 years ago

I see thanks!