xieyaxiongfly / atheros-csi-tool Goto Github PK
View Code? Open in Web Editor NEWTool for extracting CSI from off-the-shelf Commercial Atheros WiFi NIC
License: Other
Tool for extracting CSI from off-the-shelf Commercial Atheros WiFi NIC
License: Other
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/
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!
Hi,
Thank you for the tool! I just wonder is this tool able to extract the CSI received from a TP-link?
If so, how could I do it?
Best
Hi @xieyaxiongfly ,
I'm reading your documentation and i see that the noise information is not working, right? How we can fix this bug?
Best Regards,
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
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.
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.
And this is the IQ-Data from a packet we recorded.
This is a phase we recorded.
And this one is from the sample file. It looks as expected.
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.
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.
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?
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 !
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?
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.
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
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.
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.
I see that the CSI is coming from the buffer sent by the hardware in a location that's just past the struct ar9003_rxs
portion.
How did you know the CSI was stored in this location? Is this an extension to the ar9003_rxs
struct? Is this documented anywhere?
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 !
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! :)
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
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!
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?
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,
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!
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.
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 !
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
Hi, Is it possible that your CSI AP get HT sounding packet and calculate CSI data from commercial wifi device?
We tried it, and seems to get CSI data with your recvCSI. But cannot read csi data with your read_log_file.m/read_csi.c.
Regards,
David Yu
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.
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.
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).
Hi, The maintainance page http://pdcc.ntu.edu.sg/wands/Atheros/ is not loading for me. Any one else having the same problem?
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.?
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?
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!
Hello,
Is it possible to access the received signal via the atheros card and not just the CSI? Thank you
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?
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.
Hello
I am just wondering if the tool is supposed to work with 9285 NIC
Hi @xieyaxiongfly ,
Is there a way to collect the transmissor magnitude of CSI tones to calcule EVM / doppler effect / multipath?
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?
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.
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.
I would like to use this tool.
However, on the page of the supported hardwares I can not find any, which can be purchaised.
Is there anyone, who can suggest any device, which is not a card, but a router, or an AP?
i use openwrt with tplink4310,and i find the receive antenna is 2 and how can i set it 3?
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!
Hi Xie,
I want to get CSI values for 2 NIC cards simultaneously, to combine them and make a virtual 5 antenna NIC as mentioned in paper on Phaser (https://jon.tsp.io/papers/mobicom14-phaser.pdf).
Can you let me know if your CSI tool supports CSI acquisition from 2 NICs and if not, what changes one would need to make in order to make it work.
Thank you in advance for your help.
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.
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?
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).
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).
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.
Is the tool going to work with NICs that are connected by USB?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.