This diff below is actually 2 changes. When scanning it will print the frequency to stderr every time something breaks squelch. When searching/scanning a range it logs active frequencies into a file in /tmp.
Two notes: there's an extra \n at the start of each frequency announcement, that's to get around sox's output. If you use something like aucat that doesn't write to the console you don't need that.
The file path should be ifdefed and an appropriate Windows path added.
This diff was taken before my fix to the scanning step, which may change the context slightly.
Alan
*** rtl_fm_original.c Wed May 22 13:18:00 2013
--- rtl_fm.c Wed May 22 13:32:53 2013
***************
*** 76,82 ****
--- 76,86 ----
static int *atan_lut = NULL;
static int atan_lut_size = 131072; /* 512 KB */
static int atan_lut_coef = 8;
+ static int f_ann = 0; /* freq announced */
+ static int searching = 0;
+ static FILE *flog; /* frequency log */
+
struct fm_state
{
int now_r, now_j;
***************
*** 587,592 ****
--- 591,603 ----
return;
}
sr = post_squelch(fm);
+ if ((sr > 0) && (f_ann == 0) && (fm->freq_len > 1)) {
+ fprintf(stderr, "\n%f\n",(double)fm->freqs[fm->freq_now]/1000000.0);
+ f_ann = 1; /* reset next hop */
+ if (searching > 0) {
+ fprintf(flog,"%f\n",(double)fm->freqs[fm->freq_now]/1000000.0);
+ fflush(flog);
+ }
if (!sr && fm->squelch_hits > fm->conseq_squelch) {
if (fm->terminate_on_squelch) {
fm->exit_flag = 1;}
***************
*** 609,614 ****
--- 620,626 ----
/* ignore under runs for now */
fwrite(fm->signal2, 2, fm->signal2_len, fm->file);
if (hop) {
+ f_ann = 0;
freq_next = (fm->freq_now + 1) % fm->freq_len;
optimal_settings(fm, freq_next, 1);
fm->squelch_hits = fm->conseq_squelch + 1; /* hair trigger */
***************
*** 676,681 ****
--- 688,696 ----
stop[-1] = '\0';
step = strchr(stop, ':') + 1;
step[-1] = '\0';
+ flog = fopen("/tmp/freqlog.txt","a");
+ if (flog != NULL)
+ searching = 1;
for(i=(int)atofs(start); i<=(int)atofs(stop); i+=(int)atofs(step))
{
fm->freqs[fm->freq_len] = (uint32_t)i;
-----
Radio Astronomy - the ultimate DX
This only affects scanning, or specifically searching a range of frequencies. I could hear it in the example from usage -f 118M:137M:25k. For some reason the step changes as the loop executes so the frequencies look like:
118950000
118975000
119000000 ok to here
119257000
119282000
119307000
119332000
119357000
119382000
119407000
119432000
119457000
119482000
119507000
119532000
119789000
119814000
119839000
119864000
The frequencies should be at 25 KHz intervals.
I don't have a diff because I have several other changes in my version, but my frequency_range() now looks like:
void frequency_range(struct fm_state *fm, char *arg)
{
char *start, *stop, *step;
int i;
int frst, frstp, frdelta;
start = arg;
stop = strchr(start, ':') + 1;
stop[-1] = '\0';
step = strchr(stop, ':') + 1;
step[-1] = '\0';
frst = (int)atofs(start);
frstp = (int)atofs(stop);
frdelta = (int)atofs(step);
fprintf(stderr,"start: %i, stop: %i, step: %i\n",frst,frstp,frdelta);
// step was changing here somehow:
// for(i=(int)atofs(start); i<=(int)atofs(stop); i+=(int)atofs(step))
for (i=frst; i<=frstp; i+=frdelta)
{
fm->freqs[fm->freq_len] = (uint32_t)i;
fm->freq_len++;
}
stop[-1] = ':';
step[-1] = ':';
}
I added the fr* variables and used them in the loop. It sounds better now that none of the frequencies are off. I'm also logging and those frequencies look OK.
Alan
-----
Radio Astronomy - the ultimate DX
Hello All
This is the first time I have posted on this list, sorry if I have done it
wrong
I would like to use a line powered "cheap and nasty" LNA with an RTL dongle.
E.g.
http://www.amazon.co.uk/Satellite-Signal-Amplifier-Booster-electrosmart%C2%…
This may seem a like stupid question (I will ask it anyway) but will the
dongle need protecting from the 18V going down the antenna line. I have
seen some diagrams with protection and some without.
If protection is required, has anyone got any suggestions on how I should
do it???
Many thanks
Jonathan, M0ZJO
Hi all,
I need some help to resolve my problem with GNURADIO.
I Built and installed rtl-sdr and it works well with the dongle
terratec.
Built and install also the osmosdr package, but when I open grc the
block sources rtl does'nt appear.
Any ideas?
GNUradio for debian package v.3.5.3.2-1 installed.
Best regards
Laurent
Hi there!
I would like to know if is it possible to change the freq. of rtl_fm "on
the fly" without cloning the process and restart it with a a different
freq. parameter.
Any idea?
I've recently developed a RTL-SDR component for REDHAWK that uses the
RTL-TCP server.
https://github.com/Axios-Engineering/acquisition-components
I'm guessing that this mailing list is the correct address to use for this
component to be listed on the "Known Apps" page for the RTL driver.
~Michael
From: LD Zhang [mailto:ldz10565@gmail.com]
Sent: Monday, May 13, 2013 2:23 PM
To: 'osmocom-sdr(a)lists.osmocom.org'
Subject: A question on osmoSDR new version
Hello,
I am very interested in the new osmoSDR that has 4MS/s rate and a 14bit ADC.
Is this new version available for purchase?
Thanks,
LD
Ah, OK - I've got you.
You also need to run the script once you have launched rtl_tcp using the command in step 3) below.
The simplest way to do this would be to add a step:
6) Sign in to rPi with a new terminal session, leaving the old one open for now. cd to the directory where you created the script and then run it using this command:
./rtl-robot (or whatever you called the script)
You could run the script from the same terminal that you launched rtl_tcp from if you used & to force rtl_tcp to detach from the console and run in the background.
I'll edit the comments on the script to make that a bit clearer...
Thanks!
Simon
----- Original Message -----
From: "Favati" <smile_k(a)libero.it>
To: osmocom-sdr(a)lists.osmocom.org
Sent: Saturday, 11 May, 2013 20:14:36 GMT +00:00 GMT Britain, Ireland, Portugal
Subject: Re: Raspberry Pi based remote SDR head
> Could you describe exactly the steps you have taken?
1) installed wiringpi (and tested as described on the developer site)
2) created your script
3) launched this command:
stdbuf --output=0 rtl_tcp -a 192.168.2.15 -p 1234 > rtl.data
4) used sdrsharp to connect to my raspberry (192.168.2.15, and it
connect ok, i can use sdrsharp ok)
5) nothing is displayed on the console of my raspy except the first 2
lines of rtl_tcp output
The rtl_data is created ok and looking inside that file i can see the
normal output of "rtl_tcp" (set freq blablablabla, etc...)
At the moment i've taken another approach...i've patched the rtl_tcp.c
to set the gpio directly...i'll post my "project" asap somewhere...
Hi there,
That's odd - do you have WiringPi installed?
https://projects.drogon.net/raspberry-pi/wiringpi/download-and-install/
The script makes use of this excellent program to control the GPIO and also to report on the pin status. Originally I was using the native method of controlling the GPIO using export and echoing a value to the files on the pi. I stumbled onto WiringPi, which makes controlling the pins far simpler and does not require root privs to set them up.
Simon
----- Original Message -----
From: "Favati" <smile_k(a)libero.it>
To: osmocom-sdr(a)lists.osmocom.org
Sent: Thursday, 9 May, 2013 18:30:51 GMT +00:00 GMT Britain, Ireland, Portugal
Subject: Re: Raspberry Pi based remote SDR head
Il 03/05/2013 01:57, Simon PurplePlaNET ha scritto:
> Hi folks,
>
> I've been messing around with rtl_tcp and an RTL2832 device on a Raspberry Pi and want to add a bank of front end filters and a LNA that can be controlled by the GPIO.
>
> I want to allow manual control of the signal path via a web page hosted on the Pi, but also want to be able to have the filters selected automatically based on the frequency that the RTL device is tuned to.
>
> I noticed that rtl_tcp helpfully echos the frequency changes to the console, so I wrote a simple shell script to gather this data and control the GPIO.
>
> Somebody may have already done this and there is probably a better way to achieve it but, if this would be of any use to you, please feel free to copy and use as you wish.
>
> http://www.purpleplanet.org/?q=rtl-robot
>
> Cheers,
>
> Simon
>
>
>
Just tryed this command:
stdbuf --output=0 rtl_tcp -a 192.168.2.15 -p 1234 > rtl.data
I don't have anything connected to the gpio pins...but i cannot see any
output from your script while changing freqs...(yes, i've gone below
100mhz and above 500mhz).
It's quite strange....the rtl.data is created in the same folder of your
script...
Taking a look at rtl.data, it contains the correct output of the
standard output of rtl_tcp.
Any idea?
Hi Alan,
Where I live, the temperature extremes inside my attic are not so bad.
If you look at devices such as the Kinetic SBS 3, you will see that Ethernet ports are becoming quite normal on SDR gear these days. This not only allows you to minimise the cable run to the antenna (important at 1090MHz) but also to use the device from anywhere with an adequate network connection to it.
http://www.kinetic-avionics.com/
A 500 foot drum of RG-6 may only cost $32 at Home Depot, but you would need over 30,000 such drums to reach the closest Home Depot from my home. Quite an outlay when we already have the wealth of a global telecommunications industry at our fingertips and begging to be used!
My main reason for doing this however, is really to make a better radio than the RTL dongle provides on it's own. I am interested in front end filtering and an LNA and want to use the rPi to control this. You could still run 500' of lossy co-ax to the antenna if you wanted to... :-)
I could buy a Funcube Pro+ Dongle for £150 instead, but where is the fun in that?
Simon
----- Original Message -----
From: "Alan Corey" <alancorey(a)yahoo.com>
To: osmocom-sdr(a)lists.osmocom.org
Sent: Friday, 10 May, 2013 03:39:55 GMT +00:00 GMT Britain, Ireland, Portugal
Subject: Re: Raspberry Pi based remote SDR head
To no one in particular: The usefulness of doing this escapes me. Sure you'd want to put the receiver up high, but in an attic? There are all kinds of temperature extremes up there, from very hot most of the year to below freezing in colder climates in the winter.
Something like a 1-transistor preamp feeding some RG-6 seems like a more practical solution. You can buy 500 feet of RG-6 for about $32 at Home Depot and good low-noise transistors are available under $1. You just need enough gain to offset the cable loss and RG-6 is pretty good.
Alan
-----
Radio Astronomy - the ultimate DX
--- On Thu, 5/2/13, Simon PurplePlaNET <simon(a)purpleplanet.org> wrote:
From: Simon PurplePlaNET <simon(a)purpleplanet.org>
Subject: Raspberry Pi based remote SDR head
To: osmocom-sdr(a)lists.osmocom.org
Date: Thursday, May 2, 2013, 7:57 PM
Hi folks,
I've been messing around with rtl_tcp and an RTL2832 device on a Raspberry Pi and want to add a bank of front end filters and a LNA that can be controlled by the GPIO.
I want to allow manual control of the signal path via a web page hosted on the Pi, but also want to be able to have the filters selected automatically based on the frequency that the RTL device is tuned to.
I noticed that rtl_tcp helpfully echos the frequency changes to the console, so I wrote a simple shell script to gather this data and control the GPIO.
Somebody may have already done this and there is probably a better way to achieve it but, if this would be of any use to you, please feel free to copy and use as you wish.
http://www.purpleplanet.org/?q=rtl-robot
Cheers,
Simon