USB procotol/class for HID device to advertise feature set changes

Hi,

I’m in the process of designing a modular USB HID device that’s basically a keyboard, but can have additional modules plugged in at runtime by the user, like a joystick or a trackpad. I’d like to avoid writing any custom driver and have Windows auto-detect things to make it easier for users, I hope this doesn’t make this post too much off-topic.

To save costs we would like to avoid putting a USB hub chip in the main device and only have a single microcontroller in each module. Also to improve user experience, we would like to avoid advertising a game controller part when it’s not plugged in, so the user doesn’t have a ghost joystick appearing in controller lists in games.

Is there any mechanism for the main module to tell Windows it’s only an HID keyboard, and then at some point later to advertise a game controller feature? I believe the device could simply reset when a module is plugged/unplugged and re-enumerate differently afterward, but is there some caching involved in Windows that would prevent that from working?

One definitive drawback of that reset+re-enumeration mechanism would be that the unchanged modules (like the keyboard itself) would get unresponsive during re-enumeration, and that’s something we would like to avoid if possible. Any suggestion?

Regards,

J?r?me.

There is no way to say the HID descriptor will change after reenumeration and to requery for it. Your best bet is to reenumerate yourself with the new hid descriptor that includes the extra hw. I don’t think there is any caching of the hid descriptor, there wasn’t the last time I looked.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@madcatz.com
Sent: Monday, October 26, 2015 9:42 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB procotol/class for HID device to advertise feature set changes

Hi,

I’m in the process of designing a modular USB HID device that’s basically a keyboard, but can have additional modules plugged in at runtime by the user, like a joystick or a trackpad. I’d like to avoid writing any custom driver and have Windows auto-detect things to make it easier for users, I hope this doesn’t make this post too much off-topic.

To save costs we would like to avoid putting a USB hub chip in the main device and only have a single microcontroller in each module. Also to improve user experience, we would like to avoid advertising a game controller part when it’s not plugged in, so the user doesn’t have a ghost joystick appearing in controller lists in games.

Is there any mechanism for the main module to tell Windows it’s only an HID keyboard, and then at some point later to advertise a game controller feature? I believe the device could simply reset when a module is plugged/unplugged and re-enumerate differently afterward, but is there some caching involved in Windows that would prevent that from working?

One definitive drawback of that reset+re-enumeration mechanism would be that the unchanged modules (like the keyboard itself) would get unresponsive during re-enumeration, and that’s something we would like to avoid if possible. Any suggestion?

Regards,

J?r?me.


NTDEV is sponsored by OSR

Visit the list at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osronline.com%2Fshowlists.cfm%3Flist%3Dntdev&data=01|01|Doron.Holan%40microsoft.com|acd699f1f34b4eaa5a8308d2de248f30|72f988bf86f141af91ab2d7cd011db47|1&sdata=tNxbkfh%2BZbiBVRZ%2B6m8TKPlDb86a8WRh2AqdKdZpFO8%3D

OSR is HIRING!! See https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osr.com%2Fcareers&data=01|01|Doron.Holan%40microsoft.com|acd699f1f34b4eaa5a8308d2de248f30|72f988bf86f141af91ab2d7cd011db47|1&sdata=dgTI%2Fg%2B6pfXulkOITt5NVCacco1hfBgsIvgavKeAtIE%3D

For our schedule of WDF, WDM, debugging and other seminars visit:
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osr.com%2Fseminars&data=01|01|Doron.Holan%40microsoft.com|acd699f1f34b4eaa5a8308d2de248f30|72f988bf86f141af91ab2d7cd011db47|1&sdata=Uct7HZQ7tZZz9h8V0B1Yyo8DGJE5EnvmUyYdIavtaF0%3D

To unsubscribe, visit the List Server section of OSR Online at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osronline.com%2Fpage.cfm%3Fname%3DListServer&data=01|01|Doron.Holan%40microsoft.com|acd699f1f34b4eaa5a8308d2de248f30|72f988bf86f141af91ab2d7cd011db47|1&sdata=YeKdGW%2B3WFWZQhcBDkn2bdCmKcW8Zl%2FQqEUq6FXXspQ%3D

Thanks for the confirmation.