Giter Club home page Giter Club logo

atheros-csi-tool's Introduction

This is a tool for extracting CSI information from commercial Atheros WiFi NIC. 

Please visit our maintainance page http://pdcc.ntu.edu.sg/wands/Atheros/ for detailed infomration.

If you want more details on how to use this tool, please request the documentation http://pdcc.ntu.edu.sg/wands/Atheros/install/install_info.html.

Change Log, we now support one transmitter multiple receivers at the same time. One packet transmitted can be simultaneously received by multiple receivers and the CSI will be calculated accordingly. More detail can be found from our maintainance page. http://pdcc.ntu.edu.sg/wands/Atheros/

atheros-csi-tool's People

Contributors

jiangzp avatar xieyaxiongfly avatar

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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

atheros-csi-tool's Issues

Can I get CSI from the APs without configuration on this APs?

Hi , Doctor Xie
I know that if I use Atheros-CSI-Tool to get CSI data from some APs, I must to configure these APs beforehand. But now I want to get CSI matries from all the neighouring APs around me, not only the APs that I have configured beforehand. I know it is possible to get RSSI values from all the neighboring APs, but If getting CSI data from all the neighbouring APs is possible? If yes, how can I do that?
Thank you!

4.1.10+ kernel doesn't run wifi on Ubuntu 16.04, even though it was working with the kernel it came with.

The specification of laptop is:
Make: Asus
Model: X556UQK
Processor: Intel® Core™ i5-7200U CPU @ 2.50GHz × 4
Wi-Fi NIC: Qualcomm Atheros QCA9377

I had flashed with Ubuntu 16.04 amd64 (kernel: 4.10.0-28-generic), wifi was working, but after following the steps to install the modified kernel (which was successful) I am not able to make the Wi-Fi work. I need to use the Atheros CSI logging tool, if there is some workaround, please let me know.
@xieyaxiongfly @jiangzp

Working with off the shelf AP

Hi Yaxiong,

thanks for your great tool. I was wondering if there would be a way to have it working as a client connected to an off the shelf 802.11n router? this is supported by the Intel CSI tool. We have not been successful in doing so.

Thanks in advance
Francois.

Strange IQ Values using verified AR9382 and AR9344 SOC (running OpenWrt)

Hi @xieyaxiongfly ,
my name is Niklas. I'am currently writing my bachelor thesis at Karlsruhe Institut of Technology and trying to reproduce the results from your paper [Precise Power Delay Profiling with Commodity WiFi
]. Currently im trying to extract CSI Information with your tool on an Atheros 9344 SOC running OpenWrt.
We can extract information but as of right now, they don't seem to make much sense. In comparision to the sample file, we cant see a steady increase to pi and then the jump to -pi for the phase angle.

We thought it might occur due to an unsupported chip (Ar9344). Thats why we also tried it with an AR9382 which is on the supported list on your homepage. The AR9382 is running in two notebooks using a Kernel 4.1. One notebooks uses the 64bit architecture, the other one is on 32bit.
The results are similar to the NIC's running OpenWrt.

We also use the default hostapd.conf from your Repo.

This is the IQ-Data from the sample file.
iq_sample
And this is the IQ-Data from a packet we recorded.
our_iq
our_iq2
This is a phase we recorded.
our_phase
And this one is from the sample file. It looks as expected.
phase_sample

UPDATE:
This is a phase from the sample file and our recording plotted in one graph. The y-Axis is in Radians. The x-Axis ist in Subcarrier.
plot

Since you discovered the presence of the CSI information by coincidence maybe you have encountered similar behavior before and you can suggest an approach to parse the buffer correctly? Or do you have a suggestion what else we could try to get similiar I/Q results?

ps: We will also experiment with the AR9582 which a 2 antenna version of the AR9580 - so we get a better understanding where the problem may lie.

How CSI is calculated at Rx from HT-LTF preamble field

Hi,
What I have understood from the 802.11n standard is that the Tx is sending NDP (HT sounding) to the Rx (explicit case). The preamble portion of HT sounding frame has a field (HT-LTF) that contains OFDM training symbols (+/-1) which are actually calculated at the Rx side to estimate CSI.

Can you please explain in brief, how this is being actually calculated at the Rx end to create the feedback matrix? Or any link/book you have that can help me to understand this?

Which image to flash. There are multiple in bin/ar71xx

Hi,

