Page 1 of 1
BLE Notification/Indication
Posted: Sat May 14, 2022 1:35 pm
by KHOAPHAM
Hi,
My BLE server doesn't support Indication/Notification. How can I get its value of every change.
Please take a look at attached picture.
Thank you for your support.
Re: BLE Notification/Indication
Posted: Sun May 15, 2022 2:24 pm
by rpiloverbd
Hello, actually it's difficult to answer with so less details. Would you please shed more lights on what you want to do? It may bring you more suggestions. Thank you.
Re: BLE Notification/Indication
Posted: Sun May 15, 2022 10:45 pm
by KHOAPHAM
Hi, I want to get data from BLE gamepad. ESP is as client. But characterictics value of gamepad supports read/write without notify. I can not resgiter_for_notify because ESP_GATT_CHAR_PROP_BIT_NOTIFY is set zero. So what is the best way to update its changes.
Re: BLE Notification/Indication
Posted: Mon May 16, 2022 1:31 am
by Alberk
If this is the case, where the Server/Peripheral device does not offer notify/indicate feature, then the only way is to do read.
Re: BLE Notification/Indication
Posted: Mon May 16, 2022 2:24 am
by KHOAPHAM
That means I should use while loop to read it. Is it possible to use GAP interval to update value?
Re: BLE Notification/Indication
Posted: Mon May 16, 2022 3:17 am
by Alberk
I guess that is the most logical way around the problem. You have to ask the developer of the device why they are not providing notification feature. Read loop is only useful for things that you know that comes on a fix periodic intervals.
Re: BLE Notification/Indication
Posted: Mon May 16, 2022 3:55 am
by KHOAPHAM
Thank you for your support. Kind Regards.
Re: BLE Notification/Indication
Posted: Mon May 16, 2022 5:48 pm
by chegewara
Well, in theory it is possible to receive notifications even if server is missing descriptor 2902, but that depends on the server implementation.
On esp32 side, client side, all you have to do is to subscribe for notification without write to that descriptor.