Skip to content

HackRF gain settings in Gnuradio using Osmocom #1674

@khusros

Description

@khusros

What outcome were you hoping for?

I don't know how to map GnuRadio Osmocom Source gains to HackRF Rx chain gains.
I assume the following mapping:
Hack RF Rx amplifier
Osmocom RF gain -> RF ("amp", 0 or ~11 dB)
Osmocom IF gain -> IF ("lna", 0 to 40 dB in 8 dB steps)
Osmocom BB gain -> baseband ("vga", 0 to 62 dB in 2 dB steps)

qpsk_example_rx_only.py

What outcome actually happened?

rf_gain=0, if_gain=0, bb_gain=0, peak FFT output power is -26dB
rf_gain=0, if_gain=0, bb_gain=2, peak FFT output power is -44dB (HOW CAN THIS BE?)
But
if_gain=0, if_gain=0, bb_gain=8, peak FFT output power is -38dB (SEEMS OK)
But then!
if_gain=0, if_gain=8, bb_gain=8, peak FFT output power is -45dB (HOW CAN THIS BE?)

What operating systems are you seeing the problem on?

Raspberry Pi 5 running Debian

What is the output of hackrf_info?

asr1@asr1:~/Downloads $ hackrf_info
hackrf_info version: 2024.02.1
libhackrf version: 2024.02.1 (0.9)
Found HackRF
Index: 0
Serial number: 000000000000000066a062dc246c959f
Board ID Number: 2 (HackRF One)
Firmware Version: 2024.02.1 (API:1.08)
Part ID Number: 0xa000cb3c 0x0058435c
Hardware Revision: r10
Hardware appears to have been manufactured by Great Scott Gadgets.
Hardware supported by installed firmware:
HackRF One

Found HackRF
Index: 1
Serial number: 0000000000000000675c62dc323f98cf
Board ID Number: 4 (HackRF One)
Firmware Version: 2024.02.1 (API:1.08)
Part ID Number: 0xa000cb3c 0x00544762
Hardware Revision: r9
Hardware appears to have been manufactured by Great Scott Gadgets.
Hardware supported by installed firmware:
HackRF One

Are you using any third-party software?

GNU radio 3.10.12.0 (Python 3.13.5)

Are you using any third-party hardware?

No.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions