Coder Social home page Coder Social logo

spanev / linux-80211n-csitool Goto Github PK

View Code? Open in Web Editor NEW
65.0 2.0 20.0 175.37 MB

802.11n CSI Tool based on iwlwifi and Linux

License: Other

Makefile 0.26% C 96.29% Assembly 1.47% C++ 1.33% Objective-C 0.31% Shell 0.08% Perl 0.13% Awk 0.01% Python 0.07% GDB 0.01% sed 0.01% Yacc 0.02% Lex 0.01% UnrealScript 0.01% SmPL 0.01% Gherkin 0.01% XS 0.01% Perl 6 0.01% Roff 0.01% Clojure 0.01%
csi intel iwlwifi channel-state-information intel-5300 ubuntu1604 ubuntu1804 ubuntu

linux-80211n-csitool's Introduction

Linux 802.11n CSI Tool for newer Linux kernels

Intro

The purpose of this repository is to provide support for building the CSI-enabled Wi-Fi drivers for Intel Wireless Link 5300 adapters on Linux distributions with newer kernel versions. At this point this code has been tested on Ubuntu 16.04 and Ubuntu 18.04 with kernel version 4.15. More tests are expected soon.

The code presented here comprises of a modified version of the Linux kernel. The modifications were made by examining the code provided by dhalperi/linux-80211n-csitool and adapting them to more recent Linux kernel versions - iwlwifi module. The building and installation instructions were taken from the original Linux 802.11n CSI Tool website and adapted accordingly.

Installation Instructions

Prerequisites

Kernel version

Before proceeding further, you need to check the version of your kernel. It should be 4.15, otherwise the commands below won't work. The following command will print that information:

$ uname -r

Required packages

$ sudo apt install build-essential linux-headers-$(uname -r) git-core

Compilers with retpoline support (Ubuntu 16.04)

Newer kernels require compilers with retpoline supports. GCC and G++ version 7.3 and above support that feature. The example below shows how to install GCC/G++ version 8:

$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
$ sudo apt update
$ sudo apt install gcc-8 g++-8

You need to ensure that the make command uses the right version of the compilers. You can use either of these two ways do it

Redirect the system-wide links to the compiler executables

Check where the current links point to. The command

$ ls -l /usr/bin/gcc /usr/bin/g++

should generate an output similar to

lrwxrwxrwx 1 root 5 Mar 27  2018 /usr/bin/g++ -> g++-5
lrwxrwxrwx 1 root 5 Mar 27  2018 /usr/bin/gcc -> gcc-5

The current links are pointing to version 5. So they need to be redirected to version 8. To do that, remove the current links

$ sudo rm /usr/bin/gcc
$ sudo rm /usr/bin/g++

and create the new ones

$ sudo ln -s /usr/bin/gcc-8 /usr/bin/gcc
$ sudo ln -s /usr/bin/g++-8 /usr/bin/g++

Build and Install the Modified Wireless Driver

Clone the modified Linux kernel code

$ git clone https://github.com/spanev/linux-80211n-csitool.git
$ cd linux-80211n-csitool

Checkout the correct release version

$ CSITOOL_KERNEL_TAG=csitool-$(uname -r | cut -d . -f 1-2)
$ git checkout ${CSITOOL_KERNEL_TAG}

Build the modified driver for the existing kernel

$ make -j `nproc` -C /lib/modules/$(uname -r)/build M=$(pwd)/drivers/net/wireless/intel/iwlwifi modules
$ sudo make -C /lib/modules/$(uname -r)/build M=$(pwd)/drivers/net/wireless/intel/iwlwifi \
> INSTALL_MOD_DIR=updates modules_install

Remark: If during the execution of the command above you get error messages similar to

- SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178
sign-file: certs/signing_key.pem: No such file or directory

do not worry. The operating system complains, because the driver doesn't have a SSL signature. That won't interfere with the driver installation. Therefore, simply ignore the messages and continue with the installation process.

$ sudo depmod
$ cd ..

Install the Modified Firmware

Obtain the CSI Tool supplementary material:

$ git clone https://github.com/dhalperi/linux-80211n-csitool-supplementary.git

Relocate any existing firmware for Intel Wi-Fi Link 5000 Series adapters:

$ for file in /lib/firmware/iwlwifi-5000-*.ucode; do sudo mv $file $file.orig; done

Install the modified firmware:

$ 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

Enable logging and testing the driver

In order to conduct tests with the newly installed driver, please refer to the original CSI Tool website's installation instructions, Section 4 and 5.

linux-80211n-csitool's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

linux-80211n-csitool's Issues

build from source on Ubuntu22.04

excuse me. l want to use it to collect CSI information of wifi and will develop it to Repeating a result from a paper。
My device is a IPC with intel integrated graphics AND ubuntu 22.04(linux kernel 5.15).l want to build it from source。
however l cant make pdfdocs or make htmldocs. AND make it. i dont know how to do it or how to learn it.

received the packet so slow

hello,when l recieve at AP pattern,l find that the number of fetched packets is small and the fetch is slower than what l ping . Can you tell me how to solve this problem?

Error in building the modified driver for the existing kernel

Hi! spanev

Thank you so much for providing a modified version for 4.15 kernel.
I have struggled several days using the original ones but still cannot find a proper Ubuntu version and kernel version. Every time I run the "make" command, there appears an error "No rule to make target".
Then, I found your branch which is so exited that the Ubuntu 16.04 with 4.15 can work.
However, when I do the "sudo make", there comes the error like follows:

sudo make -C /lib/modules/$(uname -r)/build M=$(pwd)/drivers/net/wireless/intel/iwlwifi INSTALL_MOD_DIR=updates \modules_install
make: Entering directory '/usr/src/linux-headers-4.15.0-45-generic'
INSTALL /home/hangsong/linux-80211n-csitool/drivers/net/wireless/intel/iwlwifi/dvm/iwldvm.ko
At main.c:160:

  • SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175
  • SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178
    sign-file: certs/signing_key.pem: No such file or directory
    INSTALL /home/hangsong/linux-80211n-csitool/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
    At main.c:160:
  • SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175
  • SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178
    sign-file: certs/signing_key.pem: No such file or directory
    INSTALL /home/hangsong/linux-80211n-csitool/drivers/net/wireless/intel/iwlwifi/mvm/iwlmvm.ko
    At main.c:160:
  • SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175
  • SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178
    sign-file: certs/signing_key.pem: No such file or directory
    DEPMOD 4.15.0-45-generic
    make: Leaving directory '/usr/src/linux-headers-4.15.0-45-generic'

Can you please give me some hint on how to fix this ?
Or is the 4.15.0-45-generic kernel not supported at present?

Thank you very much!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.