Reading ESP32 GATT Characteristic - need help deciphering what the data means
Posted: Fri Jan 07, 2022 7:26 pm
Working with the wifi provisioning example provided by ESP. Am able to successfully send wifi credentials to ESP32 chip over BLE. After successfully writing the credentials to the prov-config (0xFF52) characteristic, I attempt to read what the prov-config (0xFF52) characteristic has recorded. Android app code is as follows:
where '021a9004-0382-4aea-bff4-6b3f1c5adfb4' is the custom service uuid and 021aff52-0382-4aea-bff4-6b3f1c5adfb4 is the prov-config specific characteristic uuid.
A log of the response to the read operation shows the following: 8, 3, 106, 0
What do these numbers mean? Are they in some sort of a DataView format? How can I convert them to something that makes sense? Does the 0 at the end mean that the write operation was successful? What about the credentials that I wrote to the characteristic? Do those get erased from the characteristic after being copied to nvs_flash? If not, how do I know what credentials were written to the characteristic?
Thanks.
Code: Select all
BleClient.read(deviceID, '021a9004-0382-4aea-bff4-6b3f1c5adfb4', '021aff52-0382-4aea-bff4-6b3f1c5adfb4')
A log of the response to the read operation shows the following: 8, 3, 106, 0
What do these numbers mean? Are they in some sort of a DataView format? How can I convert them to something that makes sense? Does the 0 at the end mean that the write operation was successful? What about the credentials that I wrote to the characteristic? Do those get erased from the characteristic after being copied to nvs_flash? If not, how do I know what credentials were written to the characteristic?
Thanks.