I'm using Microsoft's RS232 class to access serial ports via VB.net (.net 2.0).
It seems to work alright... Monitoring the raw serial data on anotehr computer (using a crossover cable) shows the right stuff coming through. But the three events that the RS232 class seem to trigger never actually happen. Or at least my handlers don't pick them up.
In the class I declare my serial port as follows
Later on I have these handlers:
None of these handlers ever show a message box, even while I monitoring that the information is succesfully being sent across the link.
Any help is appreciated!
It seems to work alright... Monitoring the raw serial data on anotehr computer (using a crossover cable) shows the right stuff coming through. But the three events that the RS232 class seem to trigger never actually happen. Or at least my handlers don't pick them up.
In the class I declare my serial port as follows
VB.NET:
Private WithEvents CommPort As New Rs232()
Later on I have these handlers:
VB.NET:
Private Sub DataReceived(ByVal CommPort As Rs232, ByVal databuffer As Byte()) Handles CommPort.DataReceived
MsgBox("Got data!")
End Sub
Private Sub TxCompleted(ByVal CommPort As Rs232) Handles CommPort.TxCompleted
MsgBox("Transfer completed!")
End Sub
Private Sub CommEventHandler(ByVal source As Rs232, ByVal Mask As Rs232.EventMasks) Handles CommPort.CommEvent
MsgBox("Comm event!")
End Sub
None of these handlers ever show a message box, even while I monitoring that the information is succesfully being sent across the link.
Any help is appreciated!