Skip to content
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

fix: initialize FC0012 gain #2417

Merged
merged 1 commit into from
Mar 12, 2023
Merged

fix: initialize FC0012 gain #2417

merged 1 commit into from
Mar 12, 2023

Conversation

eshaz
Copy link
Contributor

@eshaz eshaz commented Mar 12, 2023

Fixes a hardware issue with the Fitipower FC0012 where the gain is not properly set unless it is first initialized to it's lowest value.

See charlie-foxtrot/RTLSDR-Airband#145 for additional information.

@zuckschwerdt
Copy link
Collaborator

Thanks! Can some users with a FitiPower FC0012 RTL-SDR run this an confirm the fix? This would be important news for FitiPower FC0012.
@merbanan do you have a FitiPower FC0012?

@merbanan
Copy link
Owner

I think I have one of those.

@merbanan
Copy link
Owner

merbanan commented Mar 12, 2023

But if the submitter can send logs before and after that is ok also. Does this issue affect FC0013 also or is this only for FC0012? I know the tuner driver in FC0012 is different from FC0013 and that this should probably be fixed in librtlsdr. But maintainance of it seems to be lacking.

@merbanan merbanan closed this Mar 12, 2023
@merbanan merbanan reopened this Mar 12, 2023
@eshaz
Copy link
Contributor Author

eshaz commented Mar 12, 2023

I found this issue #1669 that might be related. Interesting that this issue is referencing the FC0013. Perhaps they reused some firmware code that contains the same bug in both versions?

I fully agree this should be fixed in librtlsdr. I'll take a look at this.

I tested this out using GQRX and you can visually see that the gain was not being set properly on the spectrogram. The gain setting was ignored unless it was set right after being set to the minimum value. This fix also helped considerably in the RTLSDR-Airband project referenced above.

I'll attach get some logs here shortly.

@merbanan
Copy link
Owner

I think I have both tuners somewhere. But Im all for to just blindly apply this to both FC0012 and FC0013 and ping the old issue.

@eshaz
Copy link
Contributor Author

eshaz commented Mar 12, 2023

Here are logs before and after the fix. The after change shows a lower signal / noise level, which matches the desired gain level.

