cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Studio Wi-Fi Combo

rzec_3016261
New Contributor II

Hello,


I’m new to the Cypress WICED build environment but I would like to get the ble_wifi_introducer demo working on my BCM94343W_AVN dev.board.

I can build it, download it and run it.

It will try to “Joining: YOUR_AP_SSID” and if it fails it will start BLE advertisment. So far so good.

But as soon as I connect to it through BLE, it will stop working and the UART outputs the message:

GKI_exeption(): Task State Table

GKI_exeption 65524 getbuf: out of buffers


Searching this forum did not give me any solution so I’ll try again.


According to this thread: https://community.cypress.com/thread/8684 it should be possible. The 94343WWCD1 board uses the same processor.


The board files and the files associated with WICED-Studio-6.1 contain the modifications mentioned in this thread: https://community.cypress.com/message/27221


This thread: https://community.cypress.com/message/32014 states it is Assumed Answered but it looks like the answer is that a proposed solution has no effect.

Now, this thread: https://community.cypress.com/message/24540 suggests the core problem is that the application runs out of memory. It however also states that the BLE stack takes at least 96KB of SRAM ?!?! That does not seam right, does it? That’s huge! Unfortunately the thread does not give any pointer on how to solve it.


Now my question would be: how do I tweak the BLE stack / application so it will use less SRAM and we can validate the Cypress solutions as a viable candidate for our next project.

OR: how do I solve this exception an other way.


uname -r : 4.15.7-200.fc26.x86-64

WICED-Studio-6.1

WICED-SDK Version: Wiced_006.001.000.0085

Thanks, Robert

0 Likes
1 Solution
ShengY_96
Employee

Robert

Please try to larger the wiced_bt_cfg_buf_pools (located in wiced_bt_cfg.c). Try the followed value:

const wiced_bt_cfg_buf_pool_t wiced_bt_cfg_buf_pools[WICED_BT_CFG_NUM_BUF_POOLS] =

{

/*  { buf_size, buf_count } */

    { 64,       12   },      /* Small Buffer Pool */

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

    { 360,      12  },      /* Large Buffer Pool  (used for HCI ACL messages) */

    { 360,      0   },      /* Extra Large Buffer Pool - Used for avdt media packets and miscellaneous (if not needed, set buf_count to 0) */

};

There is doc located in: \WICED-Studio-xx\Doc\WICED-Application-Buffer-Pools.pdf

Hope this is helpful.

Regards

Jenson

View solution in original post

6 Replies
ShengY_96
Employee

Robert

Please try to larger the wiced_bt_cfg_buf_pools (located in wiced_bt_cfg.c). Try the followed value:

const wiced_bt_cfg_buf_pool_t wiced_bt_cfg_buf_pools[WICED_BT_CFG_NUM_BUF_POOLS] =

{

/*  { buf_size, buf_count } */

    { 64,       12   },      /* Small Buffer Pool */

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

    { 360,      12  },      /* Large Buffer Pool  (used for HCI ACL messages) */

    { 360,      0   },      /* Extra Large Buffer Pool - Used for avdt media packets and miscellaneous (if not needed, set buf_count to 0) */

};

There is doc located in: \WICED-Studio-xx\Doc\WICED-Application-Buffer-Pools.pdf

Hope this is helpful.

Regards

Jenson

View solution in original post

AxLi_1746341
Honored Contributor

yans wrote:

Robert

Please try to larger the wiced_bt_cfg_buf_pools (located in wiced_bt_cfg.c). Try the followed value:

Do you notice the referenced posts mentioned that issue does not get fixed at all?

If the problem is mis-configuration, it should hit GKI exception soon after boot and then people will

try to increase buf siz/count.

However, the problem is it hits GKI exception randomly at run-time.

And do you notice the CHANGELOG never mentioned any fix regarding GKI exception problem?

The thing is when GKI exception happens, it does not dump too much useful information.

So your users can only report it happens but your developers won't get too much information about what is going on.

0 Likes
AxLi_1746341
Honored Contributor

yans wrote:

There is doc located in: \WICED-Studio-xx\Doc\WICED-Application-Buffer-Pools.pdf

The "Buffer Usage Statistics" API wiced_bt_get_buffer_usage() does not exist in 4343W/43438.  Any chance to add it?

My device does not have uart output for debug print, so the wiced_bt_print_cfg_buf_pool_stats() does not work for me.

In additional, the "print" does not help if we want to implement some logic to detect if something wrong by the BT library.

0 Likes
rzec_3016261
New Contributor II

Hello Jenson,

Sorry for the late response (was waiting for an email notification someone answered my question).

Your right, tuns out changing the const wiced_bt_cfg_buf_pool_t wiced_bt_cfg_buf_pools works in my situation.

Despite the threads mentioned in my question I did try to change wiced_bt_cfg_buf_pools and found a working combination:

const wiced_bt_cfg_buf_pool_t wiced_bt_cfg_buf_pools[WICED_BT_CFG_NUM_BUF_POOLS] =

{

    { 64,      4  },

    { 525,      4  },

    { 1024,    6  },

    { 1024,      0  },

};

May not be optimal but for now it works. I guess your suggested combo should also work.

Thanks.

0 Likes
AxLi_1746341
Honored Contributor

Your buf_size seems to be quite strange values (64,525,1024,1024).

How do you calculate the required buf_size setting?

BTW, in case it may run out of buffer at run time.

You should try wiced_bt_print_cfg_buf_pool_stats() to check how

many buf_count is used in your application at run time.

rzec_3016261
New Contributor II

Again, a bit late....

Your buf_size seems to be quite strange values (64,525,1024,1024).

How do you calculate the required buf_size setting?

I didn't calculate, I just tried some values to get the demo working. When I start fine-tuning I will definitely use the function you suggest.

Thanks.

0 Likes