none
How to install filter driver over serial port? RRS feed

  • Question

  • Hi, 

    I add some functionality to  WinDDK\7600.16385.1\src\general\toaster\kmdf\filter\generic filter driver sample. I add some IOCTLs to it. 

    Suggest, please, how to install this filter driver over a usual serial port?

    And one more question: I will need to write two filter drivers for serial port for different purposes. So, is it possible to install one filter driver over one specific serial port and another filter driver over another specific serial port or it's no way and on one system can be at the same time installed over serial ports only one filter driver? Why I'm asking: we will use both these filter drivers on the one machine. So, should I concatenate the functionality of both filter drivers into one and install this filter driver over all com ports on the system or I can write separate filter drivers and install each on a different com ports? 

    Thank you in advance. 

    --

    Kind regards,

    Alexey Kisliy 

    Wednesday, October 24, 2012 4:16 PM

Answers

  • if the two filters are installing on devices with different hardware IDs, you can write two filters. if there is no way to distinguish the identity of these devices at install time, you should put the functaionality of both filters in the same driver.

    as for installing it, your INF is almost exactly the same as when you wrote a functional driver. instead of installing the FDO, you use Needs/Include directives in the INF to suck in the relevant portions from msports.inf and then add your driver using the UpperFilters property.


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

    • Marked as answer by Oleksii Kyslyi Thursday, October 25, 2012 9:39 AM
    Wednesday, October 24, 2012 4:25 PM
  • from a risk POV, I would go with the filter driver. maintaining a serial port driver is a big burden

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

    Thursday, October 25, 2012 5:48 PM

All replies

  • if the two filters are installing on devices with different hardware IDs, you can write two filters. if there is no way to distinguish the identity of these devices at install time, you should put the functaionality of both filters in the same driver.

    as for installing it, your INF is almost exactly the same as when you wrote a functional driver. instead of installing the FDO, you use Needs/Include directives in the INF to suck in the relevant portions from msports.inf and then add your driver using the UpperFilters property.


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

    • Marked as answer by Oleksii Kyslyi Thursday, October 25, 2012 9:39 AM
    Wednesday, October 24, 2012 4:25 PM
  • Thank you, Mr. Holan. 

    I install both my filter drivers on usual PC Com ports. Is it possible to distinguish the identity of the usual pc com ports at install time? Or in Windows 7 it is the only one way for my drivers to put the functionality into one filter driver?

    If I will put the functionality into one filter driver will it be possible to install such a driver on a specific com port, not on all? But I think it will not be a problem if we will install this filter driver on every com port on the system, because it has functionality of usual com port driver too, right? 

    --

    Kind regards,

    Alexey Kisliy 

    Wednesday, October 24, 2012 7:47 PM
  • Mr. Holan, what would you answer on my previous questions?

    --

    Kind regards,

    Alexey Kisliy

    Thursday, October 25, 2012 12:05 AM
  • all built in com ports will have the same hardware ID, so you can't distinguish between them in an INF. if your filter is pass through and only adds value when your app sends an ioctl to it, then yes, it shoudld do no harm if it is installed on all built in com ports


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

    Thursday, October 25, 2012 4:04 AM
  • Thank you, Mr. Holan. 

    It's clear now. So, the filter driver will not do the whole job for us and we do not plan to change hardware as well. So, the only way for us now is to concatenate the functionality from two drivers into one and install it on every com port in the system. Will it be the filter driver or replacing of in-box driver with modified COM port driver sample from WinDDK does not matter anymore, I think. 

    Am I right?

    --

    Kind regards,

    Alexey Kisliy 


    Thursday, October 25, 2012 9:36 AM
  • from a risk POV, I would go with the filter driver. maintaining a serial port driver is a big burden

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

    Thursday, October 25, 2012 5:48 PM
  • Mr. Holan, I have found in our old COM port driver some source code we have added into ISR.C into some function - not a lot of code. Is it possible to move this code into filter driver? I have not found place for this code in filter driver sample, found just place for IOCTLs.

    --

    Kind regards,

    Alexey Kisliy

    Thursday, October 25, 2012 8:43 PM
  • you don't get access to the ISR in a filter. what are you doing with your extra code?

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

    Friday, October 26, 2012 6:09 AM
  • you don't get access to the ISR in a filter. what are you doing with your extra code?

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

    Our extra code adds functionality into COM port driver sample that makes able to communicate through modified COM port driver with some external device in Kernel Mode. In one driver our software communicates with COM port driver in Kernel Mode and in another driver we have some external device connected to Com port and our software communicates with this device through modified COM port driver in Kernel mode. That is it.

    What would you say about that?

    --

    Kind regards,

    Alexey Kisliy

    Wednesday, October 31, 2012 5:49 PM
  • Mr. Holan,what would you say about my last post?

    Thank you in advance.

    --

    Kind regards,

    Alexey Kisliy

    Friday, November 2, 2012 8:17 AM
  • I was asking specifically why you need the ISR.  can you do what you need via the serial IOCTLs in the filter? if you need the ISR, you can't be a filter

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

    Friday, November 2, 2012 4:17 PM