I followed your instructions to install openwrt Atheros-CSI tool on my PC Engine AP with QCA9882 chipset. On running make, I have multiple images with several reading openwrt-ar71xx-generic*.img. Which one am I supposed to use to flash my AP ? I do not understand what the names mean.

Thank you !

CSI units

In which units is CSI calculated?
I see in csi_func that you can retrieve imag and real per subcarrier, but how can I interpret these values?

Sample Data Required

Can anyone share captured CSI data?

I had hoped to run my own experiments, but I have run out of time on my project. If anyone has the following scenarios captured using the CSI tool, I would be very grateful if you could share.

  • 2 different devices in the same location; each captured separately
  • 2 of the same devices in the same position; each obtained separately

I was trying to determine if it was possible to distinguish device type based on their CSI signature.

Again if anyone can share the data for these scenarios, or anything similar even, I would be very grateful.

b00l3an

More packets are received than sent.

hi,I use the ping command to send packets. At the same time, the receiver still uses Wireshark to capture data. More received than sent. The sending end also opens the receive command. In most cases, the number of sending ends is more than that of actual sending.

make -j16 errors

zhy123@zhy123-Lenovo-XiaoXin-700-15ISK:~/Atheros-CSI-Tool$ make -j16
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
DESCEND objtool
CHK scripts/mod/devicetable-offsets.h
CHK include/generated/utsrelease.h
CHK include/generated/timeconst.h
CHK include/generated/bounds.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
Building modules, stage 2.
DATAREL arch/x86/boot/compressed/vmlinux
Kernel: arch/x86/boot/bzImage is ready (#1)
MODPOST 4499 modules
WARNING: modpost: missing MODULE_LICENSE() in drivers/iio/accel/kxsd9-i2c.o
see include/linux/module.h for more information
WARNING: modpost: missing MODULE_LICENSE() in drivers/iio/adc/qcom-vadc-common.o
see include/linux/module.h for more information
WARNING: modpost: missing MODULE_LICENSE() in drivers/media/i2c/msp3400.o
see include/linux/module.h for more information
WARNING: modpost: missing MODULE_LICENSE() in drivers/mtd/nand/denali_pci.o
see include/linux/module.h for more information
WARNING: modpost: missing MODULE_LICENSE() in sound/soc/codecs/snd-soc-pcm512x-spi.o
see include/linux/module.h for more information
ERROR: "msp_once" [drivers/media/i2c/msp3400.ko] undefined!
ERROR: "msp_read_dem" [drivers/media/i2c/msp3400.ko] undefined!
ERROR: "msp_read_dsp" [drivers/media/i2c/msp3400.ko] undefined!
ERROR: "msp_update_volume" [drivers/media/i2c/msp3400.ko] undefined!
ERROR: "msp_write_dem" [drivers/media/i2c/msp3400.ko] undefined!
ERROR: "msp_set_scart" [drivers/media/i2c/msp3400.ko] undefined!
ERROR: "msp_sleep" [drivers/media/i2c/msp3400.ko] undefined!
ERROR: "msp_standard" [drivers/media/i2c/msp3400.ko] undefined!
ERROR: "msp_reset" [drivers/media/i2c/msp3400.ko] undefined!
ERROR: "msp_amsound" [drivers/media/i2c/msp3400.ko] undefined!
ERROR: "msp_dolby" [drivers/media/i2c/msp3400.ko] undefined!
ERROR: "msp_write_dsp" [drivers/media/i2c/msp3400.ko] undefined!
ERROR: "msp_stereo_thresh" [drivers/media/i2c/msp3400.ko] undefined!
ERROR: "msp_debug" [drivers/media/i2c/msp3400.ko] undefined!
scripts/Makefile.modpost:92: recipe for target '__modpost' failed
make[1]: *** [__modpost] Error 1
Makefile:1214: recipe for target 'modules' failed
make: *** [modules] Error 2

please help me.

Using this tool on wifi usb dongles

Hi,
I do not have a laptop or device that has an Atheros wifi NIC. I plan on using Raspberry Pi devices as client by hooking them up with Atheros chipset wifi usb dongles (which in Sweden seem to be very hard to get !). I suppose it will then use the ath9k_htc driver. Will this tool work for this driver ? I plan on running ubuntu on these RPi devices if that is necessary information.

Thank you !

How to change the channel automatically

Hi,Xie. Thanks for your tool! I've read your paper published in MobiCom’15. As metioned , you collected the CSI data from 10 consecutive channels. Actually, I'm doing a similar job. I wonder how to set the channel automatically(in driver layer). A script maybe works but it cost a lot of time.
Looking forward to some advice! Thanks! :)

