- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm exploring the capability of CYW4343W to enable master(central) and slave(peripheral) mode simultaneously. I can not find the answer from documents or discussions on the forum. Is this software configurable in WICED?
Thank you,
Min-Ching
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Min-Ching,
Hope you are asking about BLE Central and Peripheral on CYW4343W.
If then, yes it will support both roles at the same time.
Sequence for simultaneous BLE Central/Peripheral
1. Init the BT stack with a management callback
/* Register call back and configuration with stack */ wiced_bt_stack_init( hello_sensor_management_callback ,&wiced_bt_cfg_settings, wiced_bt_cfg_buf_pools );
2. In the management callback on receiving BTM_ENABLED, register for GATT and then start adv , and then start scan
static wiced_result_t hello_sensor_management_callback( wiced_bt_management_evt_t event, wiced_bt_management_evt_data_t *p_event_data )
{
WPRINT_BT_APP_INFO(("hello_sensor_management_callback: %x\n", event ));
switch( event )
{
/* Bluetooth stack enabled */
case BTM_ENABLED_EVT:
// Register for GATT callback
// Start ADV
//start scan
Thanks & Regards,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Min-Ching,
Hope you are asking about BLE Central and Peripheral on CYW4343W.
If then, yes it will support both roles at the same time.
Sequence for simultaneous BLE Central/Peripheral
1. Init the BT stack with a management callback
/* Register call back and configuration with stack */ wiced_bt_stack_init( hello_sensor_management_callback ,&wiced_bt_cfg_settings, wiced_bt_cfg_buf_pools );
2. In the management callback on receiving BTM_ENABLED, register for GATT and then start adv , and then start scan
static wiced_result_t hello_sensor_management_callback( wiced_bt_management_evt_t event, wiced_bt_management_evt_data_t *p_event_data )
{
WPRINT_BT_APP_INFO(("hello_sensor_management_callback: %x\n", event ));
switch( event )
{
/* Bluetooth stack enabled */
case BTM_ENABLED_EVT:
// Register for GATT callback
// Start ADV
//start scan
Thanks & Regards,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, Anjana. I will try this and provide my feedback later.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Anjana,
Is it possible we put the device into Central mode first and enable peripheral mode accordingly? I would like to enable/disable peripheral mode without drop the connections to my other peripherals.
Thank you,
Min-Ching
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Anjana,
I've tried your suggestion. It worked as expected. Thank you.
Min-Ching