|
Re: A question about HID
Hi Daniel,
Thanks for your help.
First I checked all IOCTL handles return status. They are all 0
The system called . get_device_descript, get_device_attribute, and
get_report_descritor. Then it send two read_data requests. After that,
system called 3-4 times get_feature with REPORT_ID equals
REPORTID_MAX_TOUCH and two times get_string calls.
My report descriptor have three top level collections. One for
multi-touch, one for mouse, one for Feature configure.
0x05, 0x0d, // USAGE_PAGE (Digitizers)
0x09, 0x04, // USAGE (Touch Screen)
0xa1, 0x01, // COLLECTION (Application)
0x85, REPORTID_MTOUCH, // REPORT_ID (Touch)
......
0xc0, // END_COLLECTION
0x09, 0x0E, // USAGE (Configuration)
0xa1, 0x01, // COLLECTION (Application)
0x85, REPORTID_FEATURE, // REPORT_ID (Feature) 6
0x09, 0x23, // USAGE (Device Settings)
0xa1, 0x02, // COLLECTION (logical)
0x09, 0x52, // USAGE (Input Mode)
0x09, 0x53, // USAGE (Device Index
0x09, 0x52, // USAGE (Input Mode)
0x09, 0x53, // USAGE (Device Index
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x0a, // LOGICAL_MAXIMUM (10)
0x75, 0x08, // REPORT_SIZE (8)
0x95, 0x02, // REPORT_COUNT (4)
0xb1, 0x02, // FEATURE (Data,Var,Abs)
0xc0, // END_COLLECTION
0xc0, // END_COLLECTION
0x05, 0x01, // USAGE_PAGE (Generic Desktop) 0
0x09, 0x02, // USAGE (Mouse) 2
0xa1, 0x01, // COLLECTION (Application) 4
0x85, REPORTID_MOUSE, // REPORT_ID (Mouse) 6
. . . . . . .
0xc0, // END_COLLECTION
I never get GET_FEATURE call with report Id equals REPORTID_FEATURE.
Since I tested the driver on a windows 7 system. The multi-touch is works
fine. I tried to make multi-touch and mouth work simultaneously.
Thank you very much.
Bob Bao
From: Daniel Newton
To: "Windows System Software Devs Interest List"
Date: 08/19/2012 05:27 PM
Subject: Re: [ntdev] A question about HID
Sent by: xxxxx@lists.osr.com
Do you have "multiple digitizer top-level collections of the same kind"?
If not then no not bother with device identifier.
Log all of your IOCTL handlers and check if you return an error status. If
this happens the OS will generally try a couple of times and then give up.
If that is not happening double check your input mode feature report is
correct according to the whitepaper.
Also what does your input mode feature default to? You may want to default
it to mouse as XP and Vista are not aware of the input mode feature report
but Win7 does and will change it to multitouch.
On Fri, Aug 17, 2012 at 7:14 AM, wrote:
Hi Daniel,
Thank you very much for your reply.
I read the white paper again. I am still not clear. There is a paragraph
related this topic in the paper.
"Device identifier
This is a static value (SV) when it is part of a digitizer or mouse
top-level collection. It is required if multiple digitizer top-level
collections of the same kind in a report descriptor exist. This usage
uniquely identifies the digitizer top-level collection and should appear
in a feature report. If the device can function as a mouse, the mouse
collection should have the same device identifier as the corresponding
digitizer collection. Devices with only one digitizer top-level collection
do not require a device identifier usage." So, if mouse collection and
digitizer collection have same device identifier, Windows can collect both
data simultaneously. Am I right?
Another problem is suppose Windows should call IOCTL_HID_GET_FEATURE to
get input mode or IOCTL_HID_SET_FEATURE to set input mode at initial
time. From my debug print, I only saw three IOCTL_HID_GET_FEATURE
requests with ReportId equal REPORT_MAX_COUNT. The Windows never query
the input mode feature or set feature even though I used copied Report
Descriptor from sample code EloMT. I don't know why . Any comments or
suggestion?
Thanks again.
Bob Bao
From: Daniel Newton
To: "Windows System Software Devs Interest List" <
xxxxx@lists.osr.com>
Date: 08/15/2012 05:31 PM
Subject: Re: [ntdev] A question about HID
Sent by: xxxxx@lists.osr.com
Check the whitepaper (
http://msdn.microsoft.com/en-us/library/windows/hardware/gg487437.aspx)
but there is a feature report for device mode, Windows will use this to
determine whether it is going to try reading multitouch or mouse reports
On Wed, Aug 15, 2012 at 6:49 AM, wrote:
Hi,
I am testing a KMDF driver for out HID device which support multi-touch
and mouse. I used the report descriptor similar to the sample code in
Elomt in DDK. I can get all gesture events from Windows. Everything works
fine except one problem. I could not make the mouse report work at same
time. ( The mouse not move although I report the mouse data). I could
make mouse report work only if I comment the multi-touch usage in the
report descriptor. My question is if the Windows can collect both
multi-touch and mouse data simultaneously ?
I searched this List . I saw one of Doron's reply a post on 9/29/2011."
Are you saying that you report your standard mouse data and touch data in
the same top level hid collection under same usage page ? If so, your
filter should split the data into 2 top level collections, one for mouse,
one for touch. Windows will then open the touch collection and generate
wm_gestur etc". I wonder if someone here can explain it more detail.
Specially how I change my report descriptor. The usage page for multi
touch is Digitizers and the usage page for mouse is Generic Desktop. How
to put two collections under same usage page?
Thanks very much.
Bob Bao --- NTDEV is sponsored by OSR For our schedule of WDF, WDM,
debugging and other seminars visit: http://www.osr.com/seminars To
unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
--- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and
other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
--- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and
other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
--- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and
other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
--
|