Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Send custom messages to hid keyboard minidriver

Reply
Thread Tools Display Modes

Send custom messages to hid keyboard minidriver

 
 
Max
Guest
Posts: n/a

 
      11-30-2009
Hi

I have developed an hid minidriver managing a custom keyboard I have.
The driver work well but I need also to have the possibiliy to
communicate directly with the driver for send come custom configuration
message. In the beggining I tried to use the function HidD_SetFeature()
and HidD_GetFeature() but they fail and no event arrive to the driver.
Also tried the standard call DeviceIoControl() but also this call
doesn't work. I suspect I must to add some entried into the hid report
descriptor for "enable" this direct communication but I'm not very
expert in hid developing and I don't know how to add this feature. For
the driver I used the standard hid keyboard descriptor as follow:

0x05, 0x01, // Generic Desktop
0x09, 0x06, // Keyboard
0xA1, 0x01, // Collection
0x05, 0x07,
0x19, 0xE0,
0x29, 0xE7,
0x15, 0x00,
0x25, 0x01,
0x75, 0x01,
0x95, 0x08,
0x81, 0x02,
0x95, 0x01,
0x75, 0x08,
0x81, 0x01,
0x95, 0x05,
0x75, 0x01,
0x05, 0x08,
0x19, 0x01,
0x29, 0x05,
0x91, 0x02,
0x95, 0x01,
0x75, 0x03,
0x91, 0x01,
0x95, 0x06,
0x75, 0x08,
0x15, 0x00,
0x25, 0x65,
0x05, 0x07,
0x19, 0x00,
0x29, 0x65,
0x81, 0x00,
0xC0 // End Collection

How can I add the entries for have the function HidD_SetFeature() and
HidD_GetFeature() working?
Thank you

--


--

 
Reply With Quote
 
 
 
 
Doron Holan [MSFT]
Guest
Posts: n/a

 
      11-30-2009
you need to create a 2nd top level collection (which describes a generic HID
on a custom usage page) in your HID descriptor and use that as a way to talk
to the miniport. the system opens the keyboard TLC exclusively and does not
allow you to open the keyboard collection. OR, as an alternative, you could
write you HID miniport as KMDF driver (see 7600.16385.0\src\hid\hidusbfx2 in
the win7 wdk for an example) and from that KMDF driver you can enumerate
your own raw PDO which no longer has to be HID and you can use IOCTLs to
communicate with the miniport

d

--

This posting is provided "AS IS" with no warranties, and confers no rights.


"Max" <> wrote in message news:hf0oal$cb0$...
> Hi
>
> I have developed an hid minidriver managing a custom keyboard I have.
> The driver work well but I need also to have the possibiliy to
> communicate directly with the driver for send come custom configuration
> message. In the beggining I tried to use the function HidD_SetFeature()
> and HidD_GetFeature() but they fail and no event arrive to the driver.
> Also tried the standard call DeviceIoControl() but also this call
> doesn't work. I suspect I must to add some entried into the hid report
> descriptor for "enable" this direct communication but I'm not very
> expert in hid developing and I don't know how to add this feature. For
> the driver I used the standard hid keyboard descriptor as follow:
>
> 0x05, 0x01, // Generic Desktop
> 0x09, 0x06, // Keyboard
> 0xA1, 0x01, // Collection
> 0x05, 0x07,
> 0x19, 0xE0,
> 0x29, 0xE7,
> 0x15, 0x00,
> 0x25, 0x01,
> 0x75, 0x01,
> 0x95, 0x08,
> 0x81, 0x02,
> 0x95, 0x01,
> 0x75, 0x08,
> 0x81, 0x01,
> 0x95, 0x05,
> 0x75, 0x01,
> 0x05, 0x08,
> 0x19, 0x01,
> 0x29, 0x05,
> 0x91, 0x02,
> 0x95, 0x01,
> 0x75, 0x03,
> 0x91, 0x01,
> 0x95, 0x06,
> 0x75, 0x08,
> 0x15, 0x00,
> 0x25, 0x65,
> 0x05, 0x07,
> 0x19, 0x00,
> 0x29, 0x65,
> 0x81, 0x00,
> 0xC0 // End Collection
>
> How can I add the entries for have the function HidD_SetFeature() and
> HidD_GetFeature() working?
> Thank you
>
> --
>
>
> --
>

 
Reply With Quote
 
Max
Guest
Posts: n/a

 
      11-30-2009
Hi,

Thank you for your reply.
I thought to a solition like your suggestion too but I surely made a
mistake in the second HID descriptor data because after the addition
my keyboard driver doesn't work anymore. Plase, can you post an
example about a real generic HID to add to my keyboard HID prevosusly
posted? I need both input and output communication (Get and Set
feature). Thank you very much for your help. :-)

On Mon, 30 Nov 2009 10:38:56 -0800, "Doron Holan [MSFT]"
<> wrote:

>you need to create a 2nd top level collection (which describes a generic HID
>on a custom usage page) in your HID descriptor and use that as a way to talk
>to the miniport. the system opens the keyboard TLC exclusively and does not
>allow you to open the keyboard collection. OR, as an alternative, you could
>write you HID miniport as KMDF driver (see 7600.16385.0\src\hid\hidusbfx2 in
>the win7 wdk for an example) and from that KMDF driver you can enumerate
>your own raw PDO which no longer has to be HID and you can use IOCTLs to
>communicate with the miniport
>
>d

 
Reply With Quote
 
Max
Guest
Posts: n/a

 
      12-01-2009
Please, someone can help me? I tried a lot of different combination but
no one seem to work.... :-(
--

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vista problems with Microsoft ps/2 keyboard inoperative Razzoo2 Windows Vista Hardware 5 07-23-2011 10:18 PM
windows mail will not send messages. error comes up about ports The Counselor Windows Vista Mail 1 10-31-2009 06:34 PM
How do I Backup Windows Mail? Lorraine Windows Vista Performance 26 01-19-2008 10:32 AM
Microsoft keyboard problem under vista Ihar Windows Vista Hardware 1 05-31-2007 07:36 PM
Unable to send custom properties (of appointment item) between poc Manish Agarwal ActiveSync 0 01-30-2007 06:54 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59