Skip to content

Instantly share code, notes, and snippets.

@holms
Created April 13, 2018 06:08
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 holms/1f4e55f61a32931e55ac5fc1e8bd623b to your computer and use it in GitHub Desktop.
Save holms/1f4e55f61a32931e55ac5fc1e8bd623b to your computer and use it in GitHub Desktop.
Bluetooth on raspberry pi
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# pairable on
Changing pairable on succeeded
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:15:83:15:A3:10 Discovering: yes
[CHG] Device 7C:1E:52:0B:0D:97 LegacyPairing: yes
[CHG] Device 7C:1E:52:0B:0D:97 Class: 0x002540
[CHG] Device 7C:1E:52:0B:0D:97 Icon: input-keyboard
[bluetooth]# pair 7C:1E:52:0B:0D:97
Attempting to pair with 7C:1E:52:0B:0D:97
[CHG] Device 7C:1E:52:0B:0D:97 Connected: yes
[agent] PIN code: 953853
[CHG] Device 7C:1E:52:0B:0D:97 Paired: yes
Pairing successful
[CHG] Device 7C:1E:52:0B:0D:97 Connected: no
[bluetooth]# connect 7C:1E:52:0B:0D:97
Attempting to connect to 7C:1E:52:0B:0D:97
[CHG] Device 7C:1E:52:0B:0D:97 Connected: yes
Connection successful
[bluetooth]# quit
Agent unregistered
[DEL] Controller 00:15:83:15:A3:10 raspberrypi [default]
pi@raspberrypi ~ $
When connected
In terminal:
bluetoothctl
In bluetoothctl (within terminal):
agent on
scan on
pair 7C:1E:52:0B:0D:97
(Enter pin code on keyboard or device)
trust 7C:1E:52:0B:0D:97
connect 7C:1E:52:0B:0D:97
info 7C:1E:52:0B:0D:97
quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment