[mono-vb] Serial port PinChanged handle (Vb Win to Linux)
fabiobraglin at gmail.com
Fri Jun 20 12:37:48 UTC 2014
I have a simple application in vb that check the SerialPort (previously
choosed) and wait for a Dsr pin change.
This code works in Windows, but not in Ubuntu 14, doesn't shows any error
message, I'm using a Serial-USB adapter, so, I can see that the Serial port
is open because de data LED is blinking, but nothing happens when the
external signal arrive!
* Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
* With SerialPort1*
* If .IsOpen = True Then .Close()*
* .PortName = ComboBox1.SelectedItem*
* .DtrEnable = True*
* .RtsEnable = True*
* End With*
* Timer1.Enabled = True*
* End Sub*
* Private Sub com_PinChanged(sender As Object, e As
System.IO.Ports.SerialPinChangedEventArgs) Handles SerialPort1.PinChanged*
* If IO.Ports.SerialPinChange.DsrChanged Then*
* Panel1.BackColor = Color.YellowGreen*
* End If*
* Catch ex As Exception*
* End Try*
* End Sub*
The Pinchanged handle for mono need to be different in linux?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-vb