iBeacons talk for XCake, July 2015. (Clinch.io use case)

29
iBeacons and Bluetooth LE for fun and profit ;; & a little frustration ;; Damien Glancy @dglancy

Transcript of iBeacons talk for XCake, July 2015. (Clinch.io use case)

Page 1: iBeacons talk for XCake, July 2015. (Clinch.io use case)

iBeacons and Bluetooth LEfor fun and profit;;& a little frustration;;

Damien Glancy@dglancy

Page 2: iBeacons talk for XCake, July 2015. (Clinch.io use case)

What are we looking at here?

Page 3: iBeacons talk for XCake, July 2015. (Clinch.io use case)

Bluetooth LE is a specificationdifferent to regular Bluetooth

Specification is used to create chipsetssuch as Texas Instruments CC256x

Which are embedded into devicessuch as Estimote

Page 4: iBeacons talk for XCake, July 2015. (Clinch.io use case)

iBeacon is based on the proximity part of the Bluetooth LE specification

Page 5: iBeacons talk for XCake, July 2015. (Clinch.io use case)

What does it do?

Page 6: iBeacons talk for XCake, July 2015. (Clinch.io use case)

Devices continuously transmit a small packet of data

Which wake up a listener to let it know they are there

Oh, Hi!

Page 7: iBeacons talk for XCake, July 2015. (Clinch.io use case)

Oh, Hi!

Strength of signal allows listener to calculate the proximity of the device

Page 8: iBeacons talk for XCake, July 2015. (Clinch.io use case)

GPS is about location

Beacons are about proximity

Page 9: iBeacons talk for XCake, July 2015. (Clinch.io use case)

What data is sent?

Page 10: iBeacons talk for XCake, July 2015. (Clinch.io use case)

Uses the “advertisement” channel of the Bluetooth LE spec

iBeacon prefix

Proximity UUIDMajor Code

TX power

Minor Code

9 bytes 16 bytes 2 bytes 2 bytes 1 byte

Total 31 bytes

fb0b57a2-8228-44-cd-913a-94a122ba1206 01 02

Page 11: iBeacons talk for XCake, July 2015. (Clinch.io use case)

UUID

Major Number

Minor Number

Typical Data Packet Values

{ }That you need to worry about

These can be set to whatever you want

Page 12: iBeacons talk for XCake, July 2015. (Clinch.io use case)

A typical naming scheme

Page 13: iBeacons talk for XCake, July 2015. (Clinch.io use case)

Store Location Dublin Cork Limerick

UUIDD9B9EC1F-3925-43D0-80A9-

1E39D4CEA95C

Major 1 2 3

Minor

Clothing 10 10 10

Housewares 20 20 20

Garden 30 30 30

Page 14: iBeacons talk for XCake, July 2015. (Clinch.io use case)

Core Location

Page 15: iBeacons talk for XCake, July 2015. (Clinch.io use case)

- (void)startListenting { self.locationManager = [[CLLocationManager alloc] init]; self.locationManager.delegate = self; [self.locationManager requestAlwaysAuthorization];}

Authorization

- (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status { if (status == kCLAuthorizationStatusAuthorizedAlways) { //do something }}

CLLocationManagerDelegate

Page 16: iBeacons talk for XCake, July 2015. (Clinch.io use case)

- (void)listenForBeacon:(CKBeacon *)beacon { CLBeaconRegion *region = [[CLBeaconRegion alloc] initWithProximityUUID:[[NSUUID alloc] initWithUUIDString:beacon.proximityUUID] major:beacon.major.unsignedShortValue minor:beacon.minor.unsignedShortValue identifier:beacon.name];

[self.locationManager startMonitoringForRegion:region];}

Start listening for a Beacon

- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region { CLBeaconRegion *beaconRegion = (CLBeaconRegion *)region;

NSString *proximityUUID = beaconRegion.proximityUUID; NSNumber *majorNumber = beaconRegion.major; NSNumber *minorNumber = beaconRegion.minor;}

CLLocationManagerDelegate

Page 17: iBeacons talk for XCake, July 2015. (Clinch.io use case)

CLLocationManagerDelegate

didEnterRegion:

didExitRegion:

didRangeBeacons:inRegion:

Proximity

Page 18: iBeacons talk for XCake, July 2015. (Clinch.io use case)
Page 19: iBeacons talk for XCake, July 2015. (Clinch.io use case)

How does Clinch use

Beacons?

Page 20: iBeacons talk for XCake, July 2015. (Clinch.io use case)

99%

Page 21: iBeacons talk for XCake, July 2015. (Clinch.io use case)

Typic

al H

irin

g

Pro

cess

VIP

Pro

cess

Page 22: iBeacons talk for XCake, July 2015. (Clinch.io use case)

Retail

Food & beverage sector

400+ locations

~5,000 open job positions

Page 23: iBeacons talk for XCake, July 2015. (Clinch.io use case)

Successful candidates

Recruited from their customer base

Frequent the store/live nearby

Opt-in to job alerts

Page 24: iBeacons talk for XCake, July 2015. (Clinch.io use case)

Measuring behaviour &

intersecting with skills &

employment history

Page 25: iBeacons talk for XCake, July 2015. (Clinch.io use case)

Turning

the right

Customers

Into some

of your

best

Employees

Page 26: iBeacons talk for XCake, July 2015. (Clinch.io use case)

Frustrations

or

Surprise, surprise. There are bugs!

Page 27: iBeacons talk for XCake, July 2015. (Clinch.io use case)

Delayed Triggered Local Notifications

didExitRegion triggers

Don’t get me started on CLProximity

Page 29: iBeacons talk for XCake, July 2015. (Clinch.io use case)