Intro to iBeacon and Bluetooth Low Energy
-
Upload
kurt-mcintire -
Category
Technology
-
view
5.245 -
download
1
description
Transcript of Intro to iBeacon and Bluetooth Low Energy
![Page 1: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/1.jpg)
Introduction to iBeacon and BLE @KurtMcIntire
![Page 2: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/2.jpg)
#iBeacon @VektorDigital @KurtMcIntire
![Page 3: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/3.jpg)
Source: aim.org
![Page 4: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/4.jpg)
Source: aim.org
![Page 5: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/5.jpg)
Source: starhooks.blogspot.com
![Page 6: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/6.jpg)
Source: starhooks.blogspot.com
![Page 7: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/7.jpg)
Source: starhooks.blogspot.com
three minutes elapse
![Page 8: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/8.jpg)
Source: starhooks.blogspot.com
![Page 9: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/9.jpg)
Overview 1. What is BLE? 2. What is iBeacon? 3. How to detect iBeacons 4. How make your iOS device an iBeacon 5. Demos & Real-world Applications
![Page 10: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/10.jpg)
Bluetooth Low Energy Optimized for small bursts of data Impressive battery life Ideal for sensors
![Page 11: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/11.jpg)
Sensors & Wearables
Photo Sources: ewf.sm, macrumors.com,
cdn.macrumors.com
![Page 12: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/12.jpg)
Joke and Photo Source: Punch Through Design
#iBacon
![Page 13: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/13.jpg)
Photo Source: Beekn.net
#iBeacon
![Page 14: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/14.jpg)
UUID B9407F30-
F5F8- 466E- AFF9-
25556B57FE6D
34956
58549 Major
Minor
![Page 15: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/15.jpg)
Photo Sources: QualCom, Estimote, PunchThrough, Roximity
manufacturers
![Page 16: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/16.jpg)
manufacturers
Battery Life 2 mo - 2 yr
Cost ~0 - $99
Dashboards and Beacon Management Tools
![Page 17: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/17.jpg)
iBeacon
BLUETOOTH LE SIGNAL
![Page 18: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/18.jpg)
Phones and tablets As iBeacons
![Page 19: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/19.jpg)
250,000,000 Bluetooth low energy
Phones and tablets
![Page 20: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/20.jpg)
1. User needs your app 2. User must have app-on (does not need to
be “open”) 3. User needs Bluetooth BLE compatible
device 4. User needs Bluetooth on 5. User must allow you to push messages
Requirements
![Page 21: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/21.jpg)
You’re not wrong You’re just an asshole
Photo Source: blog.estately.com
![Page 22: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/22.jpg)
The dude says,
Photo Source: blog.estately.com
![Page 23: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/23.jpg)
1. Don’t spam the s**t out of people 2. Don’t send repeat messages 3. Provide value
Photo Source: blog.estately.com
![Page 24: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/24.jpg)
Detect Beacons
![Page 25: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/25.jpg)
Framework #import <CoreLocation/CoreLocation.h>!
Delegate <CLLocationManagerDelegate>!
![Page 26: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/26.jpg)
Set up a
Region
![Page 27: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/27.jpg)
Set up a Region
- (id)initWithProximityUUID:(NSUUID *)proximityUUID major:(CLBeaconMajorValue)major minor:(CLBeaconMinorValue)minor identifier:(NSString *)identifier;!
- (id)initWithProximityUUID:(NSUUID *)proximityUUID identifier:(NSString *)identifier;!
OR
!CLBeaconRegion *beaconRegion!
![Page 28: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/28.jpg)
Set up a Region
static NSString *const kUUID = @"B9407F30-F5F8-466E-AFF9-25556B57FE6D";!!static NSString *const kIdentifier = @"EstimoteBeacon”;!
![Page 29: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/29.jpg)
Location manager CLLocationManager *locationManager!
1. Monitoring 2. Ranging
![Page 30: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/30.jpg)
Monitoring
Inside or Outside Works when phone asleep
![Page 31: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/31.jpg)
Monitoring - (void)locationManager:(CLLocationManager *)manager!
!didDetermineState:(CLRegionState)state forRegion:(CLRegion *)region!
if (state == CLRegionStateInside) {!! !// do something !!}!
else if (state == CLRegionStateOutside) {!! !// do something!!}!
![Page 32: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/32.jpg)
Monitoring
- (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region!
- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region!!
![Page 33: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/33.jpg)
Monitoring
App State Distance (ft) Active 50 Asleep 18
![Page 34: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/34.jpg)
Ranging 1 / second Proximity Works when app active
![Page 35: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/35.jpg)
Ranging - (void)locationManager:(CLLocationManager *)manager!!didRangeBeacons:(NSArray *)beacons
inRegion:(CLBeaconRegion *)region!
![Page 36: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/36.jpg)
Ranging
NSArray *detectedBeacons!CLBeacon *closestBeacon!
![Page 37: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/37.jpg)
Closest Beacon _closestBeacon = [_detectedBeacons firstObject];!
![Page 38: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/38.jpg)
Ranging typedef {! CLProximityUnknown,! CLProximityImmediate,! CLProximityNear,! CLProximityFar!} CLProximity;!
![Page 39: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/39.jpg)
Ranging
2014-01-16 14:51:33.611 BeaconDemo[591:60b] (! "CLBeacon (uuid:<__NSConcreteUUID 0x17003c800> B9407F30-F5F8-466E-AFF9-25556B57FE6D, major:34956, minor:46961, proximity:2 +/- 1.20m, rssi:-73)",! "CLBeacon (uuid:<__NSConcreteUUID 0x17003c340> B9407F30-F5F8-466E-AFF9-25556B57FE6D, major:43680, minor:8490, proximity:3 +/- 6.49m, rssi:-86)",! "CLBeacon (uuid:<__NSConcreteUUID 0x17003d360> B9407F30-F5F8-466E-AFF9-25556B57FE6D, major:22222, minor:58549, proximity:3 +/- 8.61m, rssi:-85)"!)!
![Page 40: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/40.jpg)
Ranging
Beacon Proximity RSSI Beacon 1 2 +/- 1.20m -73 Beacon 2 3 +/- 6.49m -86 Beacon 3 3 +/- 8.61m -85
![Page 41: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/41.jpg)
Do Something! - (void)checkProximity {! switch (_closestBeacon.proximity) {!
! ! case CLProximityImmediate:! self.view.backgroundColor = [UIColor redColor];! [self beaconIsImmediate];! break;! case CLProximityNear:! self.view.backgroundColor = [UIColor yellowColor];! break;! case CLProximityFar:! self.view.backgroundColor = [UIColor blueColor];! break;! default:! break;! }!}!
![Page 42: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/42.jpg)
Make your device an iBeacon
![Page 43: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/43.jpg)
Frameworks #import <CoreBluetooth/CoreBluetooth.h>!
Delegate <CBPeripheralManagerDelegate>!
![Page 44: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/44.jpg)
The PlayerS CBPeripheralManager *peripheralManager!
NSDictionary *beaconPeripheralData!
![Page 45: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/45.jpg)
Set up a Region
- (id)initWithProximityUUID:(NSUUID *)proximityUUID major:(CLBeaconMajorValue)major minor:(CLBeaconMinorValue)minor identifier:(NSString *)identifier;!
- (id)initWithProximityUUID:(NSUUID *)proximityUUID identifier:(NSString *)identifier;!
OR
![Page 46: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/46.jpg)
Set up a Region
static NSString *const kUUID = @"DE8F8D67-4914-4B25-A9F2-EE0C624117CE";!!static NSString *const kIdentifier = @”MyiPhone”;!
![Page 47: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/47.jpg)
Advertising
[self.peripheralManager stopAdvertising];!
[self.peripheralManager startAdvertising:beaconPeripheralData];!
![Page 48: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/48.jpg)
Advertising
- (void)peripheralManagerDidUpdateState:(CBPeripheralManager *)peripheralManager!
![Page 49: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/49.jpg)
BEEKN.net Raywenderlich.com HiBeacons App – Github Radius Networks – iBeacon Monitoring in the Background and Foreground
resources
![Page 50: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/50.jpg)
Beer demo
![Page 51: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/51.jpg)
Coupon Redeem with Parse demo
![Page 52: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/52.jpg)
PKPKT
![Page 53: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/53.jpg)
PKPKT
h#p://pkpkt.com/
Photo Source: insidemobileapps.com
![Page 54: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/54.jpg)
Apple Store ALL 254 Retail Locations
![Page 55: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/55.jpg)
Photo Source: insidemobileapps.com
![Page 56: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/56.jpg)
MLB At the Ballpark
![Page 57: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/57.jpg)
Photo Source: CNET News : MLB tests Apple's iBeacon at Citi Field
![Page 58: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/58.jpg)
NFL Mobile app
![Page 59: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/59.jpg)
Photo Source: nytimes.com
![Page 60: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/60.jpg)
Safeway Stores
![Page 61: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/61.jpg)
Photo Source: idownloadblog.com
![Page 62: Intro to iBeacon and Bluetooth Low Energy](https://reader034.fdocuments.us/reader034/viewer/2022050918/540dde2d8d7f72767e8b4b94/html5/thumbnails/62.jpg)
What will you make? iBeacon
@VektorDigital @KurtMcIntire