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
  #21 (permalink)  
Old 07-01-2017, 4:14 PM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Apr 2003
Location: Green Bay, WI
Posts: 82
Default

These launch gnuplot:
./rx.py --args rtl -f 772.63125e6 -g 65 -o 17 -N LNA:35 -V -D cqpsk -P constellation
./rx.py --args rtl -f 772.63125e6 -g 65 -o 17 -N LNA:35 -V -D cqpsk -P fft

However they really don't look like much
Attached Images
 

Last edited by kb9mwr; 07-01-2017 at 6:09 PM..
Reply With Quote
Sponsored links
  #22 (permalink)  
Old 07-01-2017, 5:59 PM
Member
   
Join Date: Sep 2002
Location: Toronto, Ontario
Posts: 3,989
Default

-f 772631250 perhaps?
Reply With Quote
  #23 (permalink)  
Old 07-01-2017, 6:08 PM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Apr 2003
Location: Green Bay, WI
Posts: 82
Default

Yeah I had a typo.. updated the pic and text. Now if I could just get some audio out of this thing.

Making process, it's just slow.
Reply With Quote
  #24 (permalink)  
Old 07-01-2017, 8:39 PM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Apr 2003
Location: Green Bay, WI
Posts: 82
Default

The biggest problem I see with rx.py (gnu plot based) replacing scope.py (used wxwidgets) is there is no traffic tab, enabling you to look for the NAC, etc. (just constellation, fft, symbol and datascope) Or maybe I am missing something. Is there another way?
Reply With Quote
  #25 (permalink)  
Old 07-02-2017, 5:20 AM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Mar 2007
Location: Talbot Co, MD
Posts: 376
Default

A couple thoughts about rx.py
- it's a work in progress and Max is currently integrating some enhancements I worked on. These include improvements to the FFT plot for time based averaging and a tuning line to make it easier to see where the centre is. If you want to try these before they hit the git repo, look in the "virtual op25" thread for my recent posts.

- The traffic tab is superseded by the curses terminal screen and the log file. A tuned nac is displayed at the top of the terminal and tuning errors etc can be found in stderr.2. I always run mine with a dedicated command window running "tail -f stderr.2"

Much as with scope.py, you can start rx.py without the -T parameter and have it report the nac of whatever it tunes to.
Reply With Quote
Sponsored links
  #26 (permalink)  
Old 07-02-2017, 8:09 AM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Mar 2007
Location: Talbot Co, MD
Posts: 376
Default

Here's a screenshot of my system up and running. At the time there was no voice session being tracked. When there is, additional info including tgid and slot is displayed at the bottom left of the curses terminal window.

ETA: second screen shot is with a voice session established (captured from a different computer monitoring the same radio system). Note that the stderr.2 logging of voice updates is a custom local addition I've added just for my debugging purposes.
Attached Images
  

Last edited by boatbod; 07-02-2017 at 8:16 AM..
Reply With Quote
  #27 (permalink)  
Old 07-02-2017, 10:28 AM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Apr 2003
Location: Green Bay, WI
Posts: 82
Default

Quote:
Originally Posted by boatbod View Post
A couple thoughts about rx.py
- it's a work in progress and Max is currently integrating some enhancements I worked on. These include improvements to the FFT plot for time based averaging and a tuning line to make it easier to see where the centre is. If you want to try these before they hit the git repo, look in the "virtual op25" thread for my recent posts.

- The traffic tab is superseded by the curses terminal screen and the log file. A tuned nac is displayed at the top of the terminal and tuning errors etc can be found in stderr.2. I always run mine with a dedicated command window running "tail -f stderr.2"

Much as with scope.py, you can start rx.py without the -T parameter and have it report the nac of whatever it tunes to.
Okay thanks for the explanation. I think I need to pull things down from github again. Last I did that was June 29th. I get a screwed up screen output, from rx.py, where the text basically over rights itself, etc.

Here is an animated gif example of that:
https://gifyu.com/image/brt2

