PORTS Forum

Ports and Interfaces => USB => Topic started by: Edio on October 17, 2013, 08:49:20 am

Title: HID Keyboard led control
Post by: Edio on October 17, 2013, 08:49:20 am
           I´m want to morse code a keyboard led to control another device. I go all the way but createfile fails if dwDesiredAccess = GENERIC_READ or GENERIC_WRITE.  I read somewhere that from Win2000 on that access is OS exclusive. Am I doing a mistake or that really can´t be done ???
Title: Re: HID Keyboard led control
Post by: Jan Axelson on October 17, 2013, 10:04:07 am
See:

Why do I receive "Access denied" when attempting to access my HID?

here:

http://www.lvr.com/hidfaq.htm

If using Windows 8, also see this and the pages it links to:

http://www.lvr.com/forum/index.php?topic=1092.msg4710
Title: Re: HID Keyboard led control
Post by: Edio on October 17, 2013, 10:30:01 am
         Thank you , I'll give HidD_SetFeature a try. but I guess the best way is to create another endpoint to deal with this.
Title: Re: HID Keyboard led control
Post by: Jan Axelson on October 17, 2013, 08:37:22 pm
A single HID supports at most one interrupt IN and one interrupt OUT endpoint, so if you don't want to use Feature reports, you would need to create another HID interface or maybe a second HID in the top level collection.
Title: Re: HID Keyboard led control
Post by: Edio on October 21, 2013, 12:54:08 pm
        As I noticed, SetFeature (for data transfer) is doomed in Win8 for security reasons. I'm in the way of creating a second HID top level collection. now I'm digesting USB papers (that includes your book) how I miss rs232 days!.
        Thank you for the replay.