SlideShare una empresa de Scribd logo
1 de 27
Descargar para leer sin conexión
Build Your own iBeacon
iBeacon Workshop
April 29, 2014
Andreessen Horowitz



Ramin Firoozye - @raminf
What is an iBeacon
- A Bluetooth Low Energy (BTLE) broadcast-only device
- A BTLE peripheral (transmitter)
- If connectable it can be configured
- It is a simple transmitter of data:
- UUID (i.e. E2C56DB5-DFFB-48D2-B060-D0F5A71096E0)
- Major (2 byte number)
- Minor (2 byte number)
- Proximity (via RSSI signal strength)
Typical iBeacon Platform
Beacon
Server Beacon UUID/major/minor
Distance (immediate/near/
far)
Beacon
data
Location
User ID
Personalize
d Content
BTLE Nomenclature
• Peripheral (transmitter)
• Central (receiver)
• iOS devices can be both at same time
• Broadcast interval/duration
• Channels: 37 data and 3 advertising
• Connectable vs. not
• TX Power
• RSSI (Received Signal Strength Indicator)
An iBeacon is…
• A BTLE peripheral
• Based on BTLE advertising spec
• Broadcasts a small amount of data
• May be connectable (to configure)
• Range: conservatively ~50ft
• With RSSI+TX power can roughly 

gauge distance — but not angle
TI Packet BTLE Sniffer Software (Windows)
http://www.ti.com/tool/PACKET-SNIFFER
TI Packet BTLE Sniffer Development
http://www.ti.com/tool/cc2540dk-mini
iBeacon Advertising Packet
Length: 47
!
Raw data (hex): D6 BE 89 8E 40 24 BA BB 2A CB
16 4C 02 01 06 1A FF 4C 00 02 15 29 5D 73 80
B2 A0 4F 5E 88 52 B4 70 BA 60 AB BB 00 00 00
00 C5 04 21 B9 38 A5
!
RSSI [dBm]: -38
Raw Data
Access Address
(4 bytes)
8E 89 BE D6
Advertising Channel/Data Channel PDU
(2 .. 39 bytes)
40 24 BA BB 2A CB 16 4C 02 01 06 1A FF 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52 B4 70 BA 60 AB BB 00 00 00 00
D6 BE 89 8E
40 24 BA BB 2A CB 16 4C 02 01 06 1A FF 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52
B4 70 BA 60 AB BB 00 00 00 00 C5
04 21 B9
38 A5
CRC
(3 bytes)
B9 21 04
RSSI
(1 byte)
-38
Frame Checksum
(1 byte)
A5
Header
(2 bytes)
40 24 (36 bytes)
Advertising Address
(6 bytes)
4C 16 CB 2A BB BA
D6 BE 89 8E
40 24 BA BB 2A CB 16 4C 02 01 06 1A FF 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52 B4 70 BA 60
AB BB 00 00 00 00 C5
04 21 B9 38 A5
CRC
(3 bytes)
EF E3 53
Advertising Data
(0 .. 31 bytes)
02 01 06 1A FF 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52 B4 70 BA 60 AB BB 00 00 00 00
Access Address
(4 bytes)
8E 89 BE D6
Fixed value for advertisement communication channels.
For data channels, varies by connection.
0x40 = Undirected advertising
0x24 = 36 (number of bytes to follow)
Mac Address
RSSI
(1 byte)
-38
FCS
(1 byte)
A5
D6 BE 89 8E
40 24 BA BB 2A CB 16 4C 02 01 06 1A FF 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52
B4 70 BA 60 AB BB 00 00 00 00 C5
04 21 B9 38 A5
Advertising Data
(0 .. 31 bytes)
02 01 06 1A FF 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52 B4 70 BA 60 AB BB 00 00 00 00
Length
(1 byte)
Type
(X byte)
•••
Data
(Ad Length)
Length
(1 byte)
Type
(X byte)
Data
(Ad Length)
D6 BE 89 8E
40 24 BA BB 2A CB 16 4C 02 01 06 1A FF 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52
B4 70 BA 60 AB BB 00 00 00 00 C5
04 21 B9 38 A5
Advertising Data
(0 .. 31 bytes)
02 01 06 1A FF 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52 B4 70 BA 60 AB BB 00 00 00 00
Ad Length
(1 byte)
0x02
Ad Type
(1 byte)
0x01
Data
(1 byte)
0x06 - Connectable/undirected
Ad Length
(1 byte)
0x1A = 25
Ad Type
(1 byte)
0xFF
Data
Manufacturer specific data to follow
D6 BE 89 8E
40 24 BA BB 2A CB 16 4C 02 01 06 1A FF 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52
B4 70 BA 60 AB BB 00 00 00 00 C5
04 21 B9 38 A5
Manufacturer-specific Data
(25 bytes)
4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52 B4 70 BA 60 AB BB 00 00 00 00
Manufacturer Type
(2 bytes)
00 4C
iBeacon Ad Indicator
(2 bytes)
15 02
https://www.bluetooth.org/en-us/specification/assigned-numbers/company-identifiers
Question
Will iOS iBeacon software *require* manufacturer ID 

