Closed W3AXL closed 11 months ago
A little more testing - the heart of the issue is AGC being forced on - IFGR
can't be set when it's enabled.
According to https://github.com/robotastic/trunk-recorder/issues/422#issuecomment-961987028 AGC must be first enabled then disabled again to properly disable, but it doesn't look like that process got committed anywhere in #546
This is also preventing me from decoding the system I'm tracking. Control channel is decoding fine, but all audio calls are heavily garbled with lots of errors which I'm guessing is due to the overall signals being too low. My previous setup with 3 RTL dongles worked fine on the same antenna.
I wonder if you take line 532 in main.cc: https://github.com/robotastic/trunk-recorder/blob/a30ee308518d478c4fdcd39fab2314717898bd65/trunk-recorder/main.cc#L532
Then slightly modify the ACG code and move it above the other gain settings (prior to line 473) something like this:
if(!agc){
source->set_gain_mode(true); // Enable AGC before disabling AGC
source->set_gain_mode(false);
}
else
{
source->set_gain_mode(true);
}
Does that fix the issue? I don't have anything to test it with, but based on your comments it seems like it may just be an order of operations issue.
Sorry for abandoning this issue - life has been busy. You guys are correct - I added lines in the code to toggle AGC on startup and that seems to have resolved the gain settings issue. I'll try and remember to do a PR later today for that change.
Now there's an entirely different issue where higher samplerates (above 2 MHz) are unable to demodulate P25, but I'm still trying to track down whether that's a signal level issue or an issue with the OP25 decimators.
FYI I am unable to get gain control to work with my RSP1 from a fresh build of
trunk-recorder
. I've tried several settings recommended in #422 and it appears that the changes in #546 aren't working correctly.My source config:
And the output when the device is initialized:
As you can see, AGC is not disabled properly and the IF gain reduction is not set to the correct value. IFGR seems to always revert to 50, while RFGR does properly update to the desired setting. Despite changing both
agc
tofalse
and addingagc_setpoint=0
to the device parameters, AGC remains on which makes my RSP1 unusable for the trunking system I'm monitoring.Originally posted by @W3AXL in https://github.com/robotastic/trunk-recorder/issues/422#issuecomment-1128334162