Turning A Wi-Fi Adapter Into An SDR

A waterfall display is shown, with a prominent yellow block in the upper right corner of the display.

Since the discovery of an undocumented I/Q sampling feature in ESP32 chips about two weeks ago, there’s been a flood of similar features being found in other wireless chips, including LoRa and Wi-Fi chipsets. The latest chip to join their ranks is the MediaTek MT7921AU, often used in Wi-Fi adapters, with two different projects developing independent SDR drivers for it in the last few days.

The first was BirriaSDR, which discovered that the chip exposes raw I/Q samples for debugging and calibration; BirriaSDR instead streams these to the host at 40 Msps in 14-bit resolution, with the option to tune from 2156 to 2610 MHz. BirriaSDR uses libusb to directly communicate with the Wi-Fi adapter and access its registers; it doesn’t make any permanent firmware changes, so the Wi-Fi adapter goes back to its original state after being used as an SDR. BirriaSDR implements an API similar to the RTL-SDR’s.

Mtk79ICAP, by contrast, exposes the MT7921AU’s sampling features over a standard SoapySDR interface. Unlike BirriaSDR, it applies some firmware changes to the chip, and it requires a modified driver to work. However, it can reach a maximum bandwidth of 80 MHz and tune to the 5 GHz bands. The Wi-Fi adapter in use can also simultaneously work in monitor mode and stream SDR data, though this only works when automatic gain control is enabled.

This is the second MediaTek chip we’ve seen repurposed for SDR work, after the earlier MT7996. Conveniently, Wi-Fi adapters often have external antennas, which should make it easier to connect a frequency mixer circuit. These adapters aren’t quite there yet, but some hackers have already used the ESP32 to transmit arbitrary signals.

11 thoughts on “Turning A Wi-Fi Adapter Into An SDR”

  1. This is incredible (all of these recent discoveries – esp32 and now WiFi adapters, and lora).
    I can’t tell you how long I’ve been wanting to do more RTSA-like stuff for WiFi. I used gr-fosphor with sweep on HackRF, and was desperately waiting for RFNM with Granita but the Granita is dead in the water last I heard, and then all the Lime based boards are limited to 3.7GHz or something.
    Brilliant. This is great.

    1. The datasheet for the LR2021 LoRa chip has the details in section 3.4.2 (Table 3.8) that shows the PLL frequency (FRANGE) for reception as 150 to 2500Mhz in 0.95hz steps as well as the firmware commands to achieve it later in the document. Transmission is far more restricted by the default modes.

      Using exactly this my ThinkNode M9 on WADAMesh even has a sort of little spectrum waterfall app built into it. Which is cute.

      Sort of off-topic to your exact question, just more in general:

      I would strongly encourage anyone, especially younger HaD technical readers, who might find this sort of stuff interesting to study for an amatuer license and get it! It’s not at all hard and it’s an amazing hobby, even if you only transmit sometimes or simply stick to digital transmissions.

      1. I would strongly encourage anyone […] to study for an amatuer license and get it!

        I would encourage the exact opposite. Don’t join the bitter old men club and let it die of old age. Just transmit whatever you need, however you need. What are they going to do? Ghost you on the airwaves? Call FCC and do some artistic screeching over the phone to AI receptionist because someone else was transmitting? Lel kek, let them DX in hell.

  2. That Mtk79ICAP (MT7921AU Wi-Fi stick – AX1800) looks interesting at 80MSPS I+Q and 14-bit samples transfered as 16-bit words, that is 320MB/s across a USB 3.0 interface. Although I expect the effective number of bits (ENOB) is probably closer to 8 or 9 bits. RX only, for now, with the addition of a RF mixer to access other frequencies it could be very useful for radio astronomy.

  3. Nice, I ordered a WiFi stick to play around with. They are pretty cheap. I already have a good SDR, but it only goes up to 2 GHz.

    I wonder if someone will figure out how to make them transmit?

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.