to be 0x004C?
Answer: No
As long as your ID
starts with 0x00
•••
Sucks to be TomTom
Also: this can all change
D6 BE 89 8E
40 24 BA BB 2A CB 16 4C 02 01 06 1A FF 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52
B4 70 BA 60 AB BB 00 00 00 00 C5
04 21 B9 38 A5
Manufacturer-specific Data
(25 bytes)
4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52 B4 70 BA 60 AB BB 00 00 00 00
Manufacturer Type
(2 bytes)
00 4C
iBeacon Device Type
(1 byte)
0x02
iBeacon UUID
(16 bytes)
29 5D 73 80 B2 A0 4F 5E 88 52 B4 70 BA 60 AB BB
iBeacon Major
(2 bytes)
00 00
iBeacon Minor
(2 bytes)
00 00
Measured Tx Power at 1meter
(1 byte)
C5 (-57)
iBeacon Data Length
(1 byte)
0x15 (21)
• TX Power at 1 meter - calculated for each device
• 0xC5 = 197 = 2’s complement (256-197) = -59dBM
• Varies for each module manufacturer
• Combine RSSI by TX Power to guess proximity
• Apple has own formula
• Basic version: RSSI * (1.0 / TX Power)
• To be precise, make your own calibration formula
• Break into 3 ranges: Immediate / Near / Far
• Number can vary with RSSI fluctuation
Measuring General Proximity
• Device battery life (esp. w/ CR2032)
• Obstruction
• Body (bag of water)
• Walls / Doors / Furniture
• Merchandise (i.e. clothing, solids, or liquids)
• Reflective surfaces (i.e. mirror, foil)
• Interference (2.4 GHz)
• Other devices
• Microwave ovens !!!
RSSI Fluctuation
Bluetooth spectrum scan (including iBeacon)
Microwave running 30 ft. away
(Shrimp Burrito)
Beacon Scanning Devices
• iPhone (4s and later) / iPad (3rd gen iPad)
• Android 4.3 and higher
• Google Nexus 5 and 7 (2013)
• Samsung Galaxy S III or newer
• More on their way
• Microsoft/Nokia
• BTLE support in Windows Phone 8.1 dev
• No access to broadcast data… yet
• Raspberry Pi (with BTLE dongle)
• MacBooks (2012 onward)/new Mac Mini
• Other devices? Wearables? :-)
• Need a BTLE Peripheral device
• Phones/tablets: currently only Apple devices 

can be peripherals
• Popular BTLE module vendors:
• TI
• Nordic
• BlueGiga
• CSR
• Broadcom
Making a Beacon
• Firmware for Bluegiga BLE112
• BGScript - free compiler
• Windows only dev tools
• Flash firmware with TI programmer
• Scan for Beacon with iOS and Android
Quick Demo
iOS — Things to Remember
• Can only scan for a given UUID
• Can not get raw advertising data
• Can have a device be both scanner and 

transmitter at same time
• Can return raw RSSI as well as enumerated

distance values (immediate / near / far)
• Can remember UUID and launch app when

device in range
• As of iOS 7.1 remembers UUID across 

