SubGHz - Keeloq: Read Centurion Nova remotes (#2892)

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
MMX
2023-08-01 12:32:24 +03:00
committed by GitHub
parent aadb72af53
commit fe7a1c2fcc
2 changed files with 77 additions and 56 deletions
+23 -3
View File
@@ -467,6 +467,19 @@ static inline bool subghz_protocol_keeloq_check_decrypt(
}
return false;
}
// Centurion specific check
static inline bool subghz_protocol_keeloq_check_decrypt_centurion(
SubGhzBlockGeneric* instance,
uint32_t decrypt,
uint8_t btn) {
furi_assert(instance);
if((decrypt >> 28 == btn) && (((((uint16_t)(decrypt >> 16)) & 0x3FF) == 0x1CE))) {
instance->cnt = decrypt & 0x0000FFFF;
return true;
}
return false;
}
/**
* Checking the accepted code against the database manafacture key
@@ -509,9 +522,16 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
// https://phreakerclub.com/forum/showpost.php?p=43557&postcount=37
man = subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key);
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man);
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
*manufacture_name = furi_string_get_cstr(manufacture_code->name);
return 1;
if((strcmp(furi_string_get_cstr(manufacture_code->name), "Centurion") == 0)) {
if(subghz_protocol_keeloq_check_decrypt_centurion(instance, decrypt, btn)) {
*manufacture_name = furi_string_get_cstr(manufacture_code->name);
return 1;
}
} else {
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
*manufacture_name = furi_string_get_cstr(manufacture_code->name);
return 1;
}
}
break;
case KEELOQ_LEARNING_SECURE: