Why Bluetooth LE Scanning Doesn’t Always See Devices (the First Time)

Bluetooth devices such as beacons periodically advertise data according to a pre-defined format such as iBeacon or Eddystone. The advertising is very short, of the order of 1ms. Listening devices such as apps or gateways scan for a defined time, the scan window, periodically every scan interval. The scanning scan window is usually less than the scan interval to conserve power because scanning is power intensive.

While scanning nearly always sees a nearby device, there can be times when it isn’t seen due to physical and technical reasons. Radio signals can get blocked and reflected in ways that cause them not to be received. Also, if two Bluetooth devices happen to advertise at the same time then the received radio signal is corrupted. It’s also possible that because scans stop and start, the advertising happens when the scan isn’t running.

In practice the chance of non-detection happening is small. The chances of it happening again, the next scan, are very unlikely. If a beacon isn’t seen on the first scan it’s usually seen on the second (or third) attempt.

Bluetooth has some mitigations to help reduce the occurrence of the above mentioned situations. The advertising and scanning happens on multiple channels (frequencies) 37, 38 and 39 to reduce the affect of interference from other devices. Also, the advertising interval isn’t fixed and varies by a random amount, the advertising delay, for up to 10ms, to prevent two (or more) devices’ advertising continually colliding.

The consequence of scanning possibly not seeing beacons (the first time) is that solutions using apps or gateways must not rely on only one scan to make decisions on the absence of a beacon.

iBeacon Deployment Parameters for Locating

Researchers from the The Hong Kong Polytechnic University have a new paper on Performance Evaluation of iBeacon Deployment for Location-Based Services in Physical Learning Spaces (pdf) that tests environmental and deployment factors, indoors and outdoors, related to using ibeacons for locating. It provides recommendations for iBeacon deployment in terms of location, density, transmission interval, fingerprint space interval and collection time.

iBeacon deployment

The paper provides a great introduction to positioning using beacon received signal strength (RSSI). It describes trilateration and fingerprinting methods for determining location.

Key insights are:

  • High temperature, strong wind and blocking by pedestrians degraded the signal strength.
  • Pedestrians traffic blocking the line of sight caused the most signal attenuation and variation.
  • High air temperature caused significant increase of packet loss that affected the RSSI.
  • Strong wind reduced the signal strength but didn’t affect the stability of signals.
  • Trees and nearby vehicle traffic didn’t have any negative effects on signals.
  • Lower error rates were observed when beacons were deployed on the ceiling as opposed to on the wall.
  • Positioning accuracy improved with ceiling placement due to the reduction of obstructions.
  • If ceilings are too high or ceiling deployment is impracticable wall mounted iBeacons should be placed as high as possible.
  • For fingerprinting, sample at 2m grid intervals for 6s to 10s at each point. Avoid having too many beacons as this won’t improve the positioning accuracy. A transmission interval of 100ms is detrimental to the positioning accuracy. 417ms is better.
  • For fingerprinting, positioning accuracy varies greatly according to the what is in the room.

The paper mentions that beacon UUID, major and minor are used to uniquely identify beacons. While this is true in the context of detecting using apps, most locating systems use gateways. Gateways use the Bluetooth MAC address to uniquely identify beacons and the advertising type, iBeacon, Eddystone or other, is irrelevant. Using gateways as receivers is also a solution to the problem of variability in receiving capability across smartphones.

The study only considered one beacon type and two receiving smartphones. At Beaconzone, we recommend experimenting with the actual hardware in the actual environment as, being wireless radio, optimum settings and can vary considerably.

Read about location accuracy

Read about Using Beacons, iBeacons for Real-time Locating Systems (RTLS)

iBeacons for PeopleHR

A growing number of checkin/checkout systems are using iBeacons. Having an iBeacon at an entrance to a building allows employees to be automatically clocked in and out. It provides confirmation that a worker did actually arrive at a certain place that day.

PeopleHR is one such solution that has information and a blog post on how to set up tap in and out using beacons.

