参数 | value |
---|---|
raspberry pi MOdel | 4B,4Gb |
bluetooth MOdel | 小爱同学 |
writeTime | 2023年 2月11日 下午13:14分 |
raspberry System Model | Linux raspberrypi 5.15.61-v8+ #1579 SMP PREEMPT Fri Aug 26 11:16:44 BST 2022 aarch64 GNU/Linux |
连接蓝牙
请在小爱同学app上确认蓝牙可以被发现。
打开命令行
Ctrl+Alt+T
切换到蓝牙
输入:bluetoothctl
打开代理
打开代理:agent on
扫描蓝牙
输入命令扫描蓝牙: scan on
找到对应的蓝牙之后进行配对
配对 :pair XX:XX:XX
连接
连接:connection XX:XX:XX:XX
连接上之后
选择信任蓝牙:trust XX:XX:XX
连接上蓝牙没有声音
- 确认蓝牙有电,并调整到一个合适的音量
- 确认raspberry音量合适
- 右键raspberry的音量图标,选择第三个Device Profiles,关闭或开始某一个进行音量的设置。
如果之前已经连接过了
如果之前已经连接过小爱同学了,但是再次连接连接不上去,可以让小爱同学连接互联网,然后:
你:小爱同学。
小爱同学:在
你:连接蓝牙
小爱同学:蓝牙已连接
命令的解释
[bluetooth]# help
Menu main:
Available commands:
-------------------
advertise Advertise Options Submenu
scan Scan Options Submenu
gatt Generic Attribute Submenu
list List available controllers
show [ctrl] Controller information
select <ctrl> Select default controller
devices List available devices
paired-devices List paired devices
system-alias <name> Set controller alias
reset-alias Reset controller alias
power <on/off> Set controller power
pairable <on/off> Set controller pairable mode
discoverable <on/off> Set controller discoverable mode
discoverable-timeout [value] Set discoverable timeout
agent <on/off/capability> Enable/disable agent with given capability
default-agent Set agent as the default one
advertise <on/off/type> Enable/disable advertising with given type
set-alias <alias> Set device alias
scan <on/off> Scan for devices
info [dev] Device information
pair [dev] Pair with device
cancel-pairing [dev] Cancel pairing with device
trust [dev] Trust device
untrust [dev] Untrust device
block [dev] Block device
unblock [dev] Unblock device
remove <dev> Remove device
connect <dev> Connect device
disconnect [dev] Disconnect device
menu <name> Select submenu
version Display version
quit Quit program
exit Quit program
help Display help about this program
export Print environment variables