Beamforming Implementation in receiver using the Atheros

Hi Xie,

Thank you for this excellent CSI collection tool. I am wondering is it applicable to implement the beamforming in the Rx by adding different phase delay for different antennas. Let's say, I am using a TP-Link Router as a client. This router has 3 receiving antennas. The Tx is another router, where only one antenna begins to transmit. Is there a way to add 3 phase delays to the 3 antennas to achieve beamforming without modifying any current framework or schemes of this tool?

Thank you! Hope to hear from you soon!

Gerry

transportation Atheros-CSI-Tool on 9331 route

hi,
Thank you for the tool! I try to transport this tool to the ar9331 route on OpenWrt system.In the funtion void csi_record_status(struct ath_hw *ah, struct ath_rx_status *rxs, struct ar9003_rxs rxsp,void data),the value rx_hw_upload_data and rx_hw_upload_data_type always is 0.I can not understand this two value and how could I do it?
thank you!

What should i do next?

I want to use CSI tool (ubuntu version) to get CSI data between two laptops (with AR9565 NIC) acting as Tx and Rx. I already set one laptop as AP with hostapd, What should i do next to get CSI data on the receiver side?

Diff of Kernel/Tool modifications

Hi,

Do you have a diff of all tool modifications on the Kernel? I want to map the tool and after try to modify it to use with a single node (client), like the #2 issue.

Best Regards,

Only one CSI per packet?

Hi Yaxiong,

Thanks for your great tool! These days I found a problem: when I send a packet, there is only one CSI recorded in the receiver. However, as far as I know, one long packet will be divided into several 'subpacket' and then sent. As a result, in the receiver, there should be several CSI calculated. Which one do you choose to record?

Thanks!

Loading initial ramdisk

When I try to boot into 4.1.10+ kernel the boot process is stuck at "loading initial ramdisk ...", anyone else facing this problem or if some has solved it please let me know.

Finding the right laptop with the right chipset

Hi,
I have a laptop that is locked to Intel WiFi NICs. Could you please suggest laptops that ship with CSI tool compatible Atheros wifi NICs. Or could you please suggest a laptop on which I can add Atheros wifi NICs. It is turning out to be quite a struggle finding compatible chips and compatible laptops for those chips. Thanks in advance !

  • Akhila

The ath9k wireless NIC model

I have bought two 9380/9390 miniPCIe cards from Taobao, the PCI ID is 0x168c:0x0030 and set them in two PCs, One as AP, one as STA, AP can log the received msg with recv_csi program, but the csi len is always 0, you can refer to below log

Recv 18th msg with rate: 0x8f | payload len: 1540
Timestamp 0
Channel: 2437
Bandwidth: 0
Rate: 143
NR: 3
NC: 3
Tones: 56
Phyerr: 0
RSSI0: 219
RSSI1: 45
RSSI2: 36
RSSI3: 41
Payload Len: 1540
CSI Len: 0

And here is the kernel log about this chip

csi@ubuntuCSI:~/NovelSense$ uname -a
Linux ubuntuCSI 4.1.10-040110-generic #201510030837 SMP Sat Oct 3 12:38:41 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

csi@ubuntuCSI:/NovelSense/recvCSI$ dmesg | grep ath
[ 8.552767] ath: EEPROM regdomain: 0x64
[ 8.552768] ath: EEPROM indicates we should expect a direct regpair map
[ 8.552770] ath: Country alpha2 being used: 00
[ 8.552770] ath: Regpair used: 0x64
[ 8.668764] ath9k 0000:02:00.0 wlan2: renamed from wlan0
csi@ubuntuCSI:/NovelSense/recvCSI$ dmesg | grep AR93
[ 8.667099] ieee80211 phy0: Atheros AR9300 Rev:3 mem=0xffffc90000f80000, irq=16

here is the lspci output

02:00.0 0280: 168c:0030 (rev 01)
Subsystem: 106b:009a
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at f7000000 (64-bit, non-prefetchable) [size=128K]
Expansion ROM at f7020000 [disabled] [size=64K]
Capabilities: [40] Power Management version 2
Capabilities: [50] MSI: Enable- Count=1/4 Maskable+ 64bit+
Capabilities: [70] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [300] Device Serial Number 00-00-00-00-00-00-00-00
Kernel driver in use: ath9k

