0
$\begingroup$

My question relates to the specific programming of an R820T/ R820T2 based SDR for a specific frequency.

I'm trying to build a self contained and auto initializing Raspberry Pi 4-based (ignore that detail, not central to the question) Automated Dependant Surveillance Broadcast (ADS-B) data signal receiver/ decoder because I'm an airplane nerd.

I'm only interested in the 1090MHz band of ADS-B (There is a US-only secondary system for General Aviation aircraft called UAT which operates on 978MHz which I don't need), and if anyone can tell me where the specific 1090MHz frequency is configured.

SDR manufacturers offer pre-programmed SDR units which arrive apparently set to 1090MHz already. I'm trying to figure out how one goes about setting this frequency, or any frequency the SDR is capable of, but can't find a simple answer.

I am actually starting to wonder if the factory pre-programming is actually not a thing and they just tell them ignorant like me to keep me depending on them. This would indicate that the decoder software (Dump1090) is responsible for setting the SDR to the appropriate frequency every time the power initiation script on the Raspberry Pi runs.

How do I set the RX frequency on a R820T/ R820T2 based Software Defined Radio, that maybe I'm trying to do some Amateur Radio shenanigans with?

$\endgroup$
5
  • $\begingroup$ Hello and welcome to ham.stackexchange.com! $\endgroup$ – rclocher3 Mar 3 at 2:31
  • 1
    $\begingroup$ I'm not a moderator @BigNutz, so please take my comments with a grain of salt. I read Phil's edits, and other than changing the spelling of "chinanigins", which he probably thought was an ordinary misspelling, the edits seem designed to streamline the question and strip out aside remarks. This is a common practice here that is encouraged; we often strip "please" and "thank you" from questions and answers. Phil was only trying to help. Please feel free to express your opinions, but we ask everyone to be kind, respectful, and polite. $\endgroup$ – rclocher3 Mar 4 at 18:07
  • 1
    $\begingroup$ I believe you do have the right to revert edits to your question. If you don't, you could always ask a moderator. The moderators here are active and helpful, IMO. $\endgroup$ – rclocher3 Mar 4 at 18:09
  • $\begingroup$ I know, I don't actually harbor any ill will about it. If I was that butt hurt about it, I suppose I could leave. That said, the culture the Stack Exchange platform operates in fascinates me more than anything. There are weird rules which I don't see the value of maintaining. But, this isn't my house, it's Phil and your house, so my not understanding anything about it is catagorically irrelevant. I do appreciate your messages though. I can be obnoxious, but it's always in the spirit of having fun. $\endgroup$ – BigNutz Mar 4 at 19:50
  • $\begingroup$ Right on @BigNutz, for me personally that spirit of participation works! Yes the culture is very different here, and the rules can seem weird, but I like the SE sites: the signal-to-noise ratio is better, there are a lot fewer blowhards, and we have no trolls. Stick around for a while and it'll be your house too. $\endgroup$ – rclocher3 Mar 4 at 20:02
3
$\begingroup$

A lot of the RTL-SDR code is open source on GitHub. This code runs just fine on a Raspberry Pi 3B or 4.

The C code inside rtl_tcp to set the frequency is only a few lines long. From a remote system, after starting the TCP connection, send 5 bytes, 1st command byte 0x01, then 4 bytes containing the desired frequency in little-endian 32-bit integer format. One also usually needs to set the sample rate, which uses a first command byte of 0x02. (I use a network connection to set the SDR frequency and sample rate from my iPhone.)

If you want to use RTL2832 USB dongles for the amateur radio HF bands, note that frequencies below 30 MHz or so require using an HF Direct Sampling mode that completely bypasses the R820T2 tuner chip. Some models of USB dongle require circuit board modifications to do this. Others vendors have the Direct Sampling feature built-in to their RTL-SDRs.

R820T/RTL-SDR dongles are easily overloaded from nearby strong broadcast transmissions. The USB dongles sold for ADS-B often have RF band-pass filtering to block out interference from other frequency bands, possibly as part of an added LNA RF front-end. Those models may or may not be suitable for use on amateur bands (without circuit modification).

A forum with a lot of SDR Q&A activity related to RTL-SDRs is https://www.rtl-sdr.com

$\endgroup$
3
  • $\begingroup$ Outstanding answer, thank you for taking the time to educate me. I'm using the newer Nooelec Nano 3 SDRs, which are small enough to accommodate filling all 4 Raspberry Pi USB ports with a unique SDR. My needs don't require such tomfoolery, but I like the size of that model which opens up integration options in tight quarters. Again, thanks for the knowledge, if you ever want to know WAY to much about that ADS-B system, I've been cursed with a subject matter expert's level of system understanding. $\endgroup$ – BigNutz Mar 3 at 3:50
  • $\begingroup$ I had one of those. It was small, overheated, and died after a couple months use. Replaced it with a larger RTL-SDR v3 unit that seems to have much better heat dissipation. $\endgroup$ – hotpaw2 Mar 3 at 5:19
  • $\begingroup$ I agree that the RTL-SDR kids have the industry's benchmark product with that v3 unit. I like the bias tee toggle capabilities too. The issue for my application really boils down to size. Even if I remove the alum encasement, I'm unable to make it work with my specific application. I did communicate with the manufer of the Nano 3, and they acknowledged the early versions weren't shedding waste heat effectively, & insisted that they tweaked the unit to mitigate the issue. I've been running a couple beta builds using them for a couple weeks without issue. I'll try potting compound if needed. $\endgroup$ – BigNutz Mar 3 at 5:31
1
$\begingroup$

This would indicate that the decoder software (Dump1090) is responsible for setting the SDR to the appropriate frequency

Yes, this is exactly what happens. You can see the relevant code here: https://github.com/antirez/dump1090/blob/master/dump1090.c#L381

The function that dump1090 calls, rtlsdr_set_center_freq() and all other functions that start with rtlsdr_ are from the rtl-sdr library, some of them are documented in the main header file: https://github.com/osmocom/rtl-sdr/blob/master/include/rtl-sdr.h

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.