BLE scan fails to detect advertising beacons

As we’re preparing for mesh deprecation, we’re starting to explore moving some data comms over to Bluetooth. However, our experience with scanning and advertising isn’t what we’d hoped. This might be a BLE problem, although nRF Connect (Android app for monitoring BLE) seems to show the advertising device is doing its job.

Problem description

I’m trying to use the beacon to synchronize time clocks to within 1s. When it works, it works great. But results are very inconsistent.

Half the time, the scanner sees the advertiser immediately. The other half the time, it times out without seeing the advertised beacon.

Background

The advertiser is advertising every 100ms (100/.625, in order to account for BLE advertising time units) .

The scanner uses a 10s timeout (10000/10, in order to account for BLE scanning time units)

The scanning device is sitting mere cm away from the advertising device, and when it receives it it sees a very healthy RSSI (typically >-40dbM).

The scanning device is doing nothing aside from scanning. In this case, there is no mesh traffic to compete with the BLE traffic (although Mesh is turned on).

Question

Am I doing something wrong, is there a bug, or is this standard behavior?

How can I improve my chances of getting robust results from BLE.scan()? Dropping 100 packets (10s at 10Hz) leads me to think that simply having a longer scan timeout won’t really resolve any problems.

Hi there,

Can you send me the code so I can check with my BLE scanner to see how often the packets are actually sent? I believe this is BLE related and not necessarily DeviceOS related - and BLE will continue to get attention even when Mesh is long gone.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.