mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-16 00:18:11 -07:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user