WCF serial Port communication
-
Monday, May 07, 2012 7:48 PM
Hi,
I have a device which communicates with Serial Com port, i want to write a sample application to write and read data to serial port.
if anyone knows how to do this in WCF, please help me.
vinaya kumar
All Replies
-
Monday, May 07, 2012 10:16 PMModerator
Technically, it's possible to do that. You'd need to write a custom transport in WCF which knows how to talk to the serial port. This transport would read / write from / to the port, and convert between the commands to the port (bytes) and WCF messages. But it's really hard to do. I wrote a few WCF transport channels at http://blogs.msdn.com/b/carlosfigueira/archive/2011/12/08/wcf-extensibility-transport-channels-request-channels-part-1.aspx, http://blogs.msdn.com/b/carlosfigueira/archive/2011/12/09/wcf-extensibility-transport-channels-request-channels-part-2.aspx, http://blogs.msdn.com/b/carlosfigueira/archive/2011/12/13/wcf-extensibility-transport-channels-request-channels-part-3.aspx, http://blogs.msdn.com/b/carlosfigueira/archive/2012/01/04/wcf-extensibility-transport-channels-reply-channel.aspx and http://blogs.msdn.com/b/carlosfigueira/archive/2012/01/11/wcf-extensibility-transport-channels-duplex-channels.aspx which you can look at to see if WCF is really the best fit for this problem. In many cases, low-level communication is better done outside of the WCF realm (it can be used, if you really want it).Carlos Figueira
- Marked As Answer by Richey WuModerator Wednesday, May 16, 2012 10:44 AM