before changes
Mar 12 11:25:18 flipwild rtl_433[106997]: rtl_433 version nightly-3-g376f1b02 branch master at 202303101654 inputs file rtl_tcp RTL-SDR
Mar 12 11:25:18 flipwild rtl_433[106997]: Use -h for usage help and see https://triq.org/ for documentation.
Mar 12 11:25:18 flipwild rtl_433[106997]: MQTT: Publishing MQTT data to mqtt.lan port 1883
Mar 12 11:25:18 flipwild rtl_433[106997]: MQTT: Publishing device info to MQTT topic "rtl_433/flipwild/devices[/type][/model][/subtype][/channel][/id]".
Mar 12 11:25:18 flipwild rtl_433[106997]: MQTT: Publishing events info to MQTT topic "rtl_433/flipwild/events".
Mar 12 11:25:18 flipwild rtl_433[106997]: MQTT: Publishing states info to MQTT topic "rtl_433/flipwild/states".
Mar 12 11:25:18 flipwild rtl_433[106997]: [Protocols] Registered 210 out of 243 device decoding protocols [ 1-4 8 11-12 15-17 19-23 25-26 29-36 38-60 63 67-71 73-100 102-105 108-116 119-121 124-128 130-149 151-161 163-168 170-175 177-197 199 201-215 217-228 230-232 234-241 243 ]
Mar 12 11:25:18 flipwild rtl_433[106997]: [Input] The internals of input handling changed, read about and report problems on PR #1978
Mar 12 11:25:18 flipwild rtl_433[106997]: [SDR] Found 1 device(s)
Mar 12 11:25:18 flipwild rtl_433[106997]: [SDR] trying device 0: Realtek, RTL2838UHIDIR, SN: 00000203
Mar 12 11:25:18 flipwild rtl_433[106997]: Detached kernel driver
Mar 12 11:25:18 flipwild rtl_433[106997]: Found Fitipower FC0012 tuner
Mar 12 11:25:18 flipwild rtl_433[106997]: [SDR] Using device 0: Realtek, RTL2838UHIDIR, SN: 00000203, "Generic RTL2832U OEM"
Mar 12 11:25:18 flipwild rtl_433[106997]: Exact sample rate is: 250000.000414 Hz
Mar 12 11:25:18 flipwild rtl_433[106997]: [SDR] Sample rate set to 250000 S/s.
Mar 12 11:25:18 flipwild rtl_433[106997]: [Input] Bit detection level set to 0.0 (Auto).
Mar 12 11:25:18 flipwild rtl_433[106997]: [SDR] Tuner gain set to 7.100000 dB.
Mar 12 11:25:18 flipwild rtl_433[106997]: [Input] Reading samples in async mode...
Mar 12 11:25:19 flipwild rtl_433[106997]: [SDR] Tuned to 433.910MHz.
Mar 12 11:25:19 flipwild rtl_433[106997]: Allocating 15 zero-copy buffers
Mar 12 11:25:19 flipwild rtl_433[106997]: [MQTT] MQTT Connected...
Mar 12 11:25:19 flipwild rtl_433[106997]: [MQTT] MQTT Connection established.
Mar 12 11:25:19 flipwild rtl_433[106997]: [Baseband] low pass filter for 250000 Hz at cutoff 25000 Hz, 40.0 us
Mar 12 11:25:20 flipwild rtl_433[106997]: [Auto Level] Current signal level -10.2 dB, estimated noise -14.8 dB
Mar 12 11:25:21 flipwild rtl_433[106997]: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Mar 12 11:25:21 flipwild rtl_433[106997]: time      : 2023-03-12 11:25:21.338705
Mar 12 11:25:21 flipwild rtl_433[106997]: Protocol  : 40
Mar 12 11:25:21 flipwild rtl_433[106997]: model     : Acurite-Tower
Mar 12 11:25:21 flipwild rtl_433[106997]: id        : 12034
Mar 12 11:25:21 flipwild rtl_433[106997]: channel   : C
Mar 12 11:25:21 flipwild rtl_433[106997]: Battery   : 1
Mar 12 11:25:21 flipwild rtl_433[106997]: Temperature: 16.3 C
Mar 12 11:25:21 flipwild rtl_433[106997]: Humidity  : 1 %
Mar 12 11:25:21 flipwild rtl_433[106997]: Integrity : CHECKSUM
Mar 12 11:25:21 flipwild rtl_433[106997]: Modulation: ASK
Mar 12 11:25:21 flipwild rtl_433[106997]: Freq      : 433.9 MHz
Mar 12 11:25:21 flipwild rtl_433[106997]: RSSI      : -0.3 dB
Mar 12 11:25:21 flipwild rtl_433[106997]: SNR       : 10.5 dB
Mar 12 11:25:21 flipwild rtl_433[106997]: Noise     : -10.8 dB
Mar 12 11:25:21 flipwild rtl_433[106997]: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Mar 12 11:25:21 flipwild rtl_433[106997]: time      : 2023-03-12 11:25:21.338705
Mar 12 11:25:21 flipwild rtl_433[106997]: Protocol  : 40
Mar 12 11:25:21 flipwild rtl_433[106997]: model     : Acurite-Tower
Mar 12 11:25:21 flipwild rtl_433[106997]: id        : 12034
Mar 12 11:25:21 flipwild rtl_433[106997]: channel   : C
Mar 12 11:25:21 flipwild rtl_433[106997]: Battery   : 1
Mar 12 11:25:21 flipwild rtl_433[106997]: Temperature: 16.3 C
Mar 12 11:25:21 flipwild rtl_433[106997]: Humidity  : 1 %
Mar 12 11:25:21 flipwild rtl_433[106997]: Integrity : CHECKSUM
Mar 12 11:25:21 flipwild rtl_433[106997]: Modulation: ASK
Mar 12 11:25:21 flipwild rtl_433[106997]: Freq      : 433.9 MHz
Mar 12 11:25:21 flipwild rtl_433[106997]: RSSI      : -0.3 dB
Mar 12 11:25:21 flipwild rtl_433[106997]: SNR       : 10.5 dB
Mar 12 11:25:21 flipwild rtl_433[106997]: Noise     : -10.8 dB
Mar 12 11:25:21 flipwild rtl_433[106997]: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Mar 12 11:25:21 flipwild rtl_433[106997]: time      : 2023-03-12 11:25:21.338705
Mar 12 11:25:21 flipwild rtl_433[106997]: Protocol  : 40
Mar 12 11:25:21 flipwild rtl_433[106997]: model     : Acurite-Tower
Mar 12 11:25:21 flipwild rtl_433[106997]: id        : 12034
Mar 12 11:25:21 flipwild rtl_433[106997]: channel   : C
Mar 12 11:25:21 flipwild rtl_433[106997]: Battery   : 1
Mar 12 11:25:21 flipwild rtl_433[106997]: Temperature: 16.3 C
Mar 12 11:25:21 flipwild rtl_433[106997]: Humidity  : 1 %
Mar 12 11:25:21 flipwild rtl_433[106997]: Integrity : CHECKSUM
Mar 12 11:25:21 flipwild rtl_433[106997]: Modulation: ASK
Mar 12 11:25:21 flipwild rtl_433[106997]: Freq      : 433.9 MHz
Mar 12 11:25:21 flipwild rtl_433[106997]: RSSI      : -0.3 dB
Mar 12 11:25:21 flipwild rtl_433[106997]: SNR       : 10.5 dB
Mar 12 11:25:21 flipwild rtl_433[106997]: Noise     : -10.8 dB
Mar 12 11:25:30 flipwild rtl_433[106997]: [Auto Level] Current signal level -8.1 dB, estimated noise -11.8 dB
Mar 12 11:25:30 flipwild rtl_433[106997]: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Mar 12 11:25:30 flipwild rtl_433[106997]: time      : 2023-03-12 11:25:29.483589
Mar 12 11:25:30 flipwild rtl_433[106997]: Protocol  : 40
Mar 12 11:25:30 flipwild rtl_433[106997]: model     : Acurite-Tower
Mar 12 11:25:30 flipwild rtl_433[106997]: id        : 342
Mar 12 11:25:30 flipwild rtl_433[106997]: channel   : B
Mar 12 11:25:30 flipwild rtl_433[106997]: Battery   : 1
Mar 12 11:25:30 flipwild rtl_433[106997]: Temperature: -1.8 C
Mar 12 11:25:30 flipwild rtl_433[106997]: Humidity  : 82 %
Mar 12 11:25:30 flipwild rtl_433[106997]: Integrity : CHECKSUM
Mar 12 11:25:30 flipwild rtl_433[106997]: Modulation: ASK
Mar 12 11:25:30 flipwild rtl_433[106997]: Freq      : 433.9 MHz
Mar 12 11:25:30 flipwild rtl_433[106997]: RSSI      : -0.2 dB
Mar 12 11:25:30 flipwild rtl_433[106997]: SNR       : 10.2 dB
Mar 12 11:25:30 flipwild rtl_433[106997]: Noise     : -10.4 dB
Mar 12 11:25:30 flipwild rtl_433[106997]: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Mar 12 11:25:30 flipwild rtl_433[106997]: time      : 2023-03-12 11:25:29.483589
Mar 12 11:25:30 flipwild rtl_433[106997]: Protocol  : 40
Mar 12 11:25:30 flipwild rtl_433[106997]: model     : Acurite-Tower
Mar 12 11:25:30 flipwild rtl_433[106997]: id        : 342
Mar 12 11:25:30 flipwild rtl_433[106997]: channel   : B
Mar 12 11:25:30 flipwild rtl_433[106997]: Battery   : 1
Mar 12 11:25:30 flipwild rtl_433[106997]: Temperature: -1.8 C
Mar 12 11:25:30 flipwild rtl_433[106997]: Humidity  : 82 %
Mar 12 11:25:30 flipwild rtl_433[106997]: Integrity : CHECKSUM
Mar 12 11:25:30 flipwild rtl_433[106997]: Modulation: ASK
Mar 12 11:25:30 flipwild rtl_433[106997]: Freq      : 433.9 MHz
Mar 12 11:25:30 flipwild rtl_433[106997]: RSSI      : -0.2 dB
Mar 12 11:25:30 flipwild rtl_433[106997]: SNR       : 10.2 dB
Mar 12 11:25:30 flipwild rtl_433[106997]: Noise     : -10.4 dB
Mar 12 11:25:33 flipwild rtl_433[106997]: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Mar 12 11:25:33 flipwild rtl_433[106997]: time      : 2023-03-12 11:25:32.674858
Mar 12 11:25:33 flipwild rtl_433[106997]: Protocol  : 40
Mar 12 11:25:33 flipwild rtl_433[106997]: model     : Acurite-Tower
Mar 12 11:25:33 flipwild rtl_433[106997]: id        : 12084
Mar 12 11:25:33 flipwild rtl_433[106997]: channel   : A
Mar 12 11:25:33 flipwild rtl_433[106997]: Battery   : 1
Mar 12 11:25:33 flipwild rtl_433[106997]: Temperature: 13.0 C
Mar 12 11:25:33 flipwild rtl_433[106997]: Humidity  : 53 %
Mar 12 11:25:33 flipwild rtl_433[106997]: Integrity : CHECKSUM
Mar 12 11:25:33 flipwild rtl_433[106997]: Modulation: ASK
Mar 12 11:25:33 flipwild rtl_433[106997]: Freq      : 433.9 MHz
Mar 12 11:25:33 flipwild rtl_433[106997]: RSSI      : -0.3 dB
Mar 12 11:25:33 flipwild rtl_433[106997]: SNR       : 9.7 dB
Mar 12 11:25:33 flipwild rtl_433[106997]: Noise     : -10.0 dB
Mar 12 11:25:33 flipwild rtl_433[106997]: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Mar 12 11:25:33 flipwild rtl_433[106997]: time      : 2023-03-12 11:25:32.674858
Mar 12 11:25:33 flipwild rtl_433[106997]: Protocol  : 40
Mar 12 11:25:33 flipwild rtl_433[106997]: model     : Acurite-Tower
Mar 12 11:25:33 flipwild rtl_433[106997]: id        : 12084
Mar 12 11:25:33 flipwild rtl_433[106997]: channel   : A
Mar 12 11:25:33 flipwild rtl_433[106997]: Battery   : 1
Mar 12 11:25:33 flipwild rtl_433[106997]: Temperature: 13.0 C
Mar 12 11:25:33 flipwild rtl_433[106997]: Humidity  : 53 %
Mar 12 11:25:33 flipwild rtl_433[106997]: Integrity : CHECKSUM
Mar 12 11:25:33 flipwild rtl_433[106997]: Modulation: ASK
Mar 12 11:25:33 flipwild rtl_433[106997]: Freq      : 433.9 MHz
Mar 12 11:25:33 flipwild rtl_433[106997]: RSSI      : -0.3 dB
Mar 12 11:25:33 flipwild rtl_433[106997]: SNR       : 9.7 dB
Mar 12 11:25:33 flipwild rtl_433[106997]: Noise     : -10.0 dB
Mar 12 11:25:33 flipwild rtl_433[106997]: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Mar 12 11:25:33 flipwild rtl_433[106997]: time      : 2023-03-12 11:25:32.674858
Mar 12 11:25:33 flipwild rtl_433[106997]: Protocol  : 40
Mar 12 11:25:33 flipwild rtl_433[106997]: model     : Acurite-Tower
Mar 12 11:25:33 flipwild rtl_433[106997]: id        : 12084
Mar 12 11:25:33 flipwild rtl_433[106997]: channel   : A
Mar 12 11:25:33 flipwild rtl_433[106997]: Battery   : 1
Mar 12 11:25:33 flipwild rtl_433[106997]: Temperature: 13.0 C
Mar 12 11:25:33 flipwild rtl_433[106997]: Humidity  : 53 %
Mar 12 11:25:33 flipwild rtl_433[106997]: Integrity : CHECKSUM
Mar 12 11:25:33 flipwild rtl_433[106997]: Modulation: ASK
Mar 12 11:25:33 flipwild rtl_433[106997]: Freq      : 433.9 MHz
Mar 12 11:25:33 flipwild rtl_433[106997]: RSSI      : -0.3 dB
Mar 12 11:25:33 flipwild rtl_433[106997]: SNR       : 9.7 dB
Mar 12 11:25:33 flipwild rtl_433[106997]: Noise     : -10.0 dB
Mar 12 11:25:40 flipwild rtl_433[106997]: [Auto Level] Current noise level -10.2 dB, estimated noise -10.2 dB
Mar 12 11:25:50 flipwild rtl_433[106997]: [Auto Level] Current noise level -10.2 dB, estimated noise -9.9 dB
Mar 12 11:26:00 flipwild rtl_433[106997]: [Auto Level] Current noise level -10.2 dB, estimated noise -10.1 dB
Mar 12 11:26:10 flipwild rtl_433[106997]: [Auto Level] Current noise level -10.3 dB, estimated noise -9.8 dB
Mar 12 11:26:20 flipwild rtl_433[106997]: [Auto Level] Current noise level -7.7 dB, estimated noise -9.9 dB
Mar 12 11:26:30 flipwild rtl_433[106997]: [Auto Level] Current noise level -10.3 dB, estimated noise -10.1 dB
Mar 12 11:26:40 flipwild rtl_433[106997]: [Auto Level] Current noise level -10.2 dB, estimated noise -9.9 dB
Mar 12 11:26:50 flipwild rtl_433[106997]: [Auto Level] Current noise level -10.2 dB, estimated noise -10.2 dB
Mar 12 11:27:00 flipwild rtl_433[106997]: [Auto Level] Current noise level -10.4 dB, estimated noise -9.8 dB
after changes
Mar 12 11:28:17 flipwild rtl_433[107469]: rtl_433 version nightly-3-g376f1b02 branch master at 202303101654 inputs file rtl_tcp RTL-SDR
Mar 12 11:28:17 flipwild rtl_433[107469]: Use -h for usage help and see https://triq.org/ for documentation.
Mar 12 11:28:17 flipwild rtl_433[107469]: MQTT: Publishing MQTT data to mqtt.lan port 1883
Mar 12 11:28:17 flipwild rtl_433[107469]: MQTT: Publishing device info to MQTT topic "rtl_433/flipwild/devices[/type][/model][/subtype][/channel][/id]".
Mar 12 11:28:17 flipwild rtl_433[107469]: MQTT: Publishing events info to MQTT topic "rtl_433/flipwild/events".
Mar 12 11:28:17 flipwild rtl_433[107469]: MQTT: Publishing states info to MQTT topic "rtl_433/flipwild/states".
Mar 12 11:28:17 flipwild rtl_433[107469]: [Protocols] Registered 210 out of 243 device decoding protocols [ 1-4 8 11-12 15-17 19-23 25-26 29-36 38-60 63 67-71 73-100 102-105 108-116 119-121 124-128 130-149 151-161 163-168 170-175 177-197 199 201-215 217-228 230-232 234-241 243 ]
Mar 12 11:28:17 flipwild rtl_433[107469]: [Input] The internals of input handling changed, read about and report problems on PR #1978
Mar 12 11:28:17 flipwild rtl_433[107469]: [SDR] Found 1 device(s)
Mar 12 11:28:17 flipwild rtl_433[107469]: [SDR] trying device 0: Realtek, RTL2838UHIDIR, SN: 00000203
Mar 12 11:28:18 flipwild rtl_433[107469]: Detached kernel driver
Mar 12 11:28:18 flipwild rtl_433[107469]: Found Fitipower FC0012 tuner
Mar 12 11:28:18 flipwild rtl_433[107469]: [SDR] Using device 0: Realtek, RTL2838UHIDIR, SN: 00000203, "Generic RTL2832U OEM"
Mar 12 11:28:18 flipwild rtl_433[107469]: Exact sample rate is: 250000.000414 Hz
Mar 12 11:28:18 flipwild rtl_433[107469]: [SDR] Sample rate set to 250000 S/s.
Mar 12 11:28:18 flipwild rtl_433[107469]: [Input] Bit detection level set to 0.0 (Auto).
Mar 12 11:28:18 flipwild rtl_433[107469]: [SDR] Set initial gain for FC0012 to -9.900000 dB.
Mar 12 11:28:18 flipwild rtl_433[107469]: [SDR] Tuner gain set to 7.100000 dB.
Mar 12 11:28:18 flipwild rtl_433[107469]: [Input] Reading samples in async mode...
Mar 12 11:28:18 flipwild rtl_433[107469]: [SDR] Tuned to 433.910MHz.
Mar 12 11:28:18 flipwild rtl_433[107469]: Allocating 15 zero-copy buffers
Mar 12 11:28:18 flipwild rtl_433[107469]: [MQTT] MQTT Connected...
Mar 12 11:28:18 flipwild rtl_433[107469]: [MQTT] MQTT Connection established.
Mar 12 11:28:19 flipwild rtl_433[107469]: [Auto Level] Estimated noise level is -16.6 dB, adjusting minimum detection level to -13.6 dB
Mar 12 11:28:20 flipwild rtl_433[107469]: [Auto Level] Estimated noise level is -17.6 dB, adjusting minimum detection level to -14.6 dB
Mar 12 11:28:20 flipwild rtl_433[107469]: [Auto Level] Current noise level -24.7 dB, estimated noise -17.6 dB
Mar 12 11:28:21 flipwild rtl_433[107469]: [Auto Level] Estimated noise level is -19.3 dB, adjusting minimum detection level to -16.3 dB
Mar 12 11:28:22 flipwild rtl_433[107469]: [Auto Level] Estimated noise level is -20.8 dB, adjusting minimum detection level to -17.8 dB
Mar 12 11:28:24 flipwild rtl_433[107469]: [Auto Level] Estimated noise level is -22.1 dB, adjusting minimum detection level to -19.1 dB
Mar 12 11:28:26 flipwild rtl_433[107469]: [Auto Level] Estimated noise level is -23.2 dB, adjusting minimum detection level to -20.2 dB
Mar 12 11:28:30 flipwild rtl_433[107469]: [Auto Level] Current noise level -23.4 dB, estimated noise -23.9 dB
Mar 12 11:28:32 flipwild rtl_433[107469]: [Auto Level] Estimated noise level is -24.2 dB, adjusting minimum detection level to -21.2 dB
Mar 12 11:28:33 flipwild rtl_433[107469]: [Baseband] low pass filter for 250000 Hz at cutoff 25000 Hz, 40.0 us
Mar 12 11:28:33 flipwild rtl_433[107469]: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Mar 12 11:28:33 flipwild rtl_433[107469]: time      : 2023-03-12 11:28:32.794037
Mar 12 11:28:33 flipwild rtl_433[107469]: Protocol  : 40
Mar 12 11:28:33 flipwild rtl_433[107469]: model     : Acurite-Tower
Mar 12 11:28:33 flipwild rtl_433[107469]: id        : 12084
Mar 12 11:28:33 flipwild rtl_433[107469]: channel   : A
Mar 12 11:28:33 flipwild rtl_433[107469]: Battery   : 1
Mar 12 11:28:33 flipwild rtl_433[107469]: Temperature: 12.8 C
Mar 12 11:28:33 flipwild rtl_433[107469]: Humidity  : 53 %
Mar 12 11:28:33 flipwild rtl_433[107469]: Integrity : CHECKSUM
Mar 12 11:28:33 flipwild rtl_433[107469]: Modulation: ASK
Mar 12 11:28:33 flipwild rtl_433[107469]: Freq      : 433.9 MHz
Mar 12 11:28:33 flipwild rtl_433[107469]: RSSI      : -0.2 dB
Mar 12 11:28:33 flipwild rtl_433[107469]: SNR       : 24.5 dB
Mar 12 11:28:33 flipwild rtl_433[107469]: Noise     : -24.7 dB
Mar 12 11:28:33 flipwild rtl_433[107469]: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Mar 12 11:28:33 flipwild rtl_433[107469]: time      : 2023-03-12 11:28:32.794037
Mar 12 11:28:33 flipwild rtl_433[107469]: Protocol  : 40
Mar 12 11:28:33 flipwild rtl_433[107469]: model     : Acurite-Tower
Mar 12 11:28:33 flipwild rtl_433[107469]: id        : 12084
Mar 12 11:28:33 flipwild rtl_433[107469]: channel   : A
Mar 12 11:28:33 flipwild rtl_433[107469]: Battery   : 1
Mar 12 11:28:33 flipwild rtl_433[107469]: Temperature: 12.8 C
Mar 12 11:28:33 flipwild rtl_433[107469]: Humidity  : 53 %
Mar 12 11:28:33 flipwild rtl_433[107469]: Integrity : CHECKSUM
Mar 12 11:28:33 flipwild rtl_433[107469]: Modulation: ASK
Mar 12 11:28:33 flipwild rtl_433[107469]: Freq      : 433.9 MHz
Mar 12 11:28:33 flipwild rtl_433[107469]: RSSI      : -0.2 dB
Mar 12 11:28:33 flipwild rtl_433[107469]: SNR       : 24.5 dB
Mar 12 11:28:33 flipwild rtl_433[107469]: Noise     : -24.7 dB
Mar 12 11:28:33 flipwild rtl_433[107469]: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Mar 12 11:28:33 flipwild rtl_433[107469]: time      : 2023-03-12 11:28:32.794037
Mar 12 11:28:33 flipwild rtl_433[107469]: Protocol  : 40
Mar 12 11:28:33 flipwild rtl_433[107469]: model     : Acurite-Tower
Mar 12 11:28:33 flipwild rtl_433[107469]: id        : 12084
Mar 12 11:28:33 flipwild rtl_433[107469]: channel   : A
Mar 12 11:28:33 flipwild rtl_433[107469]: Battery   : 1
Mar 12 11:28:33 flipwild rtl_433[107469]: Temperature: 12.8 C
Mar 12 11:28:33 flipwild rtl_433[107469]: Humidity  : 53 %
Mar 12 11:28:33 flipwild rtl_433[107469]: Integrity : CHECKSUM
Mar 12 11:28:33 flipwild rtl_433[107469]: Modulation: ASK
Mar 12 11:28:33 flipwild rtl_433[107469]: Freq      : 433.9 MHz
Mar 12 11:28:33 flipwild rtl_433[107469]: RSSI      : -0.2 dB
Mar 12 11:28:33 flipwild rtl_433[107469]: SNR       : 24.5 dB
Mar 12 11:28:33 flipwild rtl_433[107469]: Noise     : -24.7 dB
Mar 12 11:28:35 flipwild rtl_433[107469]: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Mar 12 11:28:35 flipwild rtl_433[107469]: time      : 2023-03-12 11:28:34.856111
Mar 12 11:28:35 flipwild rtl_433[107469]: Protocol  : 40
Mar 12 11:28:35 flipwild rtl_433[107469]: model     : Acurite-Tower
Mar 12 11:28:35 flipwild rtl_433[107469]: id        : 12034
Mar 12 11:28:35 flipwild rtl_433[107469]: channel   : C
Mar 12 11:28:35 flipwild rtl_433[107469]: Battery   : 1
Mar 12 11:28:35 flipwild rtl_433[107469]: Temperature: 16.3 C
Mar 12 11:28:35 flipwild rtl_433[107469]: Humidity  : 1 %
Mar 12 11:28:35 flipwild rtl_433[107469]: Integrity : CHECKSUM
Mar 12 11:28:35 flipwild rtl_433[107469]: Modulation: ASK
Mar 12 11:28:35 flipwild rtl_433[107469]: Freq      : 433.9 MHz
Mar 12 11:28:35 flipwild rtl_433[107469]: RSSI      : -2.9 dB
Mar 12 11:28:35 flipwild rtl_433[107469]: SNR       : 22.1 dB
Mar 12 11:28:35 flipwild rtl_433[107469]: Noise     : -25.0 dB
Mar 12 11:28:35 flipwild rtl_433[107469]: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Mar 12 11:28:35 flipwild rtl_433[107469]: time      : 2023-03-12 11:28:34.856111
Mar 12 11:28:35 flipwild rtl_433[107469]: Protocol  : 40
Mar 12 11:28:35 flipwild rtl_433[107469]: model     : Acurite-Tower
Mar 12 11:28:35 flipwild rtl_433[107469]: id        : 12034
Mar 12 11:28:35 flipwild rtl_433[107469]: channel   : C
Mar 12 11:28:35 flipwild rtl_433[107469]: Battery   : 1
Mar 12 11:28:35 flipwild rtl_433[107469]: Temperature: 16.3 C
Mar 12 11:28:35 flipwild rtl_433[107469]: Humidity  : 1 %
Mar 12 11:28:35 flipwild rtl_433[107469]: Integrity : CHECKSUM
Mar 12 11:28:35 flipwild rtl_433[107469]: Modulation: ASK
Mar 12 11:28:35 flipwild rtl_433[107469]: Freq      : 433.9 MHz
Mar 12 11:28:35 flipwild rtl_433[107469]: RSSI      : -2.9 dB
Mar 12 11:28:35 flipwild rtl_433[107469]: SNR       : 22.1 dB
Mar 12 11:28:35 flipwild rtl_433[107469]: Noise     : -25.0 dB
Mar 12 11:28:35 flipwild rtl_433[107469]: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Mar 12 11:28:35 flipwild rtl_433[107469]: time      : 2023-03-12 11:28:34.856111
Mar 12 11:28:35 flipwild rtl_433[107469]: Protocol  : 40
Mar 12 11:28:35 flipwild rtl_433[107469]: model     : Acurite-Tower
Mar 12 11:28:35 flipwild rtl_433[107469]: id        : 12034
Mar 12 11:28:35 flipwild rtl_433[107469]: channel   : C
Mar 12 11:28:35 flipwild rtl_433[107469]: Battery   : 1
Mar 12 11:28:35 flipwild rtl_433[107469]: Temperature: 16.3 C
Mar 12 11:28:35 flipwild rtl_433[107469]: Humidity  : 1 %
Mar 12 11:28:35 flipwild rtl_433[107469]: Integrity : CHECKSUM
Mar 12 11:28:35 flipwild rtl_433[107469]: Modulation: ASK
Mar 12 11:28:35 flipwild rtl_433[107469]: Freq      : 433.9 MHz
Mar 12 11:28:35 flipwild rtl_433[107469]: RSSI      : -2.9 dB
Mar 12 11:28:35 flipwild rtl_433[107469]: SNR       : 22.1 dB
Mar 12 11:28:35 flipwild rtl_433[107469]: Noise     : -25.0 dB
Mar 12 11:28:35 flipwild rtl_433[107469]: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Mar 12 11:28:35 flipwild rtl_433[107469]: time      : 2023-03-12 11:28:35.089391
Mar 12 11:28:35 flipwild rtl_433[107469]: Protocol  : 40
Mar 12 11:28:35 flipwild rtl_433[107469]: model     : Acurite-Tower
Mar 12 11:28:35 flipwild rtl_433[107469]: id        : 342
Mar 12 11:28:35 flipwild rtl_433[107469]: channel   : B
Mar 12 11:28:35 flipwild rtl_433[107469]: Battery   : 1
Mar 12 11:28:35 flipwild rtl_433[107469]: Temperature: -1.9 C
Mar 12 11:28:35 flipwild rtl_433[107469]: Humidity  : 81 %
Mar 12 11:28:35 flipwild rtl_433[107469]: Integrity : CHECKSUM
Mar 12 11:28:35 flipwild rtl_433[107469]: Modulation: ASK
Mar 12 11:28:35 flipwild rtl_433[107469]: Freq      : 433.9 MHz
Mar 12 11:28:35 flipwild rtl_433[107469]: RSSI      : -0.3 dB
Mar 12 11:28:35 flipwild rtl_433[107469]: SNR       : 24.0 dB
Mar 12 11:28:35 flipwild rtl_433[107469]: Noise     : -24.3 dB
Mar 12 11:28:35 flipwild rtl_433[107469]: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Mar 12 11:28:35 flipwild rtl_433[107469]: time      : 2023-03-12 11:28:35.089391
Mar 12 11:28:35 flipwild rtl_433[107469]: Protocol  : 40
Mar 12 11:28:35 flipwild rtl_433[107469]: model     : Acurite-Tower
Mar 12 11:28:35 flipwild rtl_433[107469]: id        : 342
Mar 12 11:28:35 flipwild rtl_433[107469]: channel   : B
Mar 12 11:28:35 flipwild rtl_433[107469]: Battery   : 1
Mar 12 11:28:35 flipwild rtl_433[107469]: Temperature: -1.9 C
Mar 12 11:28:35 flipwild rtl_433[107469]: Humidity  : 81 %
Mar 12 11:28:35 flipwild rtl_433[107469]: Integrity : CHECKSUM
Mar 12 11:28:35 flipwild rtl_433[107469]: Modulation: ASK
Mar 12 11:28:35 flipwild rtl_433[107469]: Freq      : 433.9 MHz
Mar 12 11:28:35 flipwild rtl_433[107469]: RSSI      : -0.3 dB
Mar 12 11:28:35 flipwild rtl_433[107469]: SNR       : 24.0 dB
Mar 12 11:28:35 flipwild rtl_433[107469]: Noise     : -24.3 dB
Mar 12 11:28:35 flipwild rtl_433[107469]: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Mar 12 11:28:35 flipwild rtl_433[107469]: time      : 2023-03-12 11:28:35.089391
Mar 12 11:28:35 flipwild rtl_433[107469]: Protocol  : 40
Mar 12 11:28:35 flipwild rtl_433[107469]: model     : Acurite-Tower
Mar 12 11:28:35 flipwild rtl_433[107469]: id        : 342
Mar 12 11:28:35 flipwild rtl_433[107469]: channel   : B
Mar 12 11:28:35 flipwild rtl_433[107469]: Battery   : 1
Mar 12 11:28:35 flipwild rtl_433[107469]: Temperature: -1.9 C
Mar 12 11:28:35 flipwild rtl_433[107469]: Humidity  : 81 %
Mar 12 11:28:35 flipwild rtl_433[107469]: Integrity : CHECKSUM
Mar 12 11:28:35 flipwild rtl_433[107469]: Modulation: ASK
Mar 12 11:28:35 flipwild rtl_433[107469]: Freq      : 433.9 MHz
Mar 12 11:28:35 flipwild rtl_433[107469]: RSSI      : -0.3 dB
Mar 12 11:28:35 flipwild rtl_433[107469]: SNR       : 24.0 dB
Mar 12 11:28:35 flipwild rtl_433[107469]: Noise     : -24.3 dB
Mar 12 11:28:40 flipwild rtl_433[107469]: [Auto Level] Current noise level -24.7 dB, estimated noise -24.2 dB

