Skip to content

Instantly share code, notes, and snippets.

@staticfloat
Created September 15, 2015 03:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save staticfloat/bbc016376ba5a8ab4451 to your computer and use it in GitHub Desktop.
Save staticfloat/bbc016376ba5a8ab4451 to your computer and use it in GitHub Desktop.
$ bluetoothctl
[NEW] Controller 24:0A:64:9F:69:EF steamos [default]
[bluetooth]# scan on
Discovery started
[CHG] Controller 24:0A:64:9F:69:EF Discovering: yes
[bluetooth]# agent KeyboardDisplay
Agent registered
[NEW] Device CD:9A:E7:6C:6F:03 Designer Keyboard
[bluetooth]# scan off
[CHG] Device CD:9A:E7:6C:6F:03 RSSI is nil
Discovery stopped
[CHG] Controller 24:0A:64:9F:69:EF Discovering: no
[bluetooth]# pair CD:9A:E7:6C:6F:03
Attempting to pair with CD:9A:E7:6C:6F:03
[CHG] Device CD:9A:E7:6C:6F:03 Connected: yes
[CHG] Device CD:9A:E7:6C:6F:03 Connected: no
Failed to pair: org.bluez.Error.AuthenticationCanceled
[bluetooth]#
$ sudo btmon
Bluetooth monitor ver 5.23
= New Index: 24:0A:64:9F:69:EF (BR/EDR,USB,hci0) [hci0] 0.307363
< HCI Command: LE Set Random Address (0x08|0x0005) plen 6 [hci0] 5.877021
Address: 02:F0:50:E7:57:24 (Non-Resolvable)
> HCI Event: Command Complete (0x0e) plen 4 [hci0] 5.878006
LE Set Random Address (0x08|0x0005) ncmd 1
Status: Success (0x00)
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7 [hci0] 5.878028
Type: Active (0x01)
Interval: 11.250 msec (0x0012)
Window: 11.250 msec (0x0012)
Own address type: Random (0x01)
Filter policy: Accept all advertisement (0x00)
> HCI Event: Command Complete (0x0e) plen 4 [hci0] 5.879004
LE Set Scan Parameters (0x08|0x000b) ncmd 1
Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 [hci0] 5.879026
Scanning: Enabled (0x01)
Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4 [hci0] 5.880004
LE Set Scan Enable (0x08|0x000c) ncmd 1
Status: Success (0x00)
@ Discovering: 0x01 (7)
> HCI Event: LE Meta Event (0x3e) plen 42 [hci0] 6.415998
LE Advertising Report (0x02)
Num reports: 1
Event type: Connectable undirected - ADV_IND (0x00)
Address type: Random (0x01)
Address: CD:9A:E7:6C:6F:03 (Static)
Data length: 30
Name (complete): Designer Keyboard
Appearance: Keyboard (0x03c1)
Flags: 0x05
LE Limited Discoverable Mode
BR/EDR Not Supported
16-bit Service UUIDs (complete): 1 entry
Human Interface Device (0x1812)
RSSI: -80 dBm (0xb0)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 [hci0] 11.004961
Scanning: Disabled (0x00)
Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4 [hci0] 11.008014
LE Set Scan Enable (0x08|0x000c) ncmd 1
Status: Success (0x00)
< HCI Command: Inquiry (0x01|0x0001) plen 5 [hci0] 11.008060
Access code: 0x9e8b33 (General Inquiry)
Length: 5.12s (0x04)
Num responses: 0
@ Device Found: CD:9A:E7:6C:6F:03 (2) rssi -80 flags 0x0000
12 09 44 65 73 69 67 6e 65 72 20 4b 65 79 62 6f ..Designer Keybo
61 72 64 03 19 c1 03 02 01 05 03 03 12 18 ard...........
> HCI Event: Command Status (0x0f) plen 4 [hci0] 11.009004
Inquiry (0x01|0x0001) ncmd 1
Status: Success (0x00)
< HCI Command: Inquiry Cancel (0x01|0x0002) plen 0 [hci0] 11.038520
> HCI Event: Command Complete (0x0e) plen 4 [hci0] 11.041021
Inquiry Cancel (0x01|0x0002) ncmd 1
Status: Success (0x00)
@ Discovering: 0x00 (7)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25 [hci0] 26.270851
Scan interval: 60.000 msec (0x0060)
Scan window: 30.000 msec (0x0030)
Filter policy: White list is not used (0x00)
Peer address type: Random (0x01)
Peer address: CD:9A:E7:6C:6F:03 (Static)
Own address type: Public (0x00)
Min connection interval: 50.00 msec (0x0028)
Max connection interval: 70.00 msec (0x0038)
Connection latency: 0x0000
Supervision timeout: 420 msec (0x002a)
Min connection length: 0.000 msec (0x0000)
Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4 [hci0] 26.272031
LE Create Connection (0x08|0x000d) ncmd 1
Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19 [hci0] 30.274039
LE Connection Complete (0x01)
Status: Success (0x00)
Handle: 64
Role: Master (0x00)
Peer address type: Random (0x01)
Peer address: CD:9A:E7:6C:6F:03 (Static)
Connection interval: 67.50 msec (0x0036)
Connection latency: 0.00 msec (0x0000)
Supervision timeout: 420 msec (0x002a)
Master clock accuracy: 0x05
@ Device Connected: CD:9A:E7:6C:6F:03 (2) flags 0x0000
< ACL Data TX: Handle 64 flags 0x00 dlen 11 [hci0] 30.277976
SMP: Pairing Request (0x01) len 6
IO capability: KeyboardDisplay (0x04)
OOB data: Authentication data not present (0x00)
Authentication requirement: Bonding - MITM (0x05)
Max encryption key size: 16
Initiator key distribution: EncKey Sign (0x05)
Responder key distribution: EncKey IdKey Sign (0x07)
> HCI Event: Disconnect Complete (0x05) plen 4 [hci0] 30.737028
Status: Success (0x00)
Handle: 64
Reason: Connection Failed to be Established (0x3e)
@ Device Disconnected: CD:9A:E7:6C:6F:03 (2) reason 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment