Linux 802.11n CSI Tool移植问题研究

组件

  • Modified Firmware
    作用: enable CSI measurements
    iwlwifi-5000-2.ucode.sigcomm2010 (close source)
    只要往网卡中烧录一次就可以了,与CPU和操作系统无关

  • Modified Wireless Driver
    作用: access point functionality for controlling both ends of the link
    based on iwlwifi wireless driver(open source)

  • Application(userspace tools)
    作用: Matlab (or Octave) scripts for data analysis

    • 从日志文件中提取CSI矩阵以及辅助信息
      read_bf_file.m Reads in a file of beamforming feedback logs
      read_bfee.c C语言调用Matlab函数提取CSI,编译成mexw64文件后可供Matlab程序/脚本调用
    • 计算信道矩阵(dBm)
      get_scaled_csi.m
    • 计算effective SNR
      get_eff_SNRs.m
    • compute standard features such as the channel’s singular value decomposition and its MIMO condition number

userspace tools 文件列表

注意

  • postfix _sm 代表spatial mapping
  • postfix _ber 代表bit error rate
  • postfix _bf 代表beamforming
  • postfix inv 代表求inverse operation

iw wlan0 set channel 64 HT20 表示将wlan0网口设置为64信道,20MHz带宽,采用802.11n协议传输数据

Channel Center Frequency(GHz) Frequency Range(GHz) Bandwidth(MHz)
64 5.320 5.310-5.330 20
linux-80211n-csitool-supplementary
│  .gitattributes
│  .gitignore
│  CONTRIBUTING.md
│  README.md
│  tree.md
│  
├─firmware
│      iwlwifi-5000-2.ucode.sigcomm2010
│      
├─hostap-config-files
│      hostap-dotconfig
│      hostapd.conf-real
│      hostapd.conf-test
│      
├─injection
│      .gitignore
│      Makefile
│      random_packets.c
│      README
│      setup_inject.sh
│      setup_monitor_csi.sh
│      util.c
│      util.h
│      
├─matlab
│  │  apply_sm.m
│  │  bpsk_ber.m
│  │  bpsk_berinv.m
│  │  dbinv.m
│  │  get_eff_SNRs.m
│  │  get_eff_SNRs_sm.m
│  │  get_mimo2_SNRs.m
│  │  get_mimo2_SNRs_sm.m
│  │  get_mimo3_SNRs.m
│  │  get_mimo3_SNRs_sm.m
│  │  get_scaled_csi.m
│  │  get_scaled_csi_sm.m
│  │  get_simo_SNRs.m
│  │  get_total_rss.m
│  │  qam16_ber.m
│  │  qam16_berinv.m
│  │  qam64_ber.m
│  │  qam64_berinv.m
│  │  qpsk_ber.m
│  │  qpsk_berinv.m
│  │  read_bfee.c
│  │  read_bfee.mexa64
│  │  read_bfee.mexmaci64
│  │  read_bfee.mexw32
│  │  read_bfee.mexw64
│  │  read_bf_file.m
│  │  remove_sm.m
│  │  sm_matrices.m
│  │  
│  └─sample_data
│          log.all_csi.6.7.6
│          
└─netlink
        .gitignore
        bfee.h
        bf_to_eff.c
        bf_to_eff.h
        get_first_bfee.c
        iwl_connector.h
        iwl_nl.c
        iwl_nl.h
        iwl_structs.h
        log_to_file.c
        Makefile
        nl_bf_to_eff.c
        parse_log.c
        print_packets.c
        q_approx.c
        q_approx.h
        util.c
        util.h
        

工作原理

Every 802.11n NIC measures the channel state for each received packet during the packet preamble. The CSI is then used in the equalizer to compensate for channel effects before demodulation.

Our firmware modifications enable an Intel debug mode that records CSI for each correctly received 802.11n packet and sends it up to the kernel driver on the host computer. The driver in turn passes the CSI to a user-space program for processing.

需要移植的部分

lwlwifi

**更多讨论: **

  • QQ群:CSI信道状态信息交流群 366102075
  • Github: https://github.com/wuzhiguocarter/Awesome-WiFi-CSI-Research

你可能感兴趣的:(Linux 802.11n CSI Tool移植问题研究)