Another guy who who is working on this in parallel with me, has gotten a little further and reports he has some broken audio. Do you have any insight on that?

Code:
pi@raspberrypi:~ $  nc -kluvw 1 127.0.0.1 23456 | aplay -c1 -f S16_LE -r 8000
Listening on [127.0.0.1] (family 0, port 23456)
Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
Connection closed, listening again.
underrun!!! (at least 3221.663 ms long)
underrun!!! (at least 510.575 ms long)
Connection closed, listening again.
Connection closed, listening again.

Last edited by kb9mwr; 07-02-2017 at 10:32 AM.. Reason: errors
Reply With Quote
  #28 (permalink)  
Old 07-02-2017, 11:40 AM
PiccoIntegra's Avatar
Member
   
Join Date: Dec 2002
Location: North Texas
Posts: 479
Default

Add a -q -1 or -q -2 to your rx.py command line. You're not tuned on center, which is why you see the -1200 errors.
Reply With Quote
  #29 (permalink)  
Old 07-02-2017, 12:31 PM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Mar 2007
Location: Talbot Co, MD
Posts: 376
Default

Quote:
Originally Posted by kb9mwr View Post
Okay thanks for the explanation. I think I need to pull things down from github again. Last I did that was June 29th. I get a screwed up screen output, from rx.py, where the text basically over rights itself, etc.

Here is an animated gif example of that:
https://gifyu.com/image/brt2

Another guy who who is working on this in parallel with me, has gotten a little further and reports he has some broken audio. Do you have any insight on that?

Code:
pi@raspberrypi:~ $  nc -kluvw 1 127.0.0.1 23456 | aplay -c1 -f S16_LE -r 8000
Listening on [127.0.0.1] (family 0, port 23456)
Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
Connection closed, listening again.
underrun!!! (at least 3221.663 ms long)
underrun!!! (at least 510.575 ms long)
Connection closed, listening again.
Connection closed, listening again.
Audio underruns are to be expected with the nc | aplay method of playing the audio because aplay has no idea when the audio samples are going to arbitrarily stop arriving when the transmission ends. For this very reason I implemented the built-in socket audio player (sockaudio.py) which can detect end of transmissions based on specific sequences of null samples sent over udp. If you want to try it, changed files are in my google drive and instructions are over near the end of the big op25 thread.
Reply With Quote
Sponsored links
  #30 (permalink)  
Old 07-03-2017, 3:49 PM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Apr 2003
Location: Green Bay, WI
Posts: 82
Default

