Forums - Notification flow control

2 posts / 0 new
Last post
Notification flow control
Join Date: 29 Jul 16
Posts: 25
Posted: Fri, 2017-03-24 03:51

There seems to be a bug in the notification flow control algorithm used in the CSR1010 Glucose sensor sample application. I am copying this app for a different application and found that some notifications were getting lost: if you have more than about 15 notifications to send then two get lost.

The Glucose app algorithm sends the first notification with a call to GattCharValueNotification() and then further notifications each time the corresponding GATT_CHAR_VAL_NOT_CFM event arrives, until GATT_CHAR_VAL_NOT_CFM shows an error (because the CSR1010 buffer is full). From that point on, it turns on LS_RADIO_EVENT_IND events and sends further notifications on each LS_RADIO_EVENT_IND event, until all have been sent. The GATT_CHAR_VAL_NOT_CFM events still occur but are ignored. The idea is presumably that one LS_RADIO_EVENT_IND event will happen each time a notification is transmitted, so there will be room for another in the buffer.  

However this is a mistake, as (for me) two further GATT_CHAR_VAL_NOT_CFM events with error status arrive (and are ignored). The result is that two notifications are not transmitted.

The fix is simple: on the first error turn on LS_RADIO_EVENT_IND events but use each one only as a prompt to attempt a further GattCharValueNotification() call. Monitor every GATT_CHAR_VAL_NOT_CFM event and if it shows an error, note that the notification has to be retried. Retry the next time you get a LS_RADIO_EVENT_IND event.

I would be interested to know if there are other examples of notification flow control?

Regards - Charles

  • Up0
  • Down0
Dr. Nissim Zur
Profile picture
Join Date: 6 Jun 16
Location: Skype: nissim.test CSR1010 External design house
Posts: 235
Posted: Mon, 2017-04-24 06:37

look in all *.h files to see all of them

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.