Android Question BLE2 WriteData

Steve-h

Member
I am using :-
B4X:
manager.WriteData(serveuuid,txuuid,n.GetBytes("utf8"))

Where
serveruuid is the remote ble service
txuuid is the remote ble characteristic
n is a string containing hex value from 0000 to FFFF

What I receive at the other end is 3030 to 6666. Why is that and How can I correctly send the hex value stored in n
 

Steve-h

Member
Cracked this one as well after getting close to giving up
B4X:
 Dim n As String ="ffff"
 Dim send()As Byte=bc.HexToBytes(n)
 manager.WriteData(serveuuid,txuuid,send)
 
Upvote 0
Top