flightaware / dump1090

Dump1090 is a simple Mode S decoder for RTLSDR devices
Other
880 stars 233 forks source link

dev branch soapy sdr support; how to get parameter and their names #231

Open rush0815 opened 8 months ago

rush0815 commented 8 months ago

Hi folks, finally soapy sdr support has been included in the dev branch. But from where can I get all the parameters that are possible for soapy driven devices:

--device select/configure device --channel select channel if device supports multiple channels (default: 0) --antenna select antenna (default depends on device) --bandwidth set the baseband filter width (default: 3MHz, SDRPlay: 5MHz) --enable-agc enable Automatic Gain Control if supported by device --gain-element : set gain in dB for a named gain element

To open a device I need to put in --device device_id=<whatever SoapySDRUtil --find put out> What else can I put into --device ? What format should/can it have?

From where can I get for antenna names? From where can I get : for gain settings?

I testet dump1090 --device-type soapy --device device_id=1 --bandwidth 1800000 --enable-agc for my rtl-sdr stick. But that seems to no work because the startup gives:

soapy: driver key: RTLSDR soapy: hardware key: R820T [R82XX] PLL not locked! soapy: total gain: 49.6dB; TUNER=49.6dB soapy: frequency: 1090.0 MHz soapy: sample rate: 2.4 MHz soapy: bandwidth: 0.0 MHz soapy: AGC mode: manual soapy: antenna: RX

So it looks like --bandwith and --enable-agc has no impact.

The same with a LimeSDR mini look so: ... [INFO] RX LPF configured [INFO] Selected RX path: LNAW [WARNING] Rx LPF min bandwidth is 4MHz when TIA gain is set to -12 dB [INFO] RX LPF configured soapy: total gain: 0.0dB; TIA=0.0dB; LNA=12.0dB; PGA=-12.0dB soapy: frequency: 1090.0 MHz soapy: sample rate: 2.4 MHz soapy: bandwidth: 1.8 MHz soapy: antenna: LNAW soapy: DC offset mode: automatic soapy: DC offset: I=0.000 Q=0.000 ... Here I can also see how the gain elements are named. Well, but I have to start the program first to get it out.

Maybe @mutability could post some example calls for all that options ?

rush0815 commented 8 months ago

Btw: --gain-element TIA: does not work on a LimeSDR mini. I will set TIA to 0

mutability commented 8 months ago

Most of your questions are probably better addressed by the SoapySDR or individual driver documentation.

What else can I put into --device ? What format should/can it have?

See https://github.com/pothosware/SoapySDR/wiki/DriverGuide#registration-api It's basically just a driver-specific list of key/value args.

From where can I get for antenna names? From where can I get : for gain settings?

See SoapySDRUtil --probe=<device> output

So it looks like --bandwith and --enable-agc has no impact.

--bandwidth works fine here, perhaps your driver is old.

--enable-agc handling looks like a general bug/oversight in SDR-driver-specific option handling (the option is being consumed early by the rtlsdr driver and never gets seen by the soapysdr driver)

mutability commented 8 months ago

1b4fd182c4e991e42e9f3b814454eb1204356887 and 9160dba3710655bcb50bbbd4c48ad07b2f3163d2 on the dev branch should fix --enable-agc

$ ./dump1090 --device-type soapy --device driver=rtlsdr --enable-agc --bandwidth 1800000
Fri Nov 10 18:20:02 2023 +08  dump1090-fa unknown starting up.
Found Rafael Micro R820T tuner
soapy: selected device:  driver=rtlsdr, label=Generic RTL2832U :: PS10, manufacturer=Realtek, product=RTL2832U, serial=PS10, tuner=Rafael Micro R820T
[INFO] Opening Generic RTL2832U :: PS10...
Found Rafael Micro R820T tuner
soapy: hardware info:  index=0, origin=https://github.com/pothosware/SoapyRTLSDR
soapy: driver key:      RTLSDR
soapy: hardware key:    R820T
[R82XX] PLL not locked!
soapy: total gain:      0.0dB; TUNER=0.0dB
soapy: frequency:       1090.0 MHz
soapy: sample rate:     2.4 MHz
soapy: bandwidth:       1.8 MHz
soapy: AGC mode:        automatic
soapy: antenna:         RX
soapy: freq correction: 0.0 ppm
[INFO] Using format CS16.
Allocating 15 zero-copy buffers