Stream Interface driver on Windows 7

Hi,

I am basically very new to Windows driver development.

I have a requirement to repackage/reformat data reading from and writing
toserial port as per a well defined protocol.

I need to implement it on windows embedded standard 7(WES7).

I come to know Stream interface driver could be a good option for that. Is
that is being supported in WES7 / Windows 7.
I am just looking for a reference code to implement it on any serial
device.I have already installed latest WDK but dint able to locate a sample
code for any reference stream interface driver.

Also is their any other option to implement it.

I appreciate any help.

Regards,
Ashish

I’m not sure what you mean by ‘stream interface driver.’ Could you provide
a link to the page in the wdk docs that describes these?

mm

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ashish pareek
Sent: Sunday, February 13, 2011 1:42 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Stream Interface driver on Windows 7

Hi,

I am basically very new to Windows driver development.

I have a requirement to repackage/reformat data reading from and writing
toserial port as per a well defined protocol.

I need to implement it on windows embedded standard 7(WES7).

I come to know Stream interface driver could be a good option for that. Is
that is being supported in WES7 / Windows 7.

I am just looking for a reference code to implement it on any serial
device.I have already installed latest WDK but dint able to locate a sample
code for any reference stream interface driver.

Also is their any other option to implement it.

I appreciate any help.

Regards,

Ashish

— NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and
other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the
List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Does your project involve specialized hardware install in the Windows system
or are you using standard serial ports?

Put more bluntly, why do you think you need to write a driver at all?

You might describe in a bit more ?high level detail? exactly what you are
trying accomplish. Writing a serial protocol on Windows does not require
implementing that serial protocol in a driver unless the services ?exposed?
by the system need to look like a device of a different sort to the OS.
For example, the RAS drivers (NDISWAN, ASYNCMAC) conspire to make one
believe a serial port is a network link but that is all kernel mode because
the network stack can only interface to kernel mode ?adapters?.

Pretty much every other scheme running over a serial port (industrial
control, etc.) has the bulk of the code running in usermode and thus it
often makes more sense to run the serial protocol in usermode and avoid the
headaches of drivers all together.

Good Luck,
Dave Cattley

>I come to know Stream interface driver

If you’re speaking on UNIX SysV STREAMS, then the support for this subsystem in Windows was dropped in around NT4 or such.

“Stream interface” driver in Windows usually means streaming multimedia - like the old stream.sys (SCSIPORT-like wrapper for KS devices), or the modern avstream.sys.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

Thanks all,

Implementing serial protocol as driver is required because i understand that a real serial port cant be shared among different applications. This is the major cause i was looking to shift this protocol in form of a driver over serial device.

Serialization of data is a less than required option in my case as it brings less efficiency when implemented by applications.

Is my understanding is correct? Is their any better option to implement it in Windows 7?

Thanks,
Ashish

xxxxx@gmail.com wrote:

Thanks all,

Implementing serial protocol as driver is required because i
understand that a real serial port cant be shared among different
applications. This is the major cause i was looking to shift this
protocol in form of a driver over serial device.

Is my understanding is correct? Is their any better option to
implement it in Windows 7?

As a user mode service. The user mode service opens the serial port
sends and receives all data. You can then use either TCP sockets or
another windows IPC mechanism so the the client applications can send
and receive data via the service.

Mike

Mike Pumford, Senior Software Engineer
MPC Data Limited
e-mail: xxxxx@mpc-data.co.uk web: www.mpc-data.co.uk
tel: +44 (0) 1225 710600 fax: +44 (0) 1225 710601
ddi: +44 (0) 1225 710635

MPC Data Limited is a company registered in England and Wales with
company number 05507446
Registered Address: County Gate, County Way, Trowbridge, Wiltshire,
BA14 7FJ
VAT no: 850625238

The information in this email and in the attached documents is
confidential and may be legally privileged. Any unauthorized review,
copying, disclosure or distribution is prohibited and may be unlawful.
It is intended solely for the addressee. Access to this email by anyone
else is unauthorized. If you are not the intended recipient, please
contact the sender by reply email and destroy all copies of the original
message. When addressed to our clients any opinions or advice contained
in this email is subject to the terms and conditions expressed in the
governing contract.

> sends and receives all data. You can then use either TCP sockets or

another windows IPC mechanism so the the client applications can send
and receive data via the service.

Please not TCP sockets, or the product will fail miserably on some Windows Firewall settings.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

But TCP sockets are exactly the analog for a serial connection over a
network. In this case the network might be localhost, LAN, or WAN, but the
end user will have that flexibility.

The MS solution to the windows firewall problem is to add / enable rules in
the installer. Watch what installing IIS on your machine does to your
firewall settings! I don’t know off hand if they use an API call or just a
power shell / WMI script

“Maxim S. Shatskih” wrote in message news:xxxxx@ntdev…

sends and receives all data. You can then use either TCP sockets or
another windows IPC mechanism so the the client applications can send
and receive data via the service.

Please not TCP sockets, or the product will fail miserably on some Windows
Firewall settings.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com