none
You can't really deploy a Windows Sensor, can you? RRS feed

  • Question

  • As some may be aware, I've been working with Long on Geosense , an ip/wifi/other triangulation software-only driver. I tried deploying the driver via DIFx, the method evangelized by Microsoft, to no avail. (DIFx, despite being updated in Windows 7, does not support Sensor driver types -- or anything with a co-installer it appears.) Another developer asked a similar question and got a pretty cheesy answer: "Use devcon".

    With no other options available, we deployed Geosense using devcon.exe and have already felt the pain in doing so. Devcon introduces servicing nightmares, such as not being able to delete the driver package on disk. We could look into using SetupAPI directly but this is extremely low level. DIFx needs updating ASAP.

    Is this scenario being worked on by the DIFx team? How does Microsoft envision we deploy sensors? Is devcon (SetupAPI) seriously our only choice?
    Thursday, March 11, 2010 7:41 PM

Answers

  • Hi Rafael,

    Unfortunately, your understanding is correct. For Windows 7, this is the recommended solution. Please also note that logical sensors are in-memory devices and hence do not persist when Windows restarts. So you will have to author an application/service that runs at startup to instantiate logical sensors.

    Thanks,
    Prasanna

    Friday, March 12, 2010 9:42 PM
    Answerer
  • Hi Rafael,

    The recommended solution is to use the logical sensor framework (http://msdn.microsoft.com/en-us/library/dd318907(v=VS.85).aspx). The page also links to a sample and other documentation that go into more detail.

    If you have any more questions, please let us know.

    Thanks,
    Prasanna
    Thursday, March 11, 2010 8:32 PM
    Answerer
  • Hi Rafael,

    The recommended solution is to use the logical sensor framework (http://msdn.microsoft.com/en-us/library/dd318907(v=VS.85).aspx ). The page also links to a sample and other documentation that go into more detail.

    If you have any more questions, please let us know.

    Thanks,
    Prasanna
    Prasanna,

    Thanks for the response. Your link wasn't very helpful directly... but I did a search for logical sensors and found the tidbit below :

    Installing a Logical Sensor Driver

    If your driver is intended to be used as a logical sensor, do not use devcon.exe . Instead, you need to add the driver information to the Windows driver store.

    When testing, you can use the pnputil command-line tool. For example, if your sensor is named MySensor, you can type:

    pnputil -I -a MySensor.inf.

    To add a logical sensor driver to the driver store programmatically, for example, when deploying the driver, use the DiInstallDriver function.

    I'm happy to hear there's another utility I can use for testing and that an attempt at documenting the deployment scenario has been made. I'm disappointed, however, that DiInstallDriver is recommended for use. It sounds like Microsoft is suggesting that everyone in the world, who writes a sensor, write the same low-level bootstrap code to merely install their sensor. If true, that really sucks.

    Hopefully I missed something. Waiting eagerly to hear your thoughts.

    Friday, March 12, 2010 12:58 AM

All replies

  • Hi Rafael,

    The recommended solution is to use the logical sensor framework (http://msdn.microsoft.com/en-us/library/dd318907(v=VS.85).aspx). The page also links to a sample and other documentation that go into more detail.

    If you have any more questions, please let us know.

    Thanks,
    Prasanna
    Thursday, March 11, 2010 8:32 PM
    Answerer
  • Hi Rafael,

    The recommended solution is to use the logical sensor framework (http://msdn.microsoft.com/en-us/library/dd318907(v=VS.85).aspx ). The page also links to a sample and other documentation that go into more detail.

    If you have any more questions, please let us know.

    Thanks,
    Prasanna
    Prasanna,

    Thanks for the response. Your link wasn't very helpful directly... but I did a search for logical sensors and found the tidbit below :

    Installing a Logical Sensor Driver

    If your driver is intended to be used as a logical sensor, do not use devcon.exe . Instead, you need to add the driver information to the Windows driver store.

    When testing, you can use the pnputil command-line tool. For example, if your sensor is named MySensor, you can type:

    pnputil -I -a MySensor.inf.

    To add a logical sensor driver to the driver store programmatically, for example, when deploying the driver, use the DiInstallDriver function.

    I'm happy to hear there's another utility I can use for testing and that an attempt at documenting the deployment scenario has been made. I'm disappointed, however, that DiInstallDriver is recommended for use. It sounds like Microsoft is suggesting that everyone in the world, who writes a sensor, write the same low-level bootstrap code to merely install their sensor. If true, that really sucks.

    Hopefully I missed something. Waiting eagerly to hear your thoughts.

    Friday, March 12, 2010 12:58 AM
  • Hi Rafael,

    Unfortunately, your understanding is correct. For Windows 7, this is the recommended solution. Please also note that logical sensors are in-memory devices and hence do not persist when Windows restarts. So you will have to author an application/service that runs at startup to instantiate logical sensors.

    Thanks,
    Prasanna

    Friday, March 12, 2010 9:42 PM
    Answerer
  • Hi Rafael,

    Unfortunately, your understanding is correct. For Windows 7, this is the recommended solution. Please also note that logical sensors are in-memory devices and hence do not persist when Windows restarts. So you will have to author an application/service that runs at startup to instantiate logical sensors.

    Thanks,
    Prasanna


    Thanks for getting back to me and for the pointers.
    Saturday, March 13, 2010 4:36 AM
  • When I tried to implement the GPS Sensor in logical-sensor mode, it seemed to me that the documentation was incomplete at that time and with some bugs.

    But what's the problem with devcon ? It's just a collection of dirty setup api stuff but it works and the source is available in the WDK anyway.




    Michael
    Tuesday, March 16, 2010 9:00 PM
  • When I tried to implement the GPS Sensor in logical-sensor mode, it seemed to me that the documentation was incomplete at that time and with some bugs.

    But what's the problem with devcon ? It's just a collection of dirty setup api stuff but it works and the source is available in the WDK anyway.




    Michael
    Would love to read the documentation you found on logical sensors, I couldn't find anything other than simple definitions. devcon, in a compiled state, introduces servicing issues like not being able to wipe the driver package off the system. While that's not a huge issue for me, it bugs me that Microsoft -- in multiple places -- states very clearly not to redistribute devcon.exe... but I do it anyway. It's the only solution to this issue, until we write our own installer.
    Tuesday, March 16, 2010 10:46 PM
  • You mean that the compiled version behaves differently than the version you compile using the sources? I haven't noticed what the compiled devcon.exe does, but I did notice that the driver cannot be deleted (you have to use the device manager). 

    But that's not a big problem.  If they want the driver to stay there, you have no reason to want it off. 

    As for the documentation, it seems that the people that started messing with sensors (i.e. the 5-6 people in this forum) are the actual beta testers. When I described the sensor technologies (and other Win 7 specific stuff) in more developers/users, they said "OK nice; we will use it in 2020".  It's been a few months after Win 7 release and only very few apps  use new technologies in it (ike sensors, Direct2D , Ribbon etc). It 'll take a bit for the users to understand and use this new technology so Microsoft probably wasn't exactly in a hurry to treat all the documentation issues. 





    Michael
    Wednesday, March 17, 2010 6:48 AM