19. IBEACON SPECIFICATION
▸ Apple Specification and Trademark on using Bluetooth
LE/Smart for indoor proximity
▸ Similar to a Bluetooth profile, except Apple are driving it
▸ Implementing specification is free, subject to Apple
NDA
20. REDBEAR BEACON
▸ RedBear BLE Mini
▸ TI CC2540
▸ 5v USB or 3.4v cell
battery input
▸ Around $30 USD
33. REMEMBER, IBEACONS ARE NOT SMART!
▸ No network connectivity
▸ No concept of devices that have discovered them
▸ No storage or additional information beyond UUID,
Major, Minor
37. IOS
▸ Support for iBeacons in CoreLocation in iOS 7.x
▸ Create new CLBeaconRegion using UUID
▸ DidRangeBeacons event used to detect nearby beacons
▸ Returns array of beacons
38. IOS (XAMARIN)
private CLLocationManager locationManager;
private NSUuid beaconUUID = new NSUuid ("E2C56DB5-DFFB-48D2-B060-D0F5A71096E0");
private CLBeaconRegion beaconRegion;
public void StartListeningForBeacons ()
{
beaconRegion = new CLBeaconRegion (beaconUUID, "0");
locationManager = new CLLocationManager ();
locationManager.DidRangeBeacons += (object sender, CLRegionBeaconsRangedEventArgs args) => {
// args.Beacons contains the array of found beacons
};
locationManager.StartRangingBeacons (beaconRegion);
locationManager.StartUpdatingLocation ();
}
39. ANDROID
▸ Apple does not provide iBeacon SDK for Android
▸ Radius Networks open sourced SDK
▸ Extend Activity with IBeaconConsumer
▸ OnIBeaconServiceConnect and RangingBeaconsInRegion
40. ANDROID (XAMARIN)
private readonly IBeaconManager iBeaconManager;
private readonly Region monitoringRegion;
private readonly Region rangingRegion;
private const string UUID = "e2c56db5dffb48d2b060d0f5a71096e0";
public MainActivity ()
{
iBeaconManager = IBeaconManager.GetInstanceForApplication (this);
monitorNotifier = new MonitorNotifier ();
rangeNotifier = new RangeNotifier ();
monitoringRegion = new Region ("r2MonitoringUniqueId", UUID, null, null);
rangingRegion = new Region ("r2RangingUniqueId", UUID, null, null);
}
43. WHAT DID WE SEE?
▸ Simple application using CLLocationManager to range
for beacons
▸ Relatively accurate line-of-sight proximity detection
▸ Enumerated proximity levels
46. BACKGROUND DETECTION IN IOS
▸ Made possible by iOS 7.1!
▸ Invoke ranging for beacons from AppDelegate (not
ViewController)
▸ Beacon ranging will persist background and even work
when device is locked/standby
47. BACKGROUND DETECTION IN ANDROID
▸ Default as Radius SDK actually runs as a service
▸ Developer chooses how to handle OnResume, OnPause
events, and invoking application/service on updates
▸ Should consider own service to handle background
notifications
48. BACKGROUND TIPS
▸ Keeping BLE enabled and ranging will have some effect
on battery
▸ Consider adding sleep time if running in background
▸ Don't make expensive calls (e.g. networking,
computation) on each ranging
55. TRILATERATION
▸ Similar in concept to triangulation except uses distance
vs. angles
▸ Requires minimum of three beacons
▸ Assuming accurate power signals, can calculate more
accurate position
57. WHAT DID WE SEE?
▸ Position of 3+ beacons sent to NodeJS server
▸ NodeJS server uses cartersian coords to work out
position, broadcast via WebSockets
▸ HTML5 page responds to WebSockets and plots position
on canvas
59. NOT PERFECT...
▸ Walls or line-of-sight obstructions will decrease
observed power range, and lead to inaccurate results
▸ But an array of iBeacons in an open area (e.g. retail
store) should provide 1-2m accuracy
62. IBEACONS
▸ Apple standard, but supported well on most (latest)
mobile devices
▸ Mix of hardware and software options, easy to develop
▸ Opening up wide opportunity of indoor location
scenarios to any developer at a relatively low cost point