We now have the M52-ST social distancing beacon in stock.
The beacon led flashes when two people wearing this beacon come close to one another. Each beacon stores up to 34,304 close contacts that can be extracted using the supplied iOS and Android app.
The app also allows setting of the time two people have to be together, the alarm type (led and/or sound) and a whitelist of up to 45 devices. The transmit power and signal strength trigger value can also be changed to fine tune the trigger distance for different physical situations.
PunchThrough has a comprehensive new guide about using Bluetooth on Android. It explains the basics of Bluetooth, introduces the Android Bluetooth API and provides a guide how to scan for devices and connect to them using Bluetooth GATT.
It also covers bonding, thread-safety, queuing requests, background services and 3rd party libraries.
If you are developing using Node, there’s a Node.js module, node-beacon-scanner, that allows you to scan Bluetooth beacon packets and parse the packet data.
While Node tends to be associated with Linux, servers and hence web sites, Node can also be used on small single board computers such as the Raspberry Pi. Hence, this module provides an easy way to scan for Beacons and other Bluetooth devices.
The module supports iBeacon and Eddystone and outputs the MAC address, local name, transmit power level, RSSI and the iBeacon/Eddystone specific attributes.
A new version of Nordic Semiconductor’s Android BLE library has been released. Nordic is the manufacturer of the system on a chip (SoC) inside some Bluetooth devices. Connecting to these devices, as opposed to just scanning for their advertising data, can be very tricky and there are lots of different ways of doing things depending on the Android version and workarounds based on specific situations. Nordic’s Android library aims to solve these problems and claims it “makes working with Bluetooth LE on Android a pleasure”. The library uses standard Bluetooth and hence works for all Android Bluetooth development, not just Nordic’s devices.
The new Android BLE Library v2.2.0 adds GATT server support and tidies up the callback mechanism. GATT server is where the Android device itself can be connected to from another device as opposed to Android initiating the connection. Note that this library is all about Bluetooth GATT connections. Connections are rare in the BLE World as most information is obtained through non-connected scanning for Bluetooth advertising. Connections tend to be used for settings or where you need higher or larger throughput than advertising can provide.
Note that the library doesn’t include scanning which is required before you can connect. Nordic provides a separate scanning library.
Also be aware that these libraries are relatively large. When we used them they took us over the Android 64K method limit thus complicating development slightly. Also, the later versions have dependencies on AndroidX. Finally, while the libraries hide the complications of Android development, this can be good and bad. When problems happen, as they always do with Bluetooth GATT, if you didn’t write the workarounds in the first place, debugging and fixing can be difficult.
In a previous post we explained how the Received Signal Strength Indication (RSSI) can be used to infer distance. Contract tracing apps provided by governments and workplace social distancing solutions use the RSSI to detect close contact. This post explores some factors that affect how well such systems work.
With Bluetooth LE the sender repeatedly sends out a small amount of data, called advertising, that takes of the order of 1ms to send. The repeat time, called the advertising period, is typically every 100 milliseconds to 10 seconds depending on the application.
A 1ms transmission uses a lot of battery power so there’s a tradeoff between the advertising period and battery life.
The receiver listens, called scanning, for Bluetooth advertising. Again this is battery intensive so scanning devices typically only do so for a few seconds. If they need to listen for a long time then there’s a gap of a few seconds between successive scans.
It can be seen that because the sender isn’t always sending and the receiver isn’t always listening the two might not align to cause detection. The advertising period, the scanning time and the time between scans all combine to cause a tradeoff between battery life and the responsiveness of the detection. In extreme cases detection can take a very long time or not at all.
Applying this to iOS and Android, the mobile OS manufacturers have exercised some control over what’s possible with apps so as to protect battery life. iOS is the strictest and doesn’t allow apps to advertise unless they are in the foreground and shown on the screen. There is a trick to cause advertising to wake up an iOS app to advertise for a very short time. However, it leads to poor triggering performance and can affect battery life.
Android is more capable and up until recent versions of Android, apps could advertise and scan in foreground and background. More recently, Google has restricted background activity such that Bluetooth is only advertised for a short time after the app has closed. There’s an even larger limitation on Android in that some manufacturers kill apps that work in background.
All this isn’t good for contact tracing apps. As previously mentioned , Google and Apple have implemented a new API to allow contact tracing apps to work well on iOS and Android. Some Governments, such as ours in the UK, have currently gone their own way with apps that use existing APIs. Such aforementioned restrictions stop smartphones seeing each other thus severely reducing their effectiveness. The apps won’t work properly and will provide very limited benefit. It has even been suggested the system might even be dangerous as it might be provide a false sense of security. There is a report that early trials of the UK tracing app and privacy concerns have caused the UK government to re-think their approach and are investing in research into a second Google/Apple centric app in case there’s a need to quickly change direction.
For our workplace social distancing solution we avoided use of apps for close-contact advertising and scanning. Instead we use smartband-like devices so that we are in full control of how and when the devices advertise and scan.
While wearable beacons only usually advertise, our custom firmware in social distancing wristbands performs both advertising and scanning so that devices can mutually detect one another. The heavy battery use means we still have to make a compromise between the responsiveness of triggering and battery use but at least it’s under our control rather than dictated by Google and Apple.
Bluetooth LE can be used to infer distance as is being used in contact tracing and social distancing apps. This is performed from the receiving end using what’s called the Received Signal Strength Indication (RSSI). This is a number, in dBm units produced by the receiving Bluetooth hardware that gives the wireless signal strength.
[dBm stands for Decibel-milliwatt, a unit used to measure radio frequency (RF) power level. dB (without the ‘m’) measures the power of a signal as a function of its ratio to another standardized value and the m in ‘dBm’ indicates we are comparing relative to 1 mW of power.]
RSSI is a negative value where the more negative it is, the further away the Bluetooth device. Close devices are usually in the range -10 dBm to -30 dBm while devices at the limit of detection give values less than -90 dBm.
Our post on Testing if a Beacon is Working shows how to use the nRF Connect app to measure the RSSI of a Bluetooth device.
The relationship between RSSI and distance isn’t linear and also depends on electrical, physical and environmental factors. It also varies slightly, as ‘noise’, over time, even when things don’t move. The largest electrical factor is the transmission power. Physical factors include blocking and reflection.
Some Bluetooth advertising such as iBeacon includes a value, the measured power, in the advertising that can be used to take account of the fact that different beacons have different transmission power and hence different RSSI at the same distance. The measured power is usually the value of the power at 1m from the transmitter.
While there are equations and libraries that attempt to derive distance from RSSI, often the most accurate method is to measure the actual RSSI at various distances and use this calibration data with interpolation to get estimated distances.
Here in the United Kingdom we have been locked down but we have been able to leave our homes to do essential work, shop, help sheltered people and take exercise. We have observed that companies still working through lockdown are not all practising social distancing. For example, in retail stores, employees regularly come close to one another either due to apathy, laziness or management pressure of productivity over safety. Workmen on the street can often be seen working close together.
As organisations come back to work there’s a greater awareness of workplace safety and unions are also taking a greater interest. Individuals need to know they are as safe as is practical. Governments are creating new working practice guidelines. For management, practising social distancing safety can actually be good for business. People are more willing to work, they feel the organisation has their interests in mind and ultimately there’s less risk of an outbreak on site causing worker absence and a potential site shutdown.
Governments producing guidelines and organisations implementing new working procedures don’t necessary produce changes in worker attitude, especially when it’s difficult to police the rules. This is where technology can help. A social distancing system can provide workers with warnings when they come too close and audit close contacts so that working patterns can be changed.
This isn’t about contact tracing that has been the contentious subject of recent news. While social distancing systems can produce contact tracing data, it’s unlikely to be useful in most businesses because close contact is always going to happen. Some governments realise this and guidelines stipulate extra measures when working within close contact, such as being mindful of the duration of the contact. Close contacts will happen in the workplace. It’s about reducing their number and duration.
Here are some factors to consider if you are seeking a social distancing system:
Cost – Consider the ongoing cost as well as the initial cost. Does the system unnecessarily use a software as a service (SAAS) model that ties you into monthly payments? Does it need a mobile wireless subscription for every user?
Setup – How easy is it to set up? For larger numbers of employees it’s important the tracking devices work ‘out of the box’. Lots of physical setup can also defeat the aim of reducing social and physical (screen) contact. Does the system require any site-wide infrastructure such as WiFi that’s almost certainly already unreliable due to congestion?
Scalability – How easy is it to scale to all your workforce? Where are the costs and technical bottlenecks?
Sync – How easy is it to sync? Again, data needs to be received from the tracking devices in a hands-off manner so as to reduce social and physical contact.
Data privacy – Where does the data end up? Remember your organisation might have data compliance requirements that require data be kept within the company or in a particular geographic region.
Output – What’s the output? It’s unlikely a vendor provided system will provide the exact reporting you require. Look for systems that allow you access to raw data for importing into Excel or other systems. Look for systems that automate reporting so as to reduce effort and physical (device screen) contact.
But critics warn this kind of system would be imprecise since some phones detect signals from up to 30m (98ft) away without being able to determine the distance.
The BBC took this from information in a Wired article that says:
… but with Bluetooth being able to ping other phones within a 30-metre range, without precision, there’s an increased chance of the app alerting you to false positives of people who have never even come into contact with you
This isn’t correct and misunderstands how the Bluetooth signal is being used. Receiving devices, such as smartphones, don’t just see the beacon signal but also have a received signal strength (RSSI) that can be used to infer distance. Our post on testing if a beacon is working explains and shows this value in the nRF Connect app running on Android.
While not fake news, the BBC and Wired are providing incorrect information. In these times, in the rush and panic, too many things are being written that aren’t thoroughly researched.
Many companies we work with are startups. A very recent survey by NfX shows founders are very worried, the main issues being venture capital drying up and sales declining:
Apart from cost saving actions, it’s interesting many founders are pivoting their product:
Talking to customers, we have seen an increase in the use of beacon technology in health (e.g. calling for help) and logistics (e.g. supermarket asset tracking). The use of technology and IT has the potential to reduce human effort, minimise human to human contact and provide for SOS solutions. Read our recent post on SOS type applications.
Founders are finding many VCs (41.9%) are taking much longer to respond and 15.5% of VC have gone ‘dark’:
All is not lost. Kanso have an Investor COVID19 spreadsheet that lists investors the status of European investors. Many are still accepting pitches and investing.
A few days ago we announced the New W2-P5202D3 Wristband Beacon. Another way of advertising iBeacon from a wrist worn device to use through software on a programmable watch.
Beacon Maker and Beacon Scanner have recently become available for the Galaxy Watch: