AlbrechtL / welle.io

A DAB/DAB+ Software Defined Radio (SDR)
https://www.welle.io
Other
626 stars 117 forks source link

[Airspy] Adding support for Airspy (Mini) Bias Tee #260

Closed Kabuse closed 5 years ago

Kabuse commented 6 years ago

I am using an Airspy Mini and an outdoor antenna with a preamplifier mounted directely to the antenna. But since there is no option available in welle.io to turn the internal Bias Tee of the Airspy (Mini) on and off, I can not use welle.io with my setup. So, an option (checkbox) for enabling the Bias Tee, when using an Airspy (Mini) should be integrated.

andimik commented 6 years ago

Thanks for the info, I was looking for that. Seems this can be used, too. See https://github.com/cjcliffe/CubicSDR/issues/402

AlbrechtL commented 6 years ago

I plan to make the receiver dongles configurable via the GUI. Then we can add this as well (honestly this is more a low priority task).

AfromD commented 6 years ago

Same request for another great dongle; the RTL-SDR also has a software-activated bias tee. https://www.rtl-sdr.com/rtl-sdr-blog-v-3-dongles-user-guide/ https://github.com/rtlsdrblog/rtl_biast

/*!
* Enable or disable the bias tee on GPIO PIN 0.
*/
RTLSDR_API int rtlsdr_set_bias_tee(rtlsdr_dev_t *dev, int on);

int rtlsdr_set_bias_tee(rtlsdr_dev_t *dev, int on)
{
 if (!dev)
  return -1;

 rtlsdr_set_gpio_output(dev, 0);
 rtlsdr_set_gpio_bit(dev, 0, on);

 return 1;
}

void rtlsdr_set_gpio_bit(rtlsdr_dev_t *dev, uint8_t gpio, int val)
{
 uint16_t r;

 gpio = 1 << gpio;
 r = rtlsdr_read_reg(dev, SYSB, GPO, 1);
 r = val ? (r | gpio) : (r & ~gpio);
 rtlsdr_write_reg(dev, SYSB, GPO, r, 1);
}
AlbrechtL commented 5 years ago

In 9dfdf7fbb5a71941a8f4c3aba2b0a36027b09d15 I added rtl-sdr and Airspy bias tee support. Please test it and reports issues!