RadioReference on Facebook   RadioReference on Twitter   RadioReference Blog
 

Go Back   The RadioReference.com Forums > Computer Aided Monitoring and Programming > Software Defined Radio

Software Defined Radio - A forum for general discussion of software defined radio (SDR) receiver equipment.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #41 (permalink)  
Old 07-04-2017, 8:24 AM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Aug 2008
Posts: 370
Default

Quote:
Originally Posted by mrlindstrom View Post
Thanks! Started a new folder from scratch and did the checkout first, that got it.
just to note, the new rx.py version has enough changes in it that it won't run correctly using an install of the "old" version of OP25. Accordingly, I recommend that you do a "sudo make uninstall" from the "build" directory of your previous installation. Then do a full build/install of the new version (after checking out the "max" br)...

Max
Reply With Quote
Sponsored links
  #42 (permalink)  
Old 07-04-2017, 10:05 AM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Apr 2003
Location: Green Bay, WI
Posts: 81
Default

Thanks for the help Max. I added the offset. The only errors I am seeing in the logs are the usual gnu plot related ones. So I believe it to be on frequency. (I have even tried a second RTL-SDR stick that I have) The tsbks number never really changes. I have tried outdoor antennas and indoor. It makes very little difference. I am right smack dab in the middle of 3 or 4 of the simulcast towers. So I really shouldn't have a signal strength issue. It comes in great on my XTS-2500 no matter where I am in the house.

I changed it to fsk4/datascope and here is a picture from that.

Update:
I changed the sampling rate and now I have the four groups and increasing tsbks and voice freq info!

Thanks, I am overjoyed
Attached Images
 

Last edited by kb9mwr; 07-04-2017 at 10:26 AM..
Reply With Quote
  #43 (permalink)  
Old 07-04-2017, 10:21 AM
Member
  Premium Subscriber
Premium Subscriber
Amateur Radio Operator
Amateur Radio
 
Join Date: Sep 2008
Location: Klein, TX
Posts: 87
Default

Just curious, but are there any plans to try to allow op25 to control multiple sdr devices to allow it to truly trunk track? We have some systems around here that have channels in the 770-774 range and the 851-854 range and op25 only seems to like to dial in to the 700mhz channels when watching for traffic.
Reply With Quote
  #44 (permalink)  
Old 07-04-2017, 12:47 PM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Aug 2008
Posts: 370
Default

Quote:
Originally Posted by mrlindstrom View Post
Just curious, but are there any plans to try to allow op25 to control multiple sdr devices to allow it to truly trunk track? We have some systems around here that have channels in the 770-774 range and the 851-854 range and op25 only seems to like to dial in to the 700mhz channels when watching for traffic.
When scanning a trunked system in which the range of frequencies exceeds the width of the sampling window, it doesn't do much good to use a "center frequency" since anything outside of the band will fail. If you set the center frequency to zero (or omit) OP25 will fall back to a mode where it retunes the SDR each time the rx frequency needs to be changed, i.e., whenever there is a switch between the CC to/from a VC. (In this way OP25 works exactly as would a conventional scanner when in trunked operation).

I think there may have been a bug somewhere perhaps in the drivers that caused this switching to be very slow, but it seems to be much better now using current drivers and the latest OP25.

I'd expect the 700/800 systems to work OK now as well. If not, it would be good to do a proper diagnosis and comparison of the 700/800 system versus a system that isn't spread across multiple bands, using a center frequency of zero in both cases...

To answer the original question, there aren't currently plans - it's definitely not trivial to do...

Max
Reply With Quote
  #45 (permalink)  
Old 07-04-2017, 1:32 PM
Member
  Premium Subscriber
Premium Subscriber
Amateur Radio Operator
Amateur Radio
 
Join Date: Sep 2008
Location: Klein, TX
Posts: 87
Default

Quote:
Originally Posted by KA1RBI View Post
When scanning a trunked system in which the range of frequencies exceeds the width of the sampling window, it doesn't do much good to use a "center frequency" since anything outside of the band will fail. If you set the center frequency to zero (or omit) OP25 will fall back to a mode where it retunes the SDR each time the rx frequency needs to be changed, i.e., whenever there is a switch between the CC to/from a VC. (In this way OP25 works exactly as would a conventional scanner when in trunked operation).

I think there may have been a bug somewhere perhaps in the drivers that caused this switching to be very slow, but it seems to be much better now using current drivers and the latest OP25.

I'd expect the 700/800 systems to work OK now as well. If not, it would be good to do a proper diagnosis and comparison of the 700/800 system versus a system that isn't spread across multiple bands, using a center frequency of zero in both cases...

To answer the original question, there aren't currently plans - it's definitely not trivial to do...

Max
If I omit the center frequency or set it to 0, this is what I end up with:

