Notification congestion control

4 posts / 0 new
Last post
gouzhuang
Offline
Last seen:4 years 10 months ago
加入:2015-04-16 08:10
Notification congestion control

Hi

I have DA14580 board with a sensor that samples at a rate of 25Hz. The data is send to a central device through notification at the same rate. The max connection interval is set to 40ms, and it works pretty well at first. However if the central is moved out of range, the board will soon be reset. I guess this is because the notifications could not be send out so they were queuing up and the messages could not be freed and the heap was exhausted, any ke_malloc() call thereafter would lead to a soft reset.

The question is how could the application know congestion is happening so that it stops pushing new data to the kernel?

Best Regards,
Bill

Device:
MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi gouzhuang,

Hi gouzhuang,

Probably this is the reason of your reset. i suppose that you can prevent the data generation when you get a disconnection event.

Thanks MT_dialog

Joacimwe
Offline
Last seen:1 year 5 months ago
Guru
加入:2014-01-14 06:45
Hi Bill.

Hi Bill.

The key to fix congestion control is to wait for the GATTC_CMP_EVT after sending a notification event. After you've received this, you can send the next notification packet. That way you should never run out of heap memory.

gouzhuang
Offline
Last seen:4 years 10 months ago
加入:2015-04-16 08:10
Thanks Joacimwe, I think this

Thanks Joacimwe, I think this is what I'm looking for.