BLE: Multiple discovery of the same peripheral during scan

2,876 views
Skip to first unread message

Brian Liu

unread,
Aug 4, 2013, 11:27:05 PM8/4/13
to android-...@googlegroups.com
According to API18 spec, app start BLE scan and will get notified when a new peripheral is detected.

We found that the callback (BluetoothAdapter.LeScanCallback) will be called only for the 1st time scan result. The peripheral continue it's broadcast (even with different broadcast content) and the phone continue it's scan. So the phone should have received more broadcast from the same peripheral (with different broadcast content and maybe different rssi). However, the callback will NOT be called again.

This behavior is not good for "broadcast only" type of BLE application, i.e. BLE peripherals broadcast it's data continuously without the needs to be connected.

In iOS, I found this feature is supported and can be enabled with a special option when starting scan. As below:
    ***********************
CBCentralManagerScanOptionAllowDuplicatesKey

A Boolean value that specifies whether the scan should run without duplicate filtering. The value for this key is an NSNumber object. If YES, multiple discoveries of the same peripheral are coalesced into a single discovery event. If NO, filtering is disabled. Disabling this filtering can have an adverse effect on battery life and should be used only if necessary. If the key is not specified, the default value is YES.

Available in iOS 5.0 and later.

Declared in CBCentralManager.h.

******************


My question is "is it possible for app to be notified when receiving multiple discovery of the same pheripheral" with current API18? or is there any plan to add this in future API?


Thanks.

Brian Liu

 

bny...@freezerwatch.com

unread,
Aug 13, 2013, 3:04:06 PM8/13/13
to android-...@googlegroups.com
I have built BT Proximity Scanner and have received (API14) multiple callback for the same device per discovery, primarily when the RSSI signal changed significantly (-10)+ dbm.

I'm getting BLE devices which get discovered in the same application, however I have not seen duplicates in same scan.

In most BLE Application if the data content changes dynamically, then it is assume that you should connect to the device to retrieve the content.  Broadcast content is assumed constant is this case? 

Don't think this help answer anything but it's information.  I haven't seen anything in the Bluetooth Android API for this.

Thanks

Blair

Raj

unread,
Nov 5, 2014, 1:08:29 AM11/5/14
to android-...@googlegroups.com

Hi Brian Liu ! after a year still there is no such facility in android for continuous scanning it seems. now am facing the same problem as you faced ! So how did you rectify it ?

       some are saying that we have to start and stop scanning frequently to update the data . But i tried ,,aand the app got hanged !
 Could you please   explain me how to use the method of starting & stopping of scan continuously and diaplay the data .!

 

Caylan Larson

unread,
Jan 15, 2015, 10:05:36 AM1/15/15
to android-...@googlegroups.com
Any update on this?

Caylan
Reply all
Reply to author
Forward
0 new messages