Ok, so I am using the serial library. Version 1.21.
Port is an instance of Serial. PairedMACAddress is a string containing the MAC Address to connect to (e.g. "00:12:06:01:53:65")
I have a sub where I connect to a specific MAC Address:
Private Sub ConnectToPairedDevice
If PairedMACAddress <> "" Then
Log("Connecting to specified device")
Port.Connect(PairedMACAddress) 'Attempt Connection
Else
End If
End Sub
I have another Sub where I want to process the connection state:
Private Sub Port_Connected (Success As Boolean)
Log("Connection attempt:" & Success)
End Sub
The problem is that the Port_Connected Sub is never entered.
What am I doing wrong?