OP25 tuning errors

Status
Not open for further replies.

maredzki

Member
Feed Provider
Joined
Feb 21, 2019
Messages
72
Hi Guys,

I ‘m running this on rapsberry pi and I ‘ve tried the following and they come up with very similar results. It will run for 1-15 minutes and then start throwing tuning errors. Please help!

Here are the two I‘ve tried so far:

./rx.py -l http:127.0.0.1:8080 --args 'rtl' -N 'LNA:47' -S 960000 -o 25000 -q -2 -d 0 -T trunk.tsv -V -2 -U 2> stderr.log

./rx.py --args 'rtl' -N 'LNA:47' -S 960000 -o 25000 -q -2 -d 0 -T trunk.tsv -V -2 -U 2> stderr.log

I originally thought it was related to too many trunks being listened into but after shrinking it down to a few, I still see this behaviour.

This is my second scanner, I do not recall having those issues on my other OP25 on raspberrypi.



Code:
gr-osmosdr 0.1.4 (0.1.4) gnuradio 3.7.13.4
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy airspyhf soapy redpitaya freesrp
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[1], do_nocrypt[0]
Reading whitelist file
metadata update not enabled
audio device: default
Allocating 15 zero-copy buffers
Allocating 15 zero-copy buffers
Allocating 15 zero-copy buffers
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
 
Last edited:

nick0909

Antenna flicker
Feed Provider
Joined
Jan 4, 2003
Messages
104
What RTL device do you have? Depending on how it handles temperature changes (if it has a txco or not) they can drift quite a bit once warmed up. However most are stable at their operating temp so you have to warm them up and then find the correction value. WIth that, how did you arrive at "-q -2" ? You may need to adjust that or the -d fine tune. Look at the COR plot, you want the 4 circles as tight together as possible and at perfect 45 degree offset from up/down right/left. You may also not need the -o value depending on what RTL you have. Trial and error will get you there... my OP25 on a Pi 4 with a cheap RTL dongle receives way better than trunk-recorder using the same RTL or an airspy once tuned well but it took me a bit adjusting values and watching the results.
 

maredzki

Member
Feed Provider
Joined
Feb 21, 2019
Messages
72
This is the RTL-SDR and I have two more that are functioning just fine: one is OP25 and one does dual FA and FR24 and they are in areas where temp is not regulated and doing just fine.
-q -2 was a trial and error, -1 was working fine as well, but both had same results. Removing -q did not work.
I looked at the CON plot and it fluctuates, sometimes it is perfect as a bunch and sometimes it is scattered but still in 45/deg angles from the center.
 

Attachments

fredva

Member
Feed Provider
Joined
Mar 19, 2007
Messages
1,696
Location
Virginia/West Virginia
This is the RTL-SDR and I have two more that are functioning just fine: one is OP25 and one does dual FA and FR24 and they are in areas where temp is not regulated and doing just fine.
-q -2 was a trial and error, -1 was working fine as well, but both had same results. Removing -q did not work.
I looked at the CON plot and it fluctuates, sometimes it is perfect as a bunch and sometimes it is scattered but still in 45/deg angles from the center.
But does the RTL-SDR having the problem have a brand name? If not, that might be the issue. I started OP25 using generic dongles but they would drift off frequency after about 30 minutes or so. Bought a NooElec RTL-SDR dongle and it works much better.
 

nick0909

