translated

This commit is contained in:
geekpi 2015-02-01 12:35:53 +08:00
parent 3888bd0147
commit 2d7384b45d
2 changed files with 86 additions and 88 deletions

View File

@ -1,88 +0,0 @@
Translating----geekpi
How To Monitor Access Point Signal Strength With wifi-linux
================================================================================
As a python geek I love exploring new python tools on github that target the linux users. Today I discovered a simple application written in python programming language that can be used to monitor access point signal strength.
I have been experimenting for about two hours with **wifi-linux** and it works great but I would like to see some unittests in the near future from the author as the command **plot** is not working on my machine and is also causing some errors.
### What is wifi-linux ###
According to the official readme.md file on author's github account wifi-linux is a very simple python script which collects RSSI information about wifi access points around you and draws graphics showing RSSI activity.
The author states that the program also draws RSSI activity graphic and this can be generated with the command plot but unfortunetly it is not working for me. wifi-linux supports other commands such as **bp** to add a breakpoint, **print** to print some statistics and **start changer**.
The wifi-linux application has the folowing dependencies:
- dbus-python
- gnuplot-py
So first we have to install all the package dependencies for our project in order to run it in our linux machine.
### Install pakages required by wifi-linux ###
I tried to install python-dbus by using the pip tool which is used to manage python packages but it did not work and the reason for this is that pip looks for setup.py, which dbus-python doesn't have. So the following command is not going to work.
pip install dbus-python
And to make sure it does not work give it a try. It is a very high probability that you will get the following error displayed on your console.
IOError: [Errno 2] No such file or directory: '/tmp/pip_build_oltjano/dbus-python/setup.py'
How did I manage to solve this problem? It is very simple. I installed the the system package for the Python DBUS bindings using the following command.
sudo apt-get install python-dbus
The above command will work only in machines that make use of the apt-get package manager such as Debian and Ubuntu.
Then the second dependency we have to take care is the gnuplot-py. Download it, extract using the tar utility and then run setup.py install to install the python package.
First step is to download gnuplot-py.
wget http://prdownloads.sourceforge.net/gnuplot-py/gnuplot-py-1.8.tar.gz
Then use the tar utility to extract it.
tar xvf gnuplot-py-1.8.tar.gz
Then use the cd command to change directory.
cd gnuplot-py-1.8
Once there then run the following command to install the package gunplot-py on your system.
sudo setup.py install
Once the installation is finished you are ready to run the wifi-linux on your machine. Just download it and use the following command to run the script.
Download wifi-linux on your local machine by using the following command.
wget https://github.com/dixel/wifi-linux/archive/master.zip
Extract the master.zip archive and then use the following command to run the python script list_rsssi.py
python list_rssi.py
The following screenshot shows wifi-linux in action.
![wifi-linux to monitor wifi signal strength](http://blog.linoxide.com/wp-content/uploads/2015/01/wifi-linux.png)
Then the command **bp** is executed to add a breakpoint like shown below.
![the bp command in wifi-linux](http://blog.linoxide.com/wp-content/uploads/2015/01/wifi-linux2.png)
The command **print** can be used to display stats on the console of your machine. An example of its usage is shown below.
![the print command](http://blog.linoxide.com/wp-content/uploads/2015/01/wifi-linux3.png)
--------------------------------------------------------------------------------
via: http://linoxide.com/linux-how-to/monitor-access-point-signal-strength-wifi-linux/
作者:[Oltjano Terpollari][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://linoxide.com/author/oltjano/

View File

@ -0,0 +1,86 @@
如何用wifi-linux检测AP信号强度
================================================================================
作为一名python极客我喜欢在github上发现新的针对linux用户的python工具。今天我发现了一款用python写成的用于检测AP信号强度的工具。
我已经在**wifi-linux**上实验了大约两个小时,并且它工作的很好但是我希望在不久的将来在作者那里看到一些单元测试,因为命令**plot**无法在我的电脑上工作,并且会导致一些问题。
### 什么是wifi-linux ###
根据github作者账号的官方的offical readme.md文件 wifi-linux是一个简单的收集你周围AP的RSSI信息的python脚本它还会画出RSSI活动图形。
这同样可以用命令plot生成但是不幸的是这对我不可行。wifi-linux支持其他的命令比如**bp** 来加入一个断点,**print**会打印一些统计和**启动开关**。
wifi-linux程序有下面这些依赖
- dbus-python
- gnuplot-py
首先我们需要安装所有的包依赖以使它可以运行在我们的linux机器上。
### 安装wifi-linux需要的包 ###
我怕尝试使用python包管理工具pip安装python-dbus但是失败了因为pip会查找setup.py但是python-dbus中没有。因此下面的命令不工作。
pip install dbus-python
你可以试一下但是很有可能会在终端中下面的错误。
IOError: [Errno 2] No such file or directory: '/tmp/pip_build_oltjano/dbus-python/setup.py'
我该怎么解决这个问题呢很简单用下面命令中的系统包管理工具安装Python DBUS。
sudo apt-get install python-dbus
上面的命令只有在有apt-get包管理器的机器中才可以使用比如Debian和Ubuntu。
我们要安装的第二个依赖是gnuplot-py。下载并用tar解压接着运行setup.py来安装包。
第一步是下载gnuplot-py。
wget http://prdownloads.sourceforge.net/gnuplot-py/gnuplot-py-1.8.tar.gz
接着使用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到你的机器中。
wget https://github.com/dixel/wifi-linux/archive/master.zip
解压master.zip接着使用下面的命令运行list_rsssi.py脚本。
python list_rssi.py
下面的截图说明wifi-linux在工作了。
![wifi-linux to monitor wifi signal strength](http://blog.linoxide.com/wp-content/uploads/2015/01/wifi-linux.png)
命令**bp**用于像下面那样添加一个断点。
![the bp command in wifi-linux](http://blog.linoxide.com/wp-content/uploads/2015/01/wifi-linux2.png)
命令**print**可以用于显示你机器的状态。下面就是一个例子。
![the print command](http://blog.linoxide.com/wp-content/uploads/2015/01/wifi-linux3.png)
--------------------------------------------------------------------------------
via: http://linoxide.com/linux-how-to/monitor-access-point-signal-strength-wifi-linux/
作者:[Oltjano Terpollari][a]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://linoxide.com/author/oltjano/