-
Notifications
You must be signed in to change notification settings - Fork 1
/
Bluez.txt
67 lines (48 loc) · 1.95 KB
/
Bluez.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Content-Type: text/x-zim-wiki
Wiki-Format: zim 0.4
Creation-Date: 2016-12-28T19:57:34+01:00
====== Bluez ======
Created onsdag 28 december 2016
== Installation ==
**# Install the following packages**
$ pacman -S bluez bluez-utils
**# Modprobe the bluetooth driver**
$ modprobe btusb
**# Then start the bluetooth service whenever needed**
$ systemctl start bluetooth.service
===== Usage =====
**# Open the bluetooth interactive shell**
$ bluetoothctl
**# You can always run **//help//** in this shell, to list all commands^**
**# Power on the controller (off by default)**
$ power on
**# If the device is NOT already on your list, begin a scan**
$ scan on
**# To get a list of all your **registered** devices**
$ devices
**# Once you've found your device, pair it (You can **//<tab>//** complete)**
$ pair //<MAC_ADDRESS>//
**# If using a device without a PIN, trust the device to be able to reconnect**
$ trust //<MAC_ADDRESS>//
**# Then connect to the device**
$ connect //<MAC_ADDRESS>//
===== Troubleshoot =====
**# I've encountered quite a few issues with Bluetooth. Here's the fixes I've come about. **
== Not being able to power on the bluetooth device, or device not found in bluetoothctl ==
**# Failed to set power on: org.bluez.Error.Blocked (**//bluetoothctl//**)**
**# You can check and see, if the device is up/down**
$ hciconfig
**# And be able to turn the device on with **
$ hciconfig hci0 up
**# But you might get a '**//Can't init device hci0: Operation not possible due to RF-kill (132)//**'**
**# This means some software is blocking the device.. Great**
**# We're be able to check further with **//rfkill//
**# **//rfkill//** is a package that can manage wireless devices**
$ pacman -S rfkill
**# Running **//rfkill//** might give you an output like this**
0: hci0: Bluetooth
Soft blocked: yes **# soft-blocked.. Those bastards!**
Hard blocked: no
**# Unblock it **
**# Note the index no. above, in this example it's 0 (zero)**
$ rfkill unblock 0