-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathble-identifier-reference.html
285 lines (284 loc) · 17.1 KB
/
ble-identifier-reference.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<!DOCTYPE HTML>
<html>
<head>
<title>Bluetooth Low Energy (BLE) identifier reference | diyActive</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="A just-technical-enough overview of BLE device identification, including examples of device behaviour.">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="style/main.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.2/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/2.5.0/ui-bootstrap-tpls.min.js"></script>
<script type="text/javascript" src="js/diyactive.js"></script>
</head>
<body ng-app="diyActive">
<div ng-controller="InteractionCtrl">
<nav class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle"
ng-init="navCollapsed = true"
ng-click="navCollapsed = !navCollapsed">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="https://www.reelyactive.com">
<strong>reely</strong>Active
</a>
</div>
<div class="collapse navbar-collapse" ng-class="!navCollapsed && 'in'"
ng-click="navCollapsed = true">
<ul class="nav navbar-nav navbar-right">
<li class="active"><a href="/"> diyActive </a></li>
<li class="dropdown" uib-dropdown on-toggle="toggled(open)">
<a href class="dropdown-toggle" uib-dropdown-toggle role="button"
data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
Quick links <span class="caret"></span>
</a>
<ul class="dropdown-menu" uib-dropdown-menu role="menu">
<li role="menuitem">
<a href="https://github.com/reelyactive/" target="_blank">
reelyActive on GitHub
</a>
</li>
<li role="menuitem">
<a href="https://www.npmjs.com/~reelyactive" target="_blank">
reelyActive on npmjs
</a>
</li>
<li role="separator" class="divider"></li>
<li role="menuitem">
<a href="https://www.reelyactive.com" target="_blank">
reelyActive website
</a>
</li>
<li role="menuitem">
<a href="https://getpareto.com" target="_blank">
Pareto by reelyActive
</a>
</li>
<li role="separator" class="divider"></li>
<li role="menuitem">
<a href="https://shop.reelyactive.com" target="_blank">
Our online store
</a>
</li>
<li role="menuitem">
<a href="https://reelyactive.com/blog/" target="_blank">
Our blog
</a>
</li>
</ul>
</li>
</ul>
</div>
</nav>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3">
<h1>
Bluetooth Low Energy (BLE) Identifier Reference <br>
<small> Overview of BLE device identification </small>
</h1>
<p> At <a href="https://www.reelyactive.com" target="_blank">reelyActive</a>, we often get asked questions like <i>"how much can one know about a person's smartphone from its Bluetooth packets?"</i> or <i>"can I recognise subsequent visits of the same device?"</i> This is intended to be a just-technical-enough reference for anyone to not only find answers to such questions but, more importantly, to understand why. </p>
<p> The following is a primer on radio-frequency identification using BLE. Specifics on the identifiers can be found below. </p>.
<div class="embed-responsive embed-responsive-16by9">
<iframe src="//www.slideshare.net/slideshow/embed_code/key/8vIKvMlPpRIveE" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe>
</div>
<h2> Mandatory identifier <br>
<small> What has 48-bits and comes in three flavours? </small> </h2>
<p> The <b>advertiser address</b> is the one and only mandatory identifier in a BLE advertising packet. It has the form <tt>12:34:56:78:9a:bc</tt>. </p>
<p> BLE includes a feature which allows this identifier to be either <b><i>public</i></b> (IEEE-assigned) or <b><i>random</i></b> (manufacturer-assigned). Moreover, when random, the device manufacturer is free to change the identifier dynamically, should they so choose. The result is the following three flavours: </p>
<ul>
<li>
<tt>public static</tt>
<ul>
<li> manufacturer selects unique identifier from a block of IEEE-assigned addresses </li>
<li> by definition, this identifier must remain static </li>
</ul>
</li>
<li>
<tt>random static</tt>
<ul>
<li> manufacturer assigns unique identifier at its discretion </li>
<li> manufacturer elects for this identifier to remain static </li>
</ul>
</li>
<li>
<tt>random dynamic</tt>
<ul>
<li> manufacturer assigns unique identifier at its discretion </li>
<li> manufacturer elects to change this identifier periodically </li>
</ul>
</li>
</ul>
<p> There <i>IS</i> a mandatory flag to indicate whether the address is public or random. However, there <i>IS NOT</i> a flag to indicate whether a random address is static or dynamic. In other words: </p>
<blockquote> the only way to know if a device's <i>random</i> advertiser address will periodically change is through observation </blockquote>
<table class="table table-striped table-reelyactive">
<caption> COMMON QUESTIONS ABOUT THE 48-BIT ADVERTISER ADDRESS </caption>
<thead>
<tr>
<th> Question </th>
<th> <tt>public static</tt> </th>
<th> <tt>random static</tt> </th>
<th> <tt>random dynamic</tt> </th>
</tr>
</thead>
<tbody>
<tr>
<td> Can I implicitly recognise the product? </td>
<td> No* </td>
<td> No </td>
<td> No </td>
</tr>
<tr>
<td> Can I explicitly associate with a person/product? </td>
<td> Yes </td>
<td> Yes </td>
<td> No </td>
</tr>
<tr>
<td> Can I recognise the device again if it leaves and comes back? </td>
<td> Yes </td>
<td> Yes </td>
<td> No </td>
</tr>
<tr>
<td> Is the identifier guaranteed to be unique? </td>
<td> Yes </td>
<td> No </td>
<td> No </td>
</tr>
</tbody>
</table>
<p class="text-right"> <i>*it is nonetheless possible to look up the chip manufacturer from <a href="https://regauth.standards.ieee.org/standards-ra-web/pub/view.html#registries" target="_blank">this registry</a>.</i> </p>
<h2> Optional identifiers <br>
<small> But wait, there may be more! </small> </h2>
<p> Beyond the mandatory identifier, the standard BLE advertising packet supports up to 31 bytes more payload which may contain additional identifiers. </p>
<h3> 16-bit UUID </h3>
<p> A <b>16-bit UUID</b> represents a defined service. It has the form <tt>0x1234</tt>. </p>
<p> The Bluetooth SIG has reserved a block of 512 such UUIDs for member companies, <a href="https://www.bluetooth.com/specifications/assigned-numbers/16-bit-uuids-for-members" target="_blank">listed here</a>. It is therefore possible to look up the member company from the UUID. reelyActive maintains this lookup feature in <a href="https://sniffypedia.org" target="_blank">Sniffypedia</a>. Notable examples include: </p>
<h4> Eddystone </h4>
<p> Google's <b>Eddystone</b> service uses the UUID <b><tt>0xfeaa</tt></b>. An open specification, Eddystone includes several flavours that are free for use. These include: </p>
<ul>
<li> <a href="https://github.com/google/eddystone/tree/master/eddystone-uid#eddystone-uid" target="_blank">Eddystone-UID</a> which encodes a 16-bit Beacon ID consisting of a 10-bit namespace and 6-bit instance </li>
<li> <a href="https://github.com/google/eddystone/tree/master/eddystone-eid#eddystone-eid" target="_blank">Eddystone-EID</a> which encodes an encrypted ephemeral 8-bit identifier that can only be resolved by the remote service with which it was registered </li>
<li> <a href="https://github.com/google/eddystone/tree/master/eddystone-url#eddystone-url" target="_blank">Eddystone-URL</a> which encodes a compressed URL (limited in length by the BLE payload capacity) </li>
</ul>
<h4> Tile </h4>
<p> Tile devices advertise the UUID <b><tt>0xfeed</tt></b>. </p>
<h4> Contact Tracing </h4>
<p> Devices implementing the Contact Tracing service, a collaboration between Apple and Google in response to the COVID-19 pandemic (<a href="https://www.apple.com/covid19/contacttracing/" target="_blank">specification</a>), advertise the UUID <b><tt>0xfd6f</tt></b>. </p>
<h3> 128-bit UUID </h3>
<p> A <b>128-bit UUID</b> represents a service and/or acts as a device identifier. It has the form <tt>12345678-1234-1234-1234-123456789abc</tt>. Unlike the 16-bit UUID and the 16-bit company identifier used in Manufacturer Specific Data, the Bluetooth SIG does not assign 128-bit UUIDs, leaving vendors and programmers free to choose. Notable examples include: </p>
<h4> Fitbit </h4>
<p> Fitbit devices advertise the UUID <b><tt>adabXXXX-6e7d-4601-bda2-bffaa68956ba</tt></b> where the XXXX represents a specific product type such as the Charge HR. </p>
<h3> Manufacturer Specific Data </h3>
<p> Manufacturer Specific Data is accompanied by a <b>16-bit company identifier</b>. It has the form <tt>0x1234</tt>. </p>
<p> The Bluetooth SIG assigns the company identifiers which are <a href="https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers" target="_blank">listed here</a>. It is therefore possible to look up the member company from the company identifier. reelyActive maintains this lookup feature in <a href="https://sniffypedia.org" target="_blank">Sniffypedia</a>. Notable examples include: </p>
<h4> iBeacon </h4>
<p> <b>Apple</b> is assigned the company code <b><tt>0x004c</tt></b> and their devices make extensive use of Manufacturer Specific Data for a variety of functions. While Apple does not openly document most of these functions, <a href="https://developer.apple.com/ibeacon/" target="_blank">the iBeacon specification</a> is a notable exception. </p>
<p> An iBeacon encodes a 128-bit UUID, a 16-bit Major and a 16-bit Minor identifier. Typically, the Major represents a superclass (ex: a physical venue) and the Minor represents a subclass (ex: points of interest within the venue), while the UUID is unique to a beacon vendor or operator, for example: </p>
<table class="table table-striped table-reelyactive">
<caption> COMMON IBEACON UUIDS AND THEIR ASSOCIATED VENDORS </caption>
<thead>
<tr>
<th> iBeacon UUID </th>
<th> Vendor </th>
</tr>
</thead>
<tbody>
<tr>
<td> <tt> f7826da6-4fa2-4e98-8024-bc5b71e0893e </tt> </td>
<td> Kontakt.io </td>
</tr>
<tr>
<td> <tt> 2f234454-cf6d-4a0f-adf2-f4911ba9ffa6 </tt> </td>
<td> Radius Networks </td>
</tr>
<tr>
<td> <tt> b9407f30-f5f8-466e-aff9-25556b57fe6d </tt> </td>
<td> Estimote </td>
</tr>
</tbody>
</table>
<p> The above highlights that although all iBeacons must, by definition, transmit Apple's company code (<tt>0x004c</tt>), they are not necessarily Apple devices! In general: </p>
<blockquote> it is wise to <i>not</i> assume that a device advertising a specific company code is necessarily a product of that company. </blockquote>
<h3> Local Name </h3>
<p> A Local Name is an <b>ASCII string</b>. The Local Name is often human-readable (ex: "Charge HR") as the formats described above afford more efficient encoding of machine-readable identifiers. The length of this name is limited by the capacity of the BLE payload. </p>
<p> </p>
<div class="well">
<h2> Additional resources and tools </h2>
<p> </p>
<ul class="media-list">
<li class="media">
<div class="media-left">
<img class="media-object" src="diy/best-practices-ble-identifiers/images/icon.png">
</div>
<div class="media-body">
<h4 class="media-heading">
<a href="diy/best-practices-ble-identifiers/"
target="_blank">
Best practices for BLE identifiers
</a>
</h4>
<p> Assignment of Bluetooth Low Energy identifiers for interoperability and interpretability </p>
</div>
</li>
<li class="media">
<div class="media-left">
<img class="media-object" src="/interoperable-identifier/images/icon.png">
</div>
<div class="media-body">
<h4 class="media-heading">
<a href="interoperable-identifier/" target="_blank">
The InteroperaBLE Identifier
</a>
</h4>
<p> An open specification by reelyActive to maximise the interoperability of radio-identifiers across protocols, platforms and operating systems. </p>
</div>
</li>
<li class="media">
<div class="media-left">
<img class="media-object" src="diy/common/images/icon.png">
</div>
<div class="media-body">
<h4 class="media-heading">
<a href="/" target="_blank">
reelyActive Developers
</a>
</h4>
<p> Browse all developer documentation and tutorials. </p>
</div>
</li>
</ul>
<p> For an exhaustive machine-readable list of common BLE UUIDs see <a href="https://github.com/reelyactive/sniffypedia/blob/master/index.js" target="_blank">Sniffypedia's index.js</a> </p>
</div>
<hr>
<h2> What's next? </h2>
<p> Explore Sniffypedia, check out advlib, or return to the diyActive home page. </p>
<p class="text-center">
<a class="btn btn-default" href="https://sniffypedia.org"
role="button"> Sniffypedia </a>
<a class="btn btn-default" href="https://github.com/reelyactive/advlib#advlib"
role="button"> advlib </a>
<a class="btn btn-success" href="/"
role="button"> Return to diyActive </a>
</p>
</div>
</div>
</div>
<footer class="footer">
<a href="/"
uib-tooltip="Do-it-yourself with reelyActive"
tooltip-placement="left"> diyActive </a> |
<a href="https://www.reelyactive.com"
uib-tooltip="We believe in an open Internet of Things"
tooltip-placement="right">
© reelyActive 2017-2018
</a>
</footer>
</div>
</body>
</html>