RPi 3 & RTL-SDR/OP25?

Status
Not open for further replies.

boatbod

Member
Joined
Mar 3, 2007
Messages
3,338
Location
Talbot Co, MD
I've reinforced the trunk.tsv format checking a little more and attempted to output some debug clues when things go wrong.

Thanks dsever for the patch to terminal.py. I've incorporated it as a safety measure, but it should never occur because there should never be a case where there is no NAC, especially now that it's harder to bork the config file without it being rejected.
 

WB0VHB

Member
Joined
Oct 30, 2009
Messages
159
Location
Mt. Union, Iowa
You're starting op25 in passive (non-trunked) mode so the terminal isn't going to do a while lot and you won't hear anything because voice decode had not been enabled.

Suggest you add -2 -U to the startup options, then turn on plot #1 (fft) to see if you're close to a signal of any sort.

Just got a V3 connected to the RPi and have some different results.
If I set -q -2 shows -1200 error
-q -1 returns me back to the command prompt
-q 0 shows +1200 error
-q 1 shows +/- 2400 error

I thought sending the following line (adjusting for freq error) would result in a couple of lines NAC SYSID and voice channels?
./rx.py --args 'rtl' -N 'LNA:47' -S 2400000 -f 857.2625e6 -o 25000 -q -2

You mention I won't hear anything because voice decode has not been enabled. I have been following your RPi Part 3 blog and must have missed that part.
 

N6ML

Member
Joined
Sep 26, 2008
Messages
1,275
Just got a V3 connected to the RPi and have some different results.
If I set -q -2 shows -1200 error
-q -1 returns me back to the command prompt
-q 0 shows +1200 error
-q 1 shows +/- 2400 error

I thought sending the following line (adjusting for freq error) would result in a couple of lines NAC SYSID and voice channels?
./rx.py --args 'rtl' -N 'LNA:47' -S 2400000 -f 857.2625e6 -o 25000 -q -2

You mention I won't hear anything because voice decode has not been enabled. I have been following your RPi Part 3 blog and must have missed that part.

What blog is that? If you mean https://www.hagensieker.com/wordpress/2018/07/24/op25-on-a-raspberry-pi-part-3 , that's not boatbod's blog. I don't know who "John" is... but the steps are not really ideal.

Again, it'd really be helpful if you could provide a link to the system that you're attempting to receive.

You have neither a trunk config (-T foo.tsv) nor the -U option (to use the built-in audio player) on your command-line. You should also redirect stderr to a file, so you can diagnose failures.

A suitable command-line might look like:

Code:
./rx.py --args 'rtl' --gains lna:25 -f 772.50625e6 -q -1 -S 960000 -w -U -T mysystem.tsv -v2 2>stderr.log

where mysystem.tsv is a copy of trunk.tsv that has been modified for the system that you want to receive, and 772.50625 would be replaced by that system's control channel frequency.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,338
Location
Talbot Co, MD
It sounds like -q -1 might be the solution, but even if you start with -q 0 you can probably make it work at least temporarily by interactively adjusting the fine tuning via the terminal.

First press "5" to bring up the "mixer" plot (assuming you have gnuplot-x11 package installed)
Then look at the plot and decide which way you need to move the "hump" to center it.
Use the "<", ">", ",", "." keys to adjust the fine tuning by +/-1200, +/-100 respectively until the hump is centered and the tsbk counter starts incrementing.

Before you you all this you do need the -U and -T parameters as previously noted.
 

WB0VHB

Member
Joined
Oct 30, 2009
Messages
159
Location
Mt. Union, Iowa
What blog is that? If you mean https://www.hagensieker.com/wordpress/2018/07/24/op25-on-a-raspberry-pi-part-3 , that's not boatbod's blog. I don't know who "John" is... but the steps are not really ideal.

Again, it'd really be helpful if you could provide a link to the system that you're attempting to receive.

You have neither a trunk config (-T foo.tsv) nor the -U option (to use the built-in audio player) on your command-line. You should also redirect stderr to a file, so you can diagnose failures.

A suitable command-line might look like:

Code:
./rx.py --args 'rtl' --gains lna:25 -f 772.50625e6 -q -1 -S 960000 -w -U -T mysystem.tsv -v2 2>stderr.log

where mysystem.tsv is a copy of trunk.tsv that has been modified for the system that you want to receive, and 772.50625 would be replaced by that system's control channel frequency.

Sorry for my confusion, yes I was following John's tutorial because he made it look so easy. I was at the part in his tutorial where he shows a control channel being decoded listing the NAC Sysid and the voice channels. Can't get those results so I didn't go any further with building a trunk.tsv file.

I'm attempting to receive the new Iowa 700 MHz system. But at this time I don't believe there will be any active dispatching until next month. I've also tried the Illinois Starcomm system

https://forums.radioreference.com/i...operability-communication-system-isics-5.html
 

WB0VHB

Member
Joined
Oct 30, 2009
Messages
159
Location
Mt. Union, Iowa
It sounds like -q -1 might be the solution, but even if you start with -q 0 you can probably make it work at least temporarily by interactively adjusting the fine tuning via the terminal.