Code:
gr-osmosdr 0.1.1 (0.1.1) gnuradio 3.7.2.1
built-in source types: file osmosdr fcd rtl rtl_tcp uhd hackrf bladerf rfspace 
Using device #1 Realtek RTL2838UHIDIR SN: 00000002
Found Rafael Micro R820T tuner
main: exception occurred
main: exception:
Traceback (most recent call last):
  File "./rx.py", line 642, in <module>
    if tb.process_qmsg(msg):
  File "./rx.py", line 601, in process_qmsg
    js = self.trunk_rx.to_json()
  File "/usr/lib/python2.7/dist-packages/gnuradio/gr/top_block.py", line 100, in __getattr__
    return getattr(self._tb, name)
AttributeError: 'top_block_sptr' object has no attribute 'trunk_rx'

Traceback (most recent call last):
  File "./rx.py", line 649, in <module>
    if tb.kill_sink:
  File "/usr/lib/python2.7/dist-packages/gnuradio/gr/top_block.py", line 100, in __getattr__
    return getattr(self._tb, name)
AttributeError: 'top_block_sptr' object has no attribute 'kill_sink'
Reply With Quote
Sponsored links
  #46 (permalink)  
Old 07-04-2017, 6:43 PM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Mar 2007
Location: Talbot Co, MD
Posts: 373
Default

Quote:
Originally Posted by kb9mwr View Post
Update:
I changed the sampling rate and now I have the four groups and increasing tsbks and voice freq info!
yay! Glad it's working now.

Quote:
Originally Posted by mrlindstrom View Post
Just curious, but are there any plans to try to allow op25 to control multiple sdr devices to allow it to truly trunk track? We have some systems around here that have channels in the 770-774 range and the 851-854 range and op25 only seems to like to dial in to the 700mhz channels when watching for traffic.
My variation of rx.py has changes to the relative tuning code so that it never fails to tune if outside the receive window. If a center frequency is defined and it can tune relative, it will do so, otherwise it will retune the receiver itself so it's basically seamless. The version of rx.py in the repository doesn't do that yet, and will fail if it tries to tune outside the range.

Quote:
Originally Posted by mrlindstrom View Post
If I omit the center frequency or set it to 0, this is what I end up with:

Code:
gr-osmosdr 0.1.1 (0.1.1) gnuradio 3.7.2.1
built-in source types: file osmosdr fcd rtl rtl_tcp uhd hackrf bladerf rfspace 
Using device #1 Realtek RTL2838UHIDIR SN: 00000002
Found Rafael Micro R820T tuner
main: exception occurred
main: exception:
Traceback (most recent call last):
  File "./rx.py", line 642, in <module>
    if tb.process_qmsg(msg):
  File "./rx.py", line 601, in process_qmsg
    js = self.trunk_rx.to_json()
  File "/usr/lib/python2.7/dist-packages/gnuradio/gr/top_block.py", line 100, in __getattr__
    return getattr(self._tb, name)
AttributeError: 'top_block_sptr' object has no attribute 'trunk_rx'

Traceback (most recent call last):
  File "./rx.py", line 649, in <module>
    if tb.kill_sink:
  File "/usr/lib/python2.7/dist-packages/gnuradio/gr/top_block.py", line 100, in __getattr__
    return getattr(self._tb, name)
AttributeError: 'top_block_sptr' object has no attribute 'kill_sink'
I believe you have a corrupt trunk.tsv file. The center frequency is the very last field; if you are trying to eliminate the center frequency I suggest deleting every white space/tab character following the blacklist filename and you should be ok. You might also make sure there is no blank line below the one with the valid data on it.
Reply With Quote
  #47 (permalink)  
Old 07-04-2017, 6:55 PM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Apr 2003
Location: Green Bay, WI
Posts: 81
Default

Quote:
Originally Posted by boatbod View Post
yay! Glad it's working now.
Yeah, I was hopeful that was all I needed. I still have a nice climbing tsbks and see the voice channels... but have yet to hear a peep with the netcat method. Till I hear something with it, I'm not even sure it makes sense to move to trying the socksaudio thing.

I can play a .wav fille and hear that fine.
Code:
./rx.py  --args 'rtl' --gains 'lna:49' -f 772.63125e6 -T trunk.tsv -q 0 -D cqpsk  -o 50000 -S 1000000 -P constellation -w 2> stderr.2
And in another terminal:
nc -kluvw 1 127.0.0.1 23456 | aplay -c1 -f S16_LE -r 8000
I do occasionally get a connection closed, listening again message but that is it.
Reply With Quote
  #48 (permalink)  
Old 07-05-2017, 6:14 AM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Mar 2007
Location: Talbot Co, MD
Posts: 373
Default

