RPi 3 & RTL-SDR/OP25?

Status
Not open for further replies.

boatbod

Member
Joined
Mar 3, 2007
Messages
3,648
Reaction score
1,039
Location
Talbot Co, MD
Here's a quick and dirty test. I shut off the internal audio (sockaudio.py) and turned on aplay and after watching for a few minutes I can't really see there's a significant difference between them. The audio seems to play the same (no drops or late starts). The CPU is at about the same %. The only thing is I can see the under-runs in the aplay because of the program not knowing when more data is coming after a transmission stops. I don't see that on sockaudio. Maybe it handles that more gracefully. Mine findings (unscientifically)show that going either way doesn't impact the CPU usage. Like Boatbod says if you want to save some load send the audio to a remote device. I'm happy with my setup.

Mike
Sockaudio looks for special flags inserted in the data stream that denote the end of a voice transmission. Without those you'll get an audio underrun every time.
 

royldean

Member
Joined
Jan 30, 2016
Messages
471
Reaction score
103
Location
Schwenksville, PA
Tried running at -S 274000, but I get a lot of broken transmissions. Started getting decent results at around 350000, but then cpu is at 100% during open squelch, and ~65% at idle. May have to do some more tinkering.

On a side note, I have to hit the ">" key 10 to 12 times every time I start up. Is there a way to integrate that adjustment into the command line or trunk.tsv?
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,648
Reaction score
1,039
Location
Talbot Co, MD
Tried running at -S 274000, but I get a lot of broken transmissions. Started getting decent results at around 350000, but then cpu is at 100% during open squelch, and ~65% at idle. May have to do some more tinkering.

On a side note, I have to hit the ">" key 10 to 12 times every time I start up. Is there a way to integrate that adjustment into the command line or trunk.tsv?

If you have to make such a large tuning adjustment (12,000) at startup, you should consider adjusting PPM correction (-q xxx). For small adjustments less than 1 ppm (~800) you can use the fine_tune (-d xxx) option.

Note:
10 x ">" (1200) = 12,000.
10 x "." (100) = 1000
1 ppm = tuned frequency / 1,000,000. So roughly 700-800 hz if tuned in the 700/800Mhz band.

How far off are you needing to tune? To the right of the lower "frequency" display is a number in parenthesis that is the fine tune correction. Use that to set your fine tuning and ppm.
 

royldean

Member
Joined
Jan 30, 2016
Messages
471
Reaction score
103
Location
Schwenksville, PA
Oops, didn't realize that there was a difference between ">" and "."

I actually was not hitting the shift key, so that 10 to 12 x "."

The pi is at work, I'll boot it up on Monday morning and see what the actual number is.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,648
Reaction score
1,039
Location
Talbot Co, MD
Oops, didn't realize that there was a difference between ">" and "."

I actually was not hitting the shift key, so that 10 to 12 x "."

The pi is at work, I'll boot it up on Monday morning and see what the actual number is.

LOL :) That's why I quoted both...
The idea with the shifted version of the keys is to move exactly 1200 Hz (a 90deg shift) when you see the "tuning error +/- 1200" messages.

Even with 1000 Hz correction you are probably better off adjusting PPM (-q) by +/-1 and then dialing in the fine-tune (-d) to center it up between the limits of the "tuning error" messages that you'll receive if you go too far one way or the other.
 

wildbillx

Member
Premium Subscriber
Joined
Feb 25, 2006
Messages
436
Reaction score
86
Location
Cape May, NJ
Quick question before I start building one, first are you guys getting the audio from RP3 1/8th output or gpio board? Second is anyone running a screen on their RP3 running op25 and third is anyone using the new NooElec NESDR Nano 3. Obviously my idea is a compact portable OP25 box instead of using my laptop with i7 and the full size dongle. Thanks
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,648
Reaction score
1,039
Location
Talbot Co, MD
Quick question before I start building one, first are you guys getting the audio from RP3 1/8th output or gpio board? Second is anyone running a screen on their RP3 running op25 and third is anyone using the new NooElec NESDR Nano 3. Obviously my idea is a compact portable OP25 box instead of using my laptop with i7 and the full size dongle. Thanks

To get the best audio you want the lowest amount of "other stuff" running on your PI3 because cpu is limited compared to an i5/i7. Personally I run my PI3 headless, but it does just have enough juice to run darkice and stream the audio to broadcastify.

The on board 1/8" audio jack works ok, but it's a bit electrically noisy compared to a regular pc. If you have a separate usb sound card that would work too, but you might need to configure the alsa device name (-O devicename) to make sure op25 opens the correct device.

I have several Noelec dongles and with one exception (which they replaced for free) I've had no troubles. Not tried a Nano though. Heat tends to be a problem with the smaller RTL devices, so make sure it is adequately cooled.
 

royldean

Member
Joined
Jan 30, 2016
Messages
471
Reaction score
103
Location
Schwenksville, PA
So far, I use only the onboard 1/8" jack for listening. I agree with Boatbod in that it is pretty noisy, but still works for my meager attempt. No screens, though - just ssh into the pi, start a tmux session, then start op25, then detach from the session and exit from the ssh.

I'm not a linux guy, though, so I'm sure there are better ways at doing this. I do have a usb soundcard that I may give a try sometime this week.
 

n5pwp

Member
Joined
Jan 10, 2015
Messages
302
Reaction score
17
Location
Spring, Texas
Not sure what you guys are talking about the Pi being noisy. I use mine headless also (I use a RDP session to start op25). I have a pair of PC speakers hooked up to the audio jack on the Pi and the audio sounds very nice to me. What are you hearing? Is it scratchy or tinny sounding? You're not running it to an AVR are you?:eek:

I have to second the use of a RTL-SDR.com dongle in the silver case. It is rock-solid and has done a fine job. I have some nanos that I can try out if you'd like. I used them on UniTrunker when I first started and they did OK but they do get hot.

I'm up and running fully on your repo, Graham. I did get thrown for a loop when I saw the little (0) next to the frequency display. I read your explanation here and played with it a little.

Mike
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,648
Reaction score
1,039
Location
Talbot Co, MD
Not sure what you guys are talking about the Pi being noisy. I use mine headless also (I use a RDP session to start op25). I have a pair of PC speakers hooked up to the audio jack on the Pi and the audio sounds very nice to me. What are you hearing? Is it scratchy or tinny sounding? You're not running it to an AVR are you?:eek:

I have to second the use of a RTL-SDR.com dongle in the silver case. It is rock-solid and has done a fine job. I have some nanos that I can try out if you'd like. I used them on UniTrunker when I first started and they did OK but they do get hot.

I'm up and running fully on your repo, Graham. I did get thrown for a loop when I saw the little (0) next to the frequency display. I read your explanation here and played with it a little.

Mike

The Pi3 audio output is electrically noisy; the best description I can give is that you can hear cyclic humming/buzzing/pulsing as the device operates. It's like being able to listen to the cpu doing it's work!

My fine tune offset could do with a little more work - adding it into parentheses after the frequency was easy and functional, but not very elegant. Curses programming is not something I'm overly familiar with, nor have much desire to learn beyond the basics.
 

royldean

Member
Joined
Jan 30, 2016
Messages
471
Reaction score
103
Location
Schwenksville, PA
The Pi3 audio output is electrically noisy; the best description I can give is that you can hear cyclic humming/buzzing/pulsing as the device operates. It's like being able to listen to the cpu doing it's work!

This is a perfect description of what I hear. I'm listening on earbuds, so I can hear everything that gets put out - on speakers you may lose some lower volume higher frequencies.

But in any case, what happens is while I type in commands, etc. I can hear a low hum or buz, and when I run a comand (such as "top"), I can hear this buzzing going on and off at what appears to be arbitrary intervals. Even with the pi just idle (nothing running at all), you will get an occasional buzz or crackle.
 

royldean

Member
Joined
Jan 30, 2016
Messages
471
Reaction score
103
Location
Schwenksville, PA
Interesting. Two things have changed since last week: The control channel seems to have changed on the system I am monitoring, and I mounted my pi in an aluminum housing with fan.

Result is I cannot receive at all. With no -p or -q adjustments, I get either warning of control channel timeouts or tunning errors of +1200 or "+ or - 2400" (which is new to me). No time to troubleshoot today, but figured I'd throw it out. No amount of ,.<> seems to make a difference. installed the latest boatbod build and seems to make no difference.
 

n5pwp

Member
Joined
Jan 10, 2015
Messages
302
Reaction score
17
Location
Spring, Texas
Anyone know of any documentation to explain the op25_stats.sh script file? I read the comments in it and it references two files. One is called logfile and the other is tsv_tagfile. The only log I am aware of is the stderr.2 file in the apps directory. When I tried to run op25_stats.sh stderr.2 tsv_tagfile I got a message back saying that it couldn't find tsv_tagfile. I assumed from the usage note that it would read the logfile and put the data in the tsv_tagfile. I guess not. What it did was to create several files that relate to CCs, frequencies, TGIDs which is what I was reading about in the script file comments. Anyone use this and have any luck with it? Is there another logfile? Do I create the tsv_tagfile? I tried Googling these terms and got no where. I tried searching them in this thread and there is no mention. Is this something that is being developed and its not ready to be used yet? As usual, more questions than answers. ;-)

Mike
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,648
Reaction score
1,039
Location
Talbot Co, MD
Anyone know of any documentation to explain the op25_stats.sh script file? I read the comments in it and it references two files. One is called logfile and the other is tsv_tagfile. The only log I am aware of is the stderr.2 file in the apps directory. When I tried to run op25_stats.sh stderr.2 tsv_tagfile I got a message back saying that it couldn't find tsv_tagfile. I assumed from the usage note that it would read the logfile and put the data in the tsv_tagfile. I guess not. What it did was to create several files that relate to CCs, frequencies, TGIDs which is what I was reading about in the script file comments. Anyone use this and have any luck with it? Is there another logfile? Do I create the tsv_tagfile? I tried Googling these terms and got no where. I tried searching them in this thread and there is no mention. Is this something that is being developed and its not ready to be used yet? As usual, more questions than answers. ;-)

