RPi 3 & RTL-SDR/OP25?

Status
Not open for further replies.

n5pwp

Member
Joined
Jan 10, 2015
Messages
302
Reaction score
17
Location
Spring, Texas
I've had several of these crashes today. op25 has run for better than a week with no problems. Does this indicate that I'm running into noise issues with the data? Also, I don't know why it shows the path as pointing at the boatbod install of op25. I created the symlink like you demonstrated. I thought if I launched the start command from the normal op25 directory structure that it would use that data. Why does the path point back to the op25.boatbod directory tree?
===========================
terminal: exception occurred (80, 24)
terminal: exception:
Traceback (most recent call last):
File "/home/pi/op25.boatbod/op25/gr-op25_repeater/apps/terminal.py", line 227, in run
if self.process_q_events():
File "/home/pi/op25.boatbod/op25/gr-op25_repeater/apps/terminal.py", line 218, in process_q_events
return self.process_json(msg.to_string())
File "/home/pi/op25.boatbod/op25/gr-op25_repeater/apps/terminal.py", line 204, in process_json
self.active2.addstr(0, 0, s)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 13: ordinal not in range(128)
======================

I did a Google on the last error:
--------------------------
When you do str(u'\u2013') you are trying to convert the Unicode string to a 8-bit string. To do this you need to use an encoding, a mapping between Unicode data to 8-bit data. What str() does is that is uses the system default encoding, which under Python 2 is ASCII. ASCII contains only the 127 first code points of Unicode, that is \u0000 to \u007F1. The result is that you get the above error, the ASCII codec just doesn't know what \u2013 is (it's a long dash, btw).

You therefore need to specify which encoding you want to use. Common ones are ISO-8859-1, most commonly known as Latin-1, which contains the 256 first code points; UTF-8, which can encode all code-points by using variable length encoding, CP1252 that is common on Windows, and various Chinese and Japanese encodings.
---------------------------
Here's the code that was used to create a boatbod op25 directory and then link it to op25. Once you build, make and install doesn't it put it in the op25 directory? So I should be starting the program in the op25/.../apps directory rather than the op25.boatbod/.../apps directory, right? Do I have it backwards?

mv op25 op25.max
git clone https://github.com/boatbod/op25 op25.boatbod
ln -s op25.boatbod op25
cd op25
mkdir build
cd build
cmake ../
make
sudo make install

Mike
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,646
Reaction score
1,039
Location
Talbot Co, MD
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

John (N8UR) is the author of the stats script. I can update the copy in my repo, but I've not spent any time using it so there is no guarantee that I'd be making the correct fix. He is contactable through the "op25-dev" yahoo group
 

n5pwp

Member
Joined
Jan 10, 2015
Messages
302
Reaction score
17
Location
Spring, Texas
Graham, here is the correction:

# histogram of unknown TGIDs
echo "Talkgroups without tags" > op25-tgids-tagless.txt
echo "# PCT Count TGID" >> op25-tgids-tagless.txt
=============================^

It had an extra 'i' in here so it said tgidis-tagless. No major, but it ended up creating an extra file. I have sent an email to John through the op25-dev Yahoo group. I'm not a member and am not going to join just to send a signal note. Thanks for pointing me in the right direction.

Mike
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,646
Reaction score
1,039
Location
Talbot Co, MD
Graham, here is the correction:

# histogram of unknown TGIDs
echo "Talkgroups without tags" > op25-tgids-tagless.txt
echo "# PCT Count TGID" >> op25-tgids-tagless.txt
=============================^

It had an extra 'i' in here so it said tgidis-tagless. No major, but it ended up creating an extra file. I have sent an email to John through the op25-dev Yahoo group. I'm not a member and am not going to join just to send a signal note. Thanks for pointing me in the right direction.

Mike

