Giter Club home page Giter Club logo

linux-80211n-csitool-supplementary's Introduction

This repo hosts the supplementary utilities, firmware, etc., needed for the Linux 802.11n CSI Tool. See the project website for more info.

License: See the project FAQ for licensing information.

linux-80211n-csitool-supplementary's People

Contributors

dhalperi avatar dpward avatar ippeb 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

linux-80211n-csitool-supplementary's Issues

Same step but Different outputs?

Dear , I followed the second issue "How do I process CSI with MATLAB or Octave?".but I got a different result. What's wrong with it ? How to figure it out? THANK YOU!My result is as follow:
The timestamp_low and two ans are different!

csi_trace = read_bf_file('sample_data/log.all_csi.6.7.6');
csi_entry = csi_trace{1}

csi_entry =

timestamp_low: 4
   bfee_count: 72
          Nrx: 3
          Ntx: 1
       rssi_a: 33
       rssi_b: 37
       rssi_c: 41
        noise: -127
          agc: 38
         perm: [3 2 1]
         rate: 256
          csi: [1x3x30 double]

csi = get_scaled_csi(csi_entry);
plot(db(abs(squeeze(csi).')))
legend('RX Antenna A','RX Antenna B','RX Antenna C','Location','SouthEast');
xlabel('Subcarrier index');
ylabel('SNR [dB]');
db(get_eff_SNRs(csi),'pow')

ans =

22.1821 22.2698 22.9007 24.6297
-156.5356 -156.5356 -156.5356 -156.5356
-156.5356 -156.5356 -156.5356 -156.5356
-156.5356 -156.5356 -156.5356 -156.5356
-156.5356 -156.5356 -156.5356 -156.5356
-156.5356 -156.5356 -156.5356 -156.5356
-156.5356 -156.5356 -156.5356 -156.5356

csi_entry = csi_trace{20}

csi_entry =

timestamp_low: 4
   bfee_count: 91
          Nrx: 3
          Ntx: 3
       rssi_a: 34
       rssi_b: 39
       rssi_c: 39
        noise: -127
          agc: 40
         perm: [2 3 1]
         rate: 272
          csi: [3x3x30 double]

csi = get_scaled_csi(csi_entry);
db(get_eff_SNRs(csi),'pow')

ans =

   Inf       Inf   32.3435   32.6069
   Inf       Inf   32.4238   32.6822
   Inf       Inf   32.2353   32.5051

25.4763 25.5262 25.8974 26.8482
24.6893 24.7490 25.1933 26.5660
21.9185 22.0303 22.8060 24.6483
6.5818 8.2321 12.4185 16.2016

How to restore the unmodified driver?

Hello,
I am using Ubuntu 14.04 with a working WiFi LINK 5300. I backup the old driver using

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

I am using iwlwifi-5000-5.ucode. After experiment, I try to switch back to the old working driver by

cp iwlwifi-5000-5.ucode.orig iwlwifi-5000-5.ucode

After restart the network manager, the WiFi does not work. I am having deauthenization problem all the time (with reason 3).

I notice that there is also iwlwifi-5000.2.ucode due to

sudo ln -s iwlwifi-5000-2.ucode.sigcomm2010 /lib/firmware/iwlwifi-5000-2.ucode

So I change the name to iwlwifi-5000-2.ucode. After restart the network-manager, still I cannot connect to any WiFi.

Is there any procedures that I should follow to 'restore' the old working intel WiFi 5000 series driver? Thanks!

How to force three transmit antennas?

Hello,
I know that the rate flag would be something like 1[C,D,E,F]xxx for three antenna configuration. I associate my 5300 with my three antenna wireless router. I keep refresh the rate_scale_table and ping the wireless router at another terminal. The rate scale table seems to change all the time (only allow 16 entries to be displayed at the same time). I did not see any rate starts with 1C (meaning that, the wireless router seems to be happy to work with a maximum of TWO transmit antennas).
For my current project, I need to use the three transmit antennas at the same time. I tried to put 0x1c113 in the rate scale table, but it crashes the connection (I have to re-associate with the wireless router again everytime I put 0x1c113 into rate_scale_table).
How can I get a FULL list of supported rate by an AP/station (instead of keep refreshing rate_scale_table and expect one rate starting with 0x1c...)? Thanks!

can't read private key when Installing the modified driver in step 2

I copy and paste the steps and always have the can't read private key information, after I type the cmd:
sudo make -C /lib/modules/$(uname -r)/build M=$(pwd)/drivers/net/wireless/iwlwifi INSTALL_MOD_DIR=updates
modules_install

And step 4 has errors about missing the link files, which could be the cause of the last problem.
I use the linux 14.04. Kernel version is 3.13.0-32-generic #57-Ubuntu.
Do you know how to fix that?

Jin

Following the duplicated replies questions

After the short holiday I came back to see the last my question (the #4 issue) and your kind replies. I got the problem is 'Retransmissions can occur when CSMA/CA acknowledgments are not received.' Do you know why this always happens at every time? Does it cause by the router or the crowd environment?

Dampening of signal at the subcarriers towards the end

Hello, I have recently started working with the CSI tool, and I have noticed a dampening of the signal towards the edge subcarriers. Here is an example

rss

In the figure above, the strength of the signal always goes down towards the end subcarriers. I have seen this in tests I ran at other locations as well, but have not been able to find out why this is happening. Am I doing something wrong with my configuration?

FYI, the figure above is from 1X3 SIMO link with the rate set at 54Mbps.

How to set SISO?

Dear Daniel,I have make the injection script work correctly.And I can set the transmitter number ,got a one-tx & three-rx system .Now I want to know how to set the receiver,and make an SISO system?Looking for your favorite reply.Thank you!

how can I get the RSS of every subcarriers?

Dear dhalperi:
I am confused about how to calculate the RSS of ervery subcarriers,the matlab function get_scaled_csi.m has calculate the CSI including the noise. Can you give me some advice on it? Does removing the noise directly work?
Thanks!

how to maintain the data rate and also change the channel automatically

I follow the way in FAQ1 to change the data rate like this:

echo 0x4214 | sudo tee  /sys/kernel/debug/ieee80211/phy0/netdev:wlan0/stations/'mac_addr'/rate_scale_table

The 16 possible transmit rates have changed accordingly. But I find the actual tx rate does not turn to it. I use

iw dev wlan0 link

to show the link state.
If I use the default transmit rate which will increase mcs slowly, Iog_to_file can log the csi and always show:

received 393 bytes: id: 26 val: 1 seq: 0 clen:393
received 213 bytes: id: 26 val: 1 seq: 0 clen:213

Is there any problem?
And is it possible to automatically change the AP and client to 5G or another channel in 2.4G? I want log csi of different channels in tdma way like sensor network.

Jin

I failed to download LORCONv1 from http://802.11ninja.net/svn/lorcon/branch/lorcon-old/

Some trouble about data Processing

   Excuse me, I can successfully get 30 groups of data by your method. But In your website home page there is a picture called Example CSI for 4 SISO links , which draw up 56 band (from -28 to 28). How can you get that though process 30 groups of data?

Reloading with CSI logging enabled

To the best of my knowledge, I have taken care of all instructions well. I am facing an issue at step 5. After unloading driver, wi-fi is disconnected and when I reload it with CSI logging enabled (sudo modprobe iwlwifi connector_log=0x1), wi-fi is not being connected. I am stuck at this point, don't know what is doing wrong. Please help

the tmp.dat file is empty, and cannot get the csi data

Dear sir, I have carefully install the csi tool step by step in the old installation instructions, and each step has achieved the expectant result. However, in the last "let's try it out" phase, the tmp.dat file is always empty, and there isn't any data in it. I have a router without password, and has set it in the mode of 802.11n, HT. Whereas, the computer which embedded an intel 5300 NIC is a DELL desktop computer. In China, we have a group fellows who also face the same question, his tutor has used the csi tool in the desktop, and there isn't any data either. So I want to know is this the main problem in collecting the csi data? I'm looking forward to your answer. Thank you very much!

how can i set the pc(install the csi tool) to ap model?

I have tired many methods to set the pc to ap model, i want to connect mobilephone to the pc. So i can collect the csi between them. But i failed, is there any instructions to show how to set the pc(install csi tool) to ap model?

Ping 100 time get more than 100 CSI packets ? why?

When I ping the ap , most time I got many packets of csi which the number is bigger than the times I ping? I want know the reason, I use wireshark to moniter, almost all the incoming traffic is ICMP echo (ping) replies, Only there is DNS、TCP、 HTTP replies. I have read this answer.:#49
I didn't understand "You should examine the MCS of the incoming packets to determine if an HT rate was used (and if CSI was collected)" what‘s meaning of this sentence? thanks!

How can I get the CSI information from multiple AP at the same time?

Now, I can get the CSI information from the AP which I connected. However, I want get the CSI information from multiple AP at the same time. I see your FAQ answer 11. I did as he said. But I don't understand how to use it. Who is receiver? Who is transmitter? How to use?

Injection script, cannot log transmitted data

I have set up two devices, each with the specified NIC (Intel WiFiLink 5300 802.11n MIMO). Logging CSI data by pinging a hardware AP from a device worked fine.

In the past few days, I tried to get the injection script working, but the "receiver" doesn't log the data that was send by the "transmitter". I have run all instructions from the README in the injection folder, using the values, "64" for the channel and "HT20".

Analysing the transmitted packets using Wireshark on the receiving side, it seems that all criteria for successfully logging packets were fulfilled (from 5. from the FAQs).

  • The packet is received correctly.
  • The packet is sent using an 802.11n "HT" rate.
  • The packet is sent to a hardcoded, fixed address 00:16:ea:12:34:56 from a broadcast node.

Below I have included my ifconfigs and iwconfigs (from both, the receiver and transmitter) and the Wireshark logs of the received samples.
Any idea why the CSI Tool cannot log the data sent using sudo ./random_packets 1 100 1? Any debugging hints?

the transmitter

>> ifconfig
eth0      Link encap:Ethernet  HWaddr c0:3f:d5:6d:41:e4
          inet addr:10.0.0.238  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::c23f:d5ff:fe6d:41e4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:11488 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9658 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5133991 (5.1 MB)  TX bytes:1672958 (1.6 MB)
          Interrupt:20 Memory:f7d00000-f7d20000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:338 errors:0 dropped:0 overruns:0 frame:0
          TX packets:338 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:26037 (26.0 KB)  TX bytes:26037 (26.0 KB)

mon0      Link encap:UNSPEC  HWaddr
00-21-6A-7E-30-A4-3A-30-00-00-00-00-00-00-00-00
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2041 errors:0 dropped:2041 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:366299 (366.2 KB)  TX bytes:0 (0.0 B)
>> iwconfig
eth0      no wireless extensions.

mon0      IEEE 802.11abgn  Mode:Monitor  Frequency:5.32 GHz  Tx-Power=15 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

wlan0     IEEE 802.11abgn  ESSID:off/any
          Mode:Managed  Frequency:5.32 GHz  Access Point: Not-Associated
          Tx-Power=15 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

lo        no wireless extensions.

the receiver

>> ifconfig
eth0      Link encap:Ethernet  HWaddr c0:3f:d5:6e:08:88  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:20 Memory:f7d00000-f7d20000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:2104 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2104 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:169872 (169.8 KB)  TX bytes:169872 (169.8 KB)

wlan0     Link encap:UNSPEC  HWaddr 00-21-6A-12-8A-D8-3A-30-00-00-00-00-00-00-00-00  
          inet addr:192.168.1.8  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
>> iwconfig
eth0      no wireless extensions.

lo        no wireless extensions.

wlan0     IEEE 802.11abgn  Mode:Monitor  Frequency:5.32 GHz  Tx-Power=15 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

Wireshark logs of the received samples (ran sudo ./random_packets 1 100 1 three times):
Wireshark logs

Can't understand the rssi figure for a 3X3 link

Hello,

Firstly, thanks for your help on issue #28 . I had another question regarding the csi collected in a 3X3 link. I have 3 external antennas attached to each of the machines with the intel 5300 card in them, and I set the rate to 0x1c113 as mentioned in your FAQ. When processing the CSI with matlab , this is the output of

db(get_eff_SNRs(csi), 'pow')


       Inf       Inf   34.1344   34.3114
       Inf       Inf   33.9918   34.1745
       Inf       Inf   32.5335   32.7862
   25.6629   25.7107   26.0715   27.2071
   26.3799   26.4205   26.7294   27.7068
   26.6003   26.6389   26.9326   27.7871
   22.5253   22.6320   23.3183   24.6393

and the rssi plot for all 3 receiving antennas for 1 transmitting antenna looks like this.

rssi_3x3

Is it normal to see the rssi values fluctuating like this? It almost looks like a periodic curve. Just to be double check, I also plotted out the absolute values of these complex numbers, and the plot looks very similar to this. Also attached the output of csi_entry for a packet in csi_trace

csi_entry = 

    timestamp_low: 283160501
       bfee_count: 2000
              Nrx: 3
              Ntx: 3
           rssi_a: 33
           rssi_b: 36
           rssi_c: 38
            noise: -94
              agc: 51
             perm: [3 2 1]
             rate: 275
              csi: [3x3x30 double]

I ran this test in an indoor environment (in a typical office room setting) and the machines were fairly close to each other (~2-3meters). I have not seen this kind of behavior in SIMO links, but have not been able to pinpoint if I'm doing anything wrong. Have you ever come across this kind of trend?

P.S. I also slowed down the rate using 0x1c110( MCS 16) to see if it was a rate issue but I am getting similar figures when I plot out the rssi.

Thank you.

Cannot compile the injection scripts

Hello,
I have svn'ed the lorcon-old, and build successfully on my Ubuntu 14.04. Here is what I have after make install of lorcon-old:

install -d -m 755 /usr/local/include
install -d -m 755 /usr/local/include/lorcon2/
install -m 644 lorcon.h /usr/local/include/lorcon2/lorcon.h
install -m 644 lorcon_packet.h /usr/local/include/lorcon2/lorcon_packet.h
install -m 644 lorcon_packasm.h /usr/local/include/lorcon2/lorcon_packasm.h
install -m 644 lorcon_forge.h /usr/local/include/lorcon2/lorcon_forge.h
install -m 644 ieee80211.h /usr/local/include/lorcon2/lorcon_ieee80211.h
install -d -m 755 /man/man3
install -o root -m 644 lorcon.3 /man/man3/lorcon.3

However, when I am trying to make install the injection code, I am getting

gcc -O3 -Wall -static -Wno-unknown-pragmas -I /usr/src/linux-headers-3.16.0-30-generic/include   -c -o util.o util.c
In file included from /usr/src/linux-headers-3.16.0-30-generic/include/linux/kernel.h:6:0,
                 from /usr/src/linux-headers-3.16.0-30-generic/include/linux/skbuff.h:17,
                 from /usr/src/linux-headers-3.16.0-30-generic/include/linux/if_ether.h:23,
                 from util.c:5:
/usr/src/linux-headers-3.16.0-30-generic/include/linux/linkage.h:7:25: fatal error: asm/linkage.h: No such file or directory
 #include <asm/linkage.h>
                         ^
compilation terminated.
make: *** [util.o] Error 1

I search the path. I have asm-generic in the folder

/usr/src/linux-headers-3.16.0-30-generic/include

But I don't have the folder 'asm'.

Thanks!

I can not use wireshark to capture frames from the transmitter on the receiver end.

I have substituted echo 0x4101 with echo 0x1c113 to configure transmitter.

Then I got packets on a macbook pro (13-inch, Mid-2014), on which OSX Yosemite 10.10.2 have been installed. I used the sniffer tool on it to capture the packages sent from the transmitter configured as transmitter part of README of injection part.

screen shot 2015-03-22 at 10 33 37 am
screen shot 2015-03-22 at 10 34 05 am
screen shot 2015-03-22 at 10 34 25 am

But the issue is that I can not capture them from a laptop configured as receiver of injection. On the laptop we used Wireshark with the wirelessCard running understand monitor mode. The WIFI card doesn't receive the packets at all.
If we doesn't use Wireshark to capture packets that can be captured by a mac laptop, but uses log_to_file to get CSI informations, it doesn't have any output.

Who can help me?

Why log_to_file captures no packets

Dear Mr. Ward

I am a undergraduate student in XIDIAN University,china. I am not a native English Speaker, and I am not sure whether I ignore some etiquette or say anything in a wrong way. If so, I apologize for my faults. I am using your csi tool to operate an experiment. I buy two Intel 5300 NICs and then follow the installation instructions on the official website. And I set one as AP and the other as station. While I can ping the AP from the station, I cannot grab any packets using log_to_file tool. I assume that AP and station are exchanging packets using 802.11a/b/g(legacy) instead of 802.11n(HT). I modify the rate_scale_table by running echo 0x1c113 | sudo tee /sys/kernel/debug/ieee80211/phy0/netdev:wlan0/stations/00:0f:34:9d:01:a0/rate_scale_table, but it still does not work. I really don't know how to fix this problem.
And the official website point out that injection scripts in monitor mode works better than the AP mode, but it does not give much details about monitor mode. So if it's not too much trouble for you, can you provide more information about how to use injection scripts.

Yours faithfully

Injection: transmitter and receiver can not work well.

I have set two devices with Intel 5300 NICs running Ubuntu 11.04 .They can work well when they are pinging the AP with no password and logging CSI.
In the past few days,I want to use Injection script.But the "receiver" can't log the data from the "transmitter".Their ifconfig and iwconfig are as followed:
transmitter:

ifconfig
eth0 Link encap:Ethernet HWaddr 00:e0:20:1c:33:f5
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

eth1 Link encap:Ethernet HWaddr 00:e0:20:1c:33:f6
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:100 (100.0 B) TX bytes:100 (100.0 B)

mon0 Link encap:UNSPEC HWaddr 00-16-EA-5F-2A-0C-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:57 errors:0 dropped:57 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:16306 (16.3 KB) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr 00:16:ea:5f:2a:0c
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

iwconfig
wlan0 IEEE 802.11abgn ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=15 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off

lo no wireless extensions.

mon0 IEEE 802.11abgn Mode:Monitor Frequency:5.32 GHz Tx-Power=15 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:off

eth0 no wireless extensions.

eth1 no wireless extensions.

receiver:

ifconfig
eth2 Link encap:Ethernet HWaddr 00:e0:20:1c:8d:0b
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:385 errors:0 dropped:0 overruns:0 frame:0
TX packets:53 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:36076 (36.0 KB) TX bytes:7814 (7.8 KB)

eth3 Link encap:Ethernet HWaddr 00:e0:20:1c:8d:0c
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:100 (100.0 B) TX bytes:100 (100.0 B)

wlan0 Link encap:UNSPEC HWaddr 00-16-EA-5F-2A-25-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

iwconfig
wlan0 IEEE 802.11abgn Mode:Monitor Frequency:5.32 GHz Tx-Power=15 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:off

lo no wireless extensions.

eth2 no wireless extensions.

eth3 no wireless extensions.

I followed README and did all the things as it says.But the "receiver" can't log any date from the "transmitter". I have read the issue #11 and #12 ,and I can't find a way to solve it.Anything I failed?or some other reasons.THANK YOU.

the state of reciever:
root@tracy-desktop:/home/tracy/csitools/linux-80211n-csitool-supplementary/injection# ./setup_monitor_csi.sh 64 HT20
root@tracy-desktop:/home/tracy/csitools/linux-80211n-csitool-supplementary/injection# sudo /home/tracy/csitools/linux-80211n-csitool-supplementary/netlink/log_to_file 0409.dat
then,nothing happenned.

the state of transmitter:
root@tracy-desktop:/home/tracy/csitools/linux-80211n-csitool-supplementary/injection# ./setup_inject.sh 64 HT20
root@tracy-desktop:/home/tracy/csitools/linux-80211n-csitool-supplementary/injection# echo 0x4101 | sudo tee /sys/kernel/debug/ieee80211/phy0/iwlwifi/debug/monitor_tx_rate
0x4101
root@tracy-desktop:/home/tracy/csitools/linux-80211n-csitool-supplementary/injection# sudo ./random_packets 1 100 1
Generating packet payloads
Initializing LORCON
Sending 1 packets of size 100 (. every thousand)
root@tracy-desktop:/home/tracy/csitools/linux-80211n-csitool-supplementary/injection# sudo ./random_packets 10000000 100 1
Generating packet payloads
Initializing LORCON
Sending 10000000 packets of size 100 (. every thousand)
..................................................50k
..................................................100k
..................................................150k
..................................................200k
.......................................^Z
[1]+ Stopped sudo ./random_packets 10000000 100 1

Different place ,the value of CSI similarity

Dear Daniel ! When finishing the experiment with 1 injection and 2 monitors, I can obtain the data of CSI1 and CSI2 successfully. But a problem perplexes me.
In the experiment, the monitor1 is 1.8m from the injection and the monitor2 is 2.8m. I can obtain the CSI1 and CSI2 from the monitors respectively, and the whole experiment is operated under same conditions. However, the difference between the CSI1 and CSI2 ranging from 1 to15,after calculating,I found when the value of difference is less than 10,the CSI we obtain will be incorrect. I wander what reason leads to this, the hardware’s or software’s? Could you do me a favor to confirm it?
Thanks very much.

db

I'm using Octave to plot the sample CSI data included in the tool following the direction in the FAQ. I get an error that the db function is not implemented in Octave (I'm using Octave 4.0.0 on Windows).

Is db(X) equivalent to 20log10(x) and db(X, 'pow') equivalent to 10log10(X) in the scripts? That's the assumption I made but my SNR values are shifted low by 26 in comparison to the sample plot in the FAQ.

How to know which channel is used

Dear Daniel, now I can successfully receive the CSI packets, but I want to caculate the centre frequency by using the channel number. In 'setup_inject.sh' ,it has set 'chn=64' .Which channel does the number '64' stand for? The 802.11n standard indicated there are 13 channels in the 2.4 GHz Band, how to choose the other channel by using the parament 'chn'?
Could you tell me something about that?Thank you !

Why The timestamp_low changed from 0 to 4? And Can I make it at WIN7_x64?

You said that:
timestamp_low is the low 32 bits of the NIC's 1 MHz clock. It wraps about every 4300 seconds, or 72 minutes. This field was not yet recorded in the sample trace, so all values will be zero.
BUT why does it change to 4? And what does the "Inf" mean?
Thank you !
I also mex the read_bfee.c at my laptop to run the "csi_trace = read_bf_file('sample_data/log.all_csi.6.7.6');"But the MATLAB breakdown.My OS is Win7_x64 and the MATLAB 2010b with C compiler Visual Studio 2010 .I have known that someone has succeed to make it at WIN7_x64 .So I just want to know how to make it?
Thank you very much!

Ping one time, get one CSI Packet?

When I ping the ap , sometimes I got many packets of csi, but sometimes I only get one packet or none, is it normal? ( I think that I ping one time, I should get one csi packet, am I right?)

How to use only one antenna to tx

Dear Daniel,I'm using AP mode instead of injection script.And according to #34,I can set rx antenna numbers by editing file 'rx_chain_msk'.But there is no 'tx_chain_msk'.So I wonder how to use only one antenna to tx.
Thanks
Best wishes!

Setting rates in client/AP mode

Hi

I am trying to setup the csi tool in client/AP mode and so far I have been able to install it properly and log some csi. I have a question about setting data rates/station info. If I want to set the transmit rate to 0x1c113 (as shown in FAQ #1), should I do this at the client or at the AP? Both client and AP are machines with IWL5300 card in them. Just to be clear, I have hostapd setup on one machine which is my AP, and I use another machine to ping this access point.

Thanks in advance!

MATLAB:The same packets, but different csi

Dear Daniel:Thanks for your answering my last question. Now , I gained CSI in MATLAB . But I realized CSI values which are from the same packet,same subcarrier are different ,just like this:
csi: csi_entry.csi:
val(:,:,1) = 2.7310 - 6.8276i val(:,:,1) =4.0000 -10.0000i
val(:,:,2) = -4.7793 - 6.1449i val(:,:,2) =-7.0000 - 9.0000i
...... ......
I have read the code roughly, but I don't know why they are different?
It is kind of you if you can tell me something about that. Thank you !

Injection can not work continually

If the transmitter send injection packages continually in a rate of 100 packets per second, log_to_file on the receive can only run normally for several minutes, then it would not have any output at all.

I checked usage of the memory, and I found that almost all space of the memory had been buffered.

I want to get CSI informations for several hours.
How to fix it? Is there some parameters I can set to empty buffers automatically?

No CSI logging

My installation went well with exception of merging "the driver modifications into the source tree for your specific kernel version" I couldn't merge but didn't pursue further because it seems like an optional step (let me know if it's absolutely required).

I'm able to connect to an 802.11n AP and verified that IWL5300 is operating in HT mode, however I don't get any CSI logs on the console or in the csi.dat file. I see this message in syslog iwlwifi: unknown parameter 'connector_log' ignored. so it seems to be ignoring my log filter. My full log is below. In /lib/firmware the original iwlwifi firmware is appropriately renamed with .orig and there is symlink to sigcom2010 version of the firmware so I suppose it is loading the correct firmware. It seems like I still missed something in the build, but not sure what it is. I'll appreciate any help.

syslog after "sudo modprobe iwlwifi connector_log=0x1"

kernel: [ 5029.357668] cfg80211: Calling CRDA to update world regulatory domain
kernel: [ 5029.370641] cfg80211: World regulatory domain updated:
kernel: [ 5029.370652] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
kernel: [ 5029.370659] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
kernel: [ 5029.370664] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
kernel: [ 5029.370669] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
kernel: [ 5029.370674] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
kernel: [ 5029.370679] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
kernel: [ 5029.374911] iwlwifi: unknown parameter 'connector_log' ignored
kernel: [ 5029.375982] Intel(R) Wireless WiFi driver for Linux, in-tree:
kernel: [ 5029.375992] Copyright(c) 2003-2013 Intel Corporation
kernel: [ 5029.376406] iwlwifi 0000:04:00.0: can't disable ASPM; OS doesn't have ASPM control
kernel: [ 5029.376522] iwlwifi 0000:04:00.0: irq 42 for MSI/MSI-X
kernel: [ 5029.376936] iwlwifi 0000:04:00.0: Direct firmware load failed with error -2
kernel: [ 5029.376944] iwlwifi 0000:04:00.0: Falling back to user helper
kernel: [ 5029.380796] iwlwifi 0000:04:00.0: request for firmware file 'iwlwifi-5000-5.ucode' failed.
kernel: [ 5029.380874] iwlwifi 0000:04:00.0: Direct firmware load failed with error -2
kernel: [ 5029.380883] iwlwifi 0000:04:00.0: Falling back to user helper
kernel: [ 5029.384739] iwlwifi 0000:04:00.0: request for firmware file 'iwlwifi-5000-4.ucode' failed.
kernel: [ 5029.384817] iwlwifi 0000:04:00.0: Direct firmware load failed with error -2
kernel: [ 5029.384826] iwlwifi 0000:04:00.0: Falling back to user helper
kernel: [ 5029.387906] iwlwifi 0000:04:00.0: request for firmware file 'iwlwifi-5000-3.ucode' failed.
kernel: [ 5029.388859] iwlwifi 0000:04:00.0: Firmware has old API version, expected v5, got v2.
kernel: [ 5029.388872] iwlwifi 0000:04:00.0: New firmware can be obtained from http://www.intellinuxwireless.org/.
kernel: [ 5029.389314] iwlwifi 0000:04:00.0: loaded firmware version 8.24.2.12 op_mode iwldvm
kernel: [ 5029.452419] iwlwifi 0000:04:00.0: CONFIG_IWLWIFI_DEBUG disabled
kernel: [ 5029.452433] iwlwifi 0000:04:00.0: CONFIG_IWLWIFI_DEBUGFS enabled
kernel: [ 5029.452441] iwlwifi 0000:04:00.0: CONFIG_IWLWIFI_DEVICE_TRACING enabled
kernel: [ 5029.452451] iwlwifi 0000:04:00.0: Detected Intel(R) Ultimate N WiFi Link 5300 AGN, REV=0x24
kernel: [ 5029.452555] iwlwifi 0000:04:00.0: L1 Disabled; Enabling L0S
kernel: [ 5029.483843] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'
kernel: [ 5029.546324] iwlwifi 0000:04:00.0: L1 Disabled; Enabling L0S
kernel: [ 5029.549378] iwlwifi 0000:04:00.0: Radio type=0x0-0x2-0x0
kernel: [ 5029.688763] iwlwifi 0000:04:00.0: L1 Disabled; Enabling L0S
kernel: [ 5029.691766] iwlwifi 0000:04:00.0: Radio type=0x0-0x2-0x0
kernel: [ 5029.720625] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
avahi-daemon[568]: Joining mDNS multicast group on interface wlan0.IPv4 with address 10.0.0.1.
avahi-daemon[568]: New relevant interface wlan0.IPv4 for mDNS.
avahi-daemon[568]: Registering new address record for 10.0.0.1 on wlan0.IPv4.

why AOA is not stable?

I use csi tools to calculate the direction of angle. I draw a pseudospectrum using music algorithm. However, the peaks of pseudospectrums seems clusters to four group. I have no idea with this issue. Anyone know about it?

Injection, cannot set transmit rate for transmitter

After running ./setup_inject.sh 64 HT20 when configuring the transmitter, I am unable to set the transmit rate. There exists no file called "monitor_tx_rate", find /sys -name monitor_tx_rate is empty and echo 0x4101 | sudo tee find /sys -name monitor_tx_rate`` will not work.

>> ls /sys/kernel/debug/ieee80211/phy0/iwlwifi/iwldvm/debug/
chain_noise             echo_test   missed_beacon  power_save_status  reply_tx_error  rxon_filter_flags  sensitivity   ucode_bt_stats       ucode_rx_stats  ucode_tx_stats
clear_ucode_statistics  fw_restart  plcp_delta     protection_mode    rf_reset        rxon_flags         txfifo_flush  ucode_general_stats  ucode_tracing

Any idea why I am missing this entry? I am also missing the entry "bcast_tx_rate".
Note, I am not associated to any AP, but I don't think I need to be?
(Also, note that this issue should be unrelated to #11 , at which point I was able to set monitor_tx_rate, I am not sure why I am now missing this entry)

network configuration

>> ifconfig
eth0      Link encap:Ethernet  HWaddr c0:3f:d5:6d:41:e4  
          inet addr:10.0.0.238  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::c23f:d5ff:fe6d:41e4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:16448 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10458 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:13165558 (13.1 MB)  TX bytes:1692883 (1.6 MB)
          Interrupt:20 Memory:f7d00000-f7d20000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:176 errors:0 dropped:0 overruns:0 frame:0
          TX packets:176 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:13984 (13.9 KB)  TX bytes:13984 (13.9 KB)

mon0      Link encap:UNSPEC  HWaddr 00-21-6A-7E-30-A4-3A-30-00-00-00-00-00-00-00-00  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1175 errors:0 dropped:1175 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:112120 (112.1 KB)  TX bytes:0 (0.0 B)

eth0      no wireless extensions.

wireless network configuration

>>> iwconfig
mon0      IEEE 802.11abgn  Mode:Monitor  Frequency:5.32 GHz  Tx-Power=15 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

wlan0     IEEE 802.11abgn  Mode:Monitor  Frequency:5.32 GHz  Tx-Power=15 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

lo        no wireless extensions.

seems angle between two antenna will change with time under 5G environment.

I use csi tool to measure csi and collect packages. After that, I get each antenna's csi data, like antenna1, antenna2, antenna3, each is a N(package num) * 30 matrix.
I plot the angle between two antennas. matlab code is like

plot(angle(antenna1 .* conj(antenna2)))

test

it seems with time going, the angles difference between two antenna will hava an error of pi?
Any idea bout this? Thanks.

A question about CSI packets

Dear Daniel , I used one transmitter and three receivers to bulid a system .I sent 100 packets , then different receiver received packets in different nember.Maybe 100 ,98,or 99. I just want to know whether it is normal?If I used point-to-point ,the receiving packets number is always100.Could you tell me something about that?Thank you !

CSI Measure from Transmitters with Different Wireless Card Manufacturers

Dear all

I have a receiver with an Intel IWL 5300 adapter running over Ubuntu 10.04, I was making a test to measure the CSI from packets sent from a wireless card with a different manufacturer than IWL 5300 adapter. I’m using a Ralink DWA-140 adapter which has the driver rt2800usb that supports cfg80211 and mac80211. I’m using the injection scripts for the transmitter and receiver as is pointed out in the link https://github.com/dhalperi/linux-80211n-csitool-supplementary/tree/master/injection, where just for the transmitter I changed rt2800usb instead of iwlwifi in setup_inject.sh.

After running the random_packets program, when I check it out in the receiver, I didn’t get the CSI measures for the transmitter with the DWA-140 adapter, but when I test it with the transmitter that has a IWL 5300 adapter I get the CSI measures without any issue.

I wonder if the transmitter needs to be also the Intel IWL 5300 adapter in order to the receiver be able to get the CSI information. Otherwise can you assist me please, I don’t know if I’m missing something, so that the transmission with Ralink DWA-140 adapter works and the receiver is able to get the respective CSI information.

Thanks in advance for your help.

INJECTION: recv: No buffer space available

Dear Daniel ,now I got the injection's scripts work correctly, but the receiver receive handreds of packets , then it stops and shows that: recv: No buffer space available .How to figure it out?
Looking for your favourite reply.

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.