Bluetooth LE & iBeacons
���1
Javier Chávarri @javierwchavarri
Bluetooth LE
• Aka Bluetooth Smart
• Released in June 2010
• Completely new specification (by Bluetooth SIG)
• Designed to enable very low power devices to run for years
• Asynchronous
• NOT connection oriented���2
What is Bluetooth LE good for?
• Connecting things we carry with us (watches, tags, body sensors)
• Accessing the things around us
• Low duty cycle M2M communication
• Communication within a system (wheels to car)
• Connecting anything that has intrinsic data to the Internet
���3
Prediction
•Bluetooth LE will be to smartphones what USB has been to desktop PCs: universal peripheral connectivity
���4
Our case
•Connect a BLE device to an iPhone
���5
iBeacons
• Region monitor
• Micro locations
• Range awareness
• Indoor
• Awake your app by push notifications using iBeacons
• In app notifications when user enters / leaves a region
���6
What can be an iBeacon?
• Third party BLE devices or iOS devices
���7
All iOS devices?• NO • Only these devices:
• iPhone 5 • iPhone 4S • iPad mini • iPad with Retina display (4th gen) • iPad (3rd gen) • iPod touch (5th gen)
• with iOS Version 5.1.1 or above.
���8
Other devices
• Android devices with Bluetooth 4.0 and Android 4.3 and later (Samsung Galaxy S3/S4, Samsung Galaxy Note II, HTC One, Nexus 7 2013 edition, Nexus 4, HTC Butterfly, Droid DNA)
• MacIntosh computers equipped with OS X 10.9 (Mavericks) and Bluetooth 4.0 using the MacBeacon application from Radius Networks.
���9
CLBeaconRegion• Defines a type of region that is based on the device’s
proximity to a Bluetooth beacon (or many) • One “Region” does not mean physically close, could be all
over the world • proximityUUID: identifier that you use to identify your
company’s beacons • mayor: number could represent a group of beacons in the
region • minor: is the unique identifier for the beacon
���10
Emitter
���11
NSUUID *uuid = [[NSUUID alloc] initWithUUIDString:@"23542266-18D1-4FE4-B4A1-23F8195B9D39"]; ! self.beaconRegion = [[CLBeaconRegion alloc] initWithProximityUUID:uuid
major:1 minor:4 identifier:@"com.devfright.myRegion"];
Receiver
���12
- (void)initRegion { NSUUID *uuid = [[NSUUID alloc] initWithUUIDString:@"B9407F30-F5F8-466E-AFF9-25556B57FE6D"]; self.beaconRegion = [[CLBeaconRegion alloc] initWithProximityUUID:uuid identifier:@"com.devfright.myRegion"]; [self.locationManager startMonitoringForRegion:self.beaconRegion]; }
CLBeacon
• Identifying the Beacon • proximityUUID • major • minor • Determining the Beacon Distance • proximity unknown, immediate, near, far • accuracy (meters) • rssi (dbm)
���13
CLLocationManager delegate
���14
-(void)locationManager:(CLLocationManager *)manager didRangeBeacons:(NSArray *)beacons inRegion:(CLBeaconRegion *)region { CLBeacon *beacon = [[CLBeacon alloc] init]; beacon = [beacons lastObject]; self.beaconFoundLabel.text = @"Yes"; if (beacon.proximity == CLProximityUnknown) { NSLog(@"Unknown Proximity"); } else if (beacon.proximity == CLProximityImmediate) { NSLog(@"Immediate"); } else if (beacon.proximity == CLProximityNear) { NSLog(@"Near"); } else if (beacon.proximity == CLProximityFar) { NSLog(@"Far"); } } !
Third party vendors
• Kontakt.io: they sell 10 beacons for $279; 5 beacons for $149 and 3 beacons for $99
• Estimote: 3 beacons for $99
• BLE mini (RedBearLab): 1 for $35 (development kit)
• Texas instruments: CC2541 Mini Development Kit
���15
Case uses
Dynamic content updates���17
Find real world assistance���18
Sources
• http://www.devfright.com/ibeacons-tutorial-ios-7-clbeaconregion-clbeacon/
• http://www.slideshare.net/verifone/bluetooth-low-energy-beacons-and-retail-final
• Apple documentation on CLBeacon and CLBeaconRegion
• http://en.wikipedia.org/wiki/IBeacon
���19
An exampleTriangulation using iBeacons