I made the change and pushed it up to the repo.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,646
Reaction score
1,039
Location
Talbot Co, MD
I've had several of these crashes today. op25 has run for better than a week with no problems. Does this indicate that I'm running into noise issues with the data? Also, I don't know why it shows the path as pointing at the boatbod install of op25. I created the symlink like you demonstrated. I thought if I launched the start command from the normal op25 directory structure that it would use that data. Why does the path point back to the op25.boatbod directory tree?
===========================
terminal: exception occurred (80, 24)
terminal: exception:
Traceback (most recent call last):
File "/home/pi/op25.boatbod/op25/gr-op25_repeater/apps/terminal.py", line 227, in run
if self.process_q_events():
File "/home/pi/op25.boatbod/op25/gr-op25_repeater/apps/terminal.py", line 218, in process_q_events
return self.process_json(msg.to_string())
File "/home/pi/op25.boatbod/op25/gr-op25_repeater/apps/terminal.py", line 204, in process_json
self.active2.addstr(0, 0, s)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 13: ordinal not in range(128)
======================

The exception occurred when the (curses) terminal.py module was trying to process a "change_freq" message that would have originated inside the trunking.py module. Digging a little deeper, it seems the specific part of the message that caused things to choke was the textual tgid tags, which are contained within one of the .tsv files.

My guess is one (or more) of your TGID tag entries has non-ascii characters and is causing the error you see. Edit the file and take out any funky characters and the problem will likely go away.
 

n5pwp

Member
Joined
Jan 10, 2015
Messages
302
Reaction score
17
Location
Spring, Texas
Thanks, Graham. I guess when you saw that I wasn't a member of the Yahoo group you realized my email bounced going to the list. I could've gone to QRZ.com to see if he had a personal email address listed there. Thank you for make the change and pushing it to the repo. It wasn't a big problem but if it saves someone else frorm having to spend some time figuring it out then it just makes everything run smoother.:wink:

I went through all of my tsv files looking for high ASCII characters but didn't see any in Libre Calc. I could run the files through a hex editor looking for them. You have any other ideas for how to chase it down? Only thing is, it seems to have stopped crashing now so I don't know if when I saved one of the files in Libre Calc maybe it stripped them out. I was wondering if there is any error-correction in OP25. If not maybe a hiccup in the receive might have caused a character to be misinterpreted as a high ASCII character. I'll keep an eye on it and if it happens again I'll go looking through the tsv files again. Maybe there's a Linux command for scanning a file looking for everything above x'128'? I guess its time to Google again. :D

Mike
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,646
Reaction score
1,039
Location
Talbot Co, MD
Thanks, Graham. I guess when you saw that I wasn't a member of the Yahoo group you realized my email bounced going to the list. I could've gone to QRZ.com to see if he had a personal email address listed there. Thank you for make the change and pushing it to the repo. It wasn't a big problem but if it saves someone else frorm having to spend some time figuring it out then it just makes everything run smoother.:wink:

I went through all of my tsv files looking for high ASCII characters but didn't see any in Libre Calc. I could run the files through a hex editor looking for them. You have any other ideas for how to chase it down? Only thing is, it seems to have stopped crashing now so I don't know if when I saved one of the files in Libre Calc maybe it stripped them out. I was wondering if there is any error-correction in OP25. If not maybe a hiccup in the receive might have caused a character to be misinterpreted as a high ASCII character. I'll keep an eye on it and if it happens again I'll go looking through the tsv files again. Maybe there's a Linux command for scanning a file looking for everything above x'128'? I guess its time to Google again. :D

Mike
It's only going to happen when the tag for that specific tgid gets written to the screen. I.e. When then tg is in use and actively being monitored.

If you run log level 1 or above, you might get the "voice update" message in the log immediately before the crash. If it happens several times and the same tgid is listed, that might be enough of a clue where to look.

The real solution is to error-check the file as it is read in. I'll look at that in the next few days as time permits.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,646
Reaction score
1,039
Location
Talbot Co, MD
It's only going to happen when the tag for that specific tgid gets written to the screen. I.e. When then tg is in use and actively being monitored.

If you run log level 1 or above, you might get the "voice update" message in the log immediately before the crash. If it happens several times and the same tgid is listed, that might be enough of a clue where to look.

The real solution is to error-check the file as it is read in. I'll look at that in the next few days as time permits.

I just pushed the fix for non-ascii characters in the trunk tag file. They are now silently stripped, which is not necessarily a very elegant solution, but it does prevent the crash.

