Skip to main content

Frequency Sweep

Jia-YinAbout 1 mincomm

Frequency Sweep

Frequency Sweep is a common wireless radio testing method used to analyze signal strength and activity within a specific frequency range. By combining HackRF One with GNU Radio, this operation can be effectively performed to explore and analyze the wireless signal environment.

GNU Radio Project

  1. There are two modules in GRC that can be used to receive signals from HackRF One: Osmocom and Soapy HackRF.

  2. Using Osmocom as the signal source, set Sample_Rate=8e6, Ch0_Frequency=100e6, and Freq_Sink's Center_Freq=100e6 as shown in the figure below:

The Sample Rate of the Osmocom Source indicates the sampling speed when receiving radio signals, set here as 8e6, meaning there are 8 million signal points per second. Ch0 Frequency represents the center frequency of reception, set here as 100e6, which is 100 MHz. The received signal is centered at 100 MHz in the radio wave, with an effective bandwidth of 4 MHz, meaning the radio signal received is in the frequency range of 96~104 MHz, which can be seen as a baseband signal.

Gain at the HackRF One receiver side

When receiving signals, HackRF One can adjust three gain values: RF Gain/IF Gain/Baseband Gain; when transmitting, only RF Gain/IF Gain are effective. For the receiver side, RF Gain actually has only two choices: 0 dB and 14 dB, with other settings automatically adjusted to the nearest value. In this example, setting it to 10 will actually adjust it to 14 dB. One important point to note is that if the signal strength is strong and the gain value is set very high, it may damage the HackRF One hardware. If unsure about the signal strength, start from 0 and adjust to 14 when the signal is too weak. The IF Gain can be adjusted from 0 dB to 40 dB in intervals of 8 dB, setting it too high won't damage the hardware but may cause signal distortion. Lastly, the Baseband Gain can be adjusted from 0 dB to 62 dB in 2 dB intervals, providing the largest adjustment range.

  1. Observe the received signal:

  2. Switch to the Soapy HackRF module, set Sample_Rate=8e6, and Center Freq frequency of HackRF and Freq_Sink to 100e6.

  3. Observe the received signal:

Exercise 2

  1. Gradually adjust the values of IF and BB(VGA) to observe the changes in the received signal.
  2. Try scanning a wider frequency range, for example, from 1 GHz to 3 GHz, and observe and record the activities in different frequency bands.