none
Choosing a driver model for a device filter driver RRS feed

  • Question

  • Hi,

    Which driver model choose to write a simple serial port monitor?

    The serial port is a Virtual USB Port

    Which is the best sample project from which start?

    Is it correct to write the filter in Kernel Mode or in User Mode?

    Regards

    Wednesday, November 16, 2016 10:35 AM

Answers

  • the toaster filter is the canonical starting point for a device filter. why do you think it is the wrong choice?

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

    • Marked as answer by Marbro1965 Thursday, November 17, 2016 1:10 PM
    Thursday, November 17, 2016 7:50 AM

All replies

  • Well first can you just use PortMon  https://technet.microsoft.com/en-us/sysinternals/portmon.aspx ?   If not depending on which versions of Windows you want to support, you could use UMDF 2.0 and easily port it to the kernel if there is a need.  You should be able to use  KMDF or UMDF, a lot depends on what you need to  monitor.


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    Wednesday, November 16, 2016 12:43 PM
  • I would like to make the driver. I do not see any source code there.

    Regards

    Wednesday, November 16, 2016 4:27 PM
  • If you want to build your own, you are going to have to write it completely from scratch.  I pointed out portmon incase you just needed a tool to monitor things.


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    Wednesday, November 16, 2016 4:31 PM
  • Strange,

    meanwhile i was browsing the samples provided by Microsoft and found

    https://msdn.microsoft.com/en-us/windows/hardware/drivers/wdf/sample-toaster-driver-programming-tour

    There KMDF Filter driver example says it is a simple pass through filter so i imagined could be a good

    starting point for a filter.

    Eventually i was wrong.

    Thanks 

    Thursday, November 17, 2016 6:12 AM
  • the toaster filter is the canonical starting point for a device filter. why do you think it is the wrong choice?

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

    • Marked as answer by Marbro1965 Thursday, November 17, 2016 1:10 PM
    Thursday, November 17, 2016 7:50 AM
  • Don Burn previously said i have to start completely from scratch.

    So this is not correct.

    Do you confirm that if i want to start a filter for USB serial port i can start from toaster filter?

    Also to me seems the correct choice at least to see how a filter works.

    Regards

     
    Thursday, November 17, 2016 12:45 PM
  • When I said completely from scratch I meant that there was no sample that had any knowledge of serial operations.   Of course there are generic filters, but you have a huge amount of work to do.  Interpreting "completely from scratch" to mean you could not use a simple KMDF filter as a starting point is about like assuming you had to write your own compiler to build the driver.


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    Thursday, November 17, 2016 12:51 PM
  • Sorry,

    i do not speak english very well, so i used Cambridge dictionary to translate the expression "from scratch".

    Thursday, November 17, 2016 1:38 PM