Quote:
Originally Posted by kb9mwr View Post
Code:
./rx.py  --args 'rtl' --gains 'lna:49' -f 772.63125e6 -T trunk.tsv -q 0 -D cqpsk  -o 50000 -S 1000000 -P constellation -w 2> stderr.2
And in another terminal:
nc -kluvw 1 127.0.0.1 23456 | aplay -c1 -f S16_LE -r 8000
I do occasionally get a connection closed, listening again message but that is it.
When I used netcat, this was the command line that worked best for me:
Code:
nc -kluv 127.0.0.1 23456 | aplay --period-size=32 --buffer-size=1024 -c 1 -f S16_LE -r 8000
You appear to have an additional "w 1" in the "-kluv" sequence.
Reply With Quote
  #49 (permalink)  
Old 07-05-2017, 7:13 AM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Aug 2008
Posts: 370
Default

Quote:
Originally Posted by kb9mwr View Post
have yet to hear a peep with the netcat method.
is your system p2/tdma? I need to fix the readme file, which fails to mention that for phase 2/tdma you need to add the "-2" option to rx.py... Other wise if the system is p1 fdma, I'll have some other tests for you - lmk...

Max
Reply With Quote
Sponsored links
  #50 (permalink)  
Old 07-05-2017, 2:47 PM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Apr 2003
Location: Green Bay, WI
Posts: 81
Default

No its not, its a Phase 1, P25, Simulcast system.
Reply With Quote
  #51 (permalink)  
Old 07-05-2017, 3:06 PM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Aug 2008
Posts: 370
Default

Quote:
Originally Posted by kb9mwr View Post
No its not, its a Phase 1, P25, Simulcast system.
OK let's have you do the following, for test purposes. It should produce a large amount of formatted "hex" output. To use this, run rx.py as before, and instead of the usual netcat and aplay combo, let's have you do this:

Code:
nc -kluv 127.0.0.1 23456 | od -v -t x1
This should produce large amounts of "hex" output. If not let me know. If so, CTRL-C that command, and then do

Code:
nc -kluv 127.0.0.1 23456 | cat > temp.raw
the temp.raw file is (almost) in the form of a .WAV file (16-bit, mono, 8K rate). The presence, length, and content of that file is the same as what would have been played by the "aplay" command:
Code:
cat temp.raw | aplay -c1 -f S16_LE -r 8000
Max
Reply With Quote
  #52 (permalink)  
Old 07-05-2017, 3:55 PM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Aug 2008
Posts: 370
Default

Quote:
Originally Posted by mrlindstrom View Post
If I omit the center frequency or set it to 0, this is what I end up with:

Code:
Traceback (most recent call last):
I've been unable to duplicate this here, it's possible it's just a race condition, or it's possible there's something more involved. In order to hopefully rule out the race condition, I've pushed a possible fix for this crash to the 'max' branch of the repo. It's pure python, so no rebuild should be needed. Could you try
Code:
git pull origin max
and then try again. It should be perfectly legal to specify a zero/empty center frequency!

Max
Reply With Quote
  #53 (permalink)  
Old 07-05-2017, 4:58 PM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Apr 2003
Location: Green Bay, WI
Posts: 81
Default

Quote:
Originally Posted by KA1RBI View Post
OK let's have you do the following, for test purposes. It should produce a large amount of formatted "hex" output. To use this, run rx.py as before, and instead of the usual netcat and aplay combo, let's have you do this:

Code:
nc -kluv 127.0.0.1 23456 | od -v -t x1
This should produce large amounts of "hex" output. If not let me know. If so, CTRL-C that command, and then do
Its not.
Attached Images
 
Reply With Quote
  #54 (permalink)  
Old 07-05-2017, 5:28 PM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Mar 2007
Location: Talbot Co, MD
Posts: 373
Default

Quote:
Originally Posted by kb9mwr View Post
Its not.
It's not trunking. There is nothing showing up at the bottom of the curses terminal screen where I'd expect it to say "Frequency xxx.xxxxxx" or a TGID and tag name. The screen is displaying exactly what it would if you ran the system without the -T trunk.tsv command line option. It must be some issue with command line parameters or something like that. Most odd.

ETA: I've been trying to reproduce what might be wrong, and the only partial success I've had borking the config by setting the control channel frequency to 0 inside trunk.tsv. Even then on my system it eventually recovers and starts working.

Here is an example of my terminal screen after it's been running for a while. No voice was playing at the time, but you'll note there are lists of tgid's in the "voice frequency" lines along with duration and count. The bottom of the screen shows the control channel frequency.
Attached Images
 

Last edited by boatbod; 07-05-2017 at 6:01 PM..
Reply With Quote
  #55 (permalink)  
Old 07-05-2017, 6:14 PM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Apr 2003
Location: Green Bay, WI
Posts: 81
Default

My bad, you are right I had the wrong shell script called to start rx.py (which had -T omitted)

