Art*_*his 6 command-line bluetooth
我有一个带有蓝牙芯片的小型设备。我可以通过GUI系统设置>蓝牙看到它,当添加和发现附近的新蓝牙设备时,但每次我尝试这个命令hcitool scan.,都找不到设备。
y@MyPC:~$ sudo hcitool scan
Scanning ...
y@MyPC:~$
Run Code Online (Sandbox Code Playgroud)
蓝牙 GUI 是否使用与 hcitool 不同的工具来扫描蓝牙设备?
man hcitool
列出以下选项:
-i <hciX>\n The command is applied to device hciX , which must be the name of an\n installed Bluetooth device. If not specified, the command will be sent\n to the first available Bluetooth device.\n
Run Code Online (Sandbox Code Playgroud)\n\n我怀疑您的 \xe2\x80\x9csmall device\xe2\x80\x9d 蓝牙芯片不是默认的hci0
,因此hcitool
除非您这么说,否则不会向其发送命令。要显示可用的本地设备,请运行:
hcitool dev\n
Run Code Online (Sandbox Code Playgroud)\n\n这将显示设备列表及其设备名称。选择你想要的并执行例如
\n\nhcitool -i hci1 scan\n
Run Code Online (Sandbox Code Playgroud)\n
归档时间: |
|
查看次数: |
10437 次 |
最近记录: |