SerialPort in mono in linux not responding to DataReceived event
mono does not support Event for serialport.
It is shown on mono's website
.NET SerialPort DataReceived event not firing
I can only surmise that the problem was indeed with the Virtual Serial Port Emulator program. this is NOT to say there is a problem with that software: VSPE has worked very well for me so far. But there was some conflict between my code and how I had set up the VSPE connector.
DataReceived event sometimes doesn't fire
It turned out that it was a hardware problem.
The connection betwen devices looks like this:
Device <> RS-485 <> Converter1 <> LAN <> Converter2 <> RS-232 <> Computer <> virtual COM
Converter1 appears to be malfunctioning, it clusters and holds the data my device sends to it. Now I know what is wrong I can let competent people take care of it :)
Thanks @Matthew Rodatus for your help. Your answer in roundabout way guided me to check what exactly and when exactly is coming to my COM.
In C#, does the DataReceived event handler of the SerialPort class execute on it's own thread?
MSDN says:
The DataReceived event is raised on a secondary thread when data is
received from the SerialPort object. Because this event is raised on a
secondary thread, and not the main thread, attempting to modify some
elements in the main thread, such as UI elements, could raise a
threading exception. If it is necessary to modify elements in the main
Form or Control, post change requests back using Invoke, which will do
the work on the proper thread.
So yes.
SerialPort.DataReceived
Related Topics
"Command Not Found" Piping a Variable to Cut When Output Stored in a Variable
How to Fix Nginx 502: Bad Gateway Error on a Digital Ocean Droplet - Ubuntu 20.04
Sort Entries of Lines Using Shell
Linux Zip and Exclude Dir via Bash/Shell Script
How to Create Shell Variable with Dashes
Why Does This Shell Pipeline Exit
Problems with an Imagej Plugin
How to Overlap and Merge Multiple Audio Files Using Ffmpeg
Replace Bash Variables in Template File
In Bash How to Split a Column in Several Column of Fixed Dimension
Ssh Connection to Ubuntu Open Ssh-Server Requires Login on (Physical) Server via Password First
How to Find Process Using Tcp Port
Can Someone Explain How This "Shellshock" Code Works in Shell
How to Redirect Cout to Console in Linux
How to Run a Cron Job at Every 5 Hour Interval
Linux Perf Record: Difference Between Count (-C) and Frequency (-F) Options
Using Scanf into Global or Local Variables (On the Stack), 32-Bit Calling Convention