wiced_bt_ble_scan() result is showing only connect-able BLE device advertisement (ble_evt_type 0 and 4)

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

cross mob
prpuc_2175051
Level 1
Level 1
First like received

Hi,

I am using Murata Type 1Dx module, which uses Broadcom BCM4343W chipset. I am  trying to bring-up the Bluetooth module & using WICED SDK 3.5.2 My host MCU platform is ARM Cortex M4.

I want to scan nearby bluetooth devices. I am using same ble_hello_sensor application and done few modifications to it.

In hello_sensor_management_callback() function under event BTM_ENABLED_EVT, I am calling wiced_bt_ble_scan() instead of hello_sensor_application_init().

In the scan result callback I am seeing only connect-able BLE device advertisement (ble_evt_type 0 and 4). In every scan result callback it shows same device every-time, even I have enabled duplicate filter.

Below is the code snippet which shows how wiced_bt_ble_scan() is called

wiced_bt_cfg_settings.ble_scan_cfg.scan_mode = BTM_BLE_SCAN_MODE_ACTIVE;
wiced_bt_cfg_settings.ble_scan_cfg.high_duty_scan_duration = 300;
wiced_bt_cfg_settings.ble_scan_cfg.high_duty_scan_interval = 480;
wiced_bt_cfg_settings.ble_scan_cfg.high_duty_scan_window = 480;
duplicate_filter_enabled = scan_settings.filter_duplicates;

wiced_bt_ble_scan( BTM_BLE_SCAN_TYPE_HIGH_DUTY, WICED_TRUE, ble_scan_results_cb );

Do I need to change/add any configuration under wiced_bt_cfg_settings so as to scan all nearby bluetooth devices?

It will be very helpful if someone can provide pointers on this.

Thanks & Regards,

Pratik.

0 Likes
7 Replies
Anonymous
Not applicable

Can you try PASSIVE mode?

0 Likes

I tried both ACTIVE and PASSIVE mode. Same behavior is seen.

0 Likes

nsankar wrote:

Can you try PASSIVE mode?

I also tried, PASSIVE mode does not work.

Any further comments?

0 Likes
StBa_721356
Level 5
Level 5
50 likes received 25 likes received 10 likes received

I have the very same issue: connectable devices show up whereas non-connectable do not show up.

How can this be resolved?

0 Likes

Hi sbs​,

This issue was addressed in: Re: How to scan non-connectable BLE devices ?

As we discovered in that thread, it's not a matter of the beacon being non-connectable, but rather, the AD flags specifying non-discoverable. Most commercial beacons advertise as both non-connectable and non-discoverable. The API wiced_bt_ble_observe exists to scan for all adv, including non-discoverable beacons. However, the API removes the users control of the necessary scan params. I provided a patch in the above thread to this problem that allows you to receive non-discoverable adv while specifying your own scan parameters.

In a followup thread, I've addressed the issue of the whitelist being non-functional with my original patch, so a second, updated version is provided here if you wish to use the whitelist: Re: Problems with whitelist...

I've notified the engineering team of these issues and they will hopefully be resolved in future SDKs.

Jacob

0 Likes
JacobT_81
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Hi sbs and pratik​,

Did my above comment resolve this or do you have further questions?

Jacob

0 Likes

Hi Jacob,

Thanks for your valuable support, we are planing to use SDK version 4.1.0.

I am anticipating this version includes fixes added by you.

Thanks & Regards,

Pratik.

0 Likes