nszmnsky

Member since: Wednesday, 11 October 2017
Last login:
Profile viewed: 200 views

No Rank
Points: 0

nszmnsky created a new topic ' Lost Topic - BLE notifications corrupted data' in the forum. 4 days ago

I had posted about BLE characteristic returning extra bytes
When parsing characteristic value, there are 3 bogus bytes every so often within the data.
Received in Delphi then using GetValueAsInt8 converted to hex string
010000010100FFFFFF8002000000FFFFFFC0FFFFFF8E00000000000000
020000010200037F000000FFFFFF8022000000FFFFFF80510100
What see using BLE tool nRF Connect
0100000101008002000000C08E00000000000000
020000010200037F000000802200000080510100
(Original link community.embarcadero.com/answers/my-que...tions-corrupted-data )
which seems to have disappeared. I recently revisited the issue and found that it was actually with IntToHex
HexStr := HexStr + inttohex(ACharacteristic.GetValueAsInt8(I),2);
was returning 8 characters not the 2 requested. But only for bytes with msb set, i,e, negative int8 values. Using GetValueAsUint8 eliminated the issue.

Read More...