How to receive a byte array via BLE???
Posted: Fri Jun 21, 2019 7:29 pm
Hello,
I am working on a project in which I want to do some operations over BLE with a gatt client (smart phone). At some point in operation, the ESP can be sent a string from the android app and then the ESP will do some operations using that string. I am wondering if anyone knows a good method to do this task? I am having trouble converting from uint8_t* (which is the type that the gatt write event brings in the characteristic value) to a string variable. I do not want to use Blufi, Arduino, nor Kolban c++ since I want to learn how to do it using esp-idf.
So how can one take a value from BLE characteristic write event and put it into a string variable in order to perform operations?
My code is pretty much the gatt server + gatt security server + service table examples all mashed together.
Any help is appreciated!
I am working on a project in which I want to do some operations over BLE with a gatt client (smart phone). At some point in operation, the ESP can be sent a string from the android app and then the ESP will do some operations using that string. I am wondering if anyone knows a good method to do this task? I am having trouble converting from uint8_t* (which is the type that the gatt write event brings in the characteristic value) to a string variable. I do not want to use Blufi, Arduino, nor Kolban c++ since I want to learn how to do it using esp-idf.
So how can one take a value from BLE characteristic write event and put it into a string variable in order to perform operations?
My code is pretty much the gatt server + gatt security server + service table examples all mashed together.
Any help is appreciated!