@merbanan
Copy link
Owner

Old Old rtl_433:

rtl_433 -M level -M stats -g 50 -f 868.8M
Tuner gain set to 19.200000 dB

model     : Wireless-MBus Mode      : T            Manufacturer: LAS         ID        : 21224
Version   : 7            Device Type: 0x1B         Device Type String: Room sensor                     Control   : 0x44
Data Length: 46          Data      : 2b44333024120200071b7a310000202f2f0265a5084265a708820165b10802fb1aec0042fb1aed008201fb1af0003170
Integrity : CRC
Control Info: 0x7A       Access number: 0x31       Device Type: 0x00         Configuration Word: 0x2000 Temperature: 22.13 C
Average Temperature 1h: 22.15 C                    Average Temperature 24h: 22.25 C                    Humidity  : 23.6 %
Average Humidity 1h: 23.7 %                        Average Humidity 24h: 24.0 %
Modulation: FSK          Freq1     : 868.9 MHz     Freq2     : 869.0 MHz
RSSI      : -0.1 dB      SNR       : 19.2 dB       Noise     : -19.3 dB

Recent rtl_433 with code like the patch:
src/rtl_433 -M stats -M level -f 868.8M -g 20

model     : Wireless-MBus Mode      : T            Manufacturer: LAS         ID        : 21224
Version   : 7            Device Type: 0x1B         Device Type String: Room sensor                     Control   : 0x44
Data Length: 46          Data      : 2b44333024120200071b7a380000202f2f0265a6084265a608820165b10802fb1aee0042fb1aec008201fb1af0003170
Integrity : CRC
Control Info: 0x7A       Access number: 0x38       Device Type: 0x00         Configuration Word: 0x2000  Temperature extern 1h: 22.140 C
 Temperature extern 24h: 22.140 C                   Temperature extern err[2]: 22.250 C                Humidity  : 23.8 %
