From what I've heard it should be possible to run a visual studio compiled C# file on linux by using C# mono. I installed it using apt-get install mono-complete so everything should be included
I do however get some Unhandled Exception errors I do not understand myself and I hope that someone might be able to help me out. I should note that everything works as intended on a windows machine and that I have compensated ports and so on so it should fit linux instead.
My setup looks like :
_serialPort = new SerialPort();
_serialPort.PortName = SetPortName(_serialPort.PortName);
_serialPort.BaudRate = 115200;
_serialPort.StopBits = StopBits.One;
_serialPort.Parity = Parity.None;
_serialPort.DataBits = 8;
_serialPort.Handshake = 0;
_serialPort.ReadTimeout = 500;
_serialPort.WriteTimeout = 500;
_serialPort.Open();
and the errors I get are :
System.IO.IOException: Invalid argument
at System.IO.Ports.SerialPortStream.ThrowIOException () [0x00000] in <filename unknown>:0
at System.IO.Ports.SerialPortStream.SetSignal (SerialSignal signal, Boolean value) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.IO.Ports.SerialPortStream:SetSignal (System.IO.Ports.SerialSignal,bool)
at System.IO.Ports.SerialPortStream..ctor (System.String portName, Int32 baudRate, Int32 dataBits, Parity parity, StopBits stopBits, Boolean dtrEnable, Boolean rtsEnable, Handshake handshake, Int32 readTimeout, Int32 writeTimeout, Int32 readBufferSize, Int32 writeBufferSize) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.IO.Ports.SerialPortStream:.ctor (string,int,int,System.IO.Ports.Parity,System.IO.Ports.StopBits,bool,bool,System.IO.Ports.Handshake,int,int,int,int)
at System.IO.Ports.SerialPort.Open () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.IO.Ports.SerialPort:Open ()
at TivaCOM.setup () [0x00000] in <filename unknown>:0
at TivaCOM.Main () [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.IOException: Invalid argument
at System.IO.Ports.SerialPortStream.ThrowIOException () [0x00000] in <filename unknown>:0
at System.IO.Ports.SerialPortStream.SetSignal (SerialSignal signal, Boolean value) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.IO.Ports.SerialPortStream:SetSignal (System.IO.Ports.SerialSignal,bool)
at System.IO.Ports.SerialPortStream..ctor (System.String portName, Int32 baudRate, Int32 dataBits, Parity parity, StopBits stopBits, Boolean dtrEnable, Boolean rtsEnable, Handshake handshake, Int32 readTimeout, Int32 writeTimeout, Int32 readBufferSize, Int32 writeBufferSize) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.IO.Ports.SerialPortStream:.ctor (string,int,int,System.IO.Ports.Parity,System.IO.Ports.StopBits,bool,bool,System.IO.Ports.Handshake,int,int,int,int)
at System.IO.Ports.SerialPort.Open () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.IO.Ports.SerialPort:Open ()
at TivaCOM.setup () [0x00000] in <filename unknown>:0
at TivaCOM.Main () [0x00000] in <filename unknown>:0
If someone could help me out I would be very grateful