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

how can I clear pending indication

in the answer of this question it said that :

You are also not allowed to send a new indication until the previous one is confirmed. This is signaled by the reception of a BLE_GATTS_EVT_HVC (handle value confirmation) event.

how about when I disable indication on phone side when peripheral send indication? the indication wont be confirmed. how can I set previous one manually to be confirmed, so that I can ignore it and send new indication. note that i need to use indication instead of notifications.

or is there any indication timeout event triggered????

Parents
  • FormerMember
    0 FormerMember

    As also commented in this question, it is not possible to transmit indications (or notifications) when it is disabled.

    Indications (and notifications) are enabled/disabled by writing to its CCCD. It is up to the application to keep track of that. In the example ble_app_uart, the struct ble_nus_t has the member "is_notification_enabled", it keeps track of if notification is enabled or not.

    Note that the only difference between indications and notifications is that when using indications the client has to confirm the reception from the application layer, before a the server can transmit a new indication. When using notification, the packets are ACKed in the link layer, so there should not be any data loss. I would recommend you to take a look at this post, it also discusses notifications vs indications.

Reply
  • FormerMember
    0 FormerMember

    As also commented in this question, it is not possible to transmit indications (or notifications) when it is disabled.

    Indications (and notifications) are enabled/disabled by writing to its CCCD. It is up to the application to keep track of that. In the example ble_app_uart, the struct ble_nus_t has the member "is_notification_enabled", it keeps track of if notification is enabled or not.

    Note that the only difference between indications and notifications is that when using indications the client has to confirm the reception from the application layer, before a the server can transmit a new indication. When using notification, the packets are ACKed in the link layer, so there should not be any data loss. I would recommend you to take a look at this post, it also discusses notifications vs indications.

Children
No Data
Related