I am thinking it maybe the wrong card model issue. So can you let me know what model you are using and where can buy it?

thanks

Replacing ath9k Driver

Hi Yaxiong,

I am also trying to use your CSI tool with the Intel Galileo Board like the user in issue #12. I was wondering what you meant in #12 by "replace the ath9k driver with our modified one and recompile it".

I have 2 questions specifically:

Where is your modified driver located?

How did you replace and recompile the driver? Did you use the Yocto Project?

Thank you for any help you can provide.

Capturing of HT sounding packets

I am trying to capture the HT Sounding packet in order to analyze them. Taking a trace from the transmitter (while sending the CSI packet) captures the packet naming "Bogus IPv4 version" while regular beacon packets are fine.
trace capture

Have you or anyone taken such traces before, why is the packet called bogus. Or if there is any specific way to capture the sounding frames. I am using TP-Link N750 (Atheros 9K series).

trace capture 2

How to interpret the collected CSI

Hi, I want to know how can I interpret the collected CSI data on my laptop. Should I install any applications? If yes, then which??
And also, is it possible that I use TPLINK router as my AP and laptop as the client.?

N-Tx Changing in CSI matrix

I have my NIC card attached computer as an AP. I ping it from another device which has 2X2 MIMO. However, the csi matrix is not consistently 2X3X30. Rather it varies between 1X3X30 and 2X3X30. That means the number of TX antenna is changing over the time. Why does this phenomenon occur?

What does the ah register offset 0x8344 stand for?

Hi Yaxiong,

I found that in hw.c, you set the 28th bit to 1 in the ah register with offset 0x8344. I don't really get the reason of doing that and I didn't find the meaning of that bit in the datasheet. Could you please kindly explain a little bit about that?

Thanks!

Access the received signal

Hello,
Is it possible to access the received signal via the atheros card and not just the CSI? Thank you

Is there any limitation to the client-hardware?

Hi, first thanks for the tool.
Suppose I use an Atheors 9580 NIC as AP with 3 antennas which runs the Atheros-CSI-Tool. Which type of clients can we get the CSI information from the three aspects?

  1. chip type, We must use another Atheors-9580 chip or any kind, like Intel, Broadcom etc
  2. client's antenna number, clients with two or more antennas supported?
  3. Txbeamforming-feature must be supported by the clients?
    Thanks

Kernel cannot detect Wi-Fi card?

I am using a AR9580 card. On a fresh Ubuntu 16.04 install the card is detected and I can use it.

When I install the custom kernel and boot into the custom kernel I run ifconfig and iwconfig but my wireless network interface does not shown up.

So I run lshw -c network:
*-network UNCLAIMED
description: Network controller
product: AR9580 Wireless Network Adapter
ventor: Qualcomm Atheros
...

I then run lsmod | grep ath to see if there are ath9k drivers installed but nothing shows up.

Any idea why this is happening and how I can fix it? Is there a way I can install the ath9k drivers on the kernel? I thought it should be installed automatically since this card is supported.

I tried an Intel 7260 card I had on the custom kernel and it loads fine. It is recognized by ifconfig and iwconfig as an interface.

AR9285

Hello
I am just wondering if the tool is supposed to work with 9285 NIC

kernel version compatibility

I am currently trying to use Atheros-CSI-Tool from an Intel Galileo Boards, whose cpu, Intel Quark, is not compatible with 4.1.10 as recommended. Instead it uses 3.8.7 kernel version. I blindly tried to install 4.1, but of course, it did not work.

May I ask if anyone has successfully used this CSI Tool with an Intel Galileo Boards?

Multiple CSI_dev files for multiple Atheros NICs

Hi there,

I'm currently trying to use your modified kernel driver to simultaneously receive data with two Atheros NICs on one device. The main problem is that I cannot access the individual received data as the data of both cards is written into the /dev/CSI_dev file that is defined in drivers/net/wireless/ath/ath9k/ar9003_csi.c. To solve this problem each device has to use its own device file. Is it possible to update your module that it automatically creates a CSI_dev for each installed NIC (NIC_1: CSI_dev0, NIC_2: CSI_dev1, ...) instead of using one device for all NICs?

Thanks.

Purpose of your driver modifications

