From b91f8d009e13735b2f0b6317cd0dd9554851dbac Mon Sep 17 00:00:00 2001 From: Eng1n33r <101719414+Eng1n33r@users.noreply.github.com> Date: Thu, 31 Aug 2023 22:39:22 +0300 Subject: [PATCH] Fix KL unknown mf cnt bug --- lib/subghz/protocols/keeloq.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/lib/subghz/protocols/keeloq.c b/lib/subghz/protocols/keeloq.c index a274602f3..0bda954ba 100644 --- a/lib/subghz/protocols/keeloq.c +++ b/lib/subghz/protocols/keeloq.c @@ -990,7 +990,7 @@ static void subghz_protocol_keeloq_check_remote_controller( instance->cnt = temp_counter; } else { // Counter protection - furi_crash("Unsuported Prog Mode"); + furi_crash("Unsupported Prog Mode"); } instance->serial = key_fix & 0x0FFFFFFF; @@ -1249,6 +1249,23 @@ void subghz_protocol_decoder_keeloq_get_string(void* context, FuriString* output instance->generic.btn, instance->manufacture_name, instance->generic.seed); + } else if(strcmp(instance->manufacture_name, "Unknown") == 0) { + instance->generic.cnt = 0x0; + furi_string_cat_printf( + output, + "%s %dbit\r\n" + "Key:%08lX%08lX\r\n" + "Fix:0x%08lX Cnt:????\r\n" + "Hop:0x%08lX Btn:%01X\r\n" + "MF:%s", + instance->generic.protocol_name, + instance->generic.data_count_bit, + code_found_hi, + code_found_lo, + code_found_reverse_hi, + code_found_reverse_lo, + instance->generic.btn, + instance->manufacture_name); } else { furi_string_cat_printf( output,