False positive in gate_tx
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
- Record a signal that isn't really GateTX but that the gate_tx feed detects as such.
- View it. The view shows only 24 bits although the serialized file has more.
- Try Send. Get "Error in protocol parameters description".
Target
No response
Logs
No response
Anything else?
No response
https://github.com/flipperdevices/flipperzero-firmware/pull/3253 check plz
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.
added to dev
Should be fixed in latest release.