A driver is no more special than a process in terms of the scheduler. Have you tried cranking down the system timer resolution to 1ms and reducing the extraneous workload on the machine?
From: firstname.lastname@example.org [mailto:email@example.com] On Behalf Of firstname.lastname@example.org
Sent: Tuesday, November 8, 2016 10:20 AM
To: Windows System Software Devs Interest List <email@example.com>
Subject: [ntdev] Virtual Com Port ? Protocol Driver?
I have a puzzle I?ve been trying to solve and I?m thinking that a driver might be the way to go. I work in the industrial automation industry and I have many years of experience developing software on Real Time Operations systems (using C) and user applications on Windows (C, C++ & VB) but I have only ever read about windows driver development. I'm still reading.
The automation industry still uses serial communications a great deal. It?s cheap, scalable and has a large install base. The two serial protocols that are used the most in my work are Modbus RTU and BACNet MSTP (Master Slave Token Passing). There are open source libraries for both of these protocols, but none of them work perfectly in Windows due to the 10ms timer resolution. BACNet MSTP for instance, can require that a device declare the token lost if nothing is detected on the com port for 10ms. Similarly, Modbus RTU determines that a message is done when the com port goes silent for 10ms.
What I?m thinking of is that I could implement the protocols in a driver which sits on top of Virtual com port drivers. From what I have read, and please correct me if I?m wrong, is that scheduling allows for precise control over timed code execution in kernel mode drivers. The goal would be to have the driver handle the link layer for the serial protocols. My questions are as follows:
1) Is this a reasonable idea?
2) Any advice on how to proceed?
I think I need to write a class level filter driver that supports PnP for USB Virtual com ports?
Thanks in advance for any help you can provide.
NTDEV is sponsored by OSR
Visit the list online at: <http://www.osronline.com/showlists.cfm?list=ntdev>
MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at <http://www.osr.com/seminars>
To unsubscribe, visit the List Server section of OSR Online at <http://www.osronline.com/page.cfm?name=ListServer>