Searching for SerialPort class alternative

  • Thread starter Thread starter Simon
  • Start date Start date
S

Simon

I have problems with .NET framework SerialPort class. First I had problems
with data received event. Than I have changed form event to thread which
checks for data every 100 my. Now after a while the components stops
receiving characters. I suspect that the problem is in framework and because
to verify this I would like to know if someone could give me me a hint of
alternative class that could be used for serial port communication.

I do need simple class that would support:
- opening and closing serial port
- sending string
- data received event and data read

Best regards

Simon
 
Hello Simon,

The article http://msmvps.com/blogs/coad/archive/2005/03/23/39466.aspx
provides an example of how to use the SerialPort control in .NET.

Apart from the .NET built-in serial communication support library, here are
some alternative classes:

Serial Communications : The .NET Way
http://www.codeproject.com/KB/dotnet/DotNetComPorts.aspx

Use P/Invoke to Develop a .NET Base Class Library for Serial Device
Communications
http://msdn2.microsoft.com/en-us/magazine/cc301786.aspx

Hope it helps.
Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
For MSDN subscribers whose posts are left unanswered, please check this
document: http://blogs.msdn.com/msdnts/pages/postingAlias.aspx

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express/Windows Mail, please make sure
you clear the check box "Tools/Options/Read: Get 300 headers at a time" to
see your reply promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
For Read problem try this setting:

port.Handshake = System.IO.Ports.Handshake.RequestToSend;

Enjoy,
Mark
 
Back
Top