I am putting data in a queue whenever I get indication, something like this:
I am putting data in a queue whenever I get indication, something like this:
Hello,
When you use indications, please remember that you need to ACK these in the application layer. That means that you need to call sd_ble_gattc_hv_confirm() on each indication. If not, the peripheral will not be able to send the next indication.
What do you mean by forcefully empty the queue? What queue? Did you create this queue and handler yourself?
If you are not interrested in all the data, but only the latest message, perhaps you should use notifications instead of indications, as these doesn't require application layer acks, but only link layer acks (which is done by the softdevice).
Best regards,
Edvin
Hello,
When you use indications, please remember that you need to ACK these in the application layer. That means that you need to call sd_ble_gattc_hv_confirm() on each indication. If not, the peripheral will not be able to send the next indication.
What do you mean by forcefully empty the queue? What queue? Did you create this queue and handler yourself?
If you are not interrested in all the data, but only the latest message, perhaps you should use notifications instead of indications, as these doesn't require application layer acks, but only link layer acks (which is done by the softdevice).
Best regards,
Edvin