Just to be clear, the current terminal.py implementation does not support unicode or non-ascii characters.
 

n5pwp

Member
Joined
Jan 10, 2015
Messages
302
Reaction score
17
Location
Spring, Texas
I did get the crash a couple more times. I looked in the log and saw it was on the same TG. It was one I had modified to add '- Encrypted' in its entry in my tag file. I removed the '-' and the program stopped crashing. What was strange was I had other entries with '-' in them and they didn't crash. Most of the time I edit the tsv files using nano. I used to use Libre-Calc when I edited the files on the desktop install of op25. I had learned the correct way to save the files so they worked with op25 and thought I had done the same things when I used Libre-Calc on the RPi. I'm wondering if maybe I had missed a setting for the character code format in the RPi's Libre-Calc. I went in and changed all settings for locale and format to English USA. I have not edited the files since with Libre-Calc and for the time being I'm sticking with using nano to edit. It seems to be the safer method. Thanks for making the change to protect the program from crashing.

Mike
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,646
Reaction score
1,039
Location
Talbot Co, MD
I did get the crash a couple more times. I looked in the log and saw it was on the same TG. It was one I had modified to add '- Encrypted' in its entry in my tag file. I removed the '-' and the program stopped crashing. What was strange was I had other entries with '-' in them and they didn't crash. Most of the time I edit the tsv files using nano. I used to use Libre-Calc when I edited the files on the desktop install of op25. I had learned the correct way to save the files so they worked with op25 and thought I had done the same things when I used Libre-Calc on the RPi. I'm wondering if maybe I had missed a setting for the character code format in the RPi's Libre-Calc. I went in and changed all settings for locale and format to English USA. I have not edited the files since with Libre-Calc and for the time being I'm sticking with using nano to edit. It seems to be the safer method. Thanks for making the change to protect the program from crashing.

Mike

Have you tried the new code with the old tag file? I'm curious whether it fixes your problem or not.
 

n5pwp

Member
Joined
Jan 10, 2015
Messages
302
Reaction score
17
Location
Spring, Texas
I just did the git pull to download the new code. Launched the program and so far its working fine. I re-added the '-' in the tag file but I don't know if that is enough to simulate the error condition before. I 'think' I added the '-' in originally from within Libre-Calc but I'm not sure if that is what caused the problem. But it sounds like what you did is probably a good thing to do to to keep the program from crashing. I would think it would be better to allow the terminal program to try to display as much as it could without crashing. If it looks funky in the terminal it would draw the user's attention and not crash and leave them with no idea what is going on. I'll keep an eye on it. Plus, it Usually doesn't hurt to be on the latest code. But you know how that goes. ;-)

Mike
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,646
Reaction score
1,039
Location
Talbot Co, MD
I just did the git pull to download the new code. Launched the program and so far its working fine. I re-added the '-' in the tag file but I don't know if that is enough to simulate the error condition before. I 'think' I added the '-' in originally from within Libre-Calc but I'm not sure if that is what caused the problem. But it sounds like what you did is probably a good thing to do to to keep the program from crashing. I would think it would be better to allow the terminal program to try to display as much as it could without crashing. If it looks funky in the terminal it would draw the user's attention and not crash and leave them with no idea what is going on. I'll keep an eye on it. Plus, it Usually doesn't hurt to be on the latest code. But you know how that goes. ;-)

Mike
I'm not sure if I can "fix" the curses terminal or not. It's not specifically been configured for any locale or codeset. Maybe that's the problem.
 

briandef

Member
Joined
Nov 7, 2017
Messages
6
Reaction score
0
Hi all, I appreciate all the info from these threads, I'm hoping someone can help me out with my setup, a Raspberry Pi Model 3 running raspian.

I've compiled gr-op25_repeater from the 'max' branch and it runs successfully and finds the control channel I specify in trunk.tsv. It matches talkgroups with the names in the talkgroup file. It even seems to only try to tune to talkgroups specified in the whitelist.

So far so good, except that's all that works. I can't get any audio out no matter what options I try, localhost or remote host. It's driving me crazy since everything else seems to be working.

