[FL-2045] SubGhz: new protocol (GSN , Beninca/Allmatic, Elmes) and validator (#958)
* SubGhz: add new method of obtaining a manufactory code subghz_protocol_keeloq_common_magic_xor_type1_learning * TextInput: checking for a lock on a file with the same name * TextInput: fix checking for a lock on a file with the same name * Assets: rename and recompile * TextInput: added picture and timer to turn off blob * TextInput: Fix graphics * TextInput: fix validator * Validators: Add validator is file * TextInput: fix callback validator_is_file_alloc * SubGhz: add propocol GNS (dimamic), Beninca/Alcatic, Elmes * SubGhz: fix function description * Gui: correct timer routine on deallocation * Format sources Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -115,6 +115,15 @@ uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case KEELOQ_LEARNING_MAGIC_XOR_TYPE_1:
|
||||
man_learning = subghz_protocol_keeloq_common_magic_xor_type1_learning(
|
||||
fix, manufacture_code->key);
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_learning);
|
||||
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
|
||||
instance->manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case KEELOQ_LEARNING_UNKNOWN:
|
||||
// Simple Learning
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, manufacture_code->key);
|
||||
@@ -144,6 +153,8 @@ uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
|
||||
instance->manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Check for mirrored man
|
||||
man_learning = subghz_protocol_keeloq_common_normal_learning(fix, man_rev);
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_learning);
|
||||
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
|
||||
@@ -161,13 +172,30 @@ uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
|
||||
}
|
||||
|
||||
// Check for mirrored man
|
||||
|
||||
man_learning = subghz_protocol_keeloq_common_secure_learning(fix, seed, man_rev);
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_learning);
|
||||
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
|
||||
instance->manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Magic xor type1 learning
|
||||
man_learning = subghz_protocol_keeloq_common_magic_xor_type1_learning(
|
||||
fix, manufacture_code->key);
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_learning);
|
||||
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
|
||||
instance->manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Check for mirrored man
|
||||
man_learning =
|
||||
subghz_protocol_keeloq_common_magic_xor_type1_learning(fix, man_rev);
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_learning);
|
||||
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
|
||||
instance->manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -198,6 +226,7 @@ void subghz_protocol_keeloq_check_remote_controller(SubGhzProtocolKeeloq* instan
|
||||
} else {
|
||||
subghz_protocol_keeloq_check_remote_controller_selector(instance, key_fix, key_hop);
|
||||
}
|
||||
|
||||
instance->common.serial = key_fix & 0x0FFFFFFF;
|
||||
instance->common.btn = key_fix >> 28;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user