[Hackrf-dev] sample rate USB limitation

Dominic Spill dominicgs at gmail.com
Tue Jan 31 22:48:20 EST 2017


On 31 Jan 2017 5:59 pm, "Marc Pàmies Massip" <mpamies247 at gmail.com> wrote:

Oh, I thought that both columns should have the exact same values.


We only really care about the last column, and even then we're more
concerned with the average value being 2bytes x sample rate.

Perfect then, I was worried about that. That's the output to the command
that you asked:

39.8 MiB / 1.001 sec = 39.8 MiB/second
40.1 MiB / 1.001 sec = 40.1 MiB/second
40.1 MiB / 1.001 sec = 40.1 MiB/second
39.8 MiB / 1.001 sec = 39.8 MiB/second
40.1 MiB / 1.001 sec = 40.1 MiB/second
40.1 MiB / 1.001 sec = 40.1 MiB/second
39.8 MiB / 1.001 sec = 39.8 MiB/second
40.1 MiB / 1.001 sec = 40.1 MiB/second
40.1 MiB / 1.000 sec = 40.1 MiB/second
40.1 MiB / 1.000 sec = 40.1 MiB/second
39.8 MiB / 1.001 sec = 39.8 MiB/second
40.1 MiB / 1.001 sec = 40.1 MiB/second

It means that I could use such a high sample rate without problem?
For higher rates than 20 MHz it prints "couldn't transfer any bytes for one
second."


It look like you're going to be fine up to 20MHz, which is the max
bandwidth for HackRF, so that's great.


On 01/02/2017 1:46:33, Dominic Spill <dominicgs at gmail.com> wrote:
On 31 January 2017 at 17:17, Marc Pàmies Massip <mpamies247 at gmail.com>
wrote:
>
> I am using a HackRF with my laptop (HP Spectre from 2016), but I am not
sure if its USB ports are good enough for this device. You can find
attached the output of "hackrf_transfer -r NUL -s 8000000", and as you can
see the values from the first column are not always the same as in the
second column. I was using the minimum sample rate recommended for the
HackRF (8 MHz), so does it mean that I should use another computer to
obtain reliable results? Is there a way to fix this without changing the
computer or I should just work with sample rates under the minimum
recommended?

This output looks good to me, at 8MHz we expect a pair of bytes 8 million
times per second, which matches the data rate you are seeing - 16MB/s.
Could you try the same with "hackrf_transfer -r /dev/null -s 20000000" to
see what the maximum throughput you can achieve is?  I would expect you to
get an average of 40MB/s with that.  You can even try pushing it higher
than 20MHz, but you will approach the limit of the USB 2.0 connection very
quickly and the throughput will drop.

> PD: I don't know if it has anything to do with this, but according to the
output of "hackrf_info" my firmware version is 2014.08.1. Should I upgrade
it or it's not necessary?

Yes, it is always recommended to run the latest release host code and
firmware.  The current version is 2015.07.2.

Thanks,
  Dominic
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist9.pair.net/pipermail/hackrf-dev/attachments/20170131/39370caf/attachment.html>


More information about the HackRF-dev mailing list