0
$\begingroup$

Im trying to use GNUradio 3.8 with an sdr to pick up some wifi packets 2.4 and 5 GHz but im seeing a ton of dropped samples from my sdr. Im wondering if my dropped samples have to do with the sample rate. Ive seen online sdrs have a mixer that downconvert the frequency band to baseband and then its sampled. But i believe one cannot configure arbitrary sample rates, as the receiver expects a given number of samples per symbol. Is this correct. If im trying to sample 2.4Ghz and 5Ghz a/b/g/n how do i figure out my sample rate/dropped samples issue. Thanks

$\endgroup$
3
  • $\begingroup$ Does your SDR <-> PC has a large enough data rate? For a complex signal with bandwidth $B$ quantized to 16 bits, you'll need at least $16 \times 4 \times B$ bits per second. Also: can your CPU handle that many samples? $\endgroup$
    – MBaz
    Aug 21 '20 at 0:31
  • $\begingroup$ Im a little confused can you explaion where 16 and 4 are coming from? Is 16 a standard quantization rate for 802.11 ac? Is 4 the quadrature? Your saying I need a read/write speed of 16bits*4*20Mhz = 1280 Mbps which is inline with what ive seen but my PC has a read/write of 550/520 MB/s. Im operating over PCIE gen 1.1 which has a data rate on the order of GB/s. But still seeing only drops... Also using an intel core i-5 2.1Ghz. $\endgroup$ Aug 21 '20 at 23:31
  • $\begingroup$ I assumed a USRP or similar radio, which usually quantize to 16 bits per sample. You need to sample both I and Q, at rate at least $2B$. I'm pretty sure an i5 is not going to cut it. $\endgroup$
    – MBaz
    Aug 22 '20 at 2:06
1
$\begingroup$

At the very least, you'll need a sampling rate that's high enough to capture the full bandwidth of your Wifi transmission. In a typical WiFi receiver, that puts the sample rate at exactly the OFDM width: 5, 10, 20 or 40 MHz, depending on your Wifi.

Your dropped samples simply happen because your computer isn't fast enough to keep up with that many samples per second. There's only two solutions to that:

  1. Get a faster computer
  2. Make your computer do less per sample.

Also note that the sustained write rates of permanent storage devices can be lower than your sample data rate, so even just writing to disk can be a fatal bottleneck.

Sadly, we don't know the processing you're currently doing, but maybe have a look at gr-ieee802-11, which is optimal enough that a modern midrange laptop can receive 20 MHz wide Wifi with it, continuously.

$\endgroup$
2
  • $\begingroup$ Thank you for the input. Im a bit confused, I know the data rate of 802.11 ac is <1300Mbps, Im operating over PCIE gen 1.1 (2.5Gbps) with an ssd read/write of 550/520 MB/s. WI-FI < SSD < PCIE data rate and im using an intel i-5 2.1 GHz proc. Your saying the bottle neck is occuring somewhere along the pipeline? Am i underestimating the Wi-Fi input rate? $\endgroup$ Aug 21 '20 at 23:30
  • 1
    $\begingroup$ you're confusing the data rate that some wireless standard can transport, and the data rate necessary to store the raw RF signal. Anyway, as said, storage is one of the factors that can be too slow, not the only one. $\endgroup$ Aug 22 '20 at 11:24
0
$\begingroup$

Ive seen online sdrs have a mixer that downconvert the frequency band to baseband and then its sampled

I think your question can be answered by clearing up the misunderstanding that made you write this part of your question.

All data captured by an SDR is translated down from its original frequency down to being centred around a frequency of 0 Hertz (sometimes called DC).

If you tune to 100MHz, and sample at 2Msps, then you get the chunk of spectrum between 99 and 101MHz, and it gets delivered to you as -1MHz to +1MHz. That is, centered around zero.

"Negative frequency" is a mathematical artefact, and you'll get used to it. Obviously there's no physical pendulum, or clock, that ticks with a negative frequency.

Wifi is between 20 and 160MHz wide, depending on channel width. If you have fewer than 20Msps then you cannot decode a 20MHz channel. The information just isn't there. Just like how you can't hear an FM radio signal if you put a very narrow 100Hz filter in your receiver. You can still decode morse code, but not a broadcast FM signal. (of course analog signals don't just disappear, but degrade, as you see less and less of the spectrum)

So no, if you don't process at least 20Msps, then you cannot decode a 20MHz signal.

This is getting less true with Wifi 6, which uses OFDM. OFDM is lots of separate signals, all much smaller than 20MHz, each carrying data that you can decode. Because the signals then are each smaller than 20MHz. But if you don't capture the whole 20MHz spectrum, then you can't decode all of them.

But yeah, sounds like you need more CPU power. Make sure you're not using a rate higher than you need, and reduce the rate earlier in the flowgraph, where possible.

$\endgroup$
1
  • $\begingroup$ Thank u only took a year and a half to get a good answer lol $\endgroup$ Jan 15 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.