Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Serial legacy device KMDF driver

Reply
Thread Tools Display Modes

Serial legacy device KMDF driver

 
 
Matthias
Guest
Posts: n/a

 
      11-17-2009
Hello,

I need to develop a tool which allows for communication with a real-time bus
system over RS-232. The system sends data telegrams in 1 milisecond intervals
which need to be acknowledged by an ACK-telegram before the next data
telegram can be sent. The serial interface adapter does not support PnP
specification.

Currently, as I am new to Windows driver development, I am looking for a
starting point to dig into: either to implement a filter driver on top of
serial.sys or to implement a function driver which will be enumerated by
serenum.sys?

The goal is to provide a transparent and reliable service to the user mode
application which should just be able to communicate with the real-time
system via CreateFile, WriteFile Windows API functions.

Thank you.
Matthias
 
Reply With Quote
 
 
 
 
Doron Holan [MSFT]
Guest
Posts: n/a

 
      11-17-2009
why not just use serial.sys as is? is your device plugging into an existing
COM port or does it have its own connection via PCI or ISA?

--

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


"Matthias" <> wrote in message
news:A03355AD-F097-4728-A639-...
> Hello,
>
> I need to develop a tool which allows for communication with a real-time
> bus
> system over RS-232. The system sends data telegrams in 1 milisecond
> intervals
> which need to be acknowledged by an ACK-telegram before the next data
> telegram can be sent. The serial interface adapter does not support PnP
> specification.
>
> Currently, as I am new to Windows driver development, I am looking for a
> starting point to dig into: either to implement a filter driver on top of
> serial.sys or to implement a function driver which will be enumerated by
> serenum.sys?
>
> The goal is to provide a transparent and reliable service to the user mode
> application which should just be able to communicate with the real-time
> system via CreateFile, WriteFile Windows API functions.
>
> Thank you.
> Matthias


 
Reply With Quote
 
Matthias
Guest
Posts: n/a

 
      11-18-2009
Hello Doron,

yes, the device is connected to an existing COM port. The reason for
implementing a kernel mode driver is the timing issue, as user mode polling
can not guarantee such a fast response time, so, to my understanding, only an
interrupt based approach could be used.

I need to read a telegram from the UART, perform some CRC checking, etc. and
generate and acknowledgement byte and send it out to the UART within a time
frame of 1 milisecond.

So, the question is: Where to place the code for the aforementioned data
reading and ACK sending. I could imagine the following points to hook into:

1. The UART ISR in serial.sys - "dirty hacking" solution which I don't like.
2. Filter driver on top of serial.sys?
3. Function device driver on top of serenum.sys?
4. Any other approach which I don't see yet?

Thanks for your time.

Matthias
"Doron Holan [MSFT]" wrote:

> why not just use serial.sys as is? is your device plugging into an existing
> COM port or does it have its own connection via PCI or ISA?
>
> --
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
> "Matthias" <> wrote in message
> news:A03355AD-F097-4728-A639-...
> > Hello,
> >
> > I need to develop a tool which allows for communication with a real-time
> > bus
> > system over RS-232. The system sends data telegrams in 1 milisecond
> > intervals
> > which need to be acknowledged by an ACK-telegram before the next data
> > telegram can be sent. The serial interface adapter does not support PnP
> > specification.
> >
> > Currently, as I am new to Windows driver development, I am looking for a
> > starting point to dig into: either to implement a filter driver on top of
> > serial.sys or to implement a function driver which will be enumerated by
> > serenum.sys?
> >
> > The goal is to provide a transparent and reliable service to the user mode
> > application which should just be able to communicate with the real-time
> > system via CreateFile, WriteFile Windows API functions.
> >
> > Thank you.
> > Matthias

>
> .
>

 
Reply With Quote
 
Doron Holan [MSFT]
Guest
Posts: n/a

 
      11-20-2009
a filter on top of serial.sys is not going to be any faster than something
in user mode. just because you are running in kernel mode does not mean you
run faster or have higher priority in scheduling. if you have a strict 1 ms
window I would suggest taking the serial driver and compiling your own
version with a different name. that way you can control what the ISR does
and have more control ... BUT, I don't think your device is something that
windows can support even if you do this. Windows is not an RTOS and there
are no guarantees that your ISR will be delivered in a timely manner and you
can easily exceed the 1 ms window in which you need to process the data

d

--

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


"Matthias" <> wrote in message
news:56BB07E2-B98F-4EC3-B734-...
> Hello Doron,
>
> yes, the device is connected to an existing COM port. The reason for
> implementing a kernel mode driver is the timing issue, as user mode
> polling
> can not guarantee such a fast response time, so, to my understanding, only
> an
> interrupt based approach could be used.
>
> I need to read a telegram from the UART, perform some CRC checking, etc.
> and
> generate and acknowledgement byte and send it out to the UART within a
> time
> frame of 1 milisecond.
>
> So, the question is: Where to place the code for the aforementioned data
> reading and ACK sending. I could imagine the following points to hook
> into:
>
> 1. The UART ISR in serial.sys - "dirty hacking" solution which I don't
> like.
> 2. Filter driver on top of serial.sys?
> 3. Function device driver on top of serenum.sys?
> 4. Any other approach which I don't see yet?
>
> Thanks for your time.
>
> Matthias
> "Doron Holan [MSFT]" wrote:
>
>> why not just use serial.sys as is? is your device plugging into an
>> existing
>> COM port or does it have its own connection via PCI or ISA?
>>
>> --
>>
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>>
>> "Matthias" <> wrote in message
>> news:A03355AD-F097-4728-A639-...
>> > Hello,
>> >
>> > I need to develop a tool which allows for communication with a
>> > real-time
>> > bus
>> > system over RS-232. The system sends data telegrams in 1 milisecond
>> > intervals
>> > which need to be acknowledged by an ACK-telegram before the next data
>> > telegram can be sent. The serial interface adapter does not support PnP
>> > specification.
>> >
>> > Currently, as I am new to Windows driver development, I am looking for
>> > a
>> > starting point to dig into: either to implement a filter driver on top
>> > of
>> > serial.sys or to implement a function driver which will be enumerated
>> > by
>> > serenum.sys?
>> >
>> > The goal is to provide a transparent and reliable service to the user
>> > mode
>> > application which should just be able to communicate with the real-time
>> > system via CreateFile, WriteFile Windows API functions.
>> >
>> > Thank you.
>> > Matthias

>>
>> .
>>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Game Compatibility BCurrey Windows Vista Games 6 11-29-2007 09:11 PM
My PnP Monitor is seen as Non PnP??? Colin Windows Vista Hardware 1 11-29-2007 06:01 PM
Going Golfing but not with Vista markbyrn Windows Vista Games 15 03-08-2007 11:59 AM
americas army stuttering under vista premium ernie Windows Vista Games 0 02-27-2007 11:20 PM
problem in dxdiag Peewee64 Windows Vista Games 0 02-14-2007 10:49 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59