First press "5" to bring up the "mixer" plot (assuming you have gnuplot-x11 package installed)
Then look at the plot and decide which way you need to move the "hump" to center it.
Use the "<", ">", ",", "." keys to adjust the fine tuning by +/-1200, +/-100 respectively until the hump is centered and the tsbk counter starts incrementing.

Before you you all this you do need the -U and -T parameters as previously noted.

I tried using -q -1 and was getting the 1200 tuning error. Using the < > keys causes the command line screen to go from showing +-1200 tuning errors to go back to a command prompt. Maybe I need to find a you tube video to know what I should expect to see?
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,338
Location
Talbot Co, MD
I tried using -q -1 and was getting the 1200 tuning error. Using the < > keys causes the command line screen to go from showing +-1200 tuning errors to go back to a command prompt. Maybe I need to find a you tube video to know what I should expect to see?

First I'd recommend you perform a "git pull" from inside the ~/op25 directory hierarchy There was a terminal bug that manifested itself the other day, but fixes for that have already been committed.

Next I'd observe that you really do need to set up a basic trunk.tsv otherwise you'll never be able to trunk track properly. You only need to set the control channel frequency and a nac of 0. Trunk-tags are optional.
Code:
"Sysname"       "Control Channel List"  "Offset"        "NAC"   "Modulation"    "TGID Tags File"        "Whitelist"     "Blacklist"     "Center Frequency"
"IOWA"    "772.50625"     "0"     "0" "" ""     ""      ""     ""

Try this and let me know if things improve.
 

N6ML

Member
Joined
Sep 26, 2008
Messages
1,275
Note that that's a tab-separated file, so you can't copy/paste it from here (the tabs get turned into spaces). Better to make a copy of trunk.tsv and edit it to look like the above.
 

WB0VHB

Member
Joined
Oct 30, 2009
Messages
159
Location
Mt. Union, Iowa
Still running into a brick wall. Here's what I did but it just came back to a command prompt.
I am running the RPi headless from putty. Is this a problem?

pi@raspberrypi:~/op25/op25/gr-op25_repeater/apps $ ./rx.py --args 'rtl' --gains lna:25 -f 774.30625e6 -q -1 -S 960000 -w -U -T trunk.tsv -v2 2>stderr.log
linux; GNU C++ version 6.2.0 20161010; Boost_106100; UHD_003.009.005-0-unknown

gain: name: LNA range: start 0 stop 0 step 0
setting gain lna to 25
supported sample rates 250000-2560000 step 24000
pi@raspberrypi:~/op25/op25/gr-op25_repeater/apps $
 

N6ML

Member
Joined
Sep 26, 2008
Messages
1,275
Still running into a brick wall. Here's what I did but it just came back to a command prompt.
I am running the RPi headless from putty. Is this a problem?

It should be doable, but you can't run gnuplot (unless you have a remote X server to display to, or you use the browser interface, but both of those add more complexity).

pi@raspberrypi:~/op25/op25/gr-op25_repeater/apps $ ./rx.py --args 'rtl' --gains lna:25 -f 774.30625e6 -q -1 -S 960000 -w -U -T trunk.tsv -v2 2>stderr.log
linux; GNU C++ version 6.2.0 20161010; Boost_106100; UHD_003.009.005-0-unknown

gain: name: LNA range: start 0 stop 0 step 0
setting gain lna to 25
supported sample rates 250000-2560000 step 24000
pi@raspberrypi:~/op25/op25/gr-op25_repeater/apps $

What does stderr.log contain after it returns to the prompt?
 

WB0VHB

Member
Joined
Oct 30, 2009
Messages
159
Location
Mt. Union, Iowa
gr-osmosdr 0.1.4 (0.1.4) gnuradio 3.7.10
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy soapy redpitaya
Using device #0 Realtek RTL2838UHIDIR SN: 00000001
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
[R82XX] PLL not locked!
Using two-stage decimator for speed=960000, decim=10/4 if1=96000 if2=24000
Project 25 IMBE Encoder/Decoder Fixed-Point implementation
Developed by Pavel Yazev E-mail: pyazev@gmail.com
Version 1.0 (c) Copyright 2009
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; see the file ``LICENSE'' for details.
op25_audio::eek:pen_socket(): enabled udp host(127.0.0.1), wireshark(23456), audio(23456)
p25_frame_assembler_impl: do_imbe[1], do_output[0], do_audio_output[1], do_phase2_tdma[0], do_nocrypt[0]
Traceback (most recent call last):
File "./rx.py", line 836, in <module>
rx = rx_main()
File "./rx.py", line 760, in __init__
self.tb = p25_rx_block(self.options)
File "./rx.py", line 186, in __init__
self.open_usrp()
File "./rx.py", line 687, in open_usrp
self.__set_rx_from_osmosdr()
File "./rx.py", line 632, in __set_rx_from_osmosdr
self.__build_graph(self.src, capture_rate)
File "./rx.py", line 292, in __build_graph
self.trunk_rx = trunking.rx_ctl(frequency_set = self.change_freq, debug = self.options.verbosity, conf_file = self.options.trunk_conf_file, logfile_workers=logfile_workers)
File "/home/pi/op25/op25/gr-op25_repeater/apps/trunking.py", line 652, in __init__
self.build_config_tsv(conf_file)
File "/home/pi/op25/op25/gr-op25_repeater/apps/trunking.py", line 720, in build_config_tsv
nac = int(fields['nac'], 0)
ValueError: invalid literal for int() with base 0: '""'
 

