dvdesolve / glrpt

Interactive GUI application for receiving, decoding and displaying LRPT images from the Russian Meteor-M type of weather satellites
GNU General Public License v3.0
34 stars 6 forks source link

glrpt config won't recognized biastee args for airspy R2 #11

Open jharwinbarrozo opened 3 years ago

jharwinbarrozo commented 3 years ago

Probing airspy using SoapySDRUtil shows bias tee can be enabled by [key=biastee, default=false, type=bool] $ SoapySDRUtil --probe="driver=airspy"

######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

Probe device driver=airspy

----------------------------------------------------
-- Device identification
----------------------------------------------------
  driver=Airspy
  hardware=Airspy
  serial=####################

----------------------------------------------------
-- Peripheral summary
----------------------------------------------------
  Channels: 1 Rx, 0 Tx
  Timestamps: NO
  Other Settings:
     * Bias tee - Enable the 4.5v DC Bias tee to power SpyVerter / LNA / etc. via antenna connection.
       [key=biastee, default=false, type=bool]
     * Bit Pack - Enable packing 4 12-bit samples into 3 16-bit words for 25% less USB trafic.
       [key=bitpack, default=false, type=bool]

----------------------------------------------------
-- RX Channel 0
----------------------------------------------------
  Full-duplex: YES
  Supports AGC: YES
  Stream formats: CS16, CF32
  Native format: CS16 [full-scale=32767]
  Antennas: RX
  Full gain range: [0, 45] dB
    LNA gain range: [0, 15] dB
    MIX gain range: [0, 15] dB
    VGA gain range: [0, 15] dB
  Full freq range: [24, 1800] MHz
    RF freq range: [24, 1800] MHz
  Sample rates: 10, 2.5 MSps

Testing rate using SoapySDRUtil:
$ SoapySDRUtil --args="driver=airspy,biastee=true" --rate=5ps --direction=RX I can confirmed, that the 5V is really present in the center conductor of the sdr device. biastee=false will disable it.

Now if I go to Meteor-M2.cfg and edit it to activate the bias tee:

## SDR device settings

device: {
    # SoapySDR device driver name. You can find supported drivers by running:
    # SoapySDRUtil --info | grep "Available factories"
    # and picking the right one. Special value "auto" will select SDR receiver
    # that matches specified device index
    #
    # Default value: "auto"
    # Type: string <optional>
    # Valid values: any supported by SoapySDR
    driver = "airspy,biastee=true"

    # SoapySDR device index
    #
    # Default value: 0
    # Type: uint <optional>
    # Valid values: 0 <= index <= 255
    index = 0
}

then running glrpt and clicking start, always gives me an error:

Welcome to glrpt 2.6.0
Decoding of LRPT Images Started
Searching for SDR Device "airspy,biastee=true"
No Device: "airspy,biastee=true" Index:0 found
Failed to Initialize SoapySDR

Anyone knows how to enable biastee on glrpt? Not sure if this really an issue or something I am doing incorrectly.

Thanks

dvdesolve commented 3 years ago

I have no AirSpy at hand by I've used RTLSDR v3 Bias Tee feature well with glrpt. Currently bias tee isn't managed by glrpt/mlrpt at all, it's up to the user environment to enable it. For example, with RTLSDR v3 I do the following before running glrpt:

$ rtl_biast -b 1

After that glrpt just initializes SoapySDR without touching bias tee settings at all. I'm pretty sure that similar approach will work for AirSpy. Also driver name should get plain values for driver names without specifying any extra options, e. g.: rtlsdr, airspy, auto et al

jharwinbarrozo commented 3 years ago

Wow, that's a very quick response!

It make sense now. Got an idea from your answer so I created a bash script to run first this "SoapySDRUtil --probe="driver=airspy,biastee=true" to enable the biastee via SoapySDRUtil then start the glrpt afterwards.

Now, it works!

dvdesolve commented 3 years ago

I want to keep this open so I'll not forget to implement Bias-T control in GUI