I'm trying to pick up EBRCS, a P25 Phase 1 system in the San Francisco Bay Area.

Here's my command line:
./rx.py --args 'rtl' -f 774.133e6 -N 'lna:49' -S 960000 -D cqpsk -T trunk.tsv -v 10 -q -31 -w 2>stderr.2

I have tried both the -U flag and specifying an ip address with -W, both to no avail. The netcat listener on port 23456 doesn't show any data being received at all, on either host.

The console is showing plenty of "voice frequency 770.018750 tgid(s) 3155 None 19.2s ago count 12" lines, about 12 of them live updating. The bottom of the console shows "Frequency 769.76875 Talkgroup ID 3407" and similar messages as it hops around.

stderr.2 is mostly filled with lots of lines reading "NAC 0x1F4 DUID 0x7 len 350 errs 0", occasionally punctuated with "voice update: tg(3605), freq(772093750), slot(None)", "voice timeout", and "control channel timeout" logs.

Thanks for any advice, I hope I'm just missing something obvious.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,646
Reaction score
1,039
Location
Talbot Co, MD
Hi all, I appreciate all the info from these threads, I'm hoping someone can help me out with my setup, a Raspberry Pi Model 3 running raspian.

I've compiled gr-op25_repeater from the 'max' branch and it runs successfully and finds the control channel I specify in trunk.tsv. It matches talkgroups with the names in the talkgroup file. It even seems to only try to tune to talkgroups specified in the whitelist.

So far so good, except that's all that works. I can't get any audio out no matter what options I try, localhost or remote host. It's driving me crazy since everything else seems to be working.

I'm trying to pick up EBRCS, a P25 Phase 1 system in the San Francisco Bay Area.

Here's my command line:
./rx.py --args 'rtl' -f 774.133e6 -N 'lna:49' -S 960000 -D cqpsk -T trunk.tsv -v 10 -q -31 -w 2>stderr.2

I have tried both the -U flag and specifying an ip address with -W, both to no avail. The netcat listener on port 23456 doesn't show any data being received at all, on either host.

The console is showing plenty of "voice frequency 770.018750 tgid(s) 3155 None 19.2s ago count 12" lines, about 12 of them live updating. The bottom of the console shows "Frequency 769.76875 Talkgroup ID 3407" and similar messages as it hops around.

stderr.2 is mostly filled with lots of lines reading "NAC 0x1F4 DUID 0x7 len 350 errs 0", occasionally punctuated with "voice update: tg(3605), freq(772093750), slot(None)", "voice timeout", and "control channel timeout" logs.

Thanks for any advice, I hope I'm just missing something obvious.

As a random guess based on the appearance of voice timeout and control channel timeout messages along with the attempt to tune Ph1 voice, I'd say you have the wrong modulation. Are you trying to do CQPSK or C4FM (fsk4)?

Please can you copy and past your startup command line options, your trunk.tsv and the opening part of your stderr.2 log file up to and including the first few timeout messages.
 

briandef

Member
Joined
Nov 7, 2017
Messages
6
Reaction score
0
As a random guess based on the appearance of voice timeout and control channel timeout messages along with the attempt to tune Ph1 voice, I'd say you have the wrong modulation. Are you trying to do CQPSK or C4FM (fsk4)?

Please can you copy and past your startup command line options, your trunk.tsv and the opening part of your stderr.2 log file up to and including the first few timeout messages.

Thanks for the help. I just updated trunk.tsv and the command line flag to use C4FM/fsk4, and after some more trial and error I at least got *some* audio output. But I can't get it working consistently at all. I'm also trying different values for -q, the best value seems to change by the day/hour.

My current command line:
./rx.py --args 'rtl' -f 774.133e6 -N 'lna:49' -S 960000 -D fsk4 -T trunk.tsv -v 10 -q -34 -w -W 127.0.0.1 -P symbol 2>stderr.2

I'm recording output like this:
pi raspberrypi ~ $ while true ; do nc -luw 1 127.0.0.1 23456 > $(date +%s).out ; echo caught something ; done

