fix debug output

This commit is contained in:
r3df0xx 2022-04-02 16:40:04 +03:00
parent ca920ba917
commit 02d44c32e2
2 changed files with 14 additions and 12 deletions

View file

@ -479,11 +479,12 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
for for
M_EACH(manufacture_code, *subghz_keystore_get_data(keystore), SubGhzKeyArray_t) { M_EACH(manufacture_code, *subghz_keystore_get_data(keystore), SubGhzKeyArray_t) {
uint32_t hi = manufacture_code->key >> 32;
switch(manufacture_code->type) { switch(manufacture_code->type) {
case KEELOQ_LEARNING_SIMPLE: case KEELOQ_LEARNING_SIMPLE:
// Simple Learning // Simple Learning
decrypt = subghz_protocol_keeloq_common_decrypt(hop, manufacture_code->key); decrypt = subghz_protocol_keeloq_common_decrypt(hop, manufacture_code->key);
FURI_LOG_I(TAG, "mfkey: %08lX%08lX", manufacture_code->key >> 32, manufacture_code->key); FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key);
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) { if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
*manufacture_name = string_get_cstr(manufacture_code->name); *manufacture_name = string_get_cstr(manufacture_code->name);
return 1; return 1;
@ -493,7 +494,7 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
// Normal Learning // Normal Learning
// https://phreakerclub.com/forum/showpost.php?p=43557&postcount=37 // https://phreakerclub.com/forum/showpost.php?p=43557&postcount=37
man = subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key); man = subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key);
FURI_LOG_I(TAG, "mfkey: %08lX%08lX", manufacture_code->key >> 32, manufacture_code->key); FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key);
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man); decrypt = subghz_protocol_keeloq_common_decrypt(hop, man);
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) { if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
*manufacture_name = string_get_cstr(manufacture_code->name); *manufacture_name = string_get_cstr(manufacture_code->name);
@ -503,7 +504,7 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
case KEELOQ_LEARNING_SECURE: case KEELOQ_LEARNING_SECURE:
man = subghz_protocol_keeloq_common_secure_learning( man = subghz_protocol_keeloq_common_secure_learning(
fix, seed, manufacture_code->key); fix, seed, manufacture_code->key);
FURI_LOG_I(TAG, "mfkey: %08lX%08lX", manufacture_code->key >> 32, manufacture_code->key); FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key);
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man); decrypt = subghz_protocol_keeloq_common_decrypt(hop, man);
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) { if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
*manufacture_name = string_get_cstr(manufacture_code->name); *manufacture_name = string_get_cstr(manufacture_code->name);
@ -513,7 +514,7 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
case KEELOQ_LEARNING_MAGIC_XOR_TYPE_1: case KEELOQ_LEARNING_MAGIC_XOR_TYPE_1:
man = subghz_protocol_keeloq_common_magic_xor_type1_learning( man = subghz_protocol_keeloq_common_magic_xor_type1_learning(
fix, manufacture_code->key); fix, manufacture_code->key);
FURI_LOG_I(TAG, "mfkey: %08lX%08lX", manufacture_code->key >> 32, manufacture_code->key); FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key);
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man); decrypt = subghz_protocol_keeloq_common_decrypt(hop, man);
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) { if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
*manufacture_name = string_get_cstr(manufacture_code->name); *manufacture_name = string_get_cstr(manufacture_code->name);
@ -523,7 +524,7 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
case KEELOQ_LEARNING_UNKNOWN: case KEELOQ_LEARNING_UNKNOWN:
// Simple Learning // Simple Learning
decrypt = subghz_protocol_keeloq_common_decrypt(hop, manufacture_code->key); decrypt = subghz_protocol_keeloq_common_decrypt(hop, manufacture_code->key);
FURI_LOG_I(TAG, "mfkey: %08lX%08lX", manufacture_code->key >> 32, manufacture_code->key); FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key);
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) { if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
*manufacture_name = string_get_cstr(manufacture_code->name); *manufacture_name = string_get_cstr(manufacture_code->name);
return 1; return 1;
@ -544,7 +545,7 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
// Normal Learning // Normal Learning
// https://phreakerclub.com/forum/showpost.php?p=43557&postcount=37 // https://phreakerclub.com/forum/showpost.php?p=43557&postcount=37
man = subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key); man = subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key);
FURI_LOG_I(TAG, "mfkey: %08lX%08lX", manufacture_code->key >> 32, manufacture_code->key); FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key);
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man); decrypt = subghz_protocol_keeloq_common_decrypt(hop, man);
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) { if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
*manufacture_name = string_get_cstr(manufacture_code->name); *manufacture_name = string_get_cstr(manufacture_code->name);
@ -562,7 +563,7 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
// Secure Learning // Secure Learning
man = subghz_protocol_keeloq_common_secure_learning( man = subghz_protocol_keeloq_common_secure_learning(
fix, seed, manufacture_code->key); fix, seed, manufacture_code->key);
FURI_LOG_I(TAG, "mfkey: %08lX%08lX", manufacture_code->key >> 32, manufacture_code->key); FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key);
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man); decrypt = subghz_protocol_keeloq_common_decrypt(hop, man);
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) { if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
*manufacture_name = string_get_cstr(manufacture_code->name); *manufacture_name = string_get_cstr(manufacture_code->name);
@ -580,7 +581,7 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
// Magic xor type1 learning // Magic xor type1 learning
man = subghz_protocol_keeloq_common_magic_xor_type1_learning( man = subghz_protocol_keeloq_common_magic_xor_type1_learning(
fix, manufacture_code->key); fix, manufacture_code->key);
FURI_LOG_I(TAG, "mfkey: %08lX%08lX", manufacture_code->key >> 32, manufacture_code->key); FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key);
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man); decrypt = subghz_protocol_keeloq_common_decrypt(hop, man);
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) { if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
*manufacture_name = string_get_cstr(manufacture_code->name); *manufacture_name = string_get_cstr(manufacture_code->name);

View file

@ -457,11 +457,12 @@ static uint8_t subghz_protocol_star_line_check_remote_controller_selector(
for for
M_EACH(manufacture_code, *subghz_keystore_get_data(keystore), SubGhzKeyArray_t) { M_EACH(manufacture_code, *subghz_keystore_get_data(keystore), SubGhzKeyArray_t) {
uint32_t hi = manufacture_code->key >> 32;
switch(manufacture_code->type) { switch(manufacture_code->type) {
case KEELOQ_LEARNING_SIMPLE: case KEELOQ_LEARNING_SIMPLE:
//Simple Learning //Simple Learning
decrypt = subghz_protocol_keeloq_common_decrypt(hop, manufacture_code->key); decrypt = subghz_protocol_keeloq_common_decrypt(hop, manufacture_code->key);
FURI_LOG_I(TAG, "mfkey: %08lX%08lX", manufacture_code->key >> 32, manufacture_code->key); FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key);
if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) { if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) {
*manufacture_name = string_get_cstr(manufacture_code->name); *manufacture_name = string_get_cstr(manufacture_code->name);
return 1; return 1;
@ -472,7 +473,7 @@ static uint8_t subghz_protocol_star_line_check_remote_controller_selector(
// https://phreakerclub.com/forum/showpost.php?p=43557&postcount=37 // https://phreakerclub.com/forum/showpost.php?p=43557&postcount=37
man_normal_learning = man_normal_learning =
subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key); subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key);
FURI_LOG_I(TAG, "mfkey: %08lX%08lX", manufacture_code->key >> 32, manufacture_code->key); FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key);
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_normal_learning); decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_normal_learning);
if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) { if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) {
*manufacture_name = string_get_cstr(manufacture_code->name); *manufacture_name = string_get_cstr(manufacture_code->name);
@ -482,7 +483,7 @@ static uint8_t subghz_protocol_star_line_check_remote_controller_selector(
case KEELOQ_LEARNING_UNKNOWN: case KEELOQ_LEARNING_UNKNOWN:
// Simple Learning // Simple Learning
decrypt = subghz_protocol_keeloq_common_decrypt(hop, manufacture_code->key); decrypt = subghz_protocol_keeloq_common_decrypt(hop, manufacture_code->key);
FURI_LOG_I(TAG, "mfkey: %08lX%08lX", manufacture_code->key >> 32, manufacture_code->key); FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key);
if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) { if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) {
*manufacture_name = string_get_cstr(manufacture_code->name); *manufacture_name = string_get_cstr(manufacture_code->name);
return 1; return 1;
@ -504,7 +505,7 @@ static uint8_t subghz_protocol_star_line_check_remote_controller_selector(
// https://phreakerclub.com/forum/showpost.php?p=43557&postcount=37 // https://phreakerclub.com/forum/showpost.php?p=43557&postcount=37
man_normal_learning = man_normal_learning =
subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key); subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key);
FURI_LOG_I(TAG, "mfkey: %08lX%08lX", manufacture_code->key >> 32, manufacture_code->key); FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key);
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_normal_learning); decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_normal_learning);
if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) { if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) {
*manufacture_name = string_get_cstr(manufacture_code->name); *manufacture_name = string_get_cstr(manufacture_code->name);