How to call ESP_GATTC_NOTIFY_EVT in "spp_client_demo" example
Posted: Tue Nov 26, 2019 10:22 am
OS- Windows (Developemnt in msys32)
IDF- v3.3-beta1-136-g97eecfa1b
I am working on BLE to send and recieve data. I used "BLE_SPP_CLIENT" example for this. I connected this to a BLE 5.0 device which is HC-42 and also edited the "ESP_GATT_SPP_SERVICE_UUID" with its service UUID. I have written a program in HC-42 based system in which it can receive any input through BLE (of ESP32) and then transmit data accordingly to ESP32 via BLE.
Now I am able to connect with BLE (HC-42) by edited "static const char device_name[] = "HC-42";" this and then also able to write character to HC-42 from ESP32. But I am unable to recieve any data from HC-42 system to ESP32. For confirmation I used android BLE scanner app to send and get data from HC-42 system which is working fine.
Do I need to add NOTIFY_CHAR UUID of HC-42 for incoming data. As I sew and tried the code of "gattc_demo.c" of "gatt_client" example. In this I am able to recieve the data but not able to write it, just vice versa of previous. Please let me know how can I read or recive data in BLE_SPP_CLIENT or write data in gattc_demo.c example. Both the example with little changes are attached below.
IDF- v3.3-beta1-136-g97eecfa1b
I am working on BLE to send and recieve data. I used "BLE_SPP_CLIENT" example for this. I connected this to a BLE 5.0 device which is HC-42 and also edited the "ESP_GATT_SPP_SERVICE_UUID" with its service UUID. I have written a program in HC-42 based system in which it can receive any input through BLE (of ESP32) and then transmit data accordingly to ESP32 via BLE.
Now I am able to connect with BLE (HC-42) by edited "static const char device_name[] = "HC-42";" this and then also able to write character to HC-42 from ESP32. But I am unable to recieve any data from HC-42 system to ESP32. For confirmation I used android BLE scanner app to send and get data from HC-42 system which is working fine.
Do I need to add NOTIFY_CHAR UUID of HC-42 for incoming data. As I sew and tried the code of "gattc_demo.c" of "gatt_client" example. In this I am able to recieve the data but not able to write it, just vice versa of previous. Please let me know how can I read or recive data in BLE_SPP_CLIENT or write data in gattc_demo.c example. Both the example with little changes are attached below.