BLE Notification/Indication

KHOAPHAM
Posts: 12
Joined: Wed Jan 19, 2022 3:03 am

BLE Notification/Indication

Postby KHOAPHAM » Sat May 14, 2022 1:35 pm

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.
Attachments
Screenshot 2022-05-14 202807.png
Screenshot 2022-05-14 202807.png (102.72 KiB) Viewed 4735 times

rpiloverbd
Posts: 101
Joined: Tue Mar 22, 2022 5:23 am

Re: BLE Notification/Indication

Postby rpiloverbd » Sun May 15, 2022 2:24 pm

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.

KHOAPHAM
Posts: 12
Joined: Wed Jan 19, 2022 3:03 am

Re: BLE Notification/Indication

Postby KHOAPHAM » Sun May 15, 2022 10:45 pm

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.

Alberk
Posts: 55
Joined: Sat Jun 19, 2021 1:49 am

Re: BLE Notification/Indication

Postby Alberk » Mon May 16, 2022 1:31 am

If this is the case, where the Server/Peripheral device does not offer notify/indicate feature, then the only way is to do read.

KHOAPHAM
Posts: 12
Joined: Wed Jan 19, 2022 3:03 am

Re: BLE Notification/Indication

Postby KHOAPHAM » Mon May 16, 2022 2:24 am

That means I should use while loop to read it. Is it possible to use GAP interval to update value?

Alberk
Posts: 55
Joined: Sat Jun 19, 2021 1:49 am

Re: BLE Notification/Indication

Postby Alberk » Mon May 16, 2022 3:17 am

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.

KHOAPHAM
Posts: 12
Joined: Wed Jan 19, 2022 3:03 am

Re: BLE Notification/Indication

Postby KHOAPHAM » Mon May 16, 2022 3:55 am

Thank you for your support. Kind Regards.

chegewara
Posts: 2364
Joined: Wed Jun 14, 2017 9:00 pm

Re: BLE Notification/Indication

Postby chegewara » Mon May 16, 2022 5:48 pm

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.

Who is online

Users browsing this forum: MicroController and 68 guests