
用下面命令中的系统包管理工具来安装Python DBUS。
sudo apt-get install python-dbus
上面的命令只有在有apt-get包管理器的机器中才可以使用,比如Debian和Ubuntu。
要安装的第二个依赖是gnuplot-py。下载并用tar解压,接着运行setup.py来安装包。
第一步是下载gnuplot-py。
接着使用tar工具解压。
tar xvf gnuplot-py-1.8.tar.gz
接着使用cd命令改变目录。
cd gnuplot-py-1.8
接着运行下面的命令在你的系统中安装gnuplot-py。
sudo setup.py install
安装完成后,你就可以在你的系统中运行wifi-linux了。只需下载并用下面的命令运行脚本。
用下面的命令下载wifi-linux到你的机器中。
解压master.zip接着使用下面的命令运行list_rsssi.py脚本。
python list_rssi.py
至此wifi-linux在工作了。
命令bp用于像添加一个断点。
命令print可以用于在终端上显示你机器的状态。
不知道为什么,小米的蓝牙鼠标在linux下面安装不是很顺利,系统能够识别出蓝牙鼠标,但是自作多情的识别出了一堆,如图所示:看着不爽啊,怎么办?祭出bluetoothctl大法,下面是bluetoothctl的执行过程:
$ bluetoothctl
[NEW] Controller A0:C5:89:35:05:CE mibuntu [default]
[NEW] Device FE:8F:AC:55:93:48 MiMouse
[NEW] Device CE:55:BA:B8:65:B9 MiMouse
[NEW] Device EA:36:73:C7:64:C5 MiMouse
[NEW] Device 74:23:44:45:9B:FB 红米手机
[NEW] Device FD:90:32:24:D4:04 MiMouse
[NEW] Device D6:B4:84:9A:05:87 MiMouse
[bluetooth]# help
Available commands:
list List available controllers
show [ctrl] Controller information
select <ctrl>Select default controller
devices List available devices
paired-devices List paired devices
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
set-scan-filter-uuids [uuid1 uuid2 …] Set scan filter uuids
set-scan-filter-rssi [rssi] Set scan filter rssi, and clears pathloss
set-scan-filter-pathloss [pathloss] Set scan filter pathloss, and clears rssi
set-scan-filter-transport [transport] Set scan filter transport
set-scan-filter-clear Clears discovery filter.
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
list-attributes [dev] List attributes
select-attribute <attribute>Select attribute
attribute-info [attribute] Select attribute
read Read attribute value
write <data=[xx xx …]>Write attribute value
notify <on/off>Notify attribute value
register-profile <UUID …>Register profile to connect
unregister-profile Unregister profile
version Display version
quit Quit program
[bluetooth]# remove D6:B4:84:9A:05:87
[DEL] Device D6:B4:84:9A:05:87 MiMouse
Device has been removed
[bluetooth]# remove FD:90:32:24:D4:04
[DEL] Device FD:90:32:24:D4:04 MiMouse
Device has been removed
[bluetooth]# remove EA:36:73:C7:64:C5
[DEL] Device EA:36:73:C7:64:C5 MiMouse
Device has been removed
[bluetooth]# remove CE:55:BA:B8:65:B9
[DEL] Device CE:55:BA:B8:65:B9 MiMouse
Device has been removed
[bluetooth]# devices
Device FE:8F:AC:55:93:48 MiMouse
Device 74:23:44:45:9B:FB 红米手机
全部删除MiMouse设备,然后重新发现和连接即可。
小经验:最好通过bluetoothctl执行trust指令将MiMouse加入信任设备列表,这样配对的时候不需要验证。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)