1 Bluetooth Management API
2 *************************
4 Copyright (C) 2008-2009 Marcel Holtmann <marcel@holtmann.org>
10 This document describes the format of data used for communicating with
11 the kernel using a so-called Bluetooth Management sockets. These sockets
12 are available starting with Linux kernel version 3.4
14 The following kernel versions introduced new commands, new events or
15 important fixes to the Bluetooth Management API:
17 Linux kernel v3.4 Version 1.0
18 Linux kernel v3.5 Version 1.1
19 Linux kernel v3.7 Version 1.2
20 Linux kernel v3.9 Version 1.3
21 Linux kernel v3.13 Version 1.4
22 Linux kernel v3.15 Version 1.5
23 Linux kernel v3.16 Version 1.6
24 Linux kernel v3.17 Version 1.7
25 Linux kernel v3.19 Version 1.8
26 Linux kernel v4.1 Version 1.9
27 Linux kernel v4.2 Version 1.10
28 Linux kernel v4.5 Version 1.11 (not yet released)
30 Version 1.1 introduces Set Device ID command.
32 Version 1.2 introduces Passkey Notify event.
34 Version 1.3 does not introduce any new command or event.
36 Version 1.4 introduces Set Advertising, Set BR/EDR, Set Static Address
37 and Set Scan Parameters commands. The existing Set Discoverable command
38 gained an extra setting for limited discoverable mode. The device name
39 is now provided in the scan response data for Low Energy.
41 Version 1.5 introduces Set Secure Connections, Set Debug Keys, Set Privacy
42 and Load Identity Resolving Keys commands. It also introduces New Identity
43 Resolving Key and New Signature Resolving Key events.
45 Version 1.6 introduces Get Connection Information command. It also updates
46 the Device Found event to combine advertising data and scan response data
49 Version 1.7 introduces Get Clock Information, Add Device, Remove Device,
50 Load Connection Parameters, Read Unconfigured Index List, Read Controller
51 Configuration Information, Set External Configuration and Set Public Address
52 commands. It also introduces Device Added, Device Removed, New Connection
53 Parameter, Unconfigured Index Added, Unconfigured Index Removed and New
54 Configuration Options events. The existing Set Debug Keys command gained
55 an extra setting for enabling SSP debug mode.
57 Version 1.8 introduces Start Service Discovery command. It also adds new
58 Long Term Key types for LE Secure Connection feature.
60 Version 1.9 introduces Read Local Out Of Band Extended, Data, Read Extended
61 Controller Index List, Read Advertising Features, Add Advertising and Remove
62 Advertising commands. It also introduces Extended Index Added, Extended Index
63 Removed, Local Out Of Band Extended Data Updated, Advertising Added and
64 Advertising Removed events. The existing Set Advertising command gained an
65 extra setting for enabling undirected connectable advertising. It provides
66 support for a new static address setting and allows the usage of Set Fast
67 Connectable when controller is powered off.
69 Version 1.10 does not introduce any new command or event. It extends the
70 advertising feature to support 5 parallel advertising instances.
72 Version 1.11 introduces Get Advertising Size Information command.
78 The Bluetooth management sockets can be created by setting the hci_channel
79 member of struct sockaddr_hci to HCI_CHANNEL_CONTROL (3) when creating a
80 raw HCI socket. In C the needed code would look something like the following:
84 struct sockaddr_hci addr;
87 fd = socket(PF_BLUETOOTH, SOCK_RAW | SOCK_CLOEXEC | SOCK_NONBLOCK,
92 memset(&addr, 0, sizeof(addr));
93 addr.hci_family = AF_BLUETOOTH;
94 addr.hci_dev = HCI_DEV_NONE;
95 addr.hci_channel = HCI_CHANNEL_CONTROL;
97 if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
106 The process creating the mgmt socket is required to have the
107 CAP_NET_ADMIN capability (e.g. root would have this).
115 0 4 8 12 16 22 24 28 31 35 39 43 47
116 +-------------------+-------------------+-------------------+
117 | Command Code | Controller Index | Parameter Length |
118 +-------------------+-------------------+-------------------+
123 0 4 8 12 16 22 24 28 31 35 39 43 47
124 +-------------------+-------------------+-------------------+
125 | Event Code | Controller Index | Parameter Length |
126 +-------------------+-------------------+-------------------+
129 All fields are in little-endian byte order (least significant byte first).
131 Controller Index can have a special value <non-controller> to indicate that
132 command or event is not related to any controller. Possible values:
134 <controller id> 0x0000 to 0xFFFE
135 <non-controller> 0xFFFF
141 The following values have been defined for use with the Command Status
142 and Command Complete events:
149 0x05 Authentication Failed
153 0x09 Already Connected
157 0x0D Invalid Parameters
164 0x14 Permission Denied
166 As a general rule all commands generate the events as specified below,
167 however invalid lengths or unknown commands will always generate a
168 Command Status response (with Unknown Command or Invalid Parameters
169 status). Sending a command with an invalid Controller Index value will
170 also always generate a Command Status event with the Invalid Index
174 Read Management Version Information Command
175 ===========================================
178 Controller Index: <non-controller>
180 Return Parameters: Version (1 Octets)
183 This command returns the Management version and revision.
184 Besides, being informational the information can be used to
185 determine whether certain behavior has changed or bugs fixed
186 when interacting with the kernel.
188 This command generates a Command Complete event on success or
189 a Command Status event on failure.
192 Read Management Supported Commands Command
193 ==========================================
196 Controller Index: <non-controller>
198 Return Parameters: Num_Of_Commands (2 Octets)
199 Num_Of_Events (2 Octets)
207 This command returns the list of supported Management commands
210 The commands Read Management Version Information and Read
211 management Supported Commands are not included in this list.
212 Both commands are always supported and mandatory.
214 The events Command Status and Command Complete are not included
215 in this list. Both are implicit and mandatory.
217 This command generates a Command Complete event on success or
218 a Command Status event on failure.
221 Read Controller Index List Command
222 ==================================
225 Controller Index: <non-controller>
227 Return Parameters: Num_Controllers (2 Octets)
228 Controller_Index[i] (2 Octets)
230 This command returns the list of currently known controllers.
231 Controllers added or removed after calling this command can be
232 monitored using the Index Added and Index Removed events.
234 This command generates a Command Complete event on success or
235 a Command Status event on failure.
238 Read Controller Information Command
239 ===================================
242 Controller Index: <controller id>
244 Return Parameters: Address (6 Octets)
245 Bluetooth_Version (1 Octet)
246 Manufacturer (2 Octets)
247 Supported_Settings (4 Octets)
248 Current_Settings (4 Octets)
249 Class_Of_Device (3 Octets)
251 Short_Name (11 Octets)
253 This command is used to retrieve the current state and basic
254 information of a controller. It is typically used right after
255 getting the response to the Read Controller Index List command
256 or an Index Added event.
258 The Address parameter describes the controllers public address
259 and it can be expected that it is set. However in case of single
260 mode Low Energy only controllers it can be 00:00:00:00:00:00. To
261 power on the controller in this case, it is required to configure
262 a static address using Set Static Address command first.
264 If the public address is set, then it will be used as identity
265 address for the controller. If no public address is available,
266 then the configured static address will be used as identity
269 In the case of a dual-mode controller with public address that
270 is configured as Low Energy only device (BR/EDR switched off),
271 the static address is used when set and public address otherwise.
273 If no short name is set the Short_Name parameter will be empty
274 (begin with a nul byte).
276 Current_Settings and Supported_Settings is a bitmask with
277 currently the following available bits:
284 5 Link Level Security (Sec. mode 3)
285 6 Secure Simple Pairing
286 7 Basic Rate/Enhanced Data Rate
290 11 Secure Connections
293 14 Controller Configuration
296 This command generates a Command Complete event on success or
297 a Command Status event on failure.
299 Possible errors: Invalid Parameters
307 Controller Index: <controller id>
308 Command Parameters: Powered (1 Octet)
309 Return Parameters: Current_Settings (4 Octets)
311 This command is used to power on or off a controller. The
312 allowed Powered command parameter values are 0x00 and 0x01. All
313 other values will return Invalid Parameters.
315 If discoverable setting is activated with a timeout, then
316 switching the controller off will expire this timeout and
317 disable discoverable.
319 Settings programmed via Set Advertising and Add/Remove
320 Advertising while the controller was powered off will be activated
321 when powering the controller on.
323 Switching the controller off will permanently cancel and remove
324 all advertising instances with a timeout set, i.e. time limited
325 advertising instances are not being remembered across power cycles.
326 Advertising Removed events will be issued accordingly.
328 This command generates a Command Complete event on success or
329 a Command Status event on failure.
331 Possible errors: Busy
336 Set Discoverable Command
337 ========================
340 Controller Index: <controller id>
341 Command Parameters: Discoverable (1 Octet)
343 Return Parameters: Current_Settings (4 Octets)
345 This command is used to set the discoverable property of a
346 controller. The allowed Discoverable command parameter values
347 are 0x00, 0x01 and 0x02. All other values will return Invalid
350 Timeout is the time in seconds and is only meaningful when
351 Discoverable is set to 0x01 or 0x02. Providing a timeout
352 with 0x00 return Invalid Parameters. For 0x02, the timeout
355 The value 0x00 disables discoverable, the value 0x01 enables
356 general discoverable and the value 0x02 enables limited
359 This command is only available for BR/EDR capable controllers
360 (e.g. not for single-mode LE ones). It will return Not Supported
363 This command can be used when the controller is not powered and
364 all settings will be programmed once powered.
366 However using a timeout when the controller is not powered will
367 return Not Powered error.
369 When switching discoverable on and the connectable setting is
370 off it will return Rejected error.
372 This command generates a Command Complete event on success or
373 a Command Status event on failure.
375 Possible errors: Busy
383 Set Connectable Command
384 =======================
387 Controller Index: <controller id>
388 Command Parameters: Connectable (1 Octet)
389 Return Parameters: Current_Settings (4 Octets)
391 This command is used to set the connectable property of a
392 controller. The allowed Connectable command parameter values are
393 0x00 and 0x01. All other values will return Invalid Parameters.
395 This command is available for BR/EDR, LE-only and also dual
396 mode controllers. For BR/EDR is changes the page scan setting
397 and for LE controllers it changes the advertising type. For
398 dual mode controllers it affects both settings.
400 For LE capable controllers the connectable setting takes effect
401 when advertising is enabled (peripheral) or when directed
402 advertising events are received (central).
404 This command can be used when the controller is not powered and
405 all settings will be programmed once powered.
407 When switching connectable off, it will also switch off the
408 discoverable setting. Switching connectable back on will not
409 restore a previous discoverable. It will stay off and needs
410 to be manually switched back on.
412 When switching connectable off, it will expire a discoverable
413 setting with a timeout.
415 This setting does not affect known devices from Add Device
416 command. These devices are always allowed to connect.
418 This command generates a Command Complete event on success or
419 a Command Status event on failure.
421 Possible errors: Busy
427 Set Fast Connectable Command
428 ============================
431 Controller Index: <controller id>
432 Command Parameters: Enable (1 Octet)
433 Return Parameters: Current_Settings (4 Octets)
435 This command is used to set the controller into a connectable
436 state where the page scan parameters have been set in a way to
437 favor faster connect times with the expense of higher power
440 The allowed values of the Enable command parameter are 0x00 and
441 0x01. All other values will return Invalid Parameters.
443 This command is only available for BR/EDR capable controllers
444 (e.g. not for single-mode LE ones). It will return Not Supported
447 This command can be used when the controller is not powered and
448 all settings will be programmed once powered.
450 The setting will be remembered during power down/up toggles.
452 This command generates a Command Complete event on success or
453 a Command Status event on failure.
455 Possible errors: Failed
466 Controller Index: <controller id>
467 Command Parameters: Bondable (1 Octet)
468 Return Parameters: Current_Settings (4 Octets)
470 This command is used to set the bondable property of an
471 controller. The allowed values for the Bondable command
472 parameter are 0x00 and 0x01. All other values will return
475 This command can be used when the controller is not powered and
476 all settings will be programmed once powered.
478 Turning bondable on will not automatically switch the controller
479 into connectable mode. That needs to be done separately.
481 The setting will be remembered during power down/up toggles.
483 This command generates a Command Complete event on success or
484 a Command Status event on failure.
486 Possible errors: Invalid Parameters
490 Set Link Security Command
491 =========================
494 Controller Index: <controller id>
495 Command Parameters: Link_Security (1 Octet)
496 Return Parameters: Current_Settings (4 Octets)
498 This command is used to either enable or disable link level
499 security for an controller (also known as Security Mode 3). The
500 allowed values for the Link_Security command parameter are 0x00
501 and 0x01. All other values will return Invalid Parameters.
503 This command is only available for BR/EDR capable controllers
504 (e.g. not for single-mode LE ones). It will return Not Supported
507 This command can be used when the controller is not powered and
508 all settings will be programmed once powered.
510 This command generates a Command Complete event on success or
511 a Command Status event on failure.
513 Possible errors: Busy
519 Set Secure Simple Pairing Command
520 =================================
523 Controller Index: <controller id>
524 Command Parameters: Secure_Simple_Pairing (1 Octet)
525 Return Parameters: Current_Settings (4 Octets)
527 This command is used to enable/disable Secure Simple Pairing
528 support for a controller. The allowed values for the
529 Secure_Simple_Pairing command parameter are 0x00 and 0x01. All
530 other values will return Invalid Parameters.
532 This command is only available for BR/EDR capable controllers
533 supporting the core specification version 2.1 or greater
534 (e.g. not for single-mode LE controllers or pre-2.1 ones).
536 This command can be used when the controller is not powered and
537 all settings will be programmed once powered.
539 In case the controller does not support Secure Simple Pairing,
540 the command will fail regardless with Not Supported error.
542 This command generates a Command Complete event on success or
543 a Command Status event on failure.
545 Possible errors: Busy
550 Set High Speed Command
551 ======================
554 Controller Index: <controller id>
555 Command Parameters: High_Speed (1 Octet)
556 Return Parameters: Current_Settings (4 Octets)
558 This command is used to enable/disable Bluetooth High Speed
559 support for a controller. The allowed values for the High_Speed
560 command parameter are 0x00 and 0x01. All other values will
561 return Invalid Parameters.
563 This command is only available for BR/EDR capable controllers
564 (e.g. not for single-mode LE ones).
566 This command can be used when the controller is not powered and
567 all settings will be programmed once powered.
569 To enable High Speed support, it is required that Secure Simple
570 Pairing support is enabled first. High Speed support is not
571 possible for connections without Secure Simple Pairing.
573 When switching Secure Simple Pairing off, the support for High
574 Speed will be switched off as well. Switching Secure Simple
575 Pairing back on, will not re-enable High Speed support. That
576 needs to be done manually.
578 This command generates a Command Complete event on success or
579 a Command Status event on failure.
581 Possible errors: Not Supported
586 Set Low Energy Command
587 ======================
590 Controller Index: <controller id>
591 Command Parameters: Low_Energy (1 Octet)
592 Return Parameters: Current_Settings (4 Octets)
594 This command is used to enable/disable Low Energy support for a
595 controller. The allowed values of the Low_Energy command
596 parameter are 0x00 and 0x01. All other values will return
599 This command is only available for LE capable controllers and
600 will yield in a Not Supported error otherwise.
602 This command can be used when the controller is not powered and
603 all settings will be programmed once powered.
605 In case the kernel subsystem does not support Low Energy or the
606 controller does not either, the command will fail regardless.
608 Disabling LE support will permanently disable and remove all
609 advertising instances configured with the Add Advertising
610 command. Advertising Removed events will be issued accordingly.
612 This command generates a Command Complete event on success or
613 a Command Status event on failure.
615 Possible errors: Busy
625 Controller Index: <controller id>
626 Command Parameters: Major_Class (1 Octet)
627 Minor_Class (1 Octet)
628 Return Parameters: Class_Of_Device (3 Octets)
630 This command is used to set the major and minor device class for
631 BR/EDR capable controllers.
633 This command will also implicitly disable caching of pending CoD
636 This command is only available for BR/EDR capable controllers
637 (e.g. not for single-mode LE ones).
639 This command can be used when the controller is not powered and
640 all settings will be programmed once powered.
642 In case the controller is powered off, 0x000000 will be returned
643 for the class of device parameter. And after power on the new
644 value will be announced via class of device changed event.
646 This command generates a Command Complete event on success or
647 a Command Status event on failure.
649 Possible errors: Busy
655 Set Local Name Command
656 ======================
659 Controller Index: <controller id>
660 Command Parameters: Name (249 Octets)
661 Short_Name (11 Octets)
662 Return Parameters: Name (249 Octets)
663 Short_Name (11 Octets)
665 This command is used to set the local name of a controller. The
666 command parameters also include a short name which will be used
667 in case the full name doesn't fit within EIR/AD data.
669 The name parameters need to always end with a null byte (failure
670 to do so will cause the command to fail).
672 This command can be used when the controller is not powered and
673 all settings will be programmed once powered.
675 The values of name and short name will be remembered when
676 switching the controller off and back on again. So the name
677 and short name only have to be set once when a new controller
678 is found and will stay until removed.
680 This command generates a Command Complete event on success or
681 a Command Status event on failure.
683 Possible errors: Invalid Parameters
691 Controller Index: <controller id>
692 Command Parameters: UUID (16 Octets)
694 Return Parameters: Class_Of_Device (3 Octets)
696 This command is used to add a UUID to be published in EIR data.
697 The accompanied SVC_Hint parameter is used to tell the kernel
698 whether the service class bits of the Class of Device value need
699 modifying due to this UUID.
701 This command can be used when the controller is not powered and
702 all settings will be programmed once powered.
704 In case the controller is powered off, 0x000000 will be returned
705 for the class of device parameter. And after power on the new
706 value will be announced via class of device changed event.
708 This command generates a Command Complete event on success or
709 a Command Status event on failure.
711 Possible errors: Busy
720 Controller Index: <controller id>
721 Command Parameters: UUID (16 Octets)
722 Return Parameters: Class_Of_Device (3 Octets)
724 This command is used to remove a UUID previously added using the
727 When the UUID parameter is an empty UUID (16 x 0x00), then all
728 previously loaded UUIDs will be removed.
730 This command can be used when the controller is not powered and
731 all settings will be programmed once powered.
733 In case the controller is powered off, 0x000000 will be returned
734 for the class of device parameter. And after power on the new
735 value will be announced via class of device changed event.
737 This command generates a Command Complete event on success or
738 a Command Status event on failure.
740 Possible errors: Busy
745 Load Link Keys Command
746 ======================
749 Controller Index: <controller id>
750 Command Parameters: Debug_Keys (1 Octet)
754 Address_Type (1 Octet)
763 This command is used to feed the kernel with currently known
764 link keys. The command does not need to be called again upon the
765 receipt of New Link Key events since the kernel updates its list
768 The Debug_Keys parameter is used to tell the kernel whether to
769 accept the usage of debug keys or not. The allowed values for
770 this parameter are 0x00 and 0x01. All other values will return
771 an Invalid Parameters response.
773 Usage of the Debug_Keys parameter is deprecated and has been
774 replaced with the Set Debug Keys command. When setting the
775 Debug_Keys option via Load Link Keys command it has the same
776 affect as setting it via Set Debug Keys and applies to all
779 Possible values for the Address_Type parameter:
781 1 Reserved (not in use)
782 2 Reserved (not in use)
784 Public and random LE addresses are not valid and will be rejected.
786 Currently defined Key_Type values are:
791 0x03 Debug Combination key
792 0x04 Unauthenticated Combination key from P-192
793 0x05 Authenticated Combination key from P-192
794 0x06 Changed Combination key
795 0x07 Unauthenticated Combination key from P-256
796 0x08 Authenticated Combination key from P-256
798 This command can be used when the controller is not powered.
800 This command generates a Command Complete event on success or
801 a Command Status event on failure.
803 Possible errors: Invalid Parameters
807 Load Long Term Keys Command
808 ===========================
811 Controller Index: <controller id>
812 Command Parameters: Key_Count (2 Octets)
815 Address_Type (1 Octet)
818 Encryption_Size (1 Octet)
819 Encryption_Diversifier (2 Octets)
820 Random_Number (8 Octets)
827 This command is used to feed the kernel with currently known
828 (SMP) Long Term Keys. The command does not need to be called
829 again upon the receipt of New Long Term Key events since the
830 kernel updates its list automatically.
832 Possible values for the Address_Type parameter:
833 0 Reserved (not in use)
837 The provided Address and Address_Type are the identity of
838 a device. So either its public address or static random address.
840 Unresolvable random addresses and resolvable random addresses are
841 not valid and will be rejected.
843 Currently defined Key_Type values are:
845 0x00 Unauthenticated key
846 0x01 Authenticated key
848 This command can be used when the controller is not powered.
850 This command generates a Command Complete event on success or
851 a Command Status event on failure.
853 Possible errors: Invalid Parameters
861 Controller Index: <controller id>
862 Command Parameters: Address (6 Octets)
863 Address_Type (1 Octet)
864 Return Parameters: Address (6 Octets)
865 Address_Type (1 Octet)
867 This command is used to force the disconnection of a currently
870 Possible values for the Address_Type parameter:
875 This command can only be used when the controller is powered.
877 This command generates a Command Complete event on success
880 Possible errors: Not Connected
887 Get Connections Command
888 =======================
891 Controller Index: <controller id>
893 Return Parameters: Connection_Count (2 Octets)
896 Address_Type (1 Octet)
901 This command is used to retrieve a list of currently connected
904 Possible values for the Address_Type parameter:
909 For devices using resolvable random addresses with a known
910 identity resolving key, the Address and Address_Type will
911 contain the identity information.
913 This command can only be used when the controller is powered.
915 This command generates a Command Complete event on success or
916 a Command Status event on failure.
918 Possible errors: Invalid Parameters
923 PIN Code Reply Command
924 =======================
927 Controller Index: <controller id>
928 Command Parameters: Address (6 Octets)
929 Address_Type (1 Octet)
932 Return Parameters: Address (6 Octets)
933 Address_Type (1 Octet)
935 This command is used to respond to a PIN Code request event.
937 Possible values for the Address_Type parameter:
942 This command can only be used when the controller is powered.
944 This command generates a Command Complete event on success
947 Possible errors: Not Connected
953 PIN Code Negative Reply Command
954 ===============================
957 Controller Index: <controller id>
958 Command Parameters: Address (6 Octets)
959 Address_Type (1 Octet)
960 Return Parameters: Address (6 Octets)
961 Address_Type (1 Octet)
963 This command is used to return a negative response to a PIN Code
966 Possible values for the Address_Type parameter:
971 This command can only be used when the controller is powered.
973 This command generates a Command Complete event on success
976 Possible errors: Not Connected
982 Set IO Capability Command
983 =========================
986 Controller Index: <controller id>
987 Command Parameters: IO_Capability (1 Octet)
990 This command is used to set the IO Capability used for pairing.
991 The command accepts both SSP and SMP values.
993 Possible values for the IO_Capability parameter:
1000 Passing a value 4 (KeyboardDisplay) will cause the kernel to
1001 convert it to 1 (DisplayYesNo) in the case of a BR/EDR
1002 connection (as KeyboardDisplay is specific to SMP).
1004 This command can be used when the controller is not powered.
1006 This command generates a Command Complete event on success or
1007 a Command Status event on failure.
1009 Possible errors: Invalid Parameters
1016 Command Code: 0x0019
1017 Controller Index: <controller id>
1018 Command Parameters: Address (6 Octets)
1019 Address_Type (1 Octet)
1020 IO_Capability (1 Octet)
1021 Return Parameters: Address (6 Octets)
1022 Address_Type (1 Octet)
1024 This command is used to trigger pairing with a remote device.
1025 The IO_Capability command parameter is used to temporarily (for
1026 this pairing event only) override the global IO Capability (set
1027 using the Set IO Capability command).
1029 Possible values for the Address_Type parameter:
1034 Possible values for the IO_Capability parameter:
1041 Passing a value 4 (KeyboardDisplay) will cause the kernel to
1042 convert it to 1 (DisplayYesNo) in the case of a BR/EDR
1043 connection (as KeyboardDisplay is specific to SMP).
1045 The Address and Address_Type of the return parameters will
1046 return the identity address if known. In case of resolvable
1047 random address given as command parameters and the remote
1048 provides an identity resolving key, the return parameters
1049 will provide the resolved address.
1051 To allow tracking of which resolvable random address changed
1052 into which identity address, the New Identity Resolving Key
1053 event will be sent before receiving Command Complete event
1056 This command can only be used when the controller is powered.
1058 This command generates a Command Complete event on success
1061 Reject status is used when requested transport is not enabled.
1063 Not Supported status is used if controller is not capable with
1064 requested transport.
1066 Possible errors: Rejected
1076 Cancel Pair Device Command
1077 ==========================
1079 Command Code: 0x001A
1080 Controller Index: <controller id>
1081 Command Parameters: Address (6 Octets)
1082 Address_Type (1 Octet)
1083 Return Parameters: Address (6 Octets)
1084 Address_Type (1 Octet)
1086 The Address and Address_Type parameters should match what was
1087 given to a preceding Pair Device command.
1089 Possible values for the Address_Type parameter:
1094 This command can only be used when the controller is powered.
1096 This command generates a Command Complete event on success
1099 Possible errors: Invalid Parameters
1104 Unpair Device Command
1105 =====================
1107 Command Code: 0x001B
1108 Controller Index: <controller id>
1109 Command Parameters: Address (6 Octets)
1110 Address_Type (1 Octet)
1111 Disconnect (1 Octet)
1112 Return Parameters: Address (6 Octets)
1113 Address_Type (1 Octet)
1115 Removes all keys associated with the remote device.
1117 Possible values for the Address_Type parameter:
1122 The Disconnect parameter tells the kernel whether to forcefully
1123 disconnect any existing connections to the device. It should in
1124 practice always be 1 except for some special GAP qualification
1125 test-cases where a key removal without disconnecting is needed.
1127 When unpairing a device its link key, long term key and if
1128 provided identity resolving key will be purged.
1130 For devices using resolvable random addresses where the identity
1131 resolving key was available, after this command they will now no
1132 longer be resolved. The device will essentially become private
1135 This command can only be used when the controller is powered.
1137 This command generates a Command Complete event on success
1140 Possible errors: Not Paired
1146 User Confirmation Reply Command
1147 ===============================
1149 Command Code: 0x001C
1150 Controller Index: <controller id>
1151 Command Parameters: Address (6 Octets)
1152 Address_Type (1 Octet)
1153 Return Parameters: Address (6 Octets)
1154 Address_Type (1 Octet)
1156 This command is used to respond to a User Confirmation Request
1159 Possible values for the Address_Type parameter:
1164 This command can only be used when the controller is powered.
1166 This command generates a Command Complete event on success
1169 Possible errors: Not Connected
1175 User Confirmation Negative Reply Command
1176 ========================================
1178 Command Code: 0x001D
1179 Controller Index: <controller id>
1180 Command Parameters: Address (6 Octets)
1181 Address_Type (1 Octet)
1182 Return Parameters: Address (6 Octets)
1183 Address_Type (1 Octet)
1185 This command is used to return a negative response to a User
1186 Confirmation Request event.
1188 Possible values for the Address_Type parameter:
1193 This command can only be used when the controller is powered.
1195 This command generates a Command Complete event on success
1198 Possible errors: Not Connected
1204 User Passkey Reply Command
1205 ==========================
1207 Command Code: 0x001E
1208 Controller Index: <controller id>
1209 Command Parameters: Address (6 Octets)
1210 Address_Type (1 Octet)
1212 Return Parameters: Address (6 Octets)
1213 Address_Type (1 Octet)
1215 This command is used to respond to a User Confirmation Passkey
1218 Possible values for the Address_Type parameter:
1223 This command can only be used when the controller is powered.
1225 This command generates a Command Complete event on success
1228 Possible errors: Not Connected
1234 User Passkey Negative Reply Command
1235 ===================================
1237 Command Code: 0x001F
1238 Controller Index: <controller id>
1239 Command Parameters: Address (6 Octets)
1240 Address_Type (1 Octet)
1241 Return Parameters: Address (6 Octets)
1242 Address_Type (1 Octet)
1244 This command is used to return a negative response to a User
1245 Passkey Request event.
1247 Possible values for the Address_Type parameter:
1252 This command can only be used when the controller is powered.
1254 This command generates a Command Complete event on success
1257 Possible errors: Not Connected
1263 Read Local Out Of Band Data Command
1264 ===================================
1266 Command Code: 0x0020
1267 Controller Index: <controller id>
1269 Return Parameters: Hash_192 (16 Octets)
1270 Randomizer_192 (16 Octets)
1271 Hash_256 (16 Octets, Optional)
1272 Randomizer_256 (16 Octets, Optional)
1274 This command is used to read the local Out of Band data.
1276 This command can only be used when the controller is powered.
1278 If Secure Connections support is enabled, then this command
1279 will return P-192 versions of hash and randomizer as well as
1280 P-256 versions of both.
1282 Values returned by this command become invalid when the controller
1283 is powered down. After each power-cycle it is required to call
1284 this command again to get updated values.
1286 This command generates a Command Complete event on success or
1287 a Command Status event on failure.
1289 Possible errors: Not Supported
1296 Add Remote Out Of Band Data Command
1297 ===================================
1299 Command Code: 0x0021
1300 Controller Index: <controller id>
1301 Command Parameters: Address (6 Octets)
1302 Address_Type (1 Octet)
1303 Hash_192 (16 Octets)
1304 Randomizer_192 (16 Octets)
1305 Hash_256 (16 Octets, Optional)
1306 Randomizer_256 (16 Octets, Optional)
1307 Return Parameters: Address (6 Octets)
1308 Address_Type (1 Octet)
1310 This command is used to provide Out of Band data for a remote
1313 Possible values for the Address_Type parameter:
1318 Provided Out Of Band data is persistent over power down/up toggles.
1320 This command also accept optional P-256 versions of hash and
1321 randomizer. If they are not provided, then they are set to
1324 The P-256 versions of both can also be provided when the
1325 support for Secure Connections is not enabled. However in
1326 that case they will never be used.
1328 To only provide the P-256 versions of hash and randomizer,
1329 it is valid to leave both P-192 fields as zero values. If
1330 Secure Connections is disabled, then of course this is the
1331 same as not providing any data at all.
1333 When providing data for remote LE devices, then the Hash_192 and
1334 and Randomizer_192 fields are not used and shell be set to zero.
1336 The Hash_256 and Randomizer_256 fields can be used for LE secure
1337 connections Out Of Band data. If only LE secure connections data
1338 is provided the Hash_P192 and Randomizer_P192 fields can be set
1339 to zero. Currently there is no support for providing the Security
1340 Manager TK Value for LE legacy pairing.
1342 If Secure Connections Only mode has been enabled, then providing
1343 Hash_P192 and Randomizer_P192 is not allowed. They are required
1344 to be set to zero values.
1346 This command can be used when the controller is not powered and
1347 all settings will be programmed once powered.
1349 This command generates a Command Complete event on success
1352 Possible errors: Failed
1358 Remove Remote Out Of Band Data Command
1359 ======================================
1361 Command Code: 0x0022
1362 Controller Index: <controller id>
1363 Command Parameters: Address (6 Octets)
1364 Address_Type (1 Octet)
1365 Return Parameters: Address (6 Octets)
1366 Address_Type (1 Octet)
1368 This command is used to remove data added using the Add Remote
1369 Out Of Band Data command.
1371 Possible values for the Address_Type parameter:
1376 When the Address parameter is 00:00:00:00:00:00, then all
1377 previously added data will be removed.
1379 This command can be used when the controller is not powered and
1380 all settings will be programmed once powered.
1382 This command generates a Command Complete event on success
1385 Possible errors: Invalid Parameters
1390 Start Discovery Command
1391 =======================
1393 Command Code: 0x0023
1394 Controller Index: <controller id>
1395 Command Parameters: Address_Type (1 Octet)
1396 Return Parameters: Address_Type (1 Octet)
1398 This command is used to start the process of discovering remote
1399 devices. A Device Found event will be sent for each discovered
1402 Possible values for the Address_Type parameter are a bit-wise or
1403 of the following bits:
1409 By combining these e.g. the following values are possible:
1412 6 LE (public & random)
1413 7 BR/EDR/LE (interleaved discovery)
1415 This command can only be used when the controller is powered.
1417 This command generates a Command Complete event on success
1420 Possible errors: Busy
1427 Stop Discovery Command
1428 ======================
1430 Command Code: 0x0024
1431 Controller Index: <controller id>
1432 Command Parameters: Address_Type (1 Octet)
1433 Return Parameters: Address_Type (1 Octet)
1435 This command is used to stop the discovery process started using
1436 the Start Discovery command.
1438 This command can only be used when the controller is powered.
1440 This command generates a Command Complete event on success
1443 Possible errors: Rejected
1448 Confirm Name Command
1449 ====================
1451 Command Code: 0x0025
1452 Controller Index: <controller id>
1453 Command Parameters: Address (6 Octets)
1454 Address_Type (1 Octet)
1455 Name_Known (1 Octet)
1456 Return Parameters: Address (6 Octets)
1457 Address_Type (1 Octet)
1459 This command is only valid during device discovery and is
1460 expected for each Device Found event with the Confirm Name
1463 Possible values for the Address_Type parameter:
1468 The Name_Known parameter should be set to 0x01 if user space
1469 knows the name for the device and 0x00 if it doesn't. If set to
1470 0x00 the kernel will perform a name resolving procedure for the
1473 This command can only be used when the controller is powered.
1475 This command generates a Command Complete event on success
1478 Possible errors: Failed
1483 Block Device Command
1484 ====================
1486 Command Code: 0x0026
1487 Controller Index: <controller id>
1488 Command Parameters: Address (6 Octets)
1489 Address_Type (1 Octet)
1490 Return Parameters: Address (6 Octets)
1491 Address_Type (1 Octet)
1493 This command is used to add a device to the list of devices
1494 which should be blocked from being connected to the local
1497 Possible values for the Address_Type parameter:
1502 For Low Energy devices, the blocking of a device takes precedence
1503 over auto-connection actions provided by Add Device. Blocked
1504 devices will not be auto-connected or even reported when found
1505 during background scanning. If the controller is connectable
1506 direct advertising from blocked devices will also be ignored.
1508 Connections created from advertising of the controller will
1509 be dropped if the device is blocked.
1511 This command can be used when the controller is not powered.
1513 This command generates a Command Complete event on success
1516 Possible errors: Failed
1521 Unblock Device Command
1522 ======================
1524 Command Code: 0x0027
1525 Controller Index: <controller id>
1526 Command Parameters: Address (6 Octets)
1527 Address_Type (1 Octet)
1528 Return Parameters: Address (6 Octets)
1529 Address_Type (1 Octet)
1531 This command is used to remove a device from the list of blocked
1532 devices (where it was added to using the Block Device command).
1534 Possible values for the Address_Type parameter:
1539 When the Address parameter is 00:00:00:00:00:00, then all
1540 previously blocked devices will be unblocked.
1542 This command can be used when the controller is not powered.
1544 This command generates a Command Complete event on success
1547 Possible errors: Invalid Parameters
1551 Set Device ID Command
1552 =====================
1554 Command Code: 0x0028
1555 Controller Index: <controller id>
1556 Command Parameters: Source (2 Octets)
1562 This command can be used when the controller is not powered and
1563 all settings will be programmed once powered.
1565 The Source parameter selects the organization that assigned the
1568 0x0000 Disable Device ID
1569 0x0001 Bluetooth SIG
1570 0x0002 USB Implementer's Forum
1572 The information is put into the EIR data. If the controller does
1573 not support EIR or if SSP is disabled, this command will still
1574 succeed. The information is stored for later use and will survive
1575 toggling SSP on and off.
1577 This command generates a Command Complete event on success or
1578 a Command Status event on failure.
1580 Possible errors: Invalid Parameters
1584 Set Advertising Command
1585 =======================
1587 Command Code: 0x0029
1588 Controller Index: <controller id>
1589 Command Parameters: Advertising (1 Octet)
1590 Return Parameters: Current_Settings (4 Octets)
1592 This command is used to enable LE advertising on a controller
1593 that supports it. The allowed values for the Advertising command
1594 parameter are 0x00, 0x01 and 0x02. All other values will return
1597 The value 0x00 disables advertising, the value 0x01 enables
1598 advertising with considering of connectable setting and the
1599 value 0x02 enables advertising in connectable mode.
1601 Using value 0x01 means that when connectable setting is disabled,
1602 the advertising happens with undirected non-connectable advertising
1603 packets and a non-resolvable random address is used. If connectable
1604 setting is enabled, then undirected connectable advertising packets
1605 and the identity address or resolvable private address are used.
1607 LE Devices configured via Add Device command with Action 0x01
1608 have no effect when using Advertising value 0x01 since only the
1609 connectable setting is taken into account.
1611 To utilize undirected connectable advertising without changing the
1612 connectable setting, the value 0x02 can be utilized. It makes the
1613 device connectable via LE without the requirement for being
1614 connectable on BR/EDR (and/or LE).
1616 The value 0x02 should be the preferred mode of operation when
1617 implementing peripheral mode.
1619 Using this command will temporarily deactivate any configuration
1620 made by the Add Advertising command. This command takes precedence.
1621 Once a Set Advertising command with value 0x00 is issued any
1622 previously made configurations via Add/Remove Advertising, including
1623 such changes made while Set Advertising was active, will be re-
1626 A pre-requisite is that LE is already enabled, otherwise this
1627 command will return a "rejected" response.
1629 This command generates a Command Complete event on success or a
1630 Command Status event on failure.
1632 Possible errors: Busy
1642 Command Code: 0x002A
1643 Controller Index: <controller id>
1644 Command Parameters: BR/EDR (1 Octet)
1645 Return Parameters: Current_Settings (4 Octets)
1647 This command is used to enable or disable BR/EDR support
1648 on a dual-mode controller. The allowed values for the Advertising
1649 command parameter are 0x00 and 0x01. All other values will
1650 return Invalid Parameters.
1652 A pre-requisite is that LE is already enabled, otherwise
1653 this command will return a "rejected" response. Enabling BR/EDR
1654 can be done both when powered on and powered off, however
1655 disabling it can only be done when powered off (otherwise the
1656 command will again return "rejected"). Disabling BR/EDR will
1657 automatically disable all other BR/EDR related settings.
1659 This command generates a Command Complete event on success or a
1660 Command Status event on failure.
1662 Possible errors: Busy
1669 Set Static Address Command
1670 ==========================
1672 Command Code: 0x002B
1673 Controller Index: <controller id>
1674 Command Parameters: Address (6 Octets)
1675 Return Parameters: Current_Settings (4 Octets)
1677 This command allows for setting the static random address. It is
1678 only supported on controllers with LE support. The static random
1679 address is suppose to be valid for the lifetime of the
1680 controller or at least until the next power cycle. To ensure
1681 such behavior, setting of the address is limited to when the
1682 controller is powered off.
1684 The special BDADDR_ANY address (00:00:00:00:00:00) can be used
1685 to disable the static address.
1687 When a controller has a public address (which is required for
1688 all dual-mode controllers), this address is not used. If a dual-mode
1689 controller is configured as Low Energy only devices (BR/EDR has
1690 been switched off), then the static address is used. Only when
1691 the controller information reports BDADDR_ANY (00:00:00:00:00:00),
1692 it is required to configure a static address first.
1694 If privacy mode is enabled and the controller is single mode
1695 LE only without a public address, the static random address is
1696 used as identity address.
1698 The Static Address flag from the current settings can also be used
1699 to determine if the configured static address is in use or not.
1701 This command generates a Command Complete event on success or a
1702 Command Status event on failure.
1704 Possible errors: Rejected
1710 Set Scan Parameters Command
1711 ===========================
1713 Command Code: 0x002C
1714 Controller Index: <controller id>
1715 Command Parameters: Interval (2 Octets)
1719 This command allows for setting the Low Energy scan parameters
1720 used for connection establishment and passive scanning. It is
1721 only supported on controllers with LE support.
1723 This command generates a Command Complete event on success or a
1724 Command Status event on failure.
1726 Possible errors: Rejected
1732 Set Secure Connections Command
1733 ==============================
1735 Command Code: 0x002D
1736 Controller Index: <controller id>
1737 Command Parameters: Secure_Connections (1 Octet)
1738 Return Parameters: Current_Settings (4 Octets)
1740 This command is used to enable/disable Secure Connections
1741 support for a controller. The allowed values for the
1742 Secure_Connections command parameter are 0x00, 0x01 and 0x02.
1743 All other values will return Invalid Parameters.
1745 The value 0x00 disables Secure Connections, the value 0x01
1746 enables Secure Connections and the value 0x02 enables Secure
1747 Connections Only mode.
1749 This command is only available for LE capable controllers as
1750 well as controllers supporting the core specification version
1753 This command can be used when the controller is not powered and
1754 all settings will be programmed once powered.
1756 In case the controller does not support Secure Connections
1757 the command will fail regardless with Not Supported error.
1759 This command generates a Command Complete event on success or
1760 a Command Status event on failure.
1762 Possible errors: Busy
1768 Set Debug Keys Command
1769 ======================
1771 Command Code: 0x002E
1772 Controller Index: <controller id>
1773 Command Parameters: Debug_Keys (1 Octet)
1774 Return Parameters: Current_Settings (4 Octets)
1776 This command is used to tell the kernel whether to accept the
1777 usage of debug keys or not. The allowed values for this parameter
1778 are 0x00, 0x01 and 0x02. All other values will return an Invalid
1779 Parameters response.
1781 With a value of 0x00 any generated debug key will be discarded
1782 as soon as the connection terminates.
1784 With a value of 0x01 generated debug keys will be kept and can
1785 be used for future connections. However debug keys are always
1786 marked as non persistent and should not be stored. This means
1787 a reboot or changing the value back to 0x00 will delete them.
1789 With a value of 0x02 generated debug keys will be kept and can
1790 be used for future connections. This has the same affect as
1791 with value 0x01. However in addition this value will also
1792 enter the controller mode to generate debug keys for each
1793 new pairing. Changing the value back to 0x01 or 0x00 will
1794 disable the controller mode for generating debug keys.
1796 This command generates a Command Complete event on success or
1797 a Command Status event on failure.
1799 Possible errors: Busy
1808 Command Code: 0x002F
1809 Controller Index: <controller id>
1810 Command Parameters: Privacy (1 Octet)
1811 Identity_Resolving_Key (16 Octets)
1812 Return Parameters: Current_Settings (4 Octets)
1814 This command is used to enable Low Energy Privacy feature using
1815 resolvable private addresses.
1817 The value 0x00 disables privacy mode, the values 0x01 and 0x02
1818 enable privacy mode.
1820 With value 0x01 the kernel will always use the privacy mode. This
1821 means resolvable private address is used when the controller is
1822 discoverable and also when pairing is initiated.
1824 With value 0x02 the kernel will use privacy mode with resolvable
1825 private address. In case the controller is bondable and
1826 discoverable the identity address is used. Also when pairing is
1827 initiated, the connection will be established with the identity
1830 Exposing the identity address when bondable and discoverable or
1831 during initiated pairing can be a privacy issue. For dual-mode
1832 controllers this can be neglected since its public address will
1833 be exposed over BR/EDR anyway. The benefit of exposing the
1834 identity address for pairing purposes is that it makes matching
1835 up devices with dual-mode topology during device discovery now
1838 If the privacy value 0x02 is used, then also the GATT database
1839 should expose the Privacy Characteristic so that remote devices
1840 can determine if the privacy feature is in use or not.
1842 When the controller has a public address (mandatory for dual-mode
1843 controllers) it is used as identity address. In case the controller
1844 is single mode LE only without a public address, it is required
1845 to configure a static random address first. The privacy mode can
1846 only be enabled when an identity address is available.
1848 The Identity_Resolving_Key is the local key assigned for the local
1849 resolvable private address.
1851 Possible errors: Busy
1857 Load Identity Resolving Keys Command
1858 ====================================
1860 Command Code: 0x0030
1861 Controller Index: <controller id>
1862 Command Parameters: Key_Count (2 Octets)
1865 Address_Type (1 Octet)
1872 This command is used to feed the kernel with currently known
1873 identity resolving keys. The command does not need to be called
1874 again upon the receipt of New Identity Resolving Key events
1875 since the kernel updates its list automatically.
1877 Possible values for the Address_Type parameter:
1878 0 Reserved (not in use)
1882 The provided Address and Address_Type are the identity of
1883 a device. So either its public address or static random address.
1885 Unresolvable random addresses and resolvable random addresses are
1886 not valid and will be rejected.
1888 This command can be used when the controller is not powered.
1890 This command generates a Command Complete event on success or
1891 a Command Status event on failure.
1893 Possible errors: Invalid Parameters
1896 #ifdef __TIZEN_PATCH__
1897 Generate Identity Resolving Key Command
1898 =======================================
1900 Command Code: 0x00F6
1901 Controller Index: <controller id>
1905 This command is used to generate identity resolving key for the
1906 local device, which will be used at the time of pairing for key
1907 distribution and to generate resolvable private address for local device.
1909 This command generates a Command Complete event on success
1910 or a Command Status event on failure.
1912 Possible errors: Failed
1915 Generate Resolvable Private Address Command
1916 =======================================
1918 Command Code: 0x00F5
1919 Controller Index: <controller id>
1921 Return Parameters: Resolvable Private Address (6 Octets)
1923 This command is used to generate resolvable private address for the
1924 local device when LE privacy is supported and device is having its IRK.
1926 This command returns generated private address which is resolvable
1927 by remote device on success.
1929 This command generates a Command Complete event on success
1930 or a Command Status event on failure.
1932 Possible errors: Failed
1935 Set Random Address Command
1936 ==========================
1938 Command Code: 0x00F4
1939 Controller Index: <controller id>
1940 Command Parameters: Resolvable Private Address (6 Octets)
1943 This command is used to set the random address to local controller.
1944 If local device supports LE Privacy then this command will be called to set
1945 its Random address while active scanning remote devices and in the case of
1948 This command intern calls the HCI Set Random address command from kernel
1949 space to set the RPA to controller.
1951 This command generates a Command Complete event on success
1952 or a Command Status event on failure.
1954 Possible errors: Failed
1959 Get Connection Information Command
1960 ==================================
1962 Command Code: 0x0031
1963 Controller Index: <controller id>
1964 Command Parameters: Address (6 Octets)
1965 Address_Type (1 Octet)
1966 Return Parameters: Address (6 Octets)
1967 Address_Type (1 Octet)
1970 Max_TX_Power (1 Octet)
1972 This command is used to get connection information.
1974 Possible values for the Address_Type parameter:
1979 TX_Power and Max_TX_Power can be set to 127 if values are invalid or
1980 unknown. A value of 127 for RSSI indicates that it is not available.
1982 This command generates a Command Complete event on success and
1983 on failure. In case of failure only Address and Address_Type fields
1984 are valid and values of remaining parameters are considered invalid
1985 and shall be ignored.
1987 Possible errors: Not Connected
1993 Get Clock Information Command
1994 =============================
1996 Command Code: 0x0032
1997 Controller Index: <controller id>
1998 Command Parameters: Address (6 Octets)
1999 Address_Type (1 Octet)
2000 Return Parameters: Address (6 Octets)
2001 Address_Type (1 Octet)
2002 Local_Clock (4 Octets)
2003 Piconet_Clock (4 Octets)
2006 This command is used to get local and piconet clock information.
2008 Possible values for the Address_Type parameter:
2010 1 Reserved (not in use)
2011 2 Reserved (not in use)
2013 The Accuracy can be set to 0xffff which means the value is unknown.
2015 If the Address is set to 00:00:00:00:00:00, then only the
2016 Local_Clock field has a valid value. The Piconet_Clock and
2017 Accuracy fields are invalid and shall be ignored.
2019 This command generates a Command Complete event on success and
2020 on failure. In case of failure only Address and Address_Type fields
2021 are valid and values of remaining parameters are considered invalid
2022 and shall be ignored.
2024 Possible errors: Not Connected
2033 Command Code: 0x0033
2034 Controller Index: <controller id>
2035 Command Parameters: Address (6 Octets)
2036 Address_Type (1 Octet)
2038 Return Parameters: Address (6 Octets)
2039 Address_Type (1 Octet)
2041 This command is used to add a device to the action list. The
2042 action list allows scanning for devices and enables incoming
2043 connections from known devices.
2045 Possible values for the Address_Type parameter:
2050 Possible values for the Action parameter:
2051 0 Background scan for device
2052 1 Allow incoming connection
2053 2 Auto-connect remote device
2055 With the Action 0, when the device is found, a new Device Found
2056 event will be sent indicating this device is available. This
2057 action is only valid for LE Public and LE Random address types.
2059 With the Action 1, the device is allowed to connect. For BR/EDR
2060 address type this means an incoming connection. For LE Public
2061 and LE Random address types, a connection will be established
2062 to devices using directed advertising. If successful a Device
2063 Connected event will be sent.
2065 With the Action 2, when the device is found, it will be connected
2066 and if successful a Device Connected event will be sent. This
2067 action is only valid for LE Public and LE Random address types.
2069 When a device is blocked using Block Device command, then it is
2070 valid to add the device here, but all actions will be ignored
2071 until the device is unblocked.
2073 Devices added with Action 1 are allowed to connect even if the
2074 connectable setting is off. This acts as list of known trusted
2077 This command can be used when the controller is not powered and
2078 all settings will be programmed once powered.
2080 This command generates a Command Complete event on success
2083 Possible errors: Failed
2088 Remove Device Command
2089 =====================
2091 Command Code: 0x0034
2092 Controller Index: <controller id>
2093 Command Parameters: Address (6 Octets)
2094 Address_Type (1 Octet)
2095 Return Parameters: Address (6 Octets)
2096 Address_Type (1 Octet)
2098 This command is used to remove a device from the action list
2099 previously added by using the Add Device command.
2101 Possible values for the Address_Type parameter:
2106 When the Address parameter is 00:00:00:00:00:00, then all
2107 previously added devices will be removed.
2109 This command can be used when the controller is not powered and
2110 all settings will be programmed once powered.
2112 This command generates a Command Complete event on success
2115 Possible errors: Invalid Parameters
2119 Load Connection Parameters Command
2120 ==================================
2122 Command Code: 0x0035
2123 Controller Index: <controller id>
2124 Command Parameters: Param_Count (2 Octets)
2127 Address_Type (1 Octet)
2128 Min_Connection_Interval (2 Octets)
2129 Max_Connection_Interval (2 Octets)
2130 Connection_Latency (2 Octets)
2131 Supervision_Timeout (2 Octets)
2137 This command is used to load connection parameters from several
2138 devices into kernel. Currently this is only supported on controllers
2139 with Low Energy support.
2141 Possible values for the Address_Type parameter:
2142 0 Reserved (not in use)
2146 The provided Address and Address_Type are the identity of
2147 a device. So either its public address or static random address.
2149 The Min_Connection_Interval, Max_Connection_Interval,
2150 Connection_Latency and Supervision_Timeout parameters should
2151 be configured as described in Core 4.1 spec, Vol 2, 7.8.12.
2153 This command can be used when the controller is not powered.
2155 This command generates a Command Complete event on success or
2156 a Command Status event on failure.
2158 Possible errors: Invalid Parameters
2163 Read Unconfigured Controller Index List Command
2164 ===============================================
2166 Command Code: 0x0036
2167 Controller Index: <non-controller>
2169 Return Parameters: Num_Controllers (2 Octets)
2170 Controller_Index[i] (2 Octets)
2172 This command returns the list of currently unconfigured controllers.
2173 Unconfigured controllers added after calling this command can be
2174 monitored using the Unconfigured Index Added event.
2176 An unconfigured controller can either move to a configured state
2177 by indicating Unconfigured Index Removed event followed by an
2178 Index Added event; or it can be removed from the system which
2179 would be indicated by the Unconfigured Index Removed event.
2181 Only controllers that require configuration will be listed with
2182 this command. A controller that is fully configured will not
2183 be listed even if it supports configuration changes.
2185 This command generates a Command Complete event on success or
2186 a Command Status event on failure.
2189 Read Controller Configuration Information Command
2190 =================================================
2192 Command Code: 0x0037
2193 Controller Index: <controller id>
2195 Return Parameters: Manufacturer (2 Octets)
2196 Supported_Options (4 Octets)
2197 Missing_Options (4 Octets)
2199 This command is used to retrieve the supported configuration
2200 options of a controller and the missing configuration options.
2202 The missing options are required to be configured before the
2203 controller is considered fully configured and ready for standard
2204 operation. The command is typically used right after getting the
2205 response to Read Unconfigured Controller Index List command or
2206 Unconfigured Index Added event.
2208 Supported_Options and Missing_Options is a bitmask with currently
2209 the following available bits:
2211 0 External configuration
2212 1 Bluetooth public address configuration
2214 It is valid to call this command on controllers that do not
2215 require any configuration. It is possible that a fully configured
2216 controller offers additional support for configuration.
2218 For example a controller may contain a valid Bluetooth public
2219 device address, but also allows to configure it from the host
2220 stack. In this case the general support for configurations will
2221 be indicated by the Controller Configuration settings. For
2222 controllers where no configuration options are available that
2223 setting option will not be present.
2225 When all configurations have been completed and as a result the
2226 Missing_Options mask would become empty, then the now ready
2227 controller will be announced via Index Added event.
2229 This command generates a Command Complete event on success or
2230 a Command Status event on failure.
2232 Possible errors: Invalid Parameters
2236 Set External Configuration Command
2237 ==================================
2239 Command Code: 0x0038
2240 Controller Index: <controller id>
2241 Command Parameters: Configuration (1 Octet)
2242 Return Parameters: Missing_Options (4 Octets)
2244 This command allows to change external configuration option to
2245 indicate that a controller is now configured or unconfigured.
2247 The value 0x00 sets unconfigured state and the value 0x01 sets
2248 configured state of the controller.
2250 It is not mandatory that this configuration option is provided
2251 by a controller. If it is provided, the configuration has to
2252 happen externally using user channel operation or via vendor
2255 Setting this option and when Missing_Options returns zero, this
2256 means that the controller will switch to configured state and it
2257 can be expected that it will be announced via Index Added event.
2259 Wrongly configured controllers might still cause an error when
2260 trying to power them via Set Powered command.
2262 This command generates a Command Complete event on success or a
2263 Command Status event on failure.
2265 Possible errors: Rejected
2271 Set Public Address Command
2272 ==========================
2274 Command Code: 0x0039
2275 Controller Index: <controller id>
2276 Command Parameters: Address (6 Octets)
2277 Return Parameters: Missing_Options (4 Octets)
2279 This command allows configuration of public address. Since a vendor
2280 specific procedure is required, this command might not be supported
2281 by all controllers. Actually most likely only a handful embedded
2282 controllers will offer support for this command.
2284 When the support for Bluetooth public address configuration is
2285 indicated in the supported options mask, then this command
2286 can be used to configure the public address.
2288 It is only possible to configure the public address when the
2289 controller is powered off.
2291 For an unconfigured controller and when Missing_Options returns
2292 an empty mask, this means that a Index Added event for the now
2293 fully configured controller can be expected.
2295 For a fully configured controller, the current controller index
2296 will become invalid and an Unconfigured Index Removed event will
2297 be sent. Once the address has been successfully changed an Index
2298 Added event will be sent. There is no guarantee that the controller
2299 index stays the same.
2301 All previous configured parameters and settings are lost when
2302 this command succeeds. The controller has to be treated as new
2303 one. Use this command for a fully configured controller only when
2304 you really know what you are doing.
2306 This command generates a Command Complete event on success or a
2307 Command Status event on failure.
2309 Possible errors: Rejected
2315 Start Service Discovery Command
2316 ===============================
2318 Command Code: 0x003a
2319 Controller Index: <controller id>
2320 Command Parameters: Address_Type (1 Octet)
2321 RSSI_Threshold (1 Octet)
2322 UUID_Count (1 Octet)
2324 Return Parameters: Address_Type (1 Octet)
2326 This command is used to start the process of discovering remote
2327 devices with a specific UUID. A Device Found event will be sent
2328 for each discovered device.
2330 Possible values for the Address_Type parameter are a bit-wise or
2331 of the following bits:
2337 By combining these e.g. the following values are possible:
2340 6 LE (public & random)
2341 7 BR/EDR/LE (interleaved discovery)
2343 The service discovery uses active scanning for Low Energy scanning
2344 and will search for UUID in both advertising data and scan response
2347 Found devices that have a RSSI value smaller than RSSI_Threshold
2348 are not reported via DeviceFound event. Setting a value of 127
2349 will cause all devices to be reported.
2351 The list of UUIDs identifies a logical OR. Only one of the UUIDs
2352 have to match to cause a DeviceFound event. Providing an empty
2353 list of UUIDs with Num_UUID set to 0 which means that DeviceFound
2354 events are send out for all devices above the RSSI_Threshold.
2356 In case RSSI_Threshold is set to 127 and UUID_Count is 0, then
2357 this command behaves exactly the same as Start Discovery.
2359 When the discovery procedure starts the Discovery event will
2360 notify this similar to Start Discovery.
2362 This command can only be used when the controller is powered.
2364 This command generates a Command Complete event on success
2367 Possible errors: Busy
2374 Read Local Out Of Band Extended Data Command
2375 ============================================
2377 Command Code: 0x003b
2378 Controller Index: <controller id>
2379 Command Parameters: Address_Type (1 Octet)
2380 Return Parameters: Address_Type (1 Octet)
2381 EIR_Data_Length (2 Octets)
2382 EIR_Data (0-65535 Octets)
2384 This command is used to read the local Out of Band data
2385 information and provide them encoded as extended inquiry
2386 response information or advertising data.
2388 Possible values for the Address_Type parameter are a bit-wise or
2389 of the following bits:
2395 By combining these e.g. the following values are possible:
2398 6 LE (public & random)
2399 7 Reserved (not in use)
2401 For BR/EDR controller (Address_Type 1) the returned information
2402 will contain the following information:
2405 Simple Pairing Hash C-192 (optional)
2406 Simple Pairing Randomizer R-192 (optional)
2407 Simple Pairing Hash C-256 (optional)
2408 Simple Pairing Randomizer R-256 (optional)
2409 Service Class UUID (optional)
2410 Bluetooth Local Name (optional)
2412 The Simple Pairing Hash C-256 and Simple Pairing Randomizer R-256
2413 fields are only included when secure connections has been enabled.
2415 The Device Address (BD_ADDR) is not included in the EIR_Data and
2416 needs to be taken from controller information.
2418 For LE controller (Address_Type 6) the returned information
2419 will contain the following information:
2421 LE Bluetooth Device Address
2423 LE Secure Connections Confirmation Value (optional)
2424 LE Secure Connections Random Value (optional)
2425 Appearance (optional)
2426 Local Name (optional)
2429 The LE Secure Connections Confirmation Value and LE Secure Connections
2430 Random Value fields are only included when secure connections has been
2433 The Security Manager TK Value from the Bluetooth specification can
2434 not be provided by this command. The Out Of Band information here are
2435 for asymmetric exchanges based on Diffie-Hellman key exchange. The
2436 Security Manager TK Value is a symmetric random number that has to
2437 be acquired and agreed upon differently.
2439 The returned information from BR/EDR controller and LE controller
2440 types are not related to each other. Once they have been used
2441 over an Out Of Band link, a new set of information shall be
2444 When Secure Connections Only mode has been enabled, then the fields
2445 for Simple Pairing Hash C-192 and Simple Pairing Randomizer R-192
2446 are not returned. Only the fields for the strong secure connections
2447 pairing are included.
2449 This command can only be used when the controller is powered.
2451 Values returned by this command become invalid when the controller
2452 is powered down. After each power-cycle it is required to call
2453 this command again to get updated information.
2455 This command generates a Command Complete event on success or
2456 a Command Status event on failure.
2458 Possible errors: Not Supported
2465 Read Extended Controller Index List Command
2466 ===========================================
2468 Command Code: 0x003c
2469 Controller Index: <non-controller>
2471 Return Parameters: Num_Controllers (2 Octets)
2472 Controller_Index[i] (2 Octets)
2473 Controller_Type[i] (1 Octet)
2474 Controller_Bus[i] (1 Octet)
2476 This command returns the list of currently known controllers. It
2477 includes configured, unconfigured and alternate controllers.
2479 Controllers added or removed after calling this command can be
2480 be monitored using the Extended Index Added and Extended Index
2483 The existing Index Added, Index Removed, Unconfigured Index Added
2484 and Unconfigured Index Removed are no longer sent after this command
2485 has been used at least once.
2487 Instead of calling Read Controller Index List and Read Unconfigured
2488 Controller Index List, this command combines all the information
2489 and can be used to retrieve the controller list.
2491 The Controller_Type parameter has these values:
2493 0x00 Primary Controller (BR/EDR and/or LE)
2494 0x01 Unconfigured Controller (BR/EDR and/or LE)
2495 0x02 Alternate MAC/PHY Controller (AMP)
2497 The 0x00 and 0x01 types indicate a primary BR/EDR and/or LE
2498 controller. The difference is just if they need extra configuration
2499 or if they are fully configured.
2501 Controllers in configured state will be listed as 0x00 and controllers
2502 in unconfigured state will be listed as 0x01. A controller that is
2503 fully configured and supports configuration changes will be listed
2506 Alternate MAC/PHY controllers will be listed as 0x02. They do not
2507 support the difference between configured and unconfigured state.
2509 The Controller_Bus parameter has these values:
2519 Controllers marked as RAW only operation are currently not listed
2522 This command generates a Command Complete event on success or
2523 a Command Status event on failure.
2526 Read Advertising Features Command
2527 =================================
2529 Command Code: 0x003d
2530 Controller Index: <controller id>
2532 Return Parameters: Supported_Flags (4 Octets)
2533 Max_Adv_Data_Len (1 Octet)
2534 Max_Scan_Rsp_Len (1 Octet)
2535 Max_Instances (1 Octet)
2536 Num_Instances (1 Octet)
2537 Instance[i] (1 Octet)
2539 This command is used to read the advertising features supported
2540 by the controller and stack.
2542 With the Supported_Flags field the possible values for the Flags
2543 field in Add Advertising command provided:
2545 0 Switch into Connectable mode
2546 1 Advertise as Discoverable
2547 2 Advertise as Limited Discoverable
2548 3 Add Flags field to Adv_Data
2549 4 Add TX Power field to Adv_Data
2550 5 Add Appearance field to Scan_Rsp
2551 6 Add Local Name in Scan_Rsp
2553 The Flags bit 0 indicates support for connectable advertising
2554 and for switching to connectable advertising independent of the
2555 connectable global setting. When this flag is not supported, then
2556 the global connectable setting determines if undirected connectable,
2557 undirected scannable or undirected non-connectable advertising is
2558 used. It also determines the use of non-resolvable random address
2559 versus identity address or resolvable private address.
2561 The Flags bit 1 indicates support for advertising with discoverable
2562 mode enabled. Users of this flag will decrease the Max_Adv_Data_Len
2563 by 3 octets. In this case the advertising data flags are managed
2564 and added in front of the provided advertising data.
2566 The Flags bit 2 indicates support for advertising with limited
2567 discoverable mode enabled. Users of this flag will decrease the
2568 Max_Adv_Data_Len by 3 octets. In this case the advertising data
2569 flags are managed and added in front of the provided advertising
2572 The Flags bit 3 indicates support for automatically keeping the
2573 Flags field of the advertising data updated. Users of this flag
2574 will decrease the Max_Adv_Data_Len by 3 octets and need to keep
2575 that in mind. The Flags field will be added in front of the
2576 advertising data provided by the user. Note that with Flags bit 1
2577 and Flags bit 2, this one will be implicitly used even if it is
2578 not marked as supported.
2580 The Flags bit 4 indicates support for automatically adding the
2581 TX Power value to the advertising data. Users of this flag will
2582 decrease the Max_Adv_Data_Len by 3 octets. The TX Power field will
2583 be added at the end of the user provided advertising data. If the
2584 controller does not support TX Power information, then this bit will
2587 The Flags bit 5 indicates support for automatically adding the
2588 Appearance value to the scan response data. Users of this flag
2589 will decrease the Max_Scan_Rsp_len by 4 octets. The Appearance
2590 field will be added in front of the scan response data provided
2591 by the user. If the appearance value is not supported, then this
2592 bit will not be set.
2594 The Flags bit 6 indicates support for automatically adding the
2595 Local Name value to the scan response data. This flag indicates
2596 an opportunistic approach for the Local Name. If enough space
2597 in the scan response data is available, it will be added. If the
2598 space is limited a short version or no name information. The
2599 Local Name will be added at the end of the scan response data.
2601 The valid range for Instance identifiers is 1-254. The value 0
2602 is reserved for internal use and the value 255 is reserved for
2603 future extensions. However the Max_Instances value for indicating
2604 the number of supported Instances can be also 0 if the controller
2605 does not support any advertising.
2607 The Max_Adv_Data_Len and Max_Scan_Rsp_Len provides extra
2608 information about the maximum length of the data fields. For
2609 now this will always return the value 31. Different flags
2610 however might decrease the actual available length in these
2613 With Num_Instances and Instance array the currently occupied
2614 Instance identifiers can be retrieved.
2616 This command generates a Command Complete event on success or
2617 a Command Status event on failure.
2619 Possible errors: Invalid Parameters
2623 Add Advertising Command
2624 =======================
2626 Command Code: 0x003e
2627 Controller Index: <controller id>
2628 Command Parameters: Instance (1 Octet)
2632 Adv_Data_Len (1 Octet)
2633 Scan_Rsp_len (1 Octet)
2634 Adv_Data (0-255 Octets)
2635 Scan_Rsp (0-255 Octets)
2636 Return Parameters: Instance (1 Octet)
2638 This command is used to configure an advertising instance that
2639 can be used to switch a Bluetooth Low Energy controller into
2642 Added advertising information with this command will not be visible
2643 immediately if advertising is enabled via the Set Advertising
2644 command. The usage of the Set Advertising command takes precedence
2645 over this command. Instance information is stored and will be
2646 advertised once advertising via Set Advertising has been disabled.
2648 The Instance identifier is a value between 1 and the number of
2649 supported instances. The value 0 is reserved.
2651 With the Flags value the type of advertising is controlled and
2652 the following flags are defined:
2654 0 Switch into Connectable mode
2655 1 Advertise as Discoverable
2656 2 Advertise as Limited Discoverable
2657 3 Add Flags field to Adv_Data
2658 4 Add TX Power field to Adv_Data
2659 5 Add Appearance field to Scan_Rsp
2660 6 Add Local Name in Scan_Rsp
2662 When the connectable flag is set, then the controller will use
2663 undirected connectable advertising. The value of the connectable
2664 setting can be overwritten this way. This is useful to switch a
2665 controller into connectable mode only for LE operation. This is
2666 similar to the mode 0x02 from the Set Advertising command.
2668 When the connectable flag is not set, then the controller will
2669 use advertising based on the connectable setting. When using
2670 non-connectable or scannable advertising, the controller will
2671 be programmed with a non-resolvable random address. When the
2672 system is connectable, then the identity address or resolvable
2673 private address will be used.
2675 Using the connectable flag is useful for peripheral mode support
2676 where BR/EDR (and/or LE) is controlled by Add Device. This allows
2677 making the peripheral connectable without having to interfere
2678 with the global connectable setting.
2680 If Scan_Rsp_Len is zero and connectable flag is not set and
2681 the global connectable setting is off, then non-connectable
2682 advertising is used. If Scan_Rsp_Len is larger than zero and
2683 connectable flag is not set and the global advertising is off,
2684 then scannable advertising is used. This small difference is
2685 supported to provide less air traffic for devices implementing
2688 The Duration parameter configures the length of an Instance. The
2689 value is in seconds.
2691 A value of 0 indicates a default value is chosen for the
2692 Duration. The default is 2 seconds.
2694 If only one advertising Instance has been added, then the Duration
2695 value will be ignored. It only applies for the case where multiple
2696 Instances are configured. In that case every Instance will be
2697 available for the Duration time and after that it switches to
2698 the next one. This is a simple round-robin based approach.
2700 The Timeout parameter configures the life-time of an Instance. In
2701 case the value 0 is used it indicates no expiration time. If a
2702 timeout value is provided, then the advertising Instance will be
2703 automatically removed when the timeout passes. The value for the
2704 timeout is in seconds. Powering down a controller will invalidate
2705 all advertising Instances and it is not possible to add a new
2706 Instance with a timeout when the controller is powered down.
2708 When a Timeout is provided, then the Duration subtracts from
2709 the actual Timeout value of that Instance. For example an Instance
2710 with Timeout of 5 and Duration of 2 will be scheduled exactly 3
2711 times, twice with 2 seconds and once with one second. Other
2712 Instances have no influence on the Timeout.
2714 Re-adding an already existing instance (i.e. issuing the Add
2715 Advertising command with an Instance identifier of an existing
2716 instance) will update that instance's configuration.
2718 An instance being added or changed while another instance is
2719 being advertised will not be visible immediately but only when
2720 the new/changed instance is being scheduled by the round robin
2721 advertising algorithm.
2723 Changes to an instance that is currently being advertised will
2724 cancel that instance and switch to the next instance. The changes
2725 will be visible the next time the instance is scheduled for
2726 advertising. In case a single instance is active, this means
2727 that changes will be visible right away.
2729 A pre-requisite is that LE is already enabled, otherwise this
2730 command will return a "rejected" response.
2732 This command can be used when the controller is not powered and
2733 all settings will be programmed once powered.
2735 This command generates a Command Complete event on success or a
2736 Command Status event on failure.
2738 Possible errors: Failed
2745 Remove Advertising Command
2746 ==========================
2748 Command Code: 0x003f
2749 Controller Index: <controller id>
2750 Command Parameters: Instance (1 Octet)
2751 Return Parameters: Instance (1 Octet)
2753 This command is used to remove an advertising instance that
2754 can be used to switch a Bluetooth Low Energy controller into
2757 When the Instance parameter is zero, then all previously added
2758 advertising Instances will be removed.
2760 Removing advertising information with this command will not be
2761 visible as long as advertising is enabled via the Set Advertising
2762 command. The usage of the Set Advertising command takes precedence
2763 over this command. Changes to Instance information are stored and
2764 will be advertised once advertising via Set Advertising has been
2767 Removing an instance while it is being advertised will immediately
2768 cancel the instance, even when it has been advertised less then its
2769 configured Timeout or Duration.
2771 This command can be used when the controller is not powered and
2772 all settings will be programmed once powered.
2774 This command generates a Command Complete event on success or
2775 a Command Status event on failure.
2777 Possible errors: Invalid Parameters
2781 Get Advertising Size Information Command
2782 ========================================
2784 Command Code: 0x0040
2785 Controller Index: <controller id>
2786 Command Parameters: Instance (1 Octet)
2788 Return Parameters: Instance (1 Octet)
2790 Max_Adv_Data_Len (1 Octet)
2791 Max_Scan_Rsp_Len (1 Octet)
2793 The Read Advertising Features command returns the overall maximum
2794 size of advertising data and scan response data fields. That size is
2795 valid when no Flags are used. However when certain Flags are used,
2796 then the size might decrease. This command can be used to request
2797 detailed information about the maximum available size.
2799 The following Flags values are defined:
2801 0 Switch into Connectable mode
2802 1 Advertise as Discoverable
2803 2 Advertise as Limited Discoverable
2804 3 Add Flags field to Adv_Data
2805 4 Add TX Power field to Adv_Data
2806 5 Add Appearance field to Scan_Rsp
2807 6 Add Local Name in Scan_Rsp
2809 To get accurate information about the available size, the same Flags
2810 values should be used with the Add Advertising command.
2812 The Max_Adv_Data_Len and Max_Scan_Rsp_Len fields provide information
2813 about the maximum length of the data fields for the given Flags
2814 values. When the Flags field is zero, then these fields would contain
2815 the same values as Read Advertising Features.
2817 Possible errors: Invalid Parameters
2821 Start Limited Discovery Command
2822 ===============================
2824 Command Code: 0x0041
2825 Controller Index: <controller id>
2826 Command Parameters: Address_Type (1 Octet)
2827 Return Parameters: Address_Type (1 Octet)
2829 This command is used to start the process of discovering remote
2830 devices using the limited discovery procedure. A Device Found event
2831 will be sent for each discovered device.
2833 Possible values for the Address_Type parameter are a bit-wise or
2834 of the following bits:
2840 By combining these e.g. the following values are possible:
2843 6 LE (public & random)
2844 7 BR/EDR/LE (interleaved discovery)
2846 The limited discovery uses active scanning for Low Energy scanning
2847 and will search for devices with the limited discoverability flag
2848 configured. On BR/EDR it uses LIAC and filters on the limited
2849 discoverability flag of the class of device.
2851 When the discovery procedure starts the Discovery event will
2852 notify this similar to Start Discovery.
2854 This command can only be used when the controller is powered.
2856 This command generates a Command Complete event on success
2859 Possible errors: Busy
2866 Command Complete Event
2867 ======================
2870 Controller Index: <controller id> or <non-controller>
2871 Event Parameters: Command_Opcode (2 Octets)
2875 This event is an indication that a command has completed. The
2876 fixed set of parameters includes the opcode to identify the
2877 command that completed as well as a status value to indicate
2878 success or failure. The rest of the parameters are command
2879 specific and documented in the section for each command
2883 Command Status Event
2884 ====================
2887 Controller Index: <controller id> or <non-controller>
2888 Event Parameters: Command_Opcode (2 Octets)
2891 The command status event is used to indicate an early status for
2892 a pending command. In the case that the status indicates failure
2893 (anything else except success status) this also means that the
2894 command has finished executing.
2897 Controller Error Event
2898 ======================
2901 Controller Index: <controller id>
2902 Event Parameters: Error_Code (1 Octet)
2904 This event maps straight to the HCI Hardware Error event and is
2905 used to indicate something wrong with the controller hardware.
2912 Controller Index: <controller id>
2915 This event indicates that a new controller has been added to the
2916 system. It is usually followed by a Read Controller Information
2919 Once the Read Extended Controller Index List command has been
2920 used at least once, the Extended Index Added event will be
2921 send instead of this one.
2928 Controller Index: <controller id>
2931 This event indicates that a controller has been removed from the
2934 Once the Read Extended Controller Index List command has been
2935 used at least once, the Extended Index Removed event will be
2936 send instead of this one.
2943 Controller Index: <controller id>
2944 Event Parameters: Current_Settings (4 Octets)
2946 This event indicates that one or more of the settings for a
2947 controller has changed.
2950 Class Of Device Changed Event
2951 =============================
2954 Controller Index: <controller id>
2955 Event Parameters: Class_Of_Device (3 Octets)
2957 This event indicates that the Class of Device value for the
2958 controller has changed. When the controller is powered off the
2959 Class of Device value will always be reported as zero.
2962 Local Name Changed Event
2963 ========================
2966 Controller Index: <controller id>
2967 Event Parameters: Name (249 Octets)
2968 Short_Name (11 Octets)
2970 This event indicates that the local name of the controller has
2978 Controller Index: <controller id>
2979 Event Parameters: Store_Hint (1 Octet)
2982 Address_Type (1 Octet)
2985 PIN_Length (1 Octet)
2988 This event indicates that a new link key has been generated for a
2991 The Store_Hint parameter indicates whether the host is expected
2992 to store the key persistently or not (e.g. this would not be set
2993 if the authentication requirement was "No Bonding").
2995 Possible values for the Address_Type parameter:
2997 1 Reserved (not in use)
2998 2 Reserved (not in use)
3000 Public and random LE addresses are not valid and will be rejected.
3002 Currently defined Key_Type values are:
3004 0x00 Combination key
3006 0x02 Remote Unit key
3007 0x03 Debug Combination key
3008 0x04 Unauthenticated Combination key from P-192
3009 0x05 Authenticated Combination key from P-192
3010 0x06 Changed Combination key
3011 0x07 Unauthenticated Combination key from P-256
3012 0x08 Authenticated Combination key from P-256
3014 Receiving this event indicates that a pairing procedure has
3018 New Long Term Key Event
3019 =======================
3022 Controller Index: <controller id>
3023 Event Parameters: Store_Hint (1 Octet)
3026 Address_Type (1 Octet)
3029 Encryption Size (1 Octet)
3030 Enc. Diversifier (2 Octets)
3031 Random Number (8 Octets)
3035 This event indicates that a new long term key has been generated
3036 for a remote device.
3038 The Store_Hint parameter indicates whether the host is expected
3039 to store the key persistently or not (e.g. this would not be set
3040 if the authentication requirement was "No Bonding").
3042 Possible values for the Address_Type parameter:
3043 0 Reserved (not in use)
3047 The provided Address and Address_Type are the identity of
3048 a device. So either its public address or static random address.
3050 For unresolvable random addresses and resolvable random addresses
3051 without identity information and identity resolving key, the
3052 Store_Hint will be set to not store the long term key.
3054 Currently defined Key_Type values are:
3056 0x00 Unauthenticated legacy key
3057 0x01 Authenticated legacy key
3058 0x02 Unauthenticated key from P-256
3059 0x03 Authenticated key from P-256
3060 0x04 Debug key from P-256
3062 Receiving this event indicates that a pairing procedure has
3066 Device Connected Event
3067 ======================
3070 Controller Index: <controller id>
3071 Event Parameters: Address (6 Octets)
3072 Address_Type (1 Octet)
3074 EIR_Data_Length (2 Octets)
3075 EIR_Data (0-65535 Octets)
3077 This event indicates that a successful baseband connection has
3078 been created to the remote device.
3080 Possible values for the Address_Type parameter:
3085 For devices using resolvable random addresses with a known
3086 identity resolving key, the Address and Address_Type will
3087 contain the identity information.
3089 It is possible that devices get connected via its resolvable
3090 random address and after New Identity Resolving Key event
3091 start using its identity.
3093 The following bits are defined for the Flags parameter:
3094 0 Reserved (not in use)
3096 2 Reserved (not in use)
3099 Device Disconnected Event
3100 =========================
3103 Controller Index: <controller id>
3104 Event Parameters: Address (6 Octets)
3105 Address_Type (1 Octet)
3108 This event indicates that the baseband connection was lost to a
3111 Possible values for the Address_Type parameter:
3116 For devices using resolvable random addresses with a known
3117 identity resolving key, the Address and Address_Type will
3118 contain the identity information.
3120 Possible values for the Reason parameter:
3122 1 Connection timeout
3123 2 Connection terminated by local host
3124 3 Connection terminated by remote host
3126 Note that the local/remote distinction just determines which side
3127 terminated the low-level connection, regardless of the
3128 disconnection of the higher-level profiles.
3130 This can sometimes be misleading and thus must be used with care.
3131 For example, some hardware combinations would report a locally
3132 initiated disconnection even if the user turned Bluetooth off in
3136 Connect Failed Event
3137 ====================
3140 Controller Index: <controller id>
3141 Event Parameters: Address (6 Octets)
3142 Address_Type (1 Octet)
3145 This event indicates that a connection attempt failed to a
3148 Possible values for the Address_Type parameter:
3153 For devices using resolvable random addresses with a known
3154 identity resolving key, the Address and Address_Type will
3155 contain the identity information.
3158 PIN Code Request Event
3159 ======================
3162 Controller Index: <controller id>
3163 Event Parameters: Address (6 Octets)
3164 Address_Type (1 Octet)
3167 This event is used to request a PIN Code reply from user space.
3168 The reply should either be returned using the PIN Code Reply or
3169 the PIN Code Negative Reply command.
3171 Possible values for the Address_Type parameter:
3176 Secure: 0x01 secure PIN code required
3177 0x00 secure PIN code not required
3180 User Confirmation Request Event
3181 ===============================
3184 Controller Index: <controller id>
3185 Event Parameters: Address (6 Octets)
3186 Address_Type (1 Octet)
3187 Confirm_Hint (1 Octet)
3190 This event is used to request a user confirmation request from
3193 Possible values for the Address_Type parameter:
3198 If the Confirm_Hint parameter value is 0x01 this means that
3199 a simple "Yes/No" confirmation should be presented to the user
3200 instead of a full numerical confirmation (in which case the
3201 parameter value will be 0x00).
3203 User space should respond to this command either using the User
3204 Confirmation Reply or the User Confirmation Negative Reply
3208 User Passkey Request Event
3209 ==========================
3212 Controller Index: <controller id>
3213 Event Parameters: Address (6 Octets)
3214 Address_Type (1 Octet)
3216 This event is used to request a passkey from user space. The
3217 response to this event should either be the User Passkey Reply
3218 command or the User Passkey Negative Reply command.
3220 Possible values for the Address_Type parameter:
3226 Authentication Failed Event
3227 ===========================
3230 Controller Index: <controller id>
3231 Event Parameters: Address (6 Octets)
3232 Address_Type (1 Octet)
3235 This event indicates that there was an authentication failure
3236 with a remote device.
3238 Possible values for the Address_Type parameter:
3248 Controller Index: <controller id>
3249 Event Parameters: Address (6 Octets)
3250 Address_Type (1 Octet)
3253 EIR_Data_Length (2 Octets)
3254 EIR_Data (0-65535 Octets)
3256 This event indicates that a device was found during device
3259 Possible values for the Address_Type parameter:
3264 The following bits are defined for the Flags parameter:
3269 For the RSSI field a value of 127 indicates that the RSSI is
3270 not available. That can happen with Bluetooth 1.1 and earlier
3271 controllers or with bad radio conditions.
3273 The Confirm name flag indicates that the kernel wants to know
3274 whether user space knows the name for this device or not. If
3275 this flag is set user space should respond to it using the
3276 Confirm Name command.
3278 The Legacy Pairing flag indicates that Legacy Pairing is likely
3279 to occur when pairing with this device. An application could use
3280 this information to optimize the pairing process by locally
3281 pre-generating a PIN code and thereby eliminate the risk of
3282 local input timeout when pairing. Note that there is a risk of
3283 false-positives for this flag so user space should be able to
3284 handle getting something else as a PIN Request when pairing.
3286 The Not Connectable flag indicates that the device will not
3287 accept any connections. This can be indicated by Low Energy
3288 devices that are in broadcaster role.
3295 Controller Index: <controller id>
3296 Event Parameters: Address_Type (1 Octet)
3297 Discovering (1 Octet)
3299 This event indicates that the controller has started discovering
3300 devices. This discovering state can come and go multiple times
3301 between a Start Discovery and a Stop Discovery commands.
3303 The Start Service Discovery command will also trigger this event.
3305 The valid values for the Discovering parameter are 0x01
3306 (enabled) and 0x00 (disabled).
3309 Device Blocked Event
3310 ====================
3313 Controller Index: <controller id>
3314 Event Parameters: Address (6 Octets)
3315 Address_Type (1 Octet)
3317 This event indicates that a device has been blocked using the
3318 Block Device command.
3320 Possible values for the Address_Type parameter:
3325 The event will only be sent to Management sockets other than the
3326 one through which the command was sent.
3329 Device Unblocked Event
3330 ======================
3333 Controller Index: <controller id>
3334 Event Parameters: Address (6 Octets)
3335 Address_Type (1 Octet)
3337 This event indicates that a device has been unblocked using the
3338 Unblock Device command.
3340 Possible values for the Address_Type parameter:
3345 The event will only be sent to Management sockets other than the
3346 one through which the command was sent.
3349 Device Unpaired Event
3350 =====================
3353 Controller Index: <controller id>
3354 Event Parameters: Address (6 Octets)
3355 Address_Type (1 Octet)
3357 This event indicates that a device has been unpaired (i.e. all
3358 its keys have been removed from the kernel) using the Unpair
3361 Possible values for the Address_Type parameter:
3366 For devices using resolvable random addresses with a known
3367 identity resolving key, the event parameters will contain
3368 the identity. After receiving this event, the device will
3369 become essentially private again.
3371 The event will only be sent to Management sockets other than the
3372 one through which the Unpair Device command was sent.
3375 Passkey Notify Event
3376 ====================
3379 Controller Index: <controller id>
3380 Event Parameters: Address (6 Octets)
3381 Address_Type (1 Octet)
3385 This event is used to request passkey notification to the user.
3386 Unlike the other authentication events it does not need
3387 responding to using any Management command.
3389 Possible values for the Address_Type parameter:
3394 The Passkey parameter indicates the passkey to be shown to the
3395 user whereas the Entered parameter indicates how many characters
3396 the user has entered on the remote side.
3399 New Identity Resolving Key Event
3400 ================================
3403 Controller Index: <controller id>
3404 Event Parameters: Store_Hint (1 Octet)
3405 Random_Address (6 Octets)
3408 Address_Type (1 Octet)
3412 This event indicates that a new identity resolving key has been
3413 generated for a remote device.
3415 The Store_Hint parameter indicates whether the host is expected
3416 to store the key persistently or not.
3418 The Random_Address provides the resolvable random address that
3419 was resolved into an identity. A value of 00:00:00:00:00:00
3420 indicates that the identity resolving key was provided for
3421 a public address or static random address.
3423 Once this event has been send for a resolvable random address,
3424 all further events mapping this device will send out using the
3425 identity address information.
3427 This event also indicates that now the identity address should
3428 be used for commands instead of the resolvable random address.
3430 It is possible that some devices allow discovering via its
3431 identity address, but after pairing using resolvable private
3432 address only. In such a case Store_Hint will be 0x00 and the
3433 Random_Address will indicate 00:00:00:00:00:00. For these devices,
3434 the Privacy Characteristic of the remote GATT database should
3435 be consulted to decide if the identity resolving key must be
3436 stored persistently or not.
3438 Devices using Set Privacy command with the option 0x02 would
3439 be such type of device.
3441 Possible values for the Address_Type parameter:
3442 0 Reserved (not in use)
3446 The provided Address and Address_Type are the identity of
3447 a device. So either its public address or static random address.
3450 New Signature Resolving Key Event
3451 =================================
3454 Controller Index: <controller id>
3455 Event Parameters: Store_Hint (1 Octet)
3458 Address_Type (1 Octet)
3463 This event indicates that a new signature resolving key has been
3464 generated for either the master or slave device.
3466 The Store_Hint parameter indicates whether the host is expected
3467 to store the key persistently or not.
3469 The Type parameter has the following possible values:
3471 0x00 Unauthenticated local CSRK
3472 0x01 Unauthenticated remote CSRK
3473 0x02 Authenticated local CSRK
3474 0x03 Authenticated remote CSRK
3476 The local keys are used for signing data to be sent to the
3477 remote device, whereas the remote keys are used to verify
3478 signatures received from the remote device.
3480 The local signature resolving key will be generated with each
3481 pairing request. Only after receiving this event with the Type
3482 indicating a local key is it possible to use ATT Signed Write
3485 Possible values for the Address_Type parameter:
3486 0 Reserved (not in use)
3490 The provided Address and Address_Type are the identity of
3491 a device. So either its public address or static random address.
3498 Controller Index: <controller id>
3499 Event Parameters: Address (6 Octets)
3500 Address_Type (1 Octet)
3503 This event indicates that a device has been added using the
3506 Possible values for the Address_Type parameter:
3511 The event will only be sent to management sockets other than the
3512 one through which the command was sent.
3515 Device Removed Event
3516 ====================
3519 Controller Index: <controller id>
3520 Event Parameters: Address (6 Octets)
3521 Address_Type (1 Octet)
3523 This event indicates that a device has been removed using the
3524 Remove Device command.
3526 Possible values for the Address_Type parameter:
3531 The event will only be sent to management sockets other than the
3532 one through which the command was sent.
3535 New Connection Parameter Event
3536 ==============================
3539 Controller Index: <controller id>
3540 Event Parameters: Store_Hint (1 Octet)
3543 Address_Type (1 Octet)
3544 Min_Connection_Interval (2 Octets)
3545 Max_Connection_Interval (2 Octets)
3546 Connection_Latency (2 Octets)
3547 Supervision_Timeout (2 Octets)
3550 This event indicates a new set of connection parameters from
3551 a peripheral device.
3553 The Store_Hint parameter indicates whether the host is expected
3554 to store this information persistently or not.
3556 Possible values for the Address_Type parameter:
3557 0 Reserved (not in use)
3561 The Min_Connection_Interval, Max_Connection_Interval,
3562 Connection_Latency and Supervision_Timeout parameters are
3563 encoded as described in Core 4.1 spec, Vol 2, 7.7.65.3.
3566 Unconfigured Index Added Event
3567 ==============================
3570 Controller Index: <controller id>
3573 This event indicates that a new unconfigured controller has been
3574 added to the system. It is usually followed by a Read Controller
3575 Configuration Information command.
3577 Only when a controller requires further configuration, it will
3578 be announced with this event. If it supports configuration, but
3579 does not require it, then an Index Added event will be used.
3581 Once the Read Extended Controller Index List command has been
3582 used at least once, the Extended Index Added event will be
3583 send instead of this one.
3586 Unconfigured Index Removed Event
3587 ================================
3590 Controller Index: <controller id>
3593 This event indicates that an unconfigured controller has been
3594 removed from the system.
3596 Once the Read Extended Controller Index List command has been
3597 used at least once, the Extended Index Removed event will be
3598 send instead of this one.
3601 New Configuration Options Event
3602 ===============================
3605 Controller Index: <controller id>
3606 Event Parameters: Missing_Options (4 Octets)
3608 This event indicates that one or more of the options for the
3609 controller configuration has changed.
3612 Extended Index Added Event
3613 ==========================
3616 Controller Index: <controller id>
3617 Event Parameters: Controller_Type (1 Octet)
3618 Controller_Bus (1 Octet)
3620 This event indicates that a new controller index has been
3621 added to the system.
3623 This event will only be used after Read Extended Controller Index
3624 List has been used at least once. If it has not been used, then
3625 Index Added and Unconfigured Index Added are sent instead.
3628 Extended Index Removed Event
3629 ============================
3632 Controller Index: <controller id>
3633 Event Parameters: Controller_Type (1 Octet)
3634 Controller_Bus (1 Octet)
3636 This event indicates that an existing controller index has been
3637 removed from the system.
3639 This event will only be used after Read Extended Controller Index
3640 List has been used at least once. If it has not been used, then
3641 Index Removed and Unconfigured Index Removed are sent instead.
3644 Local Out Of Band Extended Data Updated Event
3645 =============================================
3648 Controller Index: <controller id>
3649 Event Parameters: Address_Type (1 Octet)
3650 EIR_Data_Length (2 Octets)
3651 EIR_Data (0-65535 Octets)
3653 This event is used when the Read Local Out Of Band Extended Data
3654 command has been used and some other user requested a new set
3655 of local out-of-band data. This allows for the original caller
3658 Possible values for the Address_Type parameter are a bit-wise or
3659 of the following bits:
3665 By combining these e.g. the following values are possible:
3668 6 LE (public & random)
3669 7 Reserved (not in use)
3671 The value for EIR_Data_Length and content for EIR_Data is the
3672 same as described in Read Local Out Of Band Extended Data command.
3674 When LE Privacy is used and LE Secure Connections out-of-band
3675 data has been requested, then this event will be emitted every
3676 time the Resolvable Private Address (RPA) gets changed. The new
3677 RPA will be included in the EIR_Data.
3679 The event will only be sent to management sockets other than the
3680 one through which the command was sent. It will additionally also
3681 only be sent to sockets that have used the command at least once.
3684 Advertising Added Event
3685 =======================
3688 Controller Index: <controller id>
3689 Event Parameters: Instance (1 Octet)
3691 This event indicates that an advertising instance has been added
3692 using the Add Advertising command.
3694 The event will only be sent to management sockets other than the
3695 one through which the command was sent.
3698 Advertising Removed Event
3699 =========================
3702 Controller Index: <controller id>
3703 Event Parameters: Instance (1 Octet)
3705 This event indicates that an advertising instance has been removed
3706 using the Remove Advertising command.
3708 The event will only be sent to management sockets other than the
3709 one through which the command was sent.