system restarts
iBeacon Myths
• Can locate people
• Will send unsolicited ads to phones
• Are unspoofable
• Act like indoor GPS
• Are only for coupons

• Are hard to build…
Enemy of all Beacons*
* Microwave burrito + reflective foil Photo: http://flic.kr/p/9j91ea
Beware
Q&A
Ramin Firoozye
@raminf
http://blog.firoozye.com
{firstname} {lastinitial} AT gmail.com

Más contenido relacionado

Similar a Build Your own iBeacon

Taking Control of your Bluetooth Devices
Taking Control of your Bluetooth DevicesTaking Control of your Bluetooth Devices
Taking Control of your Bluetooth DevicesHelen Sherwood-Taylor
 
Motorola 68020.pdf
Motorola 68020.pdfMotorola 68020.pdf
Motorola 68020.pdfArijitDhali
 
Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 MicroprocessorNahian Ahmed
 
23c3 Bluetooth hacking revisited
23c3 Bluetooth hacking revisited23c3 Bluetooth hacking revisited
23c3 Bluetooth hacking revisitedThierry Zoller
 
Demystifying the Microsoft Extended FAT File System (exFAT)
Demystifying the Microsoft Extended FAT File System (exFAT)Demystifying the Microsoft Extended FAT File System (exFAT)
Demystifying the Microsoft Extended FAT File System (exFAT)overcertified
 
Topfoison e catalog
Topfoison e catalogTopfoison e catalog
Topfoison e catalogLynapple1022
 
Electrical Schematic Open Hardware PowerPC Notebook motherboard v. 0.4
Electrical Schematic Open Hardware PowerPC Notebook motherboard v. 0.4Electrical Schematic Open Hardware PowerPC Notebook motherboard v. 0.4
Electrical Schematic Open Hardware PowerPC Notebook motherboard v. 0.4Roberto Innocenti
 
Anaren Integrated Radio (AIR) module introduction
Anaren Integrated Radio (AIR) module introductionAnaren Integrated Radio (AIR) module introduction
Anaren Integrated Radio (AIR) module introductionAnaren, Inc.
 
presentation_microcontroller_1457634560_181219.ppt
presentation_microcontroller_1457634560_181219.pptpresentation_microcontroller_1457634560_181219.ppt
presentation_microcontroller_1457634560_181219.pptLalithKumar818864
 
JVL Bluetooth Wireless Expansion Module FB4
JVL Bluetooth Wireless Expansion Module FB4JVL Bluetooth Wireless Expansion Module FB4
JVL Bluetooth Wireless Expansion Module FB4Electromate
 
Accelerating MIPI Interface Development and Validation - Introspect Technology
Accelerating MIPI Interface Development and Validation - Introspect TechnologyAccelerating MIPI Interface Development and Validation - Introspect Technology
Accelerating MIPI Interface Development and Validation - Introspect TechnologyJean-Marc Robillard
 
Open Hardware PowerPC Notebook motherboard V.0.6 August 2020
Open Hardware PowerPC Notebook motherboard V.0.6 August 2020Open Hardware PowerPC Notebook motherboard V.0.6 August 2020
Open Hardware PowerPC Notebook motherboard V.0.6 August 2020Roberto Innocenti
 
It 200 project 2 - group 4 - final
It 200   project 2 - group 4 - finalIt 200   project 2 - group 4 - final
It 200 project 2 - group 4 - finalLoren Schwappach
 

Similar a Build Your own iBeacon (20)

Taking Control of your Bluetooth Devices
Taking Control of your Bluetooth DevicesTaking Control of your Bluetooth Devices
Taking Control of your Bluetooth Devices
 
Motorola 68020.pdf
Motorola 68020.pdfMotorola 68020.pdf
Motorola 68020.pdf
 
S ti5202
S ti5202S ti5202
S ti5202
 
Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 Microprocessor
 
Tài liệu hướng dẫn sử dụng bộ điều khiển Siemens Simatics LOGO!
Tài liệu hướng dẫn sử dụng bộ điều khiển Siemens Simatics LOGO!Tài liệu hướng dẫn sử dụng bộ điều khiển Siemens Simatics LOGO!
Tài liệu hướng dẫn sử dụng bộ điều khiển Siemens Simatics LOGO!
 