I grabbed the four files and placed them in their respective places, apps and lib directories (per this message https://forums.radioreference.com/2782328-post1153.html)..

Code:
pi@raspberrypi:~/op25/build $ sudo make install
[ 24%] Built target gnuradio-op25
[ 27%] Built target test-op25
[ 29%] Built target _op25_swig_doc_tag
[ 30%] Built target _op25_swig_swig_tag
[ 35%] Built target pygen_op25_gr_op25_swig_c8dae
[ 40%] Built target _op25_swig
[ 42%] Built target pygen_op25_gr_op25_python_59195
[ 42%] Built target pygen_op25_gr_op25_apps_383eb
[ 61%] Built target imbe_vocoder
[ 62%] Building CXX object op25/gr-op25_repeater/lib/CMakeFiles/gnuradio-op25_repeater.dir/p25p1_fdma.cc.o
/home/pi/op25/op25/gr-op25_repeater/lib/p25p1_fdma.cc:243:25: error: no €˜void gr::op25_repeater::p25p1_fdma::reset_timer()€™ member function declared in class €˜gr::op25_repeater::p25p1_fdma€™
 p25p1_fdma::reset_timer()
                         ^
op25/gr-op25_repeater/lib/CMakeFiles/gnuradio-op25_repeater.dir/build.make:326: recipe for target 'op25/gr-op25_repeater/lib/CMakeFiles/gnuradio-op25_repeater.dir/p25p1_fdma.cc.o' failed
make[2]: *** [op25/gr-op25_repeater/lib/CMakeFiles/gnuradio-op25_repeater.dir/p25p1_fdma.cc.o] Error 1
CMakeFiles/Makefile2:682: recipe for target 'op25/gr-op25_repeater/lib/CMakeFiles/gnuradio-op25_repeater.dir/all' failed
make[1]: *** [op25/gr-op25_repeater/lib/CMakeFiles/gnuradio-op25_repeater.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
pi@raspberrypi:~/op25/build $
/Edit
Nevermind, found the missing file p25p1_fdma.h and it looks like the make install is going to complete now.

Last edited by kb9mwr; 07-03-2017 at 4:00 PM..
Reply With Quote
  #31 (permalink)  
Old 07-03-2017, 5:36 PM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Mar 2007
Location: Talbot Co, MD
Posts: 376
Default

Quote:
Originally Posted by kb9mwr View Post
Nevermind, found the missing file p25p1_fdma.h and it looks like the make install is going to complete now.
Sorry 'bout that. I don't think RR will let me edit the earlier post to add the missing info.
Reply With Quote
  #32 (permalink)  
Old 07-03-2017, 5:54 PM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Apr 2003
Location: Green Bay, WI
Posts: 82
Default

That's okay, I should have read more of the thread.

I'm still not convinced this is working right on the Pi. I start it with:
Code:
./rx.py --args 'rtl' -N LNA:49 -f 772.63125e6 -S 2560000 -q 0 -V -T trunk.tsv 2>stderr.2
tail -F stderr.2
All I ever see is:

I assume I'll see something more when there is voice traffic.
And I think this indicates I have good signal, so what is missing?
Attached Images
  
Reply With Quote
  #33 (permalink)  
Old 07-03-2017, 9:16 PM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Apr 2003
Location: Green Bay, WI
Posts: 82
Default

I ran dos2unix on the files, which fixed the startup error with sockaudio.py. But the sockaudio.py app now starts and then terminates. There is no sign of it at all doing a ps –aux |more etc.

How does socksaudio work? Does it require any command line options?
Reply With Quote
  #34 (permalink)  
Old 07-03-2017, 9:52 PM
Member
  Premium Subscriber
Premium Subscriber
Amateur Radio Operator
Amateur Radio
 
Join Date: Sep 2008
Location: Klein, TX
Posts: 87
Default

For the life of me I cannot find the README file or the rx.py file in the apps folder. I've checked that I'm on the max branch:

$ git branch
master
* max

and I'm looking in the ~/op25/op25/gr-op25_repeater/apps folder, all I see is scope.py

Any ideas?

(Ubuntu 14.04 64bit)
Reply With Quote
  #35 (permalink)  
Old 07-03-2017, 10:00 PM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Apr 2003
Location: Green Bay, WI
Posts: 82
Default

If you didn't do the "git checkout max " option when you installed it, you'll have scope.py instead of rx.py
Reply With Quote
Sponsored links
  #36 (permalink)  
Old 07-03-2017, 10:07 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 kb9mwr View Post
If you didn't do the "git checkout max " option when you installed it, you'll have scope.py instead of rx.py
Thanks! Started a new folder from scratch and did the checkout first, that got it.
Reply With Quote
  #37 (permalink)  
Old 07-03-2017, 10:09 PM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Mar 2007
Location: Talbot Co, MD
Posts: 376
Default

Quote:
Originally Posted by kb9mwr View Post
That's okay, I should have read more of the thread.

I'm still not convinced this is working right on the Pi. I start it with:
Code:
./rx.py --args 'rtl' -N LNA:49 -f 772.63125e6 -S 2560000 -q 0 -V -T trunk.tsv 2>stderr.2
tail -F stderr.2
All I ever see is:

I assume I'll see something more when there is voice traffic.
And I think this indicates I have good signal, so what is missing?
I think you're missing some startup options. (Specifically the "-w" and "-2") Here is mine for comparison:
Code:
./rx.py -P fft --args "rtl=0" --gains 'lna:36' -O 'default' -D cqpsk -f 773.84375e6 -S 1440000 -q 0 -T trunk-leo.tsv -q 1 -2 -w 2> stderr.2
I'm also curious to see that your system has only received 3 tsbks and hasn't yet picked up the SYSID, so either the NAC is incorrect, it isn't tuned accurately, or it's a very weak signal.

Last edited by boatbod; 07-03-2017 at 10:15 PM..
Reply With Quote
  #38 (permalink)  
Old 07-03-2017, 10:37 PM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Apr 2003
Location: Green Bay, WI
Posts: 82
Default

I have tried it with -w. -2 appears to be for if the system is Phase 2, which mine is not. It is a simulcast system however.

What I believe is correct:
Code:
./rx.py  --args 'rtl' --gains 'lna:49' -f 772.63125e6 -T trunk.tsv -q 1 -D cqpsk  -S 2560000 -P constellation -w 2> stderr.2
I moved my antenna a bit and now have a tsbks 5.

I have another guy working in parallel with me, Pi platform, his is not simulcast, and he does get broken audio with the netcat method.. And you explained that... He tried the sockaudio.py method, and hasn't heard anything that way yet.

We both see that sockaudio.py app starts and then terminates. There is no sign of it at all doing a ps –aux |more etc.

The NAC reported by unitrunker is 4A1.

Last edited by kb9mwr; 07-03-2017 at 11:38 PM..
Reply With Quote
  #39 (permalink)  
Old 07-04-2017, 6:30 AM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Mar 2007
Location: Talbot Co, MD
Posts: 376
Default

You don't manually run sockaudio.py, it is started automatically (behind the scenes in its own thread) by rx.py when wireshark audio decoding mode -w is enabled. If you look in the log you should see a line starting with "audio device: ", which comes from sockaudio.py. If not, it hasn't been enabled or something went wrong.

On a system that is tuned and receiving the control channel properly, tsbks will count up continually. Is anything appearing in stderr.2? Relative to no audio on your friend's system, I'd be interested to see the startup sequence logged in stderr.2. Wouldn't surprise me to see something in there about unable to open pcm device.

You might try reducing the sample window a little. From memory, I think my rtl only goes up to about 2.4mhz, but I usually run at 1.44mhz to reduce CPU impact.

Last edited by boatbod; 07-04-2017 at 7:36 AM..
Reply With Quote
  #40 (permalink)  
Old 07-04-2017, 8:22 AM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Aug 2008
Posts: 372
Default

kb9mwr, let's see about getting the trunk CC tuned in properly first before worrying about the voice. We know that if the CC isn't coming in well it's unlikely you'll get a good voice decode. Looking at the results, when you see the "tsbks 3" (or 5) it is receiving something, but not very well. What you should see at that point is the "tsbks" number should be increasing at a steady rate. If it goes up very slowly, grudgingly as you seem to be seeing that indicates the tuning and/or reception isn't quite right. The constellation diagram indicates an LSM (CQPSK) system, with pretty marginal marginal signal strength at the receiver.

Both these conditions suggest that the tuning is probably on frequency and not the issue at this point. During my tests with the r-pi I used a sampling rate of 1,000,000 [-S 1000000] so it's just possible your rate is too high causing overruns at rx, if that were the case I'd expect some indication of that in the stderr file.

It seems likely that improving the signal strength at the rx would help. It would also be good to rule out the spike at DC, so if you could add an "offset" to the command line that you're running.

So here are some suggested things to try...
1) add an offset [-o 50000] parameter to the command line
2) using the constellation plot as a guide, re-arrange the antenna until you get a good 4-point constellation. What you want to do is to get rid of the cluster of symbols at the center of the plot so all the symbols move outward into four discrete groups.
3) look in the stderr file for anything untoward.

I'd also like to see what the "datascope" plot looks like. To get this you need to temporarily run the program in "fsk4" demod mode, which is incorrect for your system, but it's what's needed to get the datascope plot...

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 9:55 PM.


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