CYBT-353027 - Maximum number of buffer pools for BT

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ChCl_3198336
Level 1
Level 1
First like given

Hi folks,

first post on the forum, little intro on the setup :

Running modified version of SPP example (snip/bt/spp) on WICED-Studio-6.4 with cybt-353027, SPI communication is acheive with third party sensor. I would like to increase the amount of buffer pool to "buffer" data when connexion is weak or the device get out of range. I have modified the # of Large buffer to 75.

    { 360,      40,         }, /* Medium Buffer Pool (used for HCI & RFCOMM control messages, min recommended size is 360) */

    { 1056,     75,         }, /* Large Buffer Pool  (used for HCI ACL messages) */

Altough, when connexion is weak/lost, GKI_poolfreecount(SPP_BUFFER_POOL) return a minimum of 64 free buffer and never get lower then that. Dataloss occurs when the # of buffer reach 64. I have tried with multiple value and same behavior occurs. 50 pools get a min at 42.

I prefer not to post the code because of NDA.

I was wondering if there is any internal limitation on the amount of buffer ?

Thank you,


Christophe

0 Likes
1 Solution
AnjanaM_61
Moderator
Moderator
Moderator
10 questions asked 5 comments on KBA First comment on KBA

Hi Christophe,

This depends on the available free RAM as well as buffer usage.

You can use the wiced_bt_get_buffer_usage api to get the buffer utilization of the stack buffer pools. Please refer to WICED-Application-Buffer-Pools.pdf doc available in WICED SDK ( /20706-A2_Bluetooth/doc/WICED-Application-Buffer-Pools.pdf )

To get the available free RAM bytes at run-time, use the wiced_memory_get_free_bytes ( /20706-A2_Bluetooth/include/wiced_memory.h ) api

Thanks,

Anjana

View solution in original post

1 Reply
AnjanaM_61
Moderator
Moderator
Moderator
10 questions asked 5 comments on KBA First comment on KBA

Hi Christophe,

This depends on the available free RAM as well as buffer usage.

You can use the wiced_bt_get_buffer_usage api to get the buffer utilization of the stack buffer pools. Please refer to WICED-Application-Buffer-Pools.pdf doc available in WICED SDK ( /20706-A2_Bluetooth/doc/WICED-Application-Buffer-Pools.pdf )

To get the available free RAM bytes at run-time, use the wiced_memory_get_free_bytes ( /20706-A2_Bluetooth/include/wiced_memory.h ) api

Thanks,

Anjana