Hey there,
I want to understand the changes you have performed to the default 4.1.10 Linux kernel..
Could you explain the changes you have made to ar9003_mac.c as they fiddle around with DMA controls.
Furthermore, explanations of the modifications to hw.c and init.c would be useful too.

Thanks.

About the CSI tool in UAV

Hi,
Thank you for the CSI tool! I am trying to install this tool on the Manifold mini computer fom DJI. But should I mount what types of Atheros NIC on the Manifold ? or How can I mount the NICs you have listed here on Manifold.(This mini computer have no PCIe interface, It just has USB interface, but the supported NICs you listed are all with PCIe interface).
Thank you!

Issue with AR9285 NIC

Hello @xieyaxiongfly
I have compiled your modified kernel on my laptop with Atheros AR9285 NIC. But, it does not have any ath9k modules installed on it. Please help in this matter ASAP.
Thanks.

Send TCP packets limited

One problem: After the CSI tool is installed, a TCP packet with a size greater than 400 bytes cannot be sent out. Why? The test conditions are as follows: Computer A, without CSI tools installed; Computer B, with CSI tools installed. Both are connected to WiFi sent by OpenWRT, A -> B sends, 400 bytes of TCP packets, B can receive normally. However, when B -> A, a 400-byte TCP packet, A cannot receive it. Therefore, it is judged that the computer with the CSI tool installed has a problem with the sender. What causes it? Where can the driver be modified? Or can you increase the size of the allowed message by modifying the kernel parameters?

Bug: CSI not being recorded due to AR_CRCErr not being set on last frame

AR_CRCErr is used to distinguish between being on the last subframe of e.g. a jumbogram. This flag being set means, we're on the last subframe (as mentioned by comment a few lines above), but as far as I can tell, it not being set doesn't necessarily mean we're not on the last subframe, it could also mean, there hasn't been a CRC error (AR_PostDelimCRCErr not set).

https://github.com/xieyaxiongfly/Atheros-CSI-Tool/blob/master/drivers/net/wireless/ath/ath9k/ar9003_mac.c#L611

Why do you use that for detecting the last subframe?

My experiments seem to confirm that. When I send ICMP echo requests or <200 frames using the send_Data tool, I see the AR_CRCErr == false case triggering but never with rs_more == 1, therefore not setting the valid flag in the CSI code and never recording the csi information.
When sending >1000 frames using send_Data, some of them trigger the second case, but the last ones always trigger the first case with AR_CRCErr set, therefore attempting to record CSI information (which again fails due to https://github.com/xieyaxiongfly/Atheros-CSI-Tool/blob/master/drivers/net/wireless/ath/ath9k/ar9003_csi.c#L251 but that's another issue). I suspect this is due to the amount of data being sent causing some frames to contain errors (being caught by the CRC).

Some clarification on why you distinguish those two cases in that way and how you detect a packet without CSI (e.g. beacon) would be nice (I can't seem to find documentation for rx_hw_upload_data, rx_hw_upload_data_valid and rx_hw_upload_data_type).

Collecting CSI in Monitor Mode

Hi there,
I sent you a message a while ago and asked you a question about this CSI tool. Thank you for doing the superb job of developing this tool and making it available to the community. I have been struggling for long with the following problem: I am able to collect CSI in master mode. What I need to do is to be able to collect CSI when the receiver is in monitor mode. The reason I insist on this is that, in monitor mode, steering matrices from more number of channels can be collected within a given amount of time. However, as soon as I put the receiver in this mode, nothing is collected. When I inspected your modified driver code, I realized that rx_not_sounding=1, rx_hw_upload_data=0, rx_hw_upload_data_valid=0, rx_hw_upload_data_type=0. These values obviously block the driver to collect anything. In fact, they might mean that there is nothing to collect! I do not understand why this is happening since (according to my way of working out the theory) ath9k requires steering (CSI) matrix for decoding HT packets in monitor mode, so the latter will have to be calculated by the driver no matter in which mode (what do you think?). On the other hand, above-mentioned parameters are calculated based on 11 words of RX descriptor that is made available by the driver in ar9003_mac.c. This makes me believe that, perhaps, Atheros cards do calculate steering matrices in monitor mode but do not upload it on the hardware. Long story short, I am seeking your advice! In particular, I read your paper "precise power delay profiling using commodity wifi" and it seems you were able to do the same thing that I need to do... Any feedback is highly appreciated.

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.