Using Bluetooth and WiFi RSSI for Locating

There’s a recent paper by Hongji Cao,Yunjia Wang,Jingxue Bi and Hongxia Qi of China University of Mining and Technology on An Adaptive Bluetooth/Wi-Fi Fingerprint Positioning Method based on Gaussian Process Regression and Relative Distance.

The paper looks into how to combine both Bluetooth fingerprint positioning (BFP) and Wi-Fi fingerprint positioning (WFP) to provide for an adaptive Bluetooth/Wi-Fi fingerprint positioning system based on Gaussian process regression (GPR).

The adapative feature is particularly useful because fingerprint acquisition requires a great deal of effort and requires subsequent update and maintenance.This new method provides a better positioning than Bluetooth and Wi-Fi positioning alone but at the cost of extra computation.

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

Bluetooth Range Estimator

The Bluetooth SIG, who create the specifications for Bluetooth, have a new Bluetooth Range Estimator that takes into account the environment, transmit power, antenna gain and received gain to provide an estimated range.

There’s also an associated blog post on 3 Common Myths About Bluetooth.

In terms of beacons, the range usually relates to how they are powered. The beacons with smaller CR2032 batteries tend to be designed for ranges up 50m. Larger CR2477 powered beacons usually reach about 100m. AA battery beacons or those with power amplifers reach hundreds of metres. and some USB beacons can reach up to 4Km. These ranges are outdoors. Indoors, there’s often radio reflections and blocking that reduce range. Beacon orientation can also affect range.

Bluetooth AoA Direction Finding Study Finds Limitations

While we wait for products based on Bluetooth 5.1 direction finding to reach the market, researchers in the UK and Italy have performed a study Dead on Arrival: An Empirical Study of The Bluetooth 5.1 Positioning System.

The paper tests the market readiness of the Bluetooth 5.1 direction finding by experimentally evaluating the performance of the AoA mechanism. The authors took Software-Defined Radios(SDR) manufactured by Ettus Research and emulated Bluetooth AoA data in order to assess the potential accuracy and security.

The results show that accurate angular detection is limited to a restricted range:

“Observe that the error is below 85 cm for more than 95% of the positions. However, this is far from meeting the centimetre level accuracy expected by IoT applications, since the absolute positioning error is <10 cm only in 15% of cases. Although offering sub-meter accuracy, is far from achieving centimetre-level precision.”

It was found that a malicious device can easily alter the truthfulness of the measured AoA data by tampering with the packet structure because the Bluetooth 5.1 standard doesn’t enforce any security provisions. The researchers suggest an improvement to the standard, by changing the receiver, so that instead of using one main antenna and switching to the other only for measuring the phase-delay, it keeps the other antenna active for the next packet to be received.

BBC Watchdog Beacon Investigation

There’s a video on Facebook where the Spencer Matthews from BBC’s Watchdog programme looks into beacons:

We were contacted by a researcher from BBC Watchdog as they wanted to understand the mechanism and were initially confused as to whether the devices in stores were receiving phone Bluetooth signals or the other way around, phones receiving Bluetooth signals.

What the video doesn’t say is apps are needed to see the beacons. In the case of Facebook this will be Facebook app. You can turn off Bluetooth for that app if you don’t want to be tracked. However, as the video explains, Bluetooth is only one mechanism. WiFi, GPS and cell tower data can also be used to determine location.

Getting back to beacons, Google has an under-promoted similar mechanism ‘Project Beacon’ tied to Adwords where you can work out if an ad caused a store visit.

3rd Party Introduction to Project Beacon

As there’s no official web site or information, it’s unclear if ‘Project Beacon’ is still active.

The BBC Watchdog video shows how many consumers see such adverts as intrusive and creepy. As previously with Eddysone URL, marketers are being too blunt, alienating consumers and it’s a turn-off. Instead they need to provide useful information and tools, not adverts, then convert the consumer to a sale. Marketers need to put in place marketing that causes the consumer to say, “That’s cool, I must tell my friends” rather than “That’s creepy”.

New Sato Beacons in Stock

We have a new range of Sato beacons in stock:

Most, except the sensor beacons, are waterproof to IP67. All the beacons can be configured to advertise multiple channels at the same time including iBeacon, Eddystone UID, Eddystone URL, Eddystone TLM, sensor (where available), acceleration (where available) and device info.

Sato beacons use the button in an innovative way. Instead of going OFF, the button long press is detected for SOS type scenarios. The beacon is instead turned off using the configuration app or programatically via your custom app.

Android Bluetooth LE Resources

If you are considering developing Bluetooth LE on Android, you should take a look at Stuart Kent’s Android Bluetooth Low Energy Resources on GitHub. He provides lots of links to introductions, videos, libraries, guides, questions on Stack Overflow and example app source code.

If you need more information take a look at the Android section of the BluetoothLE Wiki. If you need to rely on background processing read Don’t Kill My App.

Android 10 Asking for Location Permission

If you have upgraded to Android 10 then you will find you are asked whether particular apps, especially those using maps or Bluetooth, can use Location permission (all the time, only while using the app or Deny). Something like:

You will find that this screen appears, for each app using Location, at a seemingly random time. Why is this? Why do apps you haven’t just started suddenly ask for the permission? What are they doing? How should you answer?

The change of Android location permissions to include ‘only while using the app’ is part of Android 10. For app architectural purposes, some apps get location or Bluetooth scan in an Android Service that runs in background. This Service can be started and stopped by the Android OS according to whether the OS needs resources and also when an app is upgraded. The starting of the Service might cause it to get location or do an initial Bluetooth scan, as part of startup, even though the app isn’t going to use this information. These things used to be transparent but now have the knock on affect of causing the OS to ask for the first-time permission seemingly at a random time.

If, for example in the above BBC Weather app, you need the app to show the latest weather for a location on a widget or otherwise use location-related data in background then select ‘Allow all the time’. Otherwise select ‘Allow only while using the app’. Beware of selecting ‘Deny’ as it’s likely it might cause the app to malfunction in some way.

Our empirical experiences are that Android 10 background restrictions do actually noticeably improve battery life, unlike previous Android ‘Doze’ and App Standby restrictions that seemed to create pain and no gain.