However when I do add -T trunk.tsv, then the constellation goes to heck, and acts like its not decoding the control channel, back to none of the expected stuff on the terminal screen.

So something must be wrong with my trunk.tsv file. I checked the tabbing, and that is correct.
(This is the system I am trying to monitor https://www.radioreference.com/apps/db/?sid=7511)

Edit: I took out the center freq just left "" and now its working! (Getting the hex voice dumps)
Its so incredibly close to intelligible audio on Pi2 (with the sockaudio mod)... I am sure it will work fine on a Pi3 (just ordered one).. Thanks Max and boatbod.. this is a great piece of software. Has a learning curve, but anything cool usually does.
Attached Images
 

Last edited by kb9mwr; 07-05-2017 at 7:47 PM..
Reply With Quote
Sponsored links
  #56 (permalink)  
Old 07-05-2017, 6:30 PM
Member
  Premium Subscriber
Premium Subscriber
Amateur Radio Operator
Amateur Radio
 
Join Date: Sep 2008
Location: Klein, TX
Posts: 87
Thumbs up

Quote:
Originally Posted by KA1RBI View Post
I've been unable to duplicate this here, it's possible it's just a race condition, or it's possible there's something more involved. In order to hopefully rule out the race condition, I've pushed a possible fix for this crash to the 'max' branch of the repo. It's pure python, so no rebuild should be needed. Could you try
Code:
git pull origin max
and then try again. It should be perfectly legal to specify a zero/empty center frequency!

Max
It no longer seems to crash, but now I just have a blank screen and this is the stderr.2:

Code:
gr-osmosdr 0.1.1 (0.1.1) gnuradio 3.7.2.1
built-in source types: file osmosdr fcd rtl rtl_tcp uhd hackrf bladerf rfspace 
Using device #1 Realtek RTL2838UHIDIR SN: 00000002
Found Rafael Micro R820T tuner
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
However, if I run it with my normal -f parameter, it runs just fine.

Last edited by mrlindstrom; 07-05-2017 at 6:34 PM..
Reply With Quote
  #57 (permalink)  
Old 07-05-2017, 6:32 PM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Mar 2007
Location: Talbot Co, MD
Posts: 373
Default

The trunk.tsv file entries look ok except I'd dump the center frequency stuff you have tacked on the end, at least for now anyway. Try removing the command line offset (-o 50000) and see if that gets you back on frequency.

If you are able to run my latest code, the FFT plot (-P fft) will show you exactly where you are tuned with a line and writes a "Tuned to xxx.xxxxxx" at the top of the screen. Unfortunately you'll have to pull all the code changes to make that feature work, since it requires changes to both rx.py and gr_gnuplot.py, and in turn those require sockaudio.py and that needs supporting library changes.... cascading effect! In absence of this, we have to assume you are tuned correctly as long as "tsbks" are increasing steadily. If they are not, then maybe the scrambled constellation is indeed indicating you have lost the tune.

Last edited by boatbod; 07-05-2017 at 6:39 PM..
Reply With Quote
  #58 (permalink)  
Old 07-05-2017, 7:33 PM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Aug 2008
Posts: 370
Default

Quote:
Originally Posted by mrlindstrom View Post

However, if I run it with my normal -f parameter, it runs just fine.
Ah, OK. could you post the command line you're running when it's not working
Reply With Quote
  #59 (permalink)  
Old 07-05-2017, 7:41 PM
Member
  Premium Subscriber
Premium Subscriber
Amateur Radio Operator
Amateur Radio
 
Join Date: Sep 2008
Location: Klein, TX
Posts: 87
Default

Quote:
Originally Posted by KA1RBI View Post
Ah, OK. could you post the command line you're running when it's not working
Code:
./rx.py --args rtl=1 -N LNA:46 -S 1024000 -f 0 -q -1 -V -T trunk.tsv -P constellation -w -2 2> stderr.2
Reply With Quote
  #60 (permalink)  
Old 07-05-2017, 7:49 PM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Aug 2008
Posts: 370
Default

Quote:
Originally Posted by mrlindstrom View Post
Code:
./rx.py --args rtl=1 -N LNA:46 -S 1024000 -f 0 -q -1 -V -T trunk.tsv -P constellation -w -2 2> stderr.2
ok that looks like the problem. For silly historical reasons the frequency must be present and valid even when using -T - even though the trunk CC frequency(s) in the trunk TSV override the -f value the -f must still be present.

So, let's have you go back to giving a valid frequency via "-f", and change the "Center" frequency in the trunking TSV to zero...

Max
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 5:51 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
All information here is Copyright 2012 by RadioReference.com LLC and Lindsay C. Blanton III.Ad Management by RedTyger
Copyright 2015 by RadioReference.com LLC Privacy Policy  |  Terms and Conditions