Mike
Log file is stderr.2
Tsv tag file will be the .tsv with tgid to name mapping.

I believe you have to have the log level at -v 2 for it to work.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,648
Reaction score
1,039
Location
Talbot Co, MD
Interesting. Two things have changed since last week: The control channel seems to have changed on the system I am monitoring, and I mounted my pi in an aluminum housing with fan.

Result is I cannot receive at all. With no -p or -q adjustments, I get either warning of control channel timeouts or tunning errors of +1200 or "+ or - 2400" (which is new to me). No time to troubleshoot today, but figured I'd throw it out. No amount of ,.<> seems to make a difference. installed the latest boatbod build and seems to make no difference.
Turn on the mixer plot (key 5) and see if it looks symmetrical. Had the signal strength dropped off?
 

royldean

Member
Joined
Jan 30, 2016
Messages
471
Reaction score
103
Location
Schwenksville, PA
Turn on the mixer plot (key 5) and see if it looks symmetrical. Had the signal strength dropped off?

That will have to wait till next week. Only SSH available today.

On an unrelated note, anybody know of an app that will run from a terminal prompt and will play audio from the rtl_sdr? I'm trying to use rtl_fm, but for some reason it won't demodulate frequencies in the 800mhz band. It'll do broadcast wfm just fine, but I get errors trying to tune into just about anything else. I was trying to "find" the control channel using this method, but because it didn't work I just kept changing the frequency in trunk.tsv until I found one that outputted the "tunning error" into stderr.2.....
 

n5rwc

Newbie
Premium Subscriber
Joined
Nov 2, 2017
Messages
1
Reaction score
0
Location
Irving
Can someone tell me what I need to do here? I am following the installation instructions. I've updated my certs but this still gives an error.

git clone https://git.osmocom.org/op25
Cloning into 'op25'...
fatal: unable to access 'https://git.osmocom.org/op25/': server certificate verification failed.
CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,648
Reaction score
1,039
Location
Talbot Co, MD
That will have to wait till next week. Only SSH available today.

On an unrelated note, anybody know of an app that will run from a terminal prompt and will play audio from the rtl_sdr? I'm trying to use rtl_fm, but for some reason it won't demodulate frequencies in the 800mhz band. It'll do broadcast wfm just fine, but I get errors trying to tune into just about anything else. I was trying to "find" the control channel using this method, but because it didn't work I just kept changing the frequency in trunk.tsv until I found one that outputted the "tunning error" into stderr.2.....

If you are ssh'ing to your pi3 from a linux desktop, you can run "ssh -X" to redirect the xterm to your local machine. Then start and run rx.py normally and activating a plot should make it pop up locally.

The osmocom_fft application will allow you to start an FFT display of the spectrum, much like the old scope.py. It doesn't demodulate, but at least you can see what's going on. Needs an xterm though.
 

royldean

Member
Joined
Jan 30, 2016
Messages
471
Reaction score
103
Location
Schwenksville, PA
Can someone tell me what I need to do here? I am following the installation instructions. I've updated my certs but this still gives an error.

git clone https://git.osmocom.org/op25
Cloning into 'op25'...
fatal: unable to access 'https://git.osmocom.org/op25/': server certificate verification failed.
CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

Check out the last page or two of the main thread (the one about the virtual environment). Boatbod includes how to substitute his repository (or whatever it's called) in place of the osmocom one which doesn't seem to work anymore. Send me a pm if you can't find it and I will forward all the details.

If you are ssh'ing to your pi3 from a linux desktop, you can run "ssh -X" to redirect the xterm to your local machine. Then start and run rx.py normally and activating a plot should make it pop up locally.

Yeah, no go. All I have at work is the "secure shell" plugin for Chrome - no xterm capable interfaces or other linux machines (at home I do, but no access to the RF - but I'll bring my ubuntu lappy-top to the office next week).
 

n5pwp

Member
Joined
Jan 10, 2015
Messages
302
Reaction score
17
Location
Spring, Texas
Log file is stderr.2
Tsv tag file will be the .tsv with tgid to name mapping.

I believe you have to have the log level at -v 2 for it to work.

Thanks for the info. I kicked it up to 10 and you get some more info. I'm still getting some empty files but it might be because the info like what CC is used hasn't shown up in the stderr.2 file yet.

While running the op25_stats script I get an error msg:

: /tmp/tmp.JVE3hJMg5b:6: is not sorted: 100 "EMSARCO Tac"

It's a TG in my tag file but why is it "not sorted"?

I found a typo in the script file also. The echo statements didn't match up for the name of the file and the headers inside the file so the script created two files. One had data in it the other didn't. I have corrected it in my copy. I don't know how you wan't stuff like that reported. It was for the reporting of tagless TGs.

Mike
 
Status
Not open for further replies.
Top