none
Sensor Input with a Driver? RRS feed

  • Question

  • Hello,

    Is there a way to input sensor data directly into the Windows Sensor platform without going through a driver?

    I have a device that connects to my system through USB and exposes a set of APIs that provides location data. This device provides several different facilities (other then sensor-based data) so the driver it comes with is factored for multiple uses and it does not expose itself as a sensor, thus Windows 7 doesn't see it as a sensor. I have the ability, with managed code to use the APIs and extract the location data (GPS coordinates) to provide to Windows 7 but I wasn't sure if I can use my application to tell Windows 7 directly where I am at. I am not a driver developer so I cannot really develop a custom driver for this purpose. I was hoping that Windows 7 sensor platform would just accept data, even if it doesn't come from a device driver.

    Is this possible?
    Owner, Quilnet Solutions
    Thursday, December 3, 2009 9:37 PM

Answers

All replies

  • Hello,

    Unfortunately, this is not possible, you do need a driver. However, the driver can be written in user mode and can be layered on top of your existing driver so you will not have to modify your existing driver for this purpose. If you are interested in such an approach, please take a look at http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=SensorsAndLocation&DownloadId=5856. That includes the sources for a sample sensor driver that is layered on top of a HID device which provides the raw data.

    Thanks,
    Prasanna

    • Marked as answer by Quilnux Thursday, December 3, 2009 11:03 PM
    Thursday, December 3, 2009 10:20 PM
    Answerer
  • Hello,

    Unfortunately, this is not possible, you do need a driver. However, the driver can be written in user mode and can be layered on top of your existing driver so you will not have to modify your existing driver for this purpose.


    Unfortunately the driver itself does not expose the coordinates. It uses an API framework in order to provide data from the device itself. There is not a way to receive the data from the driver itself, not even in a RAW form because the driver exposes all the information as a single data BLOB (which contains more then just the location data). The BLOB gets parsed by the API framework and the framework then takes the data and exposes each part into the API sets that can be called from other programs. I would have to re-write the driver itself to exclude the framework. On top of that, I don't know how to develop a driver because my development knowledge is limited to managed code.

    Thanks for the reply.
    Owner, Quilnet Solutions
    • Edited by Quilnux Thursday, December 3, 2009 11:04 PM corrected a grammar issue
    Thursday, December 3, 2009 11:03 PM
  • The bad news is that you have to implement a driver no matter what.
    The good news is that the same API that you are using from managed code could be used from the UMDF driver you have to create.

    So, give it a try.


    Michael
    Sunday, December 6, 2009 11:15 AM