-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] tuning LO across frequency border leads to reset gain setting #42
Comments
current workaround - when it happens, just change gain for some value and return it back, it will restore proper gain. Unfortunately there is no way to detect when it happens, so you're needs to be careful with change LO across HF and VHF bands |
just tested what returns driver function rtlsdr_get_tuner_gain when this issue happens. For example here is sequence which demonstrate the bug in the driver:
So, this is a bug of rtl-sdr-blog driver. |
I'll have a look at this on Linux in a few days time. I just did a quick test on Windows with SDR# but couldn't reproduce it there. |
just tried driver from original repository:
it works ok, with no this issue and it appears more fresh than your code and already supports RTLSDRv4. The issue is present in the driver code from your reporsitory. Please fix it, or just apply changes from original osmocom repository to your repository. Because it confuses users who installed driver. My first impression was that I got broken RTLSDRv4 device, because it didn't received signals when I tune it from HF band to VHF. Now it's clean that it appears due to this gain issue. |
Hm I just tested this on Linux with the rtl-sdr-blog driver and SDR++, but I still cannot reproduce it using your steps. Can I know the details of what system you are running on? The rtl-sdr-blog fork is almost exactly the same as the osmocom drivers, so I suspect the problem you are having is something to do with ef7651c. I added this commit to fix a problem with another group of users who noticed that osmocom and the old rtl-sdr-blog driver versions were having issues with rapid tuning used for scanning on AMD devices. This fixed that issue, but I did suspect that it could have unintended consequences for other systems. Though no system I have available to test on shows any problems. |
I'm running on raspberry pi OS bookworm aarch64. |
I just tested on a Pi 5 Bookworm with SDR++ but still can't reproduce. What model Raspberry Pi are you running on?
To reproduce do you have to slowly step up back to >80 MHz in 0.1-1 MHz steps, or does larger 10Mhz step changes also trigger the issue? I've tried both but both are working fine from what I see. |
I'm using RPI4 with 6.6.17-v8+ kernel, you can install this latest kernel with
but I don't think it related to platform or kernel. It happens with code from your repository cloned on 30-JAN-2024. It was compiled and installed according to your instructions here: https://www.rtl-sdr.com/V4/ The issue happened when you tune LO slowly from 5 MHZ to 100 MHz with step about 100 kHz-1 MHz using mouse wheel and placing mouse cursor on frequency digit. I reproduce it when SDR++ was in LO mode. Usually I tested it with RTLSDRv3, but as I remember it also happened for RTLSDRv4 either, because it happens just at first RTLSDRv4 test. This issue was stable reproduced on the driver code compiled from your repository, so I have no idea why you cannot reproduce it. May be you're using driver with changes from latest osmocom driver which already fix it. Currently I switched to the latest osmocom driver which don't have such issue. I compare source and yes there is some minor difference which you posted above. I think these difference is the root of cause for this issue. For more reliable steps to reproduce, you can use c++ code that I posted above:
|
Some new finding probably related with this issue. Installing osmocom driver version didn't helped. But my old OS setup works ok with v4. Detailed investigation shows that process loads incorrect library:
It appears that there is
And it solved the issue, now it loads correct library (which is installed with
And now it works ok. |
Steps to reproduce:
Expected result: since gain is set to 40.2 dB and didn't changed it should restore proper 40.2 dB gain
Actual result: the actual gain is reset to 0 dB, but SDR++ still shows 40.2 dB and it didn't changed by user. You can check it with noise floor and signals level.
The text was updated successfully, but these errors were encountered: