Android O Bluetooth 5 Device API Observations

Last March we took a closer look at Bluetooth 5 and concluded there are tradeoffs between long range, high speed, legacy (today’s) phone compatibility and efficient battery.

We are starting to see corresponding development APIs appear for devices that will detect Bluetooth 5 beacons. Android (O) has a new setPreferredPhy call that allows apps to choose the PHY modes mentioned in our previous article.

As expected, high speed and long range are mutually exclusive and if you want to remain compatible with older (current) beacons then you can’t have the high speed or long range. Long range and high speed are only supported if the hardware supports it which means old (current) smartphones won’t get Bluetooth 5 support through a software upgrade.

The availability of the Android API raises new questions. Our understanding is that PHY is a low level thing and that the Bluetooth hardware can only work in one PHY mode at a time. If so, what if an app changes the PHY? Does this switch for all apps? What are implications? For example, what if one app, for example an existing app, needs to use older beacons in compatibility mode while another app wants to use Bluetooth 5 long range beacons? Maybe we are wrong and the underlying Bluetooth 5 firmware somehow multi-tasks PHY modes? Finally, how does the app know the device is Bluetooth 5 capable? It remains to be seen how the fragmentation of capability and behaviour is going to be workable on a typical app. Will most apps end up defaulting to compatibility mode, the long range and high speed only being used for special cases (devices)? In any case, we can see it’s likely that Bluetooth 5 is going to complicate beacon app development.

28/6 UPDATE: In response to this post, Martin Woolley of the Bluetooth SIG answered all our questions! Hardware, hence Android O, can have several PHY modes active at the same time provided the underlying device supports this.

Beacons are a Technology, not the Solution

There’s an interesting app/service called Voolsy, in India, that uses iBeacons to enable a slick restaurant mobile app. The key thing here is that beacons are mentioned just once on their web pages. The emphasis is, instead, on making the dining experience “enriched, hassle free and smooth”.

Take a look at your current and proposed beacon based solution and see if you can remove almost all references to beacons and instead concentrate on the problem being solved for your users. That way you are more likely to engage customers and less likely to alienate them with what’s, to them, incomprehensible technology. Beacons are an enabling technology, not the solution.

Beacons and Lone Workers

There are types of working where workers work alone without close or direct supervision. Employers have a legal duty of care to monitor such employees so that they can detect accidents, illness and, in some cases, an attack.

There are some rudimentary systems in place, particularly on sites such as airports, that use short range (1cm) RFID tags that workers have to periodically ‘check in’ to. With beacons, workers don’t have to check in and much of this is now automated. It also works at much larger ranges up to 300m.

Our BeaconRTLS system maps lone workers. Alerts can be created that show when people haven’t changed zone for a configurable amount of time. It’s also possible to trigger alerts when people enter or leave zones or when they press an ’emergency’ button on the beacon.

What’s more, the system can be used to map assets as well as people and when used with sensor beacons can detect and alert based on environmental factors such as temperature, humidity or whether doors are open or closed.

Contact us about BeaconRTLS.

Small, Long Battery Life, Long Range Beacon

It’s surprising how many enquires we get asking for small beacons that also have a long battery life and long range. Such things don’t exist. The range and battery life relate to the battery size. Both need a larger battery and hence this implies a larger beacon.

You need to choose what’s most important for your project. If you need a very small device then the iB001M is only 2.6mm thick but has a small CR2016 battery. If battery life and range are more important then look at the larger battery beacons and long range beacons. If you have the possibility of mains (USB) power then you might consider a USB beacon that can be small.

Faraday RF-Shield Bags Back in Stock

Our large Faraday Radio Frequency RF shield nylon bags are back in stock.

Faraday bags can be very useful during development when you want to bring beacons in and out of range or need to hide development beacons. They are also useful during setup when you want to shield uncomissioned beacons temporarily.

faradaybaglarge_smaller

These bags were originally designed for military, intelligence and police agencies to prevent seized devices from being remotely altered. They shield WiFi, Bluetooth and phone signals up to 70dBm. They can also be used with phones and tablets for personal anti-radiation health reasons, preventing tracking or avoiding communication when you don’t want to be interrupted.

Bluetooth Beacons in Factories, IoT and Industry 4.0

McKinsey has a useful chart where they assess the potential impact of the IoT by segment:

It can be seen that ‘Factory’ has the greatest potential. This links with ‘Industry 4.0‘, the current trend for more automation and data exchange in manufacturing with the aim of significantly improving efficiency. But what does this mean in practice and what are challenges? Can these be solved with Bluetooth beacons?

We have learnt that while just about every industry client has different needs, all solutions involve context and location. Context is sensing, while location is where the sensing occurs.

Requirements we have experienced range from being able to pick up documents for particular machinery through to actual sensing such as detecting vibration is within (safety) bounds for ‘aggressive’ equipment. We have also seen the requirement for matching workers with workstations and jobs as well as the tracking of workers, tools, pallets, parts and fabrications. There’s also the need for real-time overviews for short term safety and efficiency management, the same longer term data also being used for process improvement and planning.

