ArchLinux安装蓝牙

2022年 11月 10日 星期四 16:34:02 CST 前几天买了三星的降噪耳机,但是在我的ThinkPad T490上不能使用,原因是电脑打不开蓝牙,这不是电脑坏了,因为之前使用manjaro系统时我的蓝牙是能正常工作的。所以问题就在于直接安装的ArchLinux没有配置好蓝牙,本文就是解决此问题的。

原本按照这个方案配置好了我的ThinkPad T490, 但是由于操作失误,导致电脑一直能扫描到其他人的蓝牙设备却无法找到自己的蓝牙鼠标和蓝牙耳机,结果一直认为是配置系统出了问题,唉失误了。正确的操作是,鼠标需要按住下面的一个按钮来配对,而蓝牙耳机则是需要断开与其他设备的连接,重新放回耳机盒现取出这样就可以被电脑发现了,一旦留下记录,下次连接将很轻松了。

安装蓝牙相关软件并启动蓝牙

1
2
3
4
5
sudo pacman -S --needed --noconfirm bluez
sudo pacman -S --needed --noconfirm bluez-utils
sudo pacman -S --needed --noconfirm pulseaudio-bluetooth
sudo systemctl enable bluetooth.service
sudo systemctl start bluetooth.service

蓝牙图形化管理工具安装

1
2
3
sudo pacman -S --needed --noconfirm bluedevil
或者
sudo pacman -S --needed --noconfirm blueman

蓝牙帮助

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
bluetoothctl ver 5.65
Usage:
bluetoothctl [--options] [commands]
Options:
--agent Register agent handler: <capability>
--monitor Enable monitor output
--timeout Timeout in seconds for non-interactive mode
--version Display version
--help Display help
Commands:
list List available controllers
show Controller information
select Select default controller
devices List available devices, with an optional property as the filter
system-alias Set controller alias
reset-alias Reset controller alias
power Set controller power
pairable Set controller pairable mode
discoverable Set controller discoverable mode
discoverable-timeout Set discoverable timeout
agent Enable/disable agent with given capability
default-agent Set agent as the default one
advertise Enable/disable advertising with given type
set-alias Set device alias
scan Scan for devices
info Device information
pair Pair with device
cancel-pairing Cancel pairing with device
trust Trust device
untrust Untrust device
block Block device
unblock Unblock device
remove Remove device
connect Connect device
disconnect Disconnect device

advertise.:
uuids Set/Get advertise uuids
service Set/Get advertise service data
manufacturer Set/Get advertise manufacturer data
data Set/Get advertise data
discoverable Set/Get advertise discoverable
discoverable-timeout Set/Get advertise discoverable timeout
tx-power Show/Enable/Disable TX power to be advertised
name Configure local name to be advertised
appearance Configure custom appearance to be advertised
duration Set/Get advertise duration
timeout Set/Get advertise timeout
secondary Set/Get advertise secondary channel
interval Set/Get advertise interval range
clear Clear advertise config

monitor.:
set-rssi-threshold Set RSSI threshold parameter
set-rssi-timeout Set RSSI timeout parameter
set-rssi-sampling-period Set RSSI sampling period parameter
add-or-pattern Register 'or pattern' type monitor with the specified RSSI parameters
get-pattern Get advertisement monitor
remove-pattern Remove advertisement monitor
get-supported-info Get advertisement manager supported features and supported monitor types
print-usage Print the command usage

scan.:
uuids Set/Get UUIDs filter
rssi Set/Get RSSI filter, and clears pathloss
pathloss Set/Get Pathloss filter, and clears RSSI
transport Set/Get transport filter
duplicate-data Set/Get duplicate data filter
discoverable Set/Get discoverable filter
pattern Set/Get pattern filter
clear Clears discovery filter.

gatt.:
list-attributes List attributes
select-attribute Select attribute
attribute-info Select attribute
read Read attribute value
write Write attribute value
acquire-write Acquire Write file descriptor
release-write Release Write file descriptor
acquire-notify Acquire Notify file descriptor
release-notify Release Notify file descriptor
notify Notify attribute value
clone Clone a device or attribute
register-application Register profile to connect
unregister-application Unregister profile
register-service Register application service.
unregister-service Unregister application service
register-includes Register as Included service in.
unregister-includes Unregister Included service.
register-characteristic Register application characteristic
unregister-characteristic Unregister application characteristic
register-descriptor Register application descriptor
unregister-descriptor Unregister application descriptor

admin.:
allow Allow service UUIDs and block rest of them

player.:
list List available players
show Player information
select Select default player
play Start playback
pause Pause playback
stop Stop playback
next Jump to next item
previous Jump to previous item
fast-forward Fast forward playback
rewind Rewind playback
equalizer Enable/Disable equalizer
repeat Set repeat mode
shuffle Set shuffle mode
scan Set scan mode
change-folder Change current folder
list-items List items of current folder
search Search items containing string
queue Add item to playlist queue
show-item Show item information

endpoint.:
list List available endpoints
show Endpoint information
register Register Endpoint
unregister Register Endpoint
config Configure Endpoint
presets List available presets

transport.:
list List available transports
show Transport information
acquire Acquire Transport
release Release Transport
send Send contents of a file
receive Get/Set file to receive
volume Get/Set transport volume