Jump-start your project by learning from devs who
write Windows drivers and file systems every day.
Take an OSR seminar!

OSR is Hiring! Click here to find out more.

Windows Internals & Software Drivers Lab, Santa Clara, CA 5-9 August, 2013
Kernel Debugging & Crash Analysis for Windows Lab, Santa Clara, CA 9-13 September, 2013
Upcoming OSR Seminars:
Writing WDF Drivers for Windows Lab, Boston, MA 7-11 October, 2013
Developing File Systems for Windows, Seattle, WA 5-8 November, 2013


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 8  
14 Aug 12 14:49
ntdev member 132929
xxxxxx@grayhill.com
Join Date:
Posts To This List: 19
A question about HID

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 --
  Message 2 of 8  
15 Aug 12 18:31
dan
xxxxxx@gmail.com
Join Date: 12 Aug 2010
Posts To This List: 103
Re: A question about HID

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, <xxxxx@grayhill.com> 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 ? <...excess quoted lines suppressed...> --
  Message 3 of 8  
16 Aug 12 15:14
ntdev member 132929
xxxxxx@grayhill.com
Join Date:
Posts To This List: 19
Re: A question about HID

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 <xxxxx@gmail.com> 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, <xxxxx@grayhill.com> 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 --
  Message 4 of 8  
19 Aug 12 18:27
dan
xxxxxx@gmail.com
Join Date: 12 Aug 2010
Posts To This List: 103
Re: A question about HID

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, <xxxxx@grayhill.com> 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 <...excess quoted lines suppressed...> --
  Message 5 of 8  
21 Aug 12 13:09
ntdev member 132929
xxxxxx@grayhill.com
Join Date:
Posts To This List: 19
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 <xxxxx@gmail.com> To: "Windows System Software Devs Interest List" <xxxxx@lists.osr.com> 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, <xxxxx@grayhill.com> 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 <xxxxx@gmail.com> 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, <xxxxx@grayhill.com> 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 --
  Message 6 of 8  
27 Aug 12 12:42
ntdev member 132929
xxxxxx@grayhill.com
Join Date:
Posts To This List: 19
Re: A question about HID

Hi Daniel, Let's forget the device identifier. Since our driver supports XP, vista and windows 7, so the default input mode would be mouse. When the driver is running on Windows 7, it uses m-touch input mode by default. The problem is our driver never get IOCTL_HID_SET_FEATURE to change the default mode from mouse to m-touch. The top level collection for the feature report in report descriptor copied from microsoft white paper( http://msdn.microsoft.com/en-us/library/windows/hardware/ff553739(v=vs.85).aspx ). I can send HidD_GetFeature and HidD_SetFeature from a test application. Both calls are down to the driver and returned without error. So the question is who should change the default setting for input mode, system or application? Another interesting thing is even you set the input mode to mouse( 0 ) from application, the system would not changed. It still collects the m-touch data. Thanks for help. Bob Bao From: Daniel Newton <xxxxx@gmail.com> To: "Windows System Software Devs Interest List" <xxxxx@lists.osr.com> 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, <xxxxx@grayhill.com> 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 <xxxxx@gmail.com> 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, <xxxxx@grayhill.com> 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 --
  Message 7 of 8  
29 Aug 12 22:35
dan
xxxxxx@gmail.com
Join Date: 12 Aug 2010
Posts To This List: 103
Re: A question about HID

I am not sure why win7 is not setting your feature report. You could do a run time check of OS version and set the default mode from that but ideally you would use the feature report. On Tue, Aug 28, 2012 at 4:41 AM, <xxxxx@grayhill.com> wrote: > Hi Daniel, > > Let's forget the device identifier. > > Since our driver supports XP, vista and windows 7, so the default input > mode would be mouse. When the driver is running on Windows 7, it uses > m-touch input mode by default. The problem is our driver never get > IOCTL_HID_SET_FEATURE to change the default mode from mouse to m-touch. > The top level collection for the feature report in report descriptor > copied from microsoft white paper( <...excess quoted lines suppressed...> --
  Message 8 of 8  
01 Sep 12 02:05
wenbing ma
xxxxxx@yahoo.cn
Join Date: 29 Aug 2012
Posts To This List: 4
RE: A question about HID

Hello Bob, Did you solve the problem? if yes, could you share your idea? I have same question as you. I want to use multi-touch in WIN7 and mouse for XP. Wenbing
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 08:48.


Copyright ©2012, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license