- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sometimes the function wiced_bt_stack_init will not call my management callback function. The last output I see is:
00000119 GKI_create_task func=0x4ada75 id=1 name=BTU stack=0x0 stackSize=6144
00000126 GKI_create_task func=0x4aef21 id=0 name=HCISU stack=0x0 stackSize=4096
But that's it, if I reboot the board it might work as usual, I get this issue around 20% of the time.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For SDK 4.0.7.58, 20719-B0_Bluetooth, the root cause of the no BTM_ENABLED_EVT issue I encounted was because the value of the maximum bumber of buffer pools was default set to 0 (uninitialized) in the wiced_bt_cfg_settings data structure when it was automatically generated.
We must manually add the code to set the value for .max_number_of_buffer_pools in wiced_bt_cfg_settings as below.
const wiced_bt_cfg_settings_t wiced_bt_cfg_settings =
{
...
/* LE Address Resolution Database Settings */
.addr_resolution_db_size = 10,
...
+ /* Maximum number of buffer pools */
+ .max_number_of_buffer_pools = 4,
}
After set the value of .max_number_of_buffer_pools, the application worked fine. 🙂
Thanks,
Dudley
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What platform are you using?
Can you check what you got at BTM_ENABLED_EVT?
(maybe my post bluetooth stack init is related to this one?)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't get any BTM_ENABLED_EVT event, the stack just doesn't call my callback at all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I also encountered this issue, SDK 4.0.7.58, 20719-B0_Bluetooth.
I created a new project through WICED Bluetooth Desginer by default with LE only mode, added a specific test service and characters for testing. After generated the code, I just set the debug_uart to PUART, and add the log before and after wiced_bt_stack_init() the function, and also at the start of the *_management_callback() callback function that input to wiced_bt_stack_init() function.
After build, burn and run the image to the BCM920739EVAL2_0 board, I get the output log before and after the wiced_bt_stack_init() function, and check the return value of wiced_bt_stack_init() is 0. But the *_management_callback() callback function was not executed at all, the log message added at the start of the *_management_callback() callback function not output at all event after several times reset.
Noramlly, the BTM_ENABLED_EVT event should be transfered into the *_management_callback() callback function after the BLE stack initialized. Though it returns 0 indicates success, but indeed the BLE stack seems has been out of work at that time.
BTW, I built and burned the hello_sensor project image to the development board, it worked fine.
Thanks,
Dudley
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For SDK 4.0.7.58, 20719-B0_Bluetooth, the root cause of the no BTM_ENABLED_EVT issue I encounted was because the value of the maximum bumber of buffer pools was default set to 0 (uninitialized) in the wiced_bt_cfg_settings data structure when it was automatically generated.
We must manually add the code to set the value for .max_number_of_buffer_pools in wiced_bt_cfg_settings as below.
const wiced_bt_cfg_settings_t wiced_bt_cfg_settings =
{
...
/* LE Address Resolution Database Settings */
.addr_resolution_db_size = 10,
...
+ /* Maximum number of buffer pools */
+ .max_number_of_buffer_pools = 4,
}
After set the value of .max_number_of_buffer_pools, the application worked fine. 🙂
Thanks,
Dudley