23c3 Bluetooth hacking revisited
23c3 Bluetooth hacking revisited23c3 Bluetooth hacking revisited
23c3 Bluetooth hacking revisited
 
Demystifying the Microsoft Extended FAT File System (exFAT)
Demystifying the Microsoft Extended FAT File System (exFAT)Demystifying the Microsoft Extended FAT File System (exFAT)
Demystifying the Microsoft Extended FAT File System (exFAT)
 
Topfoison e catalog
Topfoison e catalogTopfoison e catalog
Topfoison e catalog
 
Sprague Ackley, Technologist, Intermec
Sprague Ackley, Technologist, IntermecSprague Ackley, Technologist, Intermec
Sprague Ackley, Technologist, Intermec
 
Electrical Schematic Open Hardware PowerPC Notebook motherboard v. 0.4
Electrical Schematic Open Hardware PowerPC Notebook motherboard v. 0.4Electrical Schematic Open Hardware PowerPC Notebook motherboard v. 0.4
Electrical Schematic Open Hardware PowerPC Notebook motherboard v. 0.4
 
Mifare cards
Mifare cardsMifare cards
Mifare cards
 
Anaren Integrated Radio (AIR) module introduction
Anaren Integrated Radio (AIR) module introductionAnaren Integrated Radio (AIR) module introduction
Anaren Integrated Radio (AIR) module introduction
 
presentation_microcontroller_1457634560_181219.ppt
presentation_microcontroller_1457634560_181219.pptpresentation_microcontroller_1457634560_181219.ppt
presentation_microcontroller_1457634560_181219.ppt
 
JVL Bluetooth Wireless Expansion Module FB4
JVL Bluetooth Wireless Expansion Module FB4JVL Bluetooth Wireless Expansion Module FB4
JVL Bluetooth Wireless Expansion Module FB4
 
Ad1986 a
Ad1986 aAd1986 a
Ad1986 a
 
Hc 06
Hc 06Hc 06
Hc 06
 
Accelerating MIPI Interface Development and Validation - Introspect Technology
Accelerating MIPI Interface Development and Validation - Introspect TechnologyAccelerating MIPI Interface Development and Validation - Introspect Technology
Accelerating MIPI Interface Development and Validation - Introspect Technology
 
Open Hardware PowerPC Notebook motherboard V.0.6 August 2020
Open Hardware PowerPC Notebook motherboard V.0.6 August 2020Open Hardware PowerPC Notebook motherboard V.0.6 August 2020
Open Hardware PowerPC Notebook motherboard V.0.6 August 2020
 
It 200 project 2 - group 4 - final
It 200   project 2 - group 4 - finalIt 200   project 2 - group 4 - final
It 200 project 2 - group 4 - final
 
197e
197e197e
197e
 

Más de Ramin Firoozye

Bluetooth Over-The-Air Firmware Update
Bluetooth Over-The-Air Firmware UpdateBluetooth Over-The-Air Firmware Update
Bluetooth Over-The-Air Firmware UpdateRamin Firoozye
 
Here Come The Smartwatches
Here Come The Smartwatches Here Come The Smartwatches
Here Come The Smartwatches Ramin Firoozye
 
IOT Oversharing: 
Stop Sending My Stuff to the Cloud
IOT Oversharing: 
Stop Sending My Stuff to the CloudIOT Oversharing: 
Stop Sending My Stuff to the Cloud
IOT Oversharing: 
Stop Sending My Stuff to the CloudRamin Firoozye
 
Not another *$#@ app: How to avoid IoT fatigue
Not another *$#@ app: How to avoid IoT fatigueNot another *$#@ app: How to avoid IoT fatigue
Not another *$#@ app: How to avoid IoT fatigueRamin Firoozye
 
iPhone and iPad Back-End Servers
iPhone and iPad Back-End ServersiPhone and iPad Back-End Servers
iPhone and iPad Back-End ServersRamin Firoozye
 
iPhone Back-End Servers
iPhone Back-End ServersiPhone Back-End Servers
iPhone Back-End ServersRamin Firoozye
 

