Bluetooth Low Energy
ITP NYU - March 7, 2015
Don Coleman
@doncoleman
Lightbulb Service
- Light Switch
- Dimmer Level
- Power Consumption
Lightbulb Service
1DFB0A30-569D-4B38-A511-AA912168F7DD
Properties
Attributes
Permissions
Descriptors
Lightbulb Service
Advertising
Advertising
- MAC Address: AA:BB:CC:DD:EE:FF
- Services: [ 0x180A, 0xFF10, 0XFF20, …]
- Manufacturer Data: <00007465 6d70>
- Connectable: True
- TX Power Level: 4
- RSSI: -80
- Name: Smart Lightbulb
Advertising
- 5425B44A-024A-4D39-88D2-D9F016199B29
- Services: [ 0x180A, 0xFF10, 0XFF20, …]
- Manufacturer Data: <00007465 6d70>
- Connectable: True
- TX Power Level: 4
- RSSI: -80
- Name: Smart Lightbulb
Scan and Discover Peripherals
Connect
Explore
- Get a list of services
- For each service, get a list of characteristics
- For each characteristic, get properties
- Save handle to read or write later
- Subscribe to be notified on changes
Read Value
Write Value
Write Command
Battery Service
0x180F
16bit UUIDs
0000180F-0000-1000-8000-00805F9B34FB
00002A19-0000-1000-8000-00805F9B34FB
Notification
Indication
Peripheral
Provides services
Central
- Discover advertising peripherals
- Connect using MAC Address or UUID
- Explore the services and characteristics
- Read and write characteristics
- Subscribe to be notified of changes
iBeacon
- UUID: ad5d9ece-9331-48c2-b597-2845aac4a8f0
- Major: 0x12
- Minor: 0x08
URI Beacon
- URL: http://www.mta.info/r/8
http://www.mta.info/r/8
uri is encoded to save 15 bytes
00 // http://www.
6d // m
74 // t
61 // a
04 // .info/
52 // r
2f // /
38 // 8