Bug 2075 - System.IO.Ports SerialPort.DataReceived event doesn't work
Summary: System.IO.Ports SerialPort.DataReceived event doesn't work
Alias: None
Product: Class Libraries
Classification: Mono
Component: System ()
Version: 2.10.x
Hardware: PC All
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2011-11-17 00:09 UTC by Sash0k
Modified: 2018-03-13 16:45 UTC (History)
6 users (show)

Is this bug a regression?: ---
Last known good build:

problem code part (1.92 KB, text/plain)
2011-11-17 00:09 UTC, Sash0k
sample project (59.66 KB, application/x-bzip)
2012-03-13 06:11 UTC, Sash0k

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Sash0k 2011-11-17 00:09:33 UTC
Created attachment 900 [details]
problem code part

Hi, community.
I try to port project from .NET to mono, and have a problem:

SerialPort.DataReceived event doesn't handle SerialDataReceivedEventHandler procedure at all. I try mono 2.10.5 Linux, 2.10.6 Windows with same result. But on .NET 4.0 Windows my code works.
Comment 1 Miguel de Icaza [MSFT] 2012-03-12 23:06:07 UTC
Please provide a complete test case.
Comment 2 Sash0k 2012-03-13 06:11:40 UTC
Created attachment 1507 [details]
sample project

sample project, port from .net
uses on Windows to log all received commands from RS-232.
hope, it helps.
Comment 3 Hakan Lindestaf 2015-01-09 03:38:33 UTC
Verified to not work in 3.10 either. It seems that the events aren't even wired up if I read the code right.
Comment 4 kailash 2015-04-12 03:10:29 UTC
As told by sashok the serialport.datarecevied handler does not work in linux ..
"xamarin team " and update to make it work ..

using a thread would temperorality solve the issue but not a full proof ..

please give the updates or patches if anybody knows more on this ..
Comment 5 Marek Safar 2018-03-13 11:07:34 UTC
We have not received the requested information. If you are still experiencing this issue please provide all the requested information and reopen the bug report.

Thank you!
Comment 6 Hakan Lindestaf 2018-03-13 16:45:40 UTC
There is a sample project attached in the comments, doesn't that work?