trifork ibeacon demo lunch talk
DESCRIPTION
Slides from a Trifork Mobile lunch talk about iBeacons on Android on 5/5-2014.TRANSCRIPT
![Page 1: Trifork iBeacon Demo Lunch Talk](https://reader034.vdocuments.net/reader034/viewer/2022051819/54c84c5c4a79595a358b4618/html5/thumbnails/1.jpg)
Trifork iBeacon DemoMobile Lunch 05.05.2014
![Page 2: Trifork iBeacon Demo Lunch Talk](https://reader034.vdocuments.net/reader034/viewer/2022051819/54c84c5c4a79595a358b4618/html5/thumbnails/2.jpg)
Bluetooth Low Energy (BLE)
![Page 3: Trifork iBeacon Demo Lunch Talk](https://reader034.vdocuments.net/reader034/viewer/2022051819/54c84c5c4a79595a358b4618/html5/thumbnails/3.jpg)
iBeacons• iBeacon is a BLE profile
specification formalised by Apple. It is not a standard.
• It can work on all devices that support Bluetooth LE, not just iOS.
• 2 primary use cases: Proximity and Ranging.
• Works indoors.
![Page 4: Trifork iBeacon Demo Lunch Talk](https://reader034.vdocuments.net/reader034/viewer/2022051819/54c84c5c4a79595a358b4618/html5/thumbnails/4.jpg)
What is iBeacons
![Page 5: Trifork iBeacon Demo Lunch Talk](https://reader034.vdocuments.net/reader034/viewer/2022051819/54c84c5c4a79595a358b4618/html5/thumbnails/5.jpg)
Bluetooth LE Support• Requires a Bluetooth LE chip. Only newer phones/
tablets has it.
• Windows: Phone 8.1 (?%), Lumia 520, 620, 625, 720
• iOS: 7.0+ (87%), iPhone 4s+, iPad 3rd generation+
• Android: 4.3 (14%), Samsung Galaxy S3+, Nexus 4+
![Page 6: Trifork iBeacon Demo Lunch Talk](https://reader034.vdocuments.net/reader034/viewer/2022051819/54c84c5c4a79595a358b4618/html5/thumbnails/6.jpg)
iBeacon protocol• Advertisement bluetooth
package.
• Mac-address is spoofed on iOS.
• Proximity UUID: 16 byte UUID
• Major: 0 - 65.535
• Minor: 0 - 65.535
• TxPower: Signal Strength at 1m from iBeacon.
![Page 7: Trifork iBeacon Demo Lunch Talk](https://reader034.vdocuments.net/reader034/viewer/2022051819/54c84c5c4a79595a358b4618/html5/thumbnails/7.jpg)
Detecting a iBeacon
• Can make drive-by-detection hard. Battery matters on both ends.
• Devices do not talk to each other. Phone simply listens to heartbeats from iBeacon.
• Scan time and intervals should be non-regular numbers, eg. scan period of 1.1s. instead of 1s.
![Page 8: Trifork iBeacon Demo Lunch Talk](https://reader034.vdocuments.net/reader034/viewer/2022051819/54c84c5c4a79595a358b4618/html5/thumbnails/8.jpg)
Detecting proximity
• Just check for existence of the right combination of <Proximity UUID, Major, Minor>
• No guarantee that iBeacon is unique.
![Page 9: Trifork iBeacon Demo Lunch Talk](https://reader034.vdocuments.net/reader034/viewer/2022051819/54c84c5c4a79595a358b4618/html5/thumbnails/9.jpg)
Detecting range• Hard problem. Many scientific papers
on the subject.
• Water blocks bluetooth signals. Guess what humans are mostly made of?
• Algorithm not known on iOS.
• Thus only rough estimates -> Immediate, Near, Far.
• Recommendation is to use relative range instead of absolute.
• “You know if you are close to an iBeacon, otherwise you don’t know anything”.
![Page 10: Trifork iBeacon Demo Lunch Talk](https://reader034.vdocuments.net/reader034/viewer/2022051819/54c84c5c4a79595a358b4618/html5/thumbnails/10.jpg)
Code/SDK’s• Android doesn’t not provide a common API. Each
app must implement it.
• Androids Geofencing API doesn’t support iBeacons (yet).
• SDK’s exist that make it easy: Estimote, Radius Network, Gimbal (soon?).
• Demo app: https://github.com/cmelchior/trifork-ibeacon-demo
![Page 11: Trifork iBeacon Demo Lunch Talk](https://reader034.vdocuments.net/reader034/viewer/2022051819/54c84c5c4a79595a358b4618/html5/thumbnails/11.jpg)
Keynote now has animated GIF Support :)
![Page 12: Trifork iBeacon Demo Lunch Talk](https://reader034.vdocuments.net/reader034/viewer/2022051819/54c84c5c4a79595a358b4618/html5/thumbnails/12.jpg)
Lessons learned• Android Bluetooth stack is flawed. Crashes when it has
seen 2000 MAC’s: https://code.google.com/p/android/issues/detail?id=67272
• When monitoring, battery impact is small. It is still noticeable over a day however. Scan intervals matters!!!
• Ranging is very unprecise.
• Exit/Entry into a region can happen very frequently due to scans missing the iBeacon.
![Page 13: Trifork iBeacon Demo Lunch Talk](https://reader034.vdocuments.net/reader034/viewer/2022051819/54c84c5c4a79595a358b4618/html5/thumbnails/13.jpg)
Links• http://en.wikipedia.org/wiki/IBeacon
• http://www.warski.org/blog/2014/01/how-ibeacons-work/
• http://stackoverflow.com/questions/18906988/what-is-the-ibeacon-bluetooth-profile
• http://stackoverflow.com/questions/20416218/understanding-ibeacon-distancing
• http://localz.co/blog/ibeacon-ble-hardware-commercial-comparison/
• https://github.com/RadiusNetworks/android-ibeacon-service
• https://github.com/Estimote/Android-SDK