记录在Ubuntu14.04系统上安装CSI tool的过程。低版本Ubuntu系统上安装CSI tool推荐清华软件学院wifiradar项目附带的“CSI工具安装说明”。
CSI tool是华盛顿大学版本,作者dhalperi,
源码链接https://github.com/dhalperi/linux-80211n-csitool/
依据其个人主页的 安装指导手册
sudo apt-get install gcc make linux-headers-$(uname -r) git-core
sudo apt-get install iw
echo iface wlan0 inet manual | sudo tee -a /etc/network/interfaces
sudo restart network-manager
echo blacklist iwldvm | sudo tee -a /etc/modprobe.d/csitool.conf
echo blacklist iwlwifi | sudo tee -a /etc/modprobe.d/csitool.conf
CSITOOL_KERNEL_TAG=csitool-$(uname -r | cut -d . -f 1-2)
git clone https://github.com/dhalperi/linux-80211n-csitool.git
cd linux-80211n-csitool
git checkout ${CSITOOL_KERNEL_TAG}
UBUNTU_KERNEL_TAG=Ubuntu-3.13.0-32.57
注意:正确选择Ubuntu系统的内核版本标签,标签查询链接为http://people.canonical.com/~kernel/info/kernel-version-map.html
. /etc/lsb-release
git remote add ubuntu \
git://kernel.ubuntu.com/ubuntu/ubuntu-${DISTRIB_CODENAME}.git
git pull --no-edit ubuntu ${UBUNTU_KERNEL_TAG}
make -C /lib/modules/$(uname -r)/build \
M=$(pwd)/drivers/net/wireless/iwlwifi modules
sudo make -C /lib/modules/$(uname -r)/build \
M=$(pwd)/drivers/net/wireless/iwlwifi \
INSTALL_MOD_DIR=updates modules_install
sudo depmod
cd ..
git clone \
https://github.com/dhalperi/linux-80211n-csitool-supplementary.git
for file in /lib/firmware/iwlwifi-5000-*.ucode; do sudo mv $file $file.orig; done
sudo cp linux-80211n-csitool-supplementary/firmware/iwlwifi-5000-2.ucode.sigcomm2010 /lib/firmware/
sudo ln -s iwlwifi-5000-2.ucode.sigcomm2010 /lib/firmware/iwlwifi-5000-2.ucode
make -C linux-80211n-csitool-supplementary/netlink
sudo modprobe -r iwlwifi mac80211
sudo modprobe iwlwifi connector_log=0x1
注意:每次reboot系统后需要重新执行
sudo ip link set wlan0 up
sudo iw dev wlan0 scan
sudo iw wlan0 connect -w xxxx
sudo dhclient wlan0
sudo linux-80211n-csitool-supplementary/netlink/log_to_file csi.dat
注意:csi.dat should not be empty if AP工作在HT模式