Antenna flicker
Feed Provider
Joined
Jan 4, 2003
Messages
104
Try the fine (-d) as well as the large (-q). I believe 1 large offset is 1200 of the fine offset (aka -d 1200 is the same as -q 1). Most of my dongles are -q 0 -d 500 or so, I don't use the large value. You can do this live in the web interface by hitting the << < > >> buttons as well, adjust it while looking at the plots, watch the estimated frequency error and get that as close to 0 as possible. Once you find the best value (fine tune offset #) on the plots, then put that in your command line to run from the start.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
2,582
Location
Talbot Co, MD
What does the mixer plot (#5) and datascope plot (#4) look like?

In post#3 the first constellation plot looks reasonably ok (a little noisy, but locked in the corners) however the second looks horribly smeared. I suspect either lots of multipath or just low signal strength?
 

nick0909

Antenna flicker
Feed Provider
Joined
Jan 4, 2003
Messages
104
RTL-SDR BLOG that's what says on it. I assume it has the RealTek chipset, RTL2832U.
I have this dongle, it does drift a bit when hot, so let it run for ~20 minutes and then fine tune it. Once it is warmed up the correction should be the same so as long as it is at operating temp your offsets will work. Just ignore any errors until it is warm and running for a bit. There are some nooelec v4 ones that have worked better for me if you are interested in trying another dongle.
 

maredzki

Member
Feed Provider
Joined
Feb 21, 2019
Messages
72
What does the mixer plot (#5) and datascope plot (#4) look like?

In post#3 the first constellation plot looks reasonably ok (a little noisy, but locked in the corners) however the second looks horribly smeared. I suspect either lots of multipath or just low signal strength?
I am pretty close to the transmitting antenna, less than a mile I suspect for previous experience. I have a working op25, same settings and perfectly fine. For whatever reason this one is throwing a fit. Same exact setup in regards to hardware.
 

Attachments

maredzki

Member
Feed Provider
Joined
Feb 21, 2019
Messages
72
I have this dongle, it does drift a bit when hot, so let it run for ~20 minutes and then fine tune it. Once it is warmed up the correction should be the same so as long as it is at operating temp your offsets will work. Just ignore any errors until it is warm and running for a bit. There are some nooelec v4 ones that have worked better for me if you are interested in trying another dongle.
That’s very strange: I have two same setups, one in the garage and one in the attic and no issues to report. I’m assuming the hardware might see some corrosion due to humidity changes after sometime but that’s understood. This one I cannot figure out on my own. I wonder if I have faulty dongle?
 

rivardj

Member
Joined
Dec 19, 2009
Messages
247
Location
Michigan
It appears that you have the LNA Gain set to 47, that is quite high. I am a good distance from some of the sites I monitor and have my LNA Gain set around 29. You may want to reduce yours as you may have a signal overload condition of some sort. If you are real close to the sites you are monitoring I would go into the low twenties. I had choppy audio and other issues until I reduced my LNA Gain.
 

maredzki

Member
Feed Provider
Joined
Feb 21, 2019
Messages
72
Try the fine (-d) as well as the large (-q). I believe 1 large offset is 1200 of the fine offset (aka -d 1200 is the same as -q 1). Most of my dongles are -q 0 -d 500 or so, I don't use the large value. You can do this live in the web interface by hitting the << < > >> buttons as well, adjust it while looking at the plots, watch the estimated frequency error and get that as close to 0 as possible. Once you find the best value (fine tune offset #) on the plots, then put that in your command line to run from the start.
I switched to -q 0 -d 500 and withing seconds I got the tuning errors in the log.
 

maredzki

Member
Feed Provider
Joined
Feb 21, 2019
Messages
72
It appears that you have the LNA Gain set to 47, that is quite high. I am a good distance from some of the sites I monitor and have my LNA Gain set around 29. You may want to reduce yours as you may have a signal overload condition of some sort. If you are real close to the sites you are monitoring I would go into the low twenties. I had choppy audio and other issues until I reduced my LNA Gain.
I went down with LNA to 15 and started going up and reception increased with a higher number but still continued to have tuning errors after a while. Left it at 36.
 

nick0909

Antenna flicker
Feed Provider
Joined
Jan 4, 2003
Messages
104
I switched to -q 0 -d 500 and withing seconds I got the tuning errors in the log.
If you were -q -2 -d 0 and you went to -q 0 -d 500 you just did a massive swing of 2,900. Don't use my numbers exactly, but adjust yours in small steps to find where it works well for you. Start at -q 0 -d 0 and use the arrows in the web interface to do small (they are equal to -d 100) increments up or down until you find the value that works well, then put that in your command line so it is used every time. Every dongle, even the same brand and model, will have its own unique offset value. You have to find it for every one you own, you can't copy any others. And make sure op25 has been running for 10+ minutes before fine tuning to let it get up to temperature.

From the other comments about gain, I am also about a mile from a transmitter (I can literally see it out my window) and I use LNA:12 with great reception. But it also depends on antenna/feedline. Maybe you have a bad antenna feed? Try swapping those if you can and compare.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
2,582
Location
Talbot Co, MD
I am pretty close to the transmitting antenna, less than a mile I suspect for previous experience. I have a working op25, same settings and perfectly fine. For whatever reason this one is throwing a fit. Same exact setup in regards to hardware.
The two plots show that your tuning is way off and I'm actually surprised it is locking at all.

The signal "hump" of the mixer plot should ideally be centered on the tuning line, and the datascope convergences (top & bottom of the eyes) should occur at +/-3 and +/-1 respectively.

First zero the fine tuning and adjust the ppm (-q), then follow up with fine tuning adjustments no more than +/-300.
 

KA1RBI

Member
Joined
Aug 15, 2008
Messages
581
Location
Portage Escarpment
The problem of these tuning errors has plagued OP25 for a long time as has the need to manually correct. In an ideal world the frequency offset error would be automatically detected and cancelled out by making a programmed adjustment to the "LO" frequency.

Along these lines I've added an experimental "frequency error tracking" option (-X) to the osmocom repo in master. I suspect it will need more tweaking over time (as with most things) but for now I'd like to see some testing and feedback on it to get an idea as to how robust it might be currently. It was developed in a fairly harsh environment (using an old non-compensated RTL stick). My initial impression is that it works fairly well with the biggest problem area occurring when several different trunked systems spanning the 400 and 800 bands are present in the trunking TSV file at the same time. In the simpler case where a temp-compensated SDR is in use to track a single system I'd expect it to perform OK. As a test I've deliberately set the ppm error (-q) value to be off by a few clicks and aside from an initial startup delay it seems to work. At the moment if you have a non-compensated SDR it's still necessary to set the -q value to something fairly close to the correct value - I doubt that it would be able to correct for -q errors exceeding, say, five or ten.

The eventual goal should hopefully be that we can hopefully get rid of the need for manual options to tweak the frequency offsets once and for all...

Max

p.s. should be noted this currently only works when "cqpsk" demod type is used. The fsk4 demod is much more forgiving of tuning error, although with the advent of 6.25 KHz channel width support for NXDN you can have a whole new problem: offset errors can push the signal out of the channel filter's passband...
 

maredzki

Member
Feed Provider
Joined
Feb 21, 2019
Messages
72
The problem of these tuning errors has plagued OP25 for a long time as has the need to manually correct. In an ideal world the frequency offset error would be automatically detected and cancelled out by making a programmed adjustment to the "LO" frequency.

Along these lines I've added an experimental "frequency error tracking" option (-X) to the osmocom repo in master. I suspect it will need more tweaking over time (as with most things) but for now I'd like to see some testing and feedback on it to get an idea as to how robust it might be currently. It was developed in a fairly harsh environment (using an old non-compensated RTL stick). My initial impression is that it works fairly well with the biggest problem area occurring when several different trunked systems spanning the 400 and 800 bands are present in the trunking TSV file at the same time. In the simpler case where a temp-compensated SDR is in use to track a single system I'd expect it to perform OK. As a test I've deliberately set the ppm error (-q) value to be off by a few clicks and aside from an initial startup delay it seems to work. At the moment if you have a non-compensated SDR it's still necessary to set the -q value to something fairly close to the correct value - I doubt that it would be able to correct for -q errors exceeding, say, five or ten.

The eventual goal should hopefully be that we can hopefully get rid of the need for manual options to tweak the frequency offsets once and for all...

Max

p.s. should be noted this currently only works when "cqpsk" demod type is used. The fsk4 demod is much more forgiving of tuning error, although with the advent of 6.25 KHz channel width support for NXDN you can have a whole new problem: offset errors can push the signal out of the channel filter's passband...
That sounds good, so what would you recommend I do at this point? Is -X available in the rx.py currently? I currently do cqpsk as noted in the trunk.tsv as well.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
2,582
Location
Talbot Co, MD
That sounds good, so what would you recommend I do at this point? Is -X available in the rx.py currently? I currently do cqpsk as noted in the trunk.tsv as well.
-X is presently only available in the osmocom version of op25. I am looking at merging Max's code to the boatbod version, but doubt this will happen until this weekend at the earliest.
 

maredzki

Member
Feed Provider
Joined
Feb 21, 2019
Messages
72
-X is presently only available in the osmocom version of op25. I am looking at merging Max's code to the boatbod version, but doubt this will happen until this weekend at the earliest.
That is fine with me. If you could let me know when it is ready, I will pull it down and install it. Will I have to uninstall the current code or will it install over the current one?

Also, what would be my new rx.py with the -X option, will I need to use -q or -d?

You guys rock!!!
 

foxtail

Member
Premium Subscriber
Joined
Dec 19, 2002
Messages
268
Location
Niagara Region Canada
Why not fire up GQRX and tune to a weather channel and setup your PPM with it? Let it run for about 20 mins. and see where your PPM is after the warm up. I'll run my PPM setup that way to get a value.
 
Status
Not open for further replies.
Top