With the first Bluetooth 5 devices just released (first and foremost the Samsung Galaxy S8), Bluetooth Beacons like Apple iBeacon and Eddystone by Google gain a lot of potential. Increased range means future beacons will cover a much larger area, without increased power consumption. With the payload increase of beacon advertisement frames from 31 bytes to 255 bytes, the amount of information transmitted by beacons can substantially increase.
In my session about Bluetooth Beacons at the Mobile Developer After-Work #14: Creating Immersive Environments, I provided a short update about the latest news. Unfortunately, recording of the live session at the event failed. Therefore, I’ve re-recorded it – you will miss the live experience, but I did have a little more time for more detailed explanations of some important facts, so it’s well worth watching again even if you have been at the #mdaw14 Event!
In the previous part, we’ve re-compiled Spectator View using the latest HoloToolkit sources. At the time of writing, this resulted in a compile error, as the HoloToolkit for Unity has seen a breaking change since Spectator View was released.
In this part, we’ll first fix the Spectator View code, and then set it up correctly in our own Unity scene. Then, we’ll need to check several other things: how to launch the Sharing Service, adding Internet Connectivity and the Holographic Camera prefab.
Fixing the Spectator View Code
From the two choices at the end of part 4, of course, we go with the adventurous road to fix the code 🙂
Getting Spectator View to run with your own app is obviously the most important step. How to include the required tools – including Sharing – into your app using the latest versions?
More specifically, I’ll add Spectator View to my playground project, which is mainly for placing a hologram in the room (with a few other useful scripts). Currently, this hologram is a nice, life-size skeleton from the Unity asset store.
HoloToolkit-Unity & Holographic Academy
The Holographic Academy course 240 explains how to set up your project to include Shared Holograms. It’s a good idea to work through the tutorial, as it will show you some of the basics of what is needed for Spectator View.
However, as with most of the Academy tutorials, it’s quite old. The HoloToolkit has evolved since then, and the demos often have little resemblance to what your project would look like if you start from scratch.
According to ABI research, 8.2 million Bluetooth Beacons have been shipped. In 2021, the yearly shipments will have increased to an astonishing number of 565 million beacons per year.
The Bluetooth Beacon Interactor for Windows 10 is a free & open source app for scanning your environment for Beacons. It was the first Bluetooth Beacon scanner app available for Windows 10 and works on PCs, smartphones and even the Microsoft HoloLens.
New Features in Version 2.0
The app has just received an update to version 2.0, which adds the two most requested features:
URLs in Eddystone URL frames are now clickable. You can directly open the web site linked to by Physical Web beacons.
Thanks to a community contribution by kobush, the app now also supports beacons compatible to Apple iBeacons / Proximity Beacons.
You can download the source code of the Bluetooth Beacon Interactor and its base Universal Beacon Library at GitHub. If you would like to scan your surroundings for Bluetooth Beacons and analyze their contents, you can directly download the app from the Windows 10 App Store.
HoloLens Spectator View allows capturing high quality photos including the mixed reality contents as seen by other HoloLens users. To test the complete system setup, the next step is running the supplied sample app in Unity.
Based on my previous two blog posts, calibration of the HoloLens in relation to the DSLR camera has been successfully completed. If you need to complete these steps, check out Part 1 and Part 2 first.
The following screenshot shows the contents of the
CalibrationFiles directory, where the app saved both the screenshots of the Canon EOS camera, as well as from the HoloLens. The txt file in the directory is the data file you actually need for your app.
Especially when working with Bluetooth Beacons like iBeacon or Eddystone, you will often want to use embedded hardware to create a low-cost, always running system. This short guide explains how to read Bluetooth Beacon messages using the Arduino 101 / Genuino 101 board.