Average Humidity 1h: 23.6 %                        Average Humidity 24h: 24.0 %
Modulation: FSK          Freq1     : 868.9 MHz     Freq2     : 869.0 MHz
RSSI      : -0.1 dB      SNR       : 32.5 dB       Noise     : -32.6 dB

and then back to the old one version again:
rtl_433 -M stats -M level -f 868.8M -g 20

model     : Wireless-MBus Mode      : T            Manufacturer: LAS         ID        : 21224
Version   : 7            Device Type: 0x1B         Device Type String: Room sensor                     Control   : 0x44
Data Length: 46          Data      : 2b44333024120200071b7a3a0000202f2f0265a7084265a608820165b10802fb1aee0042fb1aec008201fb1af0003170
Integrity : CRC
Control Info: 0x7A       Access number: 0x3A       Device Type: 0x00         Configuration Word: 0x2000 Temperature: 22.15 C
Average Temperature 1h: 22.14 C                    Average Temperature 24h: 22.25 C                    Humidity  : 23.8 %
Average Humidity 1h: 23.6 %                        Average Humidity 24h: 24.0 %
Modulation: FSK          Freq1     : 868.9 MHz     Freq2     : 869.0 MHz
RSSI      : -0.1 dB      SNR       : 34.3 dB       Noise     : -34.4 dB

@merbanan
Copy link
Owner

So this definitely changes the gain while it previously might have not. We should carry this fix and I think we should add FC0013 support to it also. It should be another commit though.

@merbanan
Copy link
Owner

So ack by me.

@zuckschwerdt zuckschwerdt merged commit 42cb90c into merbanan:master Mar 12, 2023
@eshaz eshaz deleted the patch-2 branch March 13, 2023 04:29
andrewjw pushed a commit to andrewjw/rtl_433 that referenced this pull request Sep 29, 2023
Fixes a hardware issue with the Fitipower FC0012 where the gain is not properly set unless it is first initialized to it's lowest value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants