How does the demodulation done with HackRF? Is the mixed with IF and then the frequency spectrum is shifted to baseband frequency by sampling OR the frequency of the mixer in the hardware can be change by the software to the baseband frequency first and then sampled?
The RF architecture of the HackRF One is diagrammed here:
This is a bit elliptical so I'll explain what I read from it (describing the receive-mode operation; transmit is just the reverse). There are two integrated LO/mixer units:
- One is in the RFFC5072 chip. This is the one that provides the HackRF One's wide tuning range. It mixes the incoming signal to an IF that is within the MAX2837's range. (I don't know whether that's fixed or adjusted for any reason.)
- The MAX2837 chip then mixes that 2.x GHz IF down to baseband (as well as providing configurable gain and filtering).
The baseband IQ signal from the MAX2837 is then sent to the MAX5864 ADC for conversion to digital samples, which are then sent to the host computer.
When transmitting, all of these stages operate in reverse; the MAX5864 works as a DAC instead of an ADC, and the same LOs and mixers are used.
The HackRF One does not use bandpass sampling, as I think you might be asking.
One of the characteristic features of a receiver using an analog baseband I/Q signal is the “DC offset” or “DC spike”, a spurious signal visible at exactly the center frequency of the received samples. You can see this in any waterfall plot:
This is my HackRF One tuned to the FM broadcast band with a mediocre antenna, displayed using my ShinySDR software. You can see the wideband FM signals across the spectrum, and a much narrower unmodulated peak at exactly the center frequency.
As this is SDR, the HackRF hardware presents the received signal as I/Q to the computer. The actual demodulation is done in software.