-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RTL-SDR bias tee #213
RTL-SDR bias tee #213
Conversation
…ySDR support. This also adds support for SDRPlay RSP devices via SoapySDRPlay3.
…Remove SOAPY.hw_key.
The RTL-SDR V3 dongle allows software control of the bias tee DC injection. This new option allows control of that feature.
This will need conditional compilation for pre-0.6 librtlsdr (and unfortunately that will need to be fed in externally as librtlsdr does not appear to expose an API version in its headers) |
Good point about the old library versions. I hadn't expected versions so old to still be relevant but I support the aim for wide compatibility. Would you prefer this to be an optional feature? (Edited to remove the suggestion of compile-time detection by looking for rtl_tcp.h header inclusion. That only applied to the librtlsdr/librtlsdr version, not steve-m/librtlsdr.) |
After discovering there are multiple librtlsdr sources, with different versioning, I've removed my previous mention of potential compile-time detection. |
Included by default. Disabled if built with RTLSDR_BIASTEE=no
Yeah librtlsdr versioning is all a bit of a nightmare :( I think doing it in the Makefile should be fine. For package builds we can embed the knowledge of what the corresponding Debian librtlsdr package supports in the rules file. |
The rtlsdr library in Debian stretch does not support bias tee, the on in buster and later versions does. In case RTLSDR_BIASTEE is not set it is now disabled by default. Builders will have to enable it explicitly.
Bias tee support is included in versions 0.5.4 and 0.6.0 of steve-m/librtlsdr but not in those versions of librtlsdr/librtlsdr. So instead of doing a version check, this script reads the header file.
… be specified more than once.
… arch will be in a package build.
…o bkoehm-soapysdr2022
* if more than one device matches, complain and report matching candidates * if no devices match, complain and report all candidates Generally we don't want to pick an arbitrary device because there's no guarantee it's useful, e.g. Ubuntu installs tend to have a pulseaudio driver source that enumerates first and which we definitely don't want to use.
This is a little more generic than having hardware-specific flags in the SOAPY struct: look at the driver key and decide to override defaults based on that. (also, the old code would trigger if _any_ connected device was a sdrplay, not only if the selected device was)
* don't try to set a gain if AGC is enabled * move parsing of gain elements to the point we open the device * just use a flat array for gain element storage, not a list * default gain is the maximum supported gain reported by soapy
This was originally from an old @mutability branch, updated by @bkoehm, with some final cleanup by @mutability again (limited testing so far; each soapysdr driver tends to have its own quirks..)
The semantics for unsigned bitfields are somewhat confusing -- they are promoted to signed ints in many contexts. And we don't really care about the small difference in storage size. Keep single-bit bitfields since we're generally using those as booleans, not integers. Corresponding format-string changes.
These altitudes can be negative in DO-260A (v1) Target State and Status messages; previously we'd accidentally cast those to unsigned, producing a bogus large positive altitude.
We retain --no-restart-after-upgrade so that dump1090 is stopped in prerm and restarted in postinst, not because dump1090 will be confused by running during an upgrade, but because on low-resource machines like a Pi Zero, dump1090's CPU use can significantly slow down the upgrade process.
This switches us to using dh_installsystemd, and fixes some service-restart-on-upgrade paths. compat 12 was introduced in buster, so this won't work on stretch, but we no longer support stretch so that's OK.
On buster/bullseye this bug is unfixed and the service won't be correctly stopped/restarted if the old package version doesn't stop the service in prerm.
The RTL-SDR V3 dongle allows software control of the bias tee DC injection. This new option allows control of that feature.
Included by default. Disabled if built with RTLSDR_BIASTEE=no
The rtlsdr library in Debian stretch does not support bias tee, the on in buster and later versions does. In case RTLSDR_BIASTEE is not set it is now disabled by default. Builders will have to enable it explicitly.
Bias tee support is included in versions 0.5.4 and 0.6.0 of steve-m/librtlsdr but not in those versions of librtlsdr/librtlsdr. So instead of doing a version check, this script reads the header file.
…into RTL-SDR-bias-tee
merging a year's worth of commits from main made the feature branch a mess |
The rtl-sdr.com V3 dongle allows software control of the bias tee DC injection. This new option allows control of that feature.