CYW20706 Bluetooth Classic Reconnection/(Inquiry Scan?) in Firmware

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

cross mob
Kevin_Lo
Employee
Employee
50 sign-ins 10 likes given First comment on KBA

Hi Folks,

We have question about the operation logic of CYW20706 Bluetooth Classic Inquiry Scan in Firmware.

Firmware in use: WICED-Studio-6.4\20706-A2_Bluetooth\apps\demo\apple_mfi\hci_iap2_spp

The CYW20706 BT slave was Paired & Bonded with iOS device via BT Classic and works fine with custom iOS App until BT disconnected.

We assume that the 20706 in WICED Slave state as standby when disconnected and periodic do inquiry scan to resume connection with iOS device BT master. While we found that the re-connection would only occur if we reset the device.

It seem the only available option to set inquiry scan interval in the hci_iap2_spp.c firmware and the rest is done in library state machine:

// This application will always configure device connectable and discoverable

    wiced_bt_dev_set_discoverability(BTM_GENERAL_DISCOVERABLE, wiced_bt_cfg_settings.br_edr_scan_cfg.inquiry_scan_interval, wiced_bt_cfg_settings.br_edr_scan_cfg.inquiry_scan_window);

    wiced_bt_dev_set_connectability(BTM_CONNECTABLE, wiced_bt_cfg_settings.br_edr_scan_cfg.page_scan_interval, wiced_bt_cfg_settings.br_edr_scan_cfg.page_scan_window);

and in the WICED_BT_CONFIG.C

/* BR/EDR Scan Configuration */

    {

        BTM_SCAN_TYPE_STANDARD,                                             /**< Inquiry Scan Type (BTM_SCAN_TYPE_STANDARD or BTM_SCAN_TYPE_INTERLACED) */

        WICED_BT_CFG_DEFAULT_INQUIRY_SCAN_INTERVAL,                         /**< Inquiry Scan Interval (0 to use default) */

        WICED_BT_CFG_DEFAULT_INQUIRY_SCAN_WINDOW,                           /**< Inquiry Scan Window (0 to use default) */

        BTM_SCAN_TYPE_STANDARD,                                             /**< Page Scan Type (BTM_SCAN_TYPE_STANDARD or BTM_SCAN_TYPE_INTERLACED) */

        WICED_BT_CFG_DEFAULT_PAGE_SCAN_INTERVAL,                            /**< Page Scan Interval (0 to use default) */

        WICED_BT_CFG_DEFAULT_PAGE_SCAN_WINDOW,                              /**< Page Scan Window (0 to use default) */

    },

Is the BT Classic "reconnect" functionality all depends on the preset library state machine or there is some other way to allow user app firmware engagement.

Thanks and Regards,

Kevin

0 Likes
1 Solution
SheetalJ
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 500 likes received

Edit:

Hi Kevin,

As per the WICED BT stack architecture, the scan intervals are defined in configuration file wiced_bt_cfg.c only. There is no other way to set these parameters. You will have to reset the device, in order to start scanning & connection again.

One more thing which can be done is, send a connect request again after disconnection using API. Here device will try to reconnect as soon as disconnection occurs.

View solution in original post

0 Likes
1 Reply
SheetalJ
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 500 likes received

Edit:

Hi Kevin,

As per the WICED BT stack architecture, the scan intervals are defined in configuration file wiced_bt_cfg.c only. There is no other way to set these parameters. You will have to reset the device, in order to start scanning & connection again.

One more thing which can be done is, send a connect request again after disconnection using API. Here device will try to reconnect as soon as disconnection occurs.

0 Likes