WiFi Reception

This tutorial explains how to set up unidirectional communication from a normal WiFi card to the SDR.

WiFi Card Setup

On the host, we have to generate any IEEE 802.11a/g/p frames. An easy way is opening an access point in the 5GHz band, which will send periodic beacons. When opening an access point in the 2.4 GHz band, one has to ensure that the card is in pure-G mode and not in IEEE 802.11b compatibility mode. The latter has a different (backwards compatible) preamble that is not supported at the moment.

Another option is to put the card in monitor mode and manually inject frames. This has the advantage that the number of frames, the transmit power, the size, and the encoding scheme can be controlled. An example application for frame injection is included in the utils/packetspammer folder.

SDR Setup

On the receiver, we use the wifi_rx.grc flow graph from the examples folder. By default, the flow graph will output correctly received frames to the console.

To better monitor the frames, it’s possible to enable the Wireshark Connector block and the File Sink to dump the frames in a PCAP file, which can be open in Wireshark. Like with normal WiFi cards, the SDR annotates each frame with a Radiotap header, that contains information like an SNR estimate and the modulation and coding scheme.

Dumping the frames into a file is not very interactive and requires reloading the file in Wireshark to check if new frames arrived. It is possible to get live updates by

  • Changing the Append option of the File Sink from Overwrite to Append.
  • Creating a FIFO, for example, with mkfifo /tmp/wifi.pcap.
  • Making Wireshark read from the FIFO through wireshark -k /tmp/wifi.pcap.

An example script with error handling can be found at apps/rx_demo.sh. With this setup, the receiver will look similar to this:

WiFi Reception

With the GUI on the right, it is possible to change parameters and algorithms on-the-fly. This way it’s possible to change the channel estimation algorithm and watch the impact on the constellation plot.

Using a Tun/Tap interface and the corresponding GNU Radio block in the flow graph, it is possible to connect the SDR transceiver to the Linux TCP/IP stack. See the transceiver.grc flow graph and the nic.sh script from the apps folder for an example.


If it does not work out of the box you can try the following:

  • Increase or decrease the receive gain.
  • Use a channel in the 5 GHz band. They are less crowded and don’t use IEEE 802.11b compatibility mode, i.e., will send pure OFDM frames.
  • If you use a N210, change the LO offset to tune the local oscillator out of the band of interest.
  • Assert that there are no overruns, i.e., there are no ‘O’s printed on the console.
  • Check that you connected the antenna to the correct port.
  • Move sender and receiver a bit further apart from each other.