hackrf icon indicating copy to clipboard operation
hackrf copied to clipboard

hackrf_transfer should check input parameters against accepted ranges.

Open martinling opened this issue 3 years ago • 0 comments

Currently, hackrf_transfer -s doesn't check the sample rate or return an error if it is out of range.

This has led to some user confusion e.g:

  • Setting -s 2 for 2MHz without realising that the number is in Hz not Mhz.
  • Setting sample rates above 20MHz, which HackRF will try to use but fail to, resulting in uncontrolled behaviour.

The accepted ranges for all parameters are given in the usage message. We should check all of the parameters against these ranges.

martinling avatar Jan 28 '22 18:01 martinling