This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Notification/Indication Difference

Concerning this:

/** @defgroup BLE_GATT_HVX_TYPES GATT Handle Value operations
 * @{ */
#define BLE_GATT_HVX_INVALID               0x00  /**< Invalid Operation. */
#define BLE_GATT_HVX_NOTIFICATION          0x01  /**< Handle Value Notification. */
#define BLE_GATT_HVX_INDICATION            0x02  /**< Handle Value Indication. */
/** @} */

What is the difference in a notification and indication?

Parents
  • They are basically the same thing, just with a small twist to it.

    On each Indication, you must then do a application level ACK to say that this is the data I need. Basically like this: "here you have a packet. Is this something you want to acknowledge?"

    On each notification, you only get an event saying "you have received a packet, here it is"

    Indications are slower as you only can send one indication per connection interval (your application ACK will be sent on the next connection interval).

    Notifications are preferred if you need a higher transfer rate. Using notifications, you are allowed to queue a certain number of packets before sending, and once the buffer is full, you get a NO_TX_BUFFERS error back from sd_ble_gatts_hvx(). When a packet has been sent over the link layer, you'll get a BLE_EVT_TX_COMPLETE event, at which point you can queue further packets.

    BR Håkon

  • Could you provide an example of how to capture the NO_TX_BUFFERS error and also how to capture the BLE_EVT_TX_COMPLETE event in arduino? (I am using the arduino 101 with integrated ble)

Reply Children
No Data
Related