flipperzero-firmware icon indicating copy to clipboard operation
flipperzero-firmware copied to clipboard

False positive in gate_tx

Open yoavw opened this issue 2 years ago • 3 comments

Describe the bug.

Some signals are misidentified as GateTX despite having more than 24 bits. The serialized result cannot be transmitted because the deserialize function fails the 24 bits check. Below is a sample of such a file.

I suspect the bug is in gate_tx.c:230, where it checks for if(instance->decoder.decode_count_bit >= subghz_protocol_gate_tx_const.min_count_bit_for_found) accepting more than 24 bits, whereas during deserialization the check is subghz_block_generic_deserialize_check_count_bit&instance->generic, flipper_format, subghz_protocol_gate_tx_const.min_count_bit_for_found) which requires exactly 24 bits.

Sample serialized result that cannot be deserialized: Filetype: Flipper SubGhz Key File Version: 1 Frequency: 434075000 Preset: FuriHalSubGhzPresetOok650Async Protocol: GateTX Bit: 36 Key: 00 00 00 02 8C A3 60 4D

Reproduction

  1. Record a signal that isn't really GateTX but that the gate_tx feed detects as such.
  2. View it. The view shows only 24 bits although the serialized file has more.
  3. Try Send. Get "Error in protocol parameters description".

Target

No response

Logs

No response

Anything else?

No response

yoavw avatar Nov 29 '23 17:11 yoavw

https://github.com/flipperdevices/flipperzero-firmware/pull/3253 check plz

Skorpionm avatar Dec 01 '23 08:12 Skorpionm

I already tested an identical fix, it stops the false positive and the signal gets recognized correctly. But I don't have any gate_tx device so I can't verify that it still works.

yoavw avatar Dec 01 '23 12:12 yoavw

added to dev

Skorpionm avatar Jan 16 '24 12:01 Skorpionm

Should be fixed in latest release.

skotopes avatar Apr 14 '24 12:04 skotopes