Here's my current trunk.tsv file:
"Sysname" "Control Channel List" "Offset" "NAC" "Modulation" "TGID Tags File" "Whitelist" "Blacklist" "Center Frequency"
"EBRCS" "774.133" "0" "0x1f4" "C4FM" "ebrcs.tsv" "ebrcs_wl.txt" "" ""

And here's the beginning of stderr.2:
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!
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.
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
[1510082737.045924] voice update: tg(3406), freq(771793750), slot(None)
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
[1510082739.028988] voice timeout
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
[1510082740.163312] voice update: tg(3406), freq(771793750), slot(None)
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
[1510082742.147650] voice timeout

The most I've managed to capture is about 5-10 seconds of audio across 10 files. More often than not it seems to try then print the voice timeout error message before switching back to the control channel and trying again.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,646
Reaction score
1,039
Location
Talbot Co, MD
Thanks for the help. I just updated trunk.tsv and the command line flag to use C4FM/fsk4, and after some more trial and error I at least got *some* audio output. But I can't get it working consistently at all. I'm also trying different values for -q, the best value seems to change by the day/hour.

My current command line:


I'm recording output like this:


Here's my current trunk.tsv file:


And here's the beginning of stderr.2:


The most I've managed to capture is about 5-10 seconds of audio across 10 files. More often than not it seems to try then print the voice timeout error message before switching back to the control channel and trying again.
My impression is that you are either having a tuning issue (unlikely, since no +/- 1200 errors) or it's still an incorrect modulation problem.

Which repo did you use to build the code? (osmocom or github/boatbod)

While you are configured for fak4 take a look at the datascope plot and post a screen shot.

Did you attempt cqpsk modulation? (Delete the -D fsk4 from the startup options to switch back to cqpsk).

Can you post a screen shot of the mixer plot (key 5)? Note this will only work if you are using my version of op25.

Unless you really want to use nc | aplay, I'd recommend the internal audio player as it incurs less pcm underruns. That's not going to fix this problem though.
 

briandef

Member
Joined
Nov 7, 2017
Messages
6
Reaction score
0
I started out using the osmocom source, but since you've just asked I checked out github/boatbod and built that version. All my recent tests / what I'm saying now has been with the boatbod build.