Checkin/out systems use the iBeacon type of beacon because it can be detected on iOS (and Android) even when the app isn’t in foreground.

Dementia Anti-Wandering Using Beacons

The Hong Kong Multimedia Technology Research Center (MTREC) has an interesting project that implements a dementia anti-wandering system using iBeacons.

A paper (pdf) explains how it uses a novel multi-hop system to track targets using mobile sensors. The multi-hop approach extends the sensing area and reduces the deployment cost.

iBeacon Cooperative Tracking

The system uses a particle filter which analyses the temporal and spatial information of the targets to achieve 4.37m and 9.46m tracking error in a campus and a shopping mall respectively.

Read about Beacons in Life Sciences

Advanced Bluetooth on Android

Martin Woolley of the Bluetooth SIG was a recent speaker at Droidcon EMEA where he spoke about Advanced Bluetooth for Android Developers (slides).

Android Bluetooth LE Stack

Martin covered scanning, GATT, how to maximise data rates, speed vs reliability and using different PHY for enhanced range or data rates. The second part of the talk covers Bluetooth Mesh and proxy nodes.

One thing not mentioned in the slides, to be careful of, is that connection via a proxy node is relatively slow because it’s limited by the GATT connection. Proxy nodes are good for controlling (sending small amounts of data into) a Bluetooth Mesh but poor if you want to use the connected Android device as a gateway for all outgoing data.

Martin also has a blog where you can also learn about his past talks and he will be part of the new Bluetooth Developer Meetup.

Read about Beacons and the Bluetooth Mesh

Hospital Asset Tracking

There’s a new article on MyLondon on How this Putney hospital is using smart technology to track down life-saving equipment. It explains how Putney hospital is using sensors to track equipment, such as ECG machines, to make them easier to find. They are also monitoring the temperatures of fridges and the occupancy of rooms.

Hospital Asset Tracking Using Bluetooth

The time saving is incredible… there are thousands of more things the hospital would want to track in the future

Toby Roberts, Putney Hospital Associate Director of Information

At BeaconZone we have customers using beacons to track wheelchairs, porters carrying medicines and the location of vulnerable Alzheimer’s patients.

We have found the main problem with introducing new technology into hospitals is lack of funding. Anything outside purchasing for the frontline is de-prioritised. Health providers tend to have have blinkered priorities that work against efficiency and cost savings.

If you think about having three key nurses and a couple of health care assistants running around the hospital for half an hour to find a piece of equipment, even if you just add up their hourly rate, let alone the increase in service quality, it’s really quite an easy equation to justify

Toby Roberts, Putney Hospital Associate Director of Information

Read more about Beacons in Life Sciences

Bluetooth Developer Meetup

There’s a new (virtual) Bluetooth Developer Meetup group.

Developers will share their knowledge and tell their stories of working with everybody’s favourite low power wireless communication technology

The first event will be on 15th October 2020 at 17:30 UK time (UTC+1) and will include the following speakers:

  • Jacky Cheung, Google
  • Kevin Picchi, Samsung
  • Thea Aldrich, Foundries IO
  • Martin Woolley, Bluetooth SIG

Exercising Bluetooth LE GATT

Beacons send most of the time periodically advertising the same data. For setup, apps usually connect to them to set settings such as the advertising period, unique id and power level. The connection is performed using standard Bluetooth GATT.

Bluetooth LE devices connect to others via GATT. Devices such as fitness trackers and our social distancing beacons are regularly connected to, to download data. It’s also common to connect to sensor beacons to extract sensor data.

GATT is usually used via compiled code and it can be time consuming to test GATT devices and/or subsequently use the GATT interface in a flexible way. Should you need to do this, take a look at Bleak GATT client software capable of connecting to Bluetooth LE devices acting as GATT servers. It provides an asynchronous, cross-platform (Windows 10, Linux, Mac) Python API to connect and communicate with Bluetooth devices.