我想在不使用蓝牙GUI的情况下看到终端中的蓝牙适配器细节。最初,蓝牙在终端和GUI中都是关闭的。
终端中不同函数的My命令
查看蓝牙的状态(在某些情况下会显示活动/非活动状态和状态,而在其他情况下只显示活动/非活动状态)
sudo /etc/init.d/bluetooth status打开蓝牙
sudo /etc/init.d/bluetooth start关闭蓝牙
sudo /etc/init.d/bluetooth stop查看蓝牙适配器详细信息
hciconfig在Settings GUI中,我可以在蓝牙GUI的帮助下看到适配器细节。
I通过按顺序执行以下步骤来研究蓝牙在不同情况下的状态:
1.通过终端打开蓝牙
2.通过终端关闭蓝牙
3.通过GUI打开蓝牙
4.通过终端关闭蓝牙,但GUI不改变
5.通过终端打开蓝牙
6.通过终端关闭蓝牙,但GUI不改变
7.在GUI中关闭蓝牙
有人能帮帮我吗?我的命令出了什么问题?另外,为什么它与GUI一起工作很好呢?GUI实际上是做什么的?
发布于 2018-07-08 21:09:50
尝试一下这个工具:
bluetoothctl以下是安装指南:(https://wiki.archlinux.org/index.php/bluetooth#Installation)
它给了你很多机会:
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
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
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你甚至可以钻研广告策略等等:
# menu advertise
Menu advertise:
Available commands:
-------------------
uuids [uuid1 uuid2 ...] Set/Get advertise uuids
service [uuid] [data=xx xx ...] Set/Get advertise service data
manufacturer [id] [data=xx xx ...] Set/Get advertise manufacturer data
tx-power [on/off] Show/Enable/Disable TX power to be advertised
name [on/off/name] Configure local name to be advertised
appearance [on/off/value] Configure custom appearance to be advertised
duration [seconds] Set/Get advertise duration
timeout [seconds] Set/Get advertise timeout
clear [uuids/service/manufacturer/config-name...] Clear advertise config
back Return to main menu
version Display version
quit Quit program
exit Quit program
help Display help about this program这是很多您可以直接提取(并设置)的信息。
https://stackoverflow.com/questions/39490971
复制相似问题