- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using CYW20706 as Central role to do the scanning.
when scan result callback I turn off scanning and initiate a connection by callback parameter.
scanResultCb(parameter)
{
wiced_bt_ble_scan( BTM_BLE_SCAN_TYPE_NONE, WICED_FALSE, scanResultCb );
return_value = wiced_bt_gatt_le_connect( p_scan_result->remote_bd_addr, p_scan_result->ble_addr_type, BLE_CONN_MODE_HIGH_DUTY, TRUE );
}
but I got the return_value as FALSE very often,
I keep scanning after lots of return FALSE it can get return TRUE and connect successfully in sometimes.
Is there any reason why connect fail return FALSE?
thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found the issue,
if you want to do connect in scanResultCb,
1. save scan address and advtype
2. disable scanning
3. scanResultCb will callback again without parameter
4. in this time, do connect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found the issue,
if you want to do connect in scanResultCb,
1. save scan address and advtype
2. disable scanning
3. scanResultCb will callback again without parameter
4. in this time, do connect