Managed equivalent to javax.comm package


I recently had this question coming up from one of our customers:


Q. I just used JLCA3.0 to convert a rather large Java communications library, and it went well except that there seems to be no managed equivalent to Java's  javax.comm package.  How would you suggest I go about implementing a replacement for this package in my C# project?


The new SerialPort Class introduced in Visual Studio 2005 (aka Whidbey), supports communication via the serial port like the java.comm package. This class is used to control a serial port file resource. This class provides synchronous and event-driven I/O, access to pin and break states, and access to serial driver properties. To know more about the same you may want to read more here.


As you are using JLCA 3.0, I am not sure if you are working with Visual Studio .NET 2003 or Visual studio 2005. VS 2005 Beta2 comes integrated with the JLCA tool and is now available for download from here.


A sample demonstrating the use of SerialPortClass is available here. Check out the "Serial Support" sample on that page.


Hope this helps you. You may even want to check more about the Serial port support in Whidbey at Brad Abram’s blog’s here.

Skip to main content