N6ML

Member
Joined
Sep 26, 2008
Messages
1,275
...
File "/home/pi/op25/op25/gr-op25_repeater/apps/trunking.py", line 720, in build_config_tsv
nac = int(fields['nac'], 0)
ValueError: invalid literal for int() with base 0: '""'

It looks like the NAC column in your trunk.tsv file contains an empty value in quotes? You probably want it to be "0" (not "")
 

N6ML

Member
Joined
Sep 26, 2008
Messages
1,275
Putting the zero in for the NAC didn't help.
And now I can't find the stderr.log file.

Please paste what you have in trunk.tsv

When it returns to the shell prompt, type: cat stderr.log
 

maus92

Member
Premium Subscriber
Joined
Jun 23, 2004
Messages
8,039
Location
The OP
I'm wondering why WB is not using the NAC for 774.30625 (Louisa site.) The Site NAC for Louisa County (the county next to Henry County where WB appears to live) is 4C5, and the sysid is 4C9 - at least according to RRDB.
 

maus92

Member
Premium Subscriber
Joined
Jun 23, 2004
Messages
8,039
Location
The OP
Two more questions for WB: Have you verified that the control channel is actually on the air and receivable from your location, and what format are you saving the the trunk.tsv file. Should be CSV format with a .tsv extension / suffix.
 

WB0VHB

Member
Joined
Oct 30, 2009
Messages
159
Location
Mt. Union, Iowa
Please paste what you have in trunk.tsv

When it returns to the shell prompt, type: cat stderr.log

"Sysname" "Control Channel List" "Offset" "NAC" "Modulation" "TGID Tags File" "Whitelist" "Blacklist" "Center Frequency"
"IOWA" "774.30625" "0" "0" "" "" "" "0" ""

Here's the stderr.log file

gr-osmosdr 0.1.4 (0.1.4) gnuradio 3.7.10
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy soapy redpitaya
Using device #0 Realtek RTL2838UHIDIR SN: 00000001
Detached kernel driver
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
[R82XX] PLL not locked!
Using two-stage decimator for speed=960000, decim=10/4 if1=96000 if2=24000
Project 25 IMBE Encoder/Decoder Fixed-Point implementation
Developed by Pavel Yazev E-mail: pyazev@gmail.com
Version 1.0 (c) Copyright 2009
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; see the file ``LICENSE'' for details.
op25_audio::eek:pen_socket(): enabled udp host(127.0.0.1), wireshark(23456), audio(23456)
p25_frame_assembler_impl: do_imbe[1], do_output[0], do_audio_output[1], do_phase2_tdma[0], do_nocrypt[0]
Traceback (most recent call last):
File "./rx.py", line 836, in <module>
rx = rx_main()
File "./rx.py", line 760, in __init__
self.tb = p25_rx_block(self.options)
File "./rx.py", line 186, in __init__
self.open_usrp()
File "./rx.py", line 687, in open_usrp
self.__set_rx_from_osmosdr()
File "./rx.py", line 632, in __set_rx_from_osmosdr
self.__build_graph(self.src, capture_rate)
File "./rx.py", line 292, in __build_graph
self.trunk_rx = trunking.rx_ctl(frequency_set = self.change_freq, debug = self.options.verbosity, conf_file = self.options.trunk_conf_file, logfile_workers=logfile_workers)
File "/home/pi/op25/op25/gr-op25_repeater/apps/trunking.py", line 652, in __init__
self.build_config_tsv(conf_file)
File "/home/pi/op25/op25/gr-op25_repeater/apps/trunking.py", line 720, in build_config_tsv
nac = int(fields['nac'], 0)
ValueError: invalid literal
 

WB0VHB

Member
Joined
Oct 30, 2009
Messages
159
Location
Mt. Union, Iowa
Two more questions for WB: Have you verified that the control channel is actually on the air and receivable from your location, and what format are you saving the the trunk.tsv file. Should be CSV format with a .tsv extension / suffix.

Yes I see a very strong signal on 774.30625 and can see two other signals from the Lee Co. and Jefferson Co. sites. Also the strongest signal is on 774.34425 which isn't listed in the database but assume it is coming from the Des Moines Co site that is not very far from me.

I'm far from being real familiar with Linux but did not copy and paste the trunk.tsv example boatbod provided. Instead I opened that file in an editor and changed the data. I'm assuming saving after that edit maintained the correct file format?
 
Status
Not open for further replies.
Top