Más de Ramin Firoozye (7)

Bluetooth Over-The-Air Firmware Update
Bluetooth Over-The-Air Firmware UpdateBluetooth Over-The-Air Firmware Update
Bluetooth Over-The-Air Firmware Update
 
Smartwatches Oooooof!
Smartwatches Oooooof!Smartwatches Oooooof!
Smartwatches Oooooof!
 
Here Come The Smartwatches
Here Come The Smartwatches Here Come The Smartwatches
Here Come The Smartwatches
 
IOT Oversharing: 
Stop Sending My Stuff to the Cloud
IOT Oversharing: 
Stop Sending My Stuff to the CloudIOT Oversharing: 
Stop Sending My Stuff to the Cloud
IOT Oversharing: 
Stop Sending My Stuff to the Cloud
 
Not another *$#@ app: How to avoid IoT fatigue
Not another *$#@ app: How to avoid IoT fatigueNot another *$#@ app: How to avoid IoT fatigue
Not another *$#@ app: How to avoid IoT fatigue
 
iPhone and iPad Back-End Servers
iPhone and iPad Back-End ServersiPhone and iPad Back-End Servers
iPhone and iPad Back-End Servers
 
iPhone Back-End Servers
iPhone Back-End ServersiPhone Back-End Servers
iPhone Back-End Servers
 

Último

(办理学位证)多伦多大学毕业证成绩单原版一比一
(办理学位证)多伦多大学毕业证成绩单原版一比一(办理学位证)多伦多大学毕业证成绩单原版一比一
(办理学位证)多伦多大学毕业证成绩单原版一比一C SSS
 
定制(USF学位证)旧金山大学毕业证成绩单原版一比一
定制(USF学位证)旧金山大学毕业证成绩单原版一比一定制(USF学位证)旧金山大学毕业证成绩单原版一比一
定制(USF学位证)旧金山大学毕业证成绩单原版一比一ss ss
 
vip Krishna Nagar Call Girls 9999965857 Call or WhatsApp Now Book
vip Krishna Nagar Call Girls 9999965857 Call or WhatsApp Now Bookvip Krishna Nagar Call Girls 9999965857 Call or WhatsApp Now Book
vip Krishna Nagar Call Girls 9999965857 Call or WhatsApp Now Bookmanojkuma9823
 
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degreeyuu sss
 
Hifi Babe North Delhi Call Girl Service Fun Tonight
Hifi Babe North Delhi Call Girl Service Fun TonightHifi Babe North Delhi Call Girl Service Fun Tonight
Hifi Babe North Delhi Call Girl Service Fun TonightKomal Khan
 
NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...
NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...
NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...Amil baba
 
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best ServicesVip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Servicesnajka9823
 
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一定制(UI学位证)爱达荷大学毕业证成绩单原版一比一
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一ss ss
 
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一Fi sss
 
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...ttt fff
 
Papular No 1 Online Istikhara Amil Baba Pakistan Amil Baba In Karachi Amil B...
Papular No 1 Online Istikhara Amil Baba Pakistan  Amil Baba In Karachi Amil B...Papular No 1 Online Istikhara Amil Baba Pakistan  Amil Baba In Karachi Amil B...
Papular No 1 Online Istikhara Amil Baba Pakistan Amil Baba In Karachi Amil B...Authentic No 1 Amil Baba In Pakistan
 
existing product research b2 Sunderland Culture
existing product research b2 Sunderland Cultureexisting product research b2 Sunderland Culture
existing product research b2 Sunderland CultureChloeMeadows1
 
Call Girls In Munirka>༒9599632723 Incall_OutCall Available
Call Girls In Munirka>༒9599632723 Incall_OutCall AvailableCall Girls In Munirka>༒9599632723 Incall_OutCall Available
Call Girls In Munirka>༒9599632723 Incall_OutCall AvailableCall Girls in Delhi
 
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...Amil baba
 
Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝
Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝
Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝soniya singh
 
