SlideShare une entreprise Scribd logo
1  sur  27
Télécharger pour lire hors ligne
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

Contenu connexe

Similaire à 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
 

Similaire à 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
 

Plus 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
 

Plus 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
 

Dernier

Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...
Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...
Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...MOHANI PANDEY
 
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...motiram463
 
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...Call Girls in Nagpur High Profile
 
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...Pooja Nehwal
 
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...drmarathore
 
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证wpkuukw
 
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...amitlee9823
 
Escorts Service Arekere ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Arekere ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Arekere ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Arekere ☎ 7737669865☎ Book Your One night Stand (Bangalore)amitlee9823
 
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证tufbav
 
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...ranjana rawat
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证wpkuukw
 
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)amitlee9823
 
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Introduction-to-4x4-SRAM-Memory-Block.pptx
Introduction-to-4x4-SRAM-Memory-Block.pptxIntroduction-to-4x4-SRAM-Memory-Block.pptx
Introduction-to-4x4-SRAM-Memory-Block.pptxJaiLegal
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedDelhi Call girls
 
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...amitlee9823
 

Dernier (20)

Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...
Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...
Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...
 
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
 
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
 
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
 
(ISHITA) Call Girls Service Aurangabad Call Now 8617697112 Aurangabad Escorts...
(ISHITA) Call Girls Service Aurangabad Call Now 8617697112 Aurangabad Escorts...(ISHITA) Call Girls Service Aurangabad Call Now 8617697112 Aurangabad Escorts...
(ISHITA) Call Girls Service Aurangabad Call Now 8617697112 Aurangabad Escorts...
 
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
 
CHEAP Call Girls in Ashok Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Ashok Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Ashok Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Ashok Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
 
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
 
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
 
Escorts Service Arekere ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Arekere ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Arekere ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Arekere ☎ 7737669865☎ Book Your One night Stand (Bangalore)
 
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
 
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝
 
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
 
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
 
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
 
Introduction-to-4x4-SRAM-Memory-Block.pptx
Introduction-to-4x4-SRAM-Memory-Block.pptxIntroduction-to-4x4-SRAM-Memory-Block.pptx
Introduction-to-4x4-SRAM-Memory-Block.pptx
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 

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