So why beacons?

  1. Low power. Sensors need to have a long life because replacing them or their batteries requires human effort and they are sometimes placed in normally inaccessible and dangerous areas. Beacons are ideal for this because some have up to 5+ years battery life and others can be permanently powered.
  2. Sensing. Various off the shelf sensor beacons are available. Custom variants are possible to sense industry specific metrics.
  3. Connectivity. Several gateways are available to connect to WiFi. Alternatively, it’s possible to use smartphones or small single board computers as gateways. There’s a trend for ‘Fog’ or ‘Edge’ gateways that only send pertinent data on to the cloud and can provide direct alerts quicker than being dependent on the latency of the cloud.
  4. Cloud management. Software such as our BeaconRTLS platform allows for the management and visualisation of sensors.
  5. Security. Beacon devices are password protected and the gateway to cloud communication is protected using standard Internet protocols.
  6. IoT needs to be made easy. This is BeaconZone’s role. As we mentioned, with the IoT every client has different needs. We bring together ready-made hardware and software components so that they can be dovetailed to create solutions.

Read about using Beacons in Industry and the 4th Industrial Revolution (4IR)

Read about BluetoothLocationEngine™

iBeacon App Development Considerations

If you are considering writing apps to communicate with iBeacons, here are some high level things you need to think about that are specific to beacon app development:

  • Detecting whether Location and Bluetooth are on/off and alerting the user for permission to use these
  • Detecting beacons in background when the iOS app is closed or the Android app is in doze mode
  • On Android, taking account of the various Bluetooth APIs that exist for the different Android releases
  • Fetching data, associated with a beacon, from a service, such that it’s cached and not fetched every time
  • Arranging for some initial data bundled with the app so that it works straight away without a data connection
  • Fetching data before it is needed such that it’s available with no delay and when there’s no network connection
  • Re-fetching of data when it becomes stale
  • Fetching metadata from the server to control the behaviour of triggering
  • Arranging how Apple will test the app for app review otherwise complications will arise and the review will take weeks
  • Assessing whether to use the mobile OS or manufacturer supplied SDKs (or both)
  • If connecting to beacons, taking account of the unreliability of wireless connections
  • Collecting and uploading statistics/analytics to assess usage
  • Providing end user diagnostics to aid support troubleshooting

Need an experienced beacon app developer to get these things done quicker? Consider our development services.

Choosing an iBeacon Developer

We are sometimes approached by companies after their initial choice of developer has let them down. The usual pattern is failure to meet deadlines after which the developer gives excuses why they can’t continue on the project. iBeacon projects introduce extra complexities that, if not experienced previously, can slow or stall projects. In the worst of cases this can cause developers to drop out wasting valuable time and in some cases loss of money that can’t be recovered.

A resultant problem is that it’s difficult to take on others’ code. The only time this is usually possible is when the developer has left for a good reason and is still around for a short time to answer questions. Noone wants to take on abandoned code as as it’s usually poorly implemented and documented.

Organisations are generally too casual about how and who they take on for development, concentrating on cost and speed at the expense of risk. Do some checking so you reduce some of the risks.

Ask who (yes a person, not a company) will be actually doing the work. How long have they been with the company? Try to assess whether they are likely to see your project through to the end. Try to get a reference for work done by the person. Ask the reference about quality and whether the work was completed on time. The better developers provide weekly or even daily builds for you to review. This allows you to evaluate progress and provide feedback. Think about how much pre-sales feedback has been received. For most projects, developers ask things and provide initial advice. If it’s all ‘can do’ or ‘yes’ then suspect something is amiss.

Successful development is a long term relationship and a random approach to choosing one is more likely to land you in trouble. It’s sometimes the case that there’s more work to be done on amendments, enhancements, solving end-user problems and creating variants than on the original development. Think longer term.

Read about our development services.

Using Beacons in Retail

We get many queries from retailers asking how to use beacons. As we have previously written, Beacons aren’t much good for unsolicated marketing (nor are Eddystone beacons) and instead you need to think about offering useful information on top of which you can then provide offers.

There’s a Twitter post by Joaquim Bretcha today that shows how Tesco Lotus use iBeacons in Thailand:

You can see that their app does a lot more than push offers. It gently prompts the user at the appropriate times through notifications, in-app messages and sms messages. The aim is to have “Constant exposure to Tesco media”, not push offers.

Adding Beacon Functionalty

Since beacons became available there has been an emphasis on new companies creating new systems that use beacons. Now that beacons are maturing we are starting to see existing apps and systems add beacon-triggered functionality.

A very recent example is the FileMaker platform that has added iBeacon geofencing. Two other examples are car mileage logging apps that turn on/off in response to beacons and the Motorola MOTOTRBO range of two-way radios that include beacon detection so that they can support indoor positioning.

These scenarios are very different and therein lies the opportunity. Many existing systems, apps, services and products can be extended to provide for features based on location. Instead of looking for new things, that might experience difficulty gaining traction, think about what you (or your partners) already have and work out if beacons can provide added value.