萨斯喀彻温大学毕业证学位证成绩单-购买流程
萨斯喀彻温大学毕业证学位证成绩单-购买流程萨斯喀彻温大学毕业证学位证成绩单-购买流程
萨斯喀彻温大学毕业证学位证成绩单-购买流程1k98h0e1
 
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作ss846v0c
 
NO1 WorldWide kala jadu Love Marriage Black Magic Punjab Powerful Black Magic...
NO1 WorldWide kala jadu Love Marriage Black Magic Punjab Powerful Black Magic...NO1 WorldWide kala jadu Love Marriage Black Magic Punjab Powerful Black Magic...
NO1 WorldWide kala jadu Love Marriage Black Magic Punjab Powerful Black Magic...Amil baba
 
Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作
Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作
Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作f3774p8b
 

Último (20)

(办理学位证)多伦多大学毕业证成绩单原版一比一
(办理学位证)多伦多大学毕业证成绩单原版一比一(办理学位证)多伦多大学毕业证成绩单原版一比一
(办理学位证)多伦多大学毕业证成绩单原版一比一
 
定制(USF学位证)旧金山大学毕业证成绩单原版一比一
定制(USF学位证)旧金山大学毕业证成绩单原版一比一定制(USF学位证)旧金山大学毕业证成绩单原版一比一
定制(USF学位证)旧金山大学毕业证成绩单原版一比一
 
vip Krishna Nagar Call Girls 9999965857 Call or WhatsApp Now Book
vip Krishna Nagar Call Girls 9999965857 Call or WhatsApp Now Bookvip Krishna Nagar Call Girls 9999965857 Call or WhatsApp Now Book
vip Krishna Nagar Call Girls 9999965857 Call or WhatsApp Now Book
 
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
 
Hifi Babe North Delhi Call Girl Service Fun Tonight
Hifi Babe North Delhi Call Girl Service Fun TonightHifi Babe North Delhi Call Girl Service Fun Tonight
Hifi Babe North Delhi Call Girl Service Fun Tonight
 
NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...
NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...
NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...
 
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best ServicesVip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
 
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一定制(UI学位证)爱达荷大学毕业证成绩单原版一比一
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一
 
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
 
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
 
Papular No 1 Online Istikhara Amil Baba Pakistan Amil Baba In Karachi Amil B...
Papular No 1 Online Istikhara Amil Baba Pakistan  Amil Baba In Karachi Amil B...Papular No 1 Online Istikhara Amil Baba Pakistan  Amil Baba In Karachi Amil B...
Papular No 1 Online Istikhara Amil Baba Pakistan Amil Baba In Karachi Amil B...
 
existing product research b2 Sunderland Culture
existing product research b2 Sunderland Cultureexisting product research b2 Sunderland Culture
existing product research b2 Sunderland Culture
 
Call Girls In Munirka>༒9599632723 Incall_OutCall Available
Call Girls In Munirka>༒9599632723 Incall_OutCall AvailableCall Girls In Munirka>༒9599632723 Incall_OutCall Available
Call Girls In Munirka>༒9599632723 Incall_OutCall Available
 
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
 
Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝
Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝
Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝
 
萨斯喀彻温大学毕业证学位证成绩单-购买流程
萨斯喀彻温大学毕业证学位证成绩单-购买流程萨斯喀彻温大学毕业证学位证成绩单-购买流程
萨斯喀彻温大学毕业证学位证成绩单-购买流程
 
young call girls in Gtb Nagar,🔝 9953056974 🔝 escort Service
young call girls in Gtb Nagar,🔝 9953056974 🔝 escort Serviceyoung call girls in Gtb Nagar,🔝 9953056974 🔝 escort Service
young call girls in Gtb Nagar,🔝 9953056974 🔝 escort Service
 
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
 
NO1 WorldWide kala jadu Love Marriage Black Magic Punjab Powerful Black Magic...
NO1 WorldWide kala jadu Love Marriage Black Magic Punjab Powerful Black Magic...NO1 WorldWide kala jadu Love Marriage Black Magic Punjab Powerful Black Magic...
NO1 WorldWide kala jadu Love Marriage Black Magic Punjab Powerful Black Magic...
 
Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作
Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作
Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作
 

