'Declarations
Dim BTAdminReader As BluetoothAdmin
Dim BTSerialReader As Serial
Dim AStreamReader As AsyncStreams
Dim BlueMacReader As String
Dim BluePortReader As Int
'Connection
BTSerialReader.ConnectInsecure(BTAdminReader,BlueMacReader,BluePortReader)
'Connect, Connect2 and Connect3 doesn't work
Sub BTSerialReader_Connected (Success As Boolean)
If Success = True Then 'Succes is correctly True
AStreamReader.Initialize(BTSerialReader.InputStream,Null,"BluetoothAStreamReader")
End if
End Sub
Sub BluetoothAStreamReader_NewData (Buffer() As Byte)
Dim bConv As ByteConverter
Dim BluetoothReaderResponse As String
BluetoothReaderResponse = bConv.StringFromBytes(Buffer,"UTF8")
Log(BluetoothReaderResponse) '(***)
End Sub
'This is the result of (***)
099000
0001100200150092015091520150915001001151511192382
OR
09900000
01100200150092015091520150915001001151511192382