I have been working on an app to read and write data from another BLE device. I don't have any issues going on from the app point of view. Just some of the conceptual doubts I need to clarify. So:
Why do we need the cccd for enabling notification?
Once passing the ENABLE_INDICATION_VALUE, does it enables the notification in the peripheral device?
What is the major difference between ENABLE_INDICATION_VALUE and ENABLE_NOTIFICATION_VALUE while both do the same task that is, sending continuous data to the central device?
The client needs to configure the server if it should enable notifications/indications. Otherwise it won't send anything.
No. The 16-bit descriptor value is a bit field. Currently only two bits are defined: Notification and Indication. You could set both bits and then you should get both a notification and an indication if the server behaves correctly.
A server can send notifications whenever it wants. Possibly even multiple notifications per connection event, which gives high performance. A server can only have one outstanding indication. The client needs to confirm the reception of an indication before the server can send a new one. This gives slow performance compared to notifications. Note that, in my opinion, using indications with Android or iOS as client is kind of useless because the confirmation is sent back by the Bluetooth stack before the app has handled the indication completely. So the confirmation is a "false" confirmation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With