Build Your own iBeacon

  • 1. Build Your own iBeacon iBeacon Workshop April 29, 2014 Andreessen Horowitz
 
 Ramin Firoozye - @raminf
  • 2. What is an iBeacon - A Bluetooth Low Energy (BTLE) broadcast-only device - A BTLE peripheral (transmitter) - If connectable it can be configured - It is a simple transmitter of data: - UUID (i.e. E2C56DB5-DFFB-48D2-B060-D0F5A71096E0) - Major (2 byte number) - Minor (2 byte number) - Proximity (via RSSI signal strength)
  • 3. Typical iBeacon Platform Beacon Server Beacon UUID/major/minor Distance (immediate/near/ far) Beacon data Location User ID Personalize d Content
  • 4. BTLE Nomenclature • Peripheral (transmitter) • Central (receiver) • iOS devices can be both at same time • Broadcast interval/duration • Channels: 37 data and 3 advertising • Connectable vs. not • TX Power • RSSI (Received Signal Strength Indicator)
  • 5. An iBeacon is… • A BTLE peripheral • Based on BTLE advertising spec • Broadcasts a small amount of data • May be connectable (to configure) • Range: conservatively ~50ft • With RSSI+TX power can roughly 
 gauge distance — but not angle
  • 6. TI Packet BTLE Sniffer Software (Windows) http://www.ti.com/tool/PACKET-SNIFFER TI Packet BTLE Sniffer Development http://www.ti.com/tool/cc2540dk-mini
  • 8. Length: 47 ! Raw data (hex): D6 BE 89 8E 40 24 BA BB 2A CB 16 4C 02 01 06 1A FF 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52 B4 70 BA 60 AB BB 00 00 00 00 C5 04 21 B9 38 A5 ! RSSI [dBm]: -38 Raw Data
  • 9. Access Address (4 bytes) 8E 89 BE D6 Advertising Channel/Data Channel PDU (2 .. 39 bytes) 40 24 BA BB 2A CB 16 4C 02 01 06 1A FF 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52 B4 70 BA 60 AB BB 00 00 00 00 D6 BE 89 8E 40 24 BA BB 2A CB 16 4C 02 01 06 1A FF 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52 B4 70 BA 60 AB BB 00 00 00 00 C5 04 21 B9 38 A5 CRC (3 bytes) B9 21 04 RSSI (1 byte) -38 Frame Checksum (1 byte) A5
  • 10. Header (2 bytes) 40 24 (36 bytes) Advertising Address (6 bytes) 4C 16 CB 2A BB BA D6 BE 89 8E 40 24 BA BB 2A CB 16 4C 02 01 06 1A FF 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52 B4 70 BA 60 AB BB 00 00 00 00 C5 04 21 B9 38 A5 CRC (3 bytes) EF E3 53 Advertising Data (0 .. 31 bytes) 02 01 06 1A FF 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52 B4 70 BA 60 AB BB 00 00 00 00 Access Address (4 bytes) 8E 89 BE D6 Fixed value for advertisement communication channels. For data channels, varies by connection. 0x40 = Undirected advertising 0x24 = 36 (number of bytes to follow) Mac Address RSSI (1 byte) -38 FCS (1 byte) A5
  • 11. D6 BE 89 8E 40 24 BA BB 2A CB 16 4C 02 01 06 1A FF 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52 B4 70 BA 60 AB BB 00 00 00 00 C5 04 21 B9 38 A5 Advertising Data (0 .. 31 bytes) 02 01 06 1A FF 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52 B4 70 BA 60 AB BB 00 00 00 00 Length (1 byte) Type (X byte) ••• Data (Ad Length) Length (1 byte) Type (X byte) Data (Ad Length)
  • 12. D6 BE 89 8E 40 24 BA BB 2A CB 16 4C 02 01 06 1A FF 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52 B4 70 BA 60 AB BB 00 00 00 00 C5 04 21 B9 38 A5 Advertising Data (0 .. 31 bytes) 02 01 06 1A FF 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52 B4 70 BA 60 AB BB 00 00 00 00 Ad Length (1 byte) 0x02 Ad Type (1 byte) 0x01 Data (1 byte) 0x06 - Connectable/undirected Ad Length (1 byte) 0x1A = 25 Ad Type (1 byte) 0xFF Data Manufacturer specific data to follow
  • 13. D6 BE 89 8E 40 24 BA BB 2A CB 16 4C 02 01 06 1A FF 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52 B4 70 BA 60 AB BB 00 00 00 00 C5 04 21 B9 38 A5 Manufacturer-specific Data (25 bytes) 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52 B4 70 BA 60 AB BB 00 00 00 00 Manufacturer Type (2 bytes) 00 4C iBeacon Ad Indicator (2 bytes) 15 02
  • 15. Question Will iOS iBeacon software *require* manufacturer ID 
 to be 0x004C? Answer: No As long as your ID starts with 0x00 ••• Sucks to be TomTom Also: this can all change
  • 16. D6 BE 89 8E 40 24 BA BB 2A CB 16 4C 02 01 06 1A FF 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52 B4 70 BA 60 AB BB 00 00 00 00 C5 04 21 B9 38 A5 Manufacturer-specific Data (25 bytes) 4C 00 02 15 29 5D 73 80 B2 A0 4F 5E 88 52 B4 70 BA 60 AB BB 00 00 00 00 Manufacturer Type (2 bytes) 00 4C iBeacon Device Type (1 byte) 0x02 iBeacon UUID (16 bytes) 29 5D 73 80 B2 A0 4F 5E 88 52 B4 70 BA 60 AB BB iBeacon Major (2 bytes) 00 00 iBeacon Minor (2 bytes) 00 00 Measured Tx Power at 1meter (1 byte) C5 (-57) iBeacon Data Length (1 byte) 0x15 (21)
  • 17. • TX Power at 1 meter - calculated for each device • 0xC5 = 197 = 2’s complement (256-197) = -59dBM • Varies for each module manufacturer • Combine RSSI by TX Power to guess proximity • Apple has own formula • Basic version: RSSI * (1.0 / TX Power) • To be precise, make your own calibration formula • Break into 3 ranges: Immediate / Near / Far • Number can vary with RSSI fluctuation Measuring General Proximity
  • 18. • Device battery life (esp. w/ CR2032) • Obstruction • Body (bag of water) • Walls / Doors / Furniture • Merchandise (i.e. clothing, solids, or liquids) • Reflective surfaces (i.e. mirror, foil) • Interference (2.4 GHz) • Other devices • Microwave ovens !!! RSSI Fluctuation
  • 19. Bluetooth spectrum scan (including iBeacon)
  • 20. Microwave running 30 ft. away (Shrimp Burrito)
  • 21. Beacon Scanning Devices • iPhone (4s and later) / iPad (3rd gen iPad) • Android 4.3 and higher • Google Nexus 5 and 7 (2013) • Samsung Galaxy S III or newer • More on their way • Microsoft/Nokia • BTLE support in Windows Phone 8.1 dev • No access to broadcast data… yet • Raspberry Pi (with BTLE dongle) • MacBooks (2012 onward)/new Mac Mini • Other devices? Wearables? :-)
  • 22. • Need a BTLE Peripheral device • Phones/tablets: currently only Apple devices 
 can be peripherals • Popular BTLE module vendors: • TI • Nordic • BlueGiga • CSR • Broadcom Making a Beacon
  • 23. • Firmware for Bluegiga BLE112 • BGScript - free compiler • Windows only dev tools • Flash firmware with TI programmer • Scan for Beacon with iOS and Android Quick Demo
  • 24. iOS — Things to Remember • Can only scan for a given UUID • Can not get raw advertising data • Can have a device be both scanner and 
 transmitter at same time • Can return raw RSSI as well as enumerated
 distance values (immediate / near / far) • Can remember UUID and launch app when
 device in range • As of iOS 7.1 remembers UUID across 
 system restarts
  • 25. iBeacon Myths • Can locate people • Will send unsolicited ads to phones • Are unspoofable • Act like indoor GPS • Are only for coupons
 • Are hard to build…
  • 26. Enemy of all Beacons* * Microwave burrito + reflective foil Photo: http://flic.kr/p/9j91ea Beware