Running the same command lines as with the osmocom build (ok, I added '-o 30000' but that's it). You build is definitely transmitting more over the udp socket, but it's not decoded/demodulated audio, just static or a p25-sounding hum. This is after trying both C4FM/fsk4 and CQPSK configurations.

I've attached a datascope plot from one of the C4FM/fsk4 attempts.

On both builds/versions, I've tried both fsk4 and cqpsk, to similar results. Actually, I still haven't been able to get playable audio from your build, even though your build seems to detect and attempt to demodulate more often.

Here's a mixer plot from one of the fsk4 runs as well. Stays at around that value when tuned to the control channel.

The logs from boatbod build mostly just spamming that familiar "NAC 0x1F4 DUID 0x7 len 360 errs 0" line along with lots of tgid and freq lines being spammed:

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!
p25_demodulator::connect_chain() demod_type=fsk4
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.
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
NAC 0x1F4 DUID 0x7 len 360 errs 0
1510122608.297642 set tgid: 3155
1510122608.298692 new tgid: 3155 Emeryville PD1
1510122608.299327 new freq: 770.018750
1510122608.299545 set tgid: 3407
1510122608.299625 new tgid: 3407 Oakland PD3
1510122608.299957 new freq: 770.568750
1510122608.301290 set tgid: 3724
1510122608.301453 new tgid: 3724 ACSO Bailiff
1510122608.301785 new freq: 771.193750
NAC 0x1F4 DUID 0x7 len 360 errs 0
1510122608.357006 set tgid: 3724

Even though it's inconsistent and unreliable, I have managed to get some voice audio output from the osmocom build, when running with C4FM modulation. Does this mean the modulation is definitely C4FM/fsk4? Should I keep trying CQPSK?

Thanks for all the help, your build of op25 is great.
 

Attachments

  • datascope.plot.png
    datascope.plot.png
    54.1 KB · Views: 358
  • mixer.plot.png
    mixer.plot.png
    28.1 KB · Views: 355

royldean

Member
Joined
Jan 30, 2016
Messages
471
Reaction score
103
Location
Schwenksville, PA
Finally got a chance to hook up a monitor to my pi and "startx". From a terminal in the gui, I use my standard start script and I get a failure as soon as I hit a number to open a plot. If I use the -P fft command line, I get this:

Code:
gr-osmosdr 0.1.3 (0.1.3) gnuradio 3.7.5
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy
Using device #0 Realtek RTL2838UHIDIR SN: 00000001
Found Rafael Micro R820T tuner
Invalid sample rate: 350000 Hz
p25_demodulator::connect_chain() demod_type=cqpsk
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_udp::open_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[1]
Traceback (most recent call last):
  File "./rx.py", line 772, in <module>
    tb = p25_rx_block()
  File "./rx.py", line 225, in __init__
    self.open_usrp()
  File "./rx.py", line 704, in open_usrp
    self.__set_rx_from_osmosdr()
  File "./rx.py", line 640, in __set_rx_from_osmosdr
    self.__build_graph(self.src, capture_rate)
  File "./rx.py", line 296, in __build_graph
    self.toggle_fft()
  File "./rx.py", line 515, in toggle_fft
    self.fft_sink = fft_sink_c()
  File "/home/pi/op25/op25/gr-op25_repeater/apps/gr_gnuplot.py", line 227, in __init__
    self.gnuplot = wrap_gp()
  File "/home/pi/op25/op25/gr-op25_repeater/apps/gr_gnuplot.py", line 55, in __init__
    self.attach_gp()
  File "/home/pi/op25/op25/gr-op25_repeater/apps/gr_gnuplot.py", line 60, in attach_gp
    self.gp = subprocess.Popen(args, executable=exe, stdin=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Any clues?
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,646
Reaction score
1,039
Location
Talbot Co, MD
I started out using the osmocom source, but since you've just asked I checked out github/boatbod and built that version. All my recent tests / what I'm saying now has been with the boatbod build.

Running the same command lines as with the osmocom build (ok, I added '-o 30000' but that's it). You build is definitely transmitting more over the udp socket, but it's not decoded/demodulated audio, just static or a p25-sounding hum. This is after trying both C4FM/fsk4 and CQPSK configurations.

I've attached a datascope plot from one of the C4FM/fsk4 attempts.

On both builds/versions, I've tried both fsk4 and cqpsk, to similar results. Actually, I still haven't been able to get playable audio from your build, even though your build seems to detect and attempt to demodulate more often.

Here's a mixer plot from one of the fsk4 runs as well. Stays at around that value when tuned to the control channel.

The logs from boatbod build mostly just spamming that familiar "NAC 0x1F4 DUID 0x7 len 360 errs 0" line along with lots of tgid and freq lines being spammed:



Even though it's inconsistent and unreliable, I have managed to get some voice audio output from the osmocom build, when running with C4FM modulation. Does this mean the modulation is definitely C4FM/fsk4? Should I keep trying CQPSK?

Thanks for all the help, your build of op25 is great.

One thing that is most definitely missing in your recent log is a line that says "audio device: default" which means the built-in audio decoder is not turned on. You need at least a -V and -U on the command line to make that happen, and if you want phase 2 tdma you need a -2 as well.

The datascope plot looks good and seems to confirm c4fm/fsk4 modulation at least on the control channel. If yours is a phase 1 system you can stick with -D fsk4 on the command line (the modulation settings in trunk.tsv are ignored and do nothing). The mixer plot looks nicely centered, so it doesn't look like a mistune problem. Is your RTL dongle fitted with a TXCO? I'd guess perhaps not if the tuning is varying over time?

One other consideration is that the RPI3 is a little low on cpu horsepower, so avoid running plots for longer than necessary as they definitely affect audio decoding/playback. Similarly, go with as low a sample rate as is reliable - on my rpi3 I've got it set to "-S 274000". NOTE: you can go too low and the RTL driver will kick back an error.
 
Status
Not open for further replies.
Top