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

Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,Pooja Nehwal
 
Top Rated Pune Call Girls Ravet ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Ravet ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Ravet ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Ravet ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Call Girls in Nagpur High Profile
 
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai GapedCall Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gapedkojalkojal131
 
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...Pooja Nehwal
 
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...ranjana rawat
 
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service -  Bandra F...WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service -  Bandra F...
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...Pooja Nehwal
 
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...Call Girls in Nagpur High Profile
 
Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Call Girls in Nagpur High Profile
 
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...Suhani Kapoor
 
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...Call Girls in Nagpur High Profile
 
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | DelhiFULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhisoniya singh
 
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai WisteriaDubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai WisteriaUnited Arab Emirates
 
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...anilsa9823
 
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)kojalkojal131
 
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...Naicy mandal
 
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service NashikLow Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 

Último (20)

🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate
🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate
🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate
 
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
 
Top Rated Pune Call Girls Ravet ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Ravet ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Ravet ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Ravet ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
 
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai GapedCall Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
 
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
 
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
 
Call Girls In Vaishali 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In Vaishali 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In Vaishali 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In Vaishali 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service -  Bandra F...WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service -  Bandra F...
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...
 
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
 
Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
 
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
 
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
 
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | DelhiFULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
 
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai WisteriaDubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
 
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
 
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)
 
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
 
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service NashikLow Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
 

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