From a0a75d8e7111bcae7a0eed8dba875488a0da744c Mon Sep 17 00:00:00 2001 From: Derek Jamison Date: Wed, 11 Oct 2023 13:43:35 -0500 Subject: [PATCH 1/2] 12-bits is 0xFFF (or 0xFF0) --- applications/main/subghz/scenes/subghz_scene_set_type.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/main/subghz/scenes/subghz_scene_set_type.c b/applications/main/subghz/scenes/subghz_scene_set_type.c index 8c040cc9cf2..9d77bff598d 100644 --- a/applications/main/subghz/scenes/subghz_scene_set_type.c +++ b/applications/main/subghz/scenes/subghz_scene_set_type.c @@ -134,7 +134,7 @@ bool subghz_scene_set_type_on_event(void* context, SceneManagerEvent event) { subghz->txrx, "AM650", 315000000, SUBGHZ_PROTOCOL_PRINCETON_NAME, key, 24, 400); break; case SubmenuIndexNiceFlo12bit: - key = (key & 0x0000FFF0) | 0x1; //btn 0x1, 0x2, 0x4 + key = (key & 0x00000FF0) | 0x1; //btn 0x1, 0x2, 0x4 generated_protocol = subghz_txrx_gen_data_protocol( subghz->txrx, "AM650", 433920000, SUBGHZ_PROTOCOL_NICE_FLO_NAME, key, 12); break; @@ -144,7 +144,7 @@ bool subghz_scene_set_type_on_event(void* context, SceneManagerEvent event) { subghz->txrx, "AM650", 433920000, SUBGHZ_PROTOCOL_NICE_FLO_NAME, key, 24); break; case SubmenuIndexCAME12bit: - key = (key & 0x0000FFF0) | 0x1; //btn 0x1, 0x2, 0x4 + key = (key & 0x00000FF0) | 0x1; //btn 0x1, 0x2, 0x4 generated_protocol = subghz_txrx_gen_data_protocol( subghz->txrx, "AM650", 433920000, SUBGHZ_PROTOCOL_CAME_NAME, key, 12); break; From bf5733dc380c1b88e51c2e0f049b692cd11fed96 Mon Sep 17 00:00:00 2001 From: Derek Jamison Date: Wed, 11 Oct 2023 14:43:36 -0500 Subject: [PATCH 2/2] Mask with 0x7FFFF3FC for 850LM pairing --- applications/main/subghz/scenes/subghz_scene_set_type.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/applications/main/subghz/scenes/subghz_scene_set_type.c b/applications/main/subghz/scenes/subghz_scene_set_type.c index 9d77bff598d..f76bd9e27d2 100644 --- a/applications/main/subghz/scenes/subghz_scene_set_type.c +++ b/applications/main/subghz/scenes/subghz_scene_set_type.c @@ -198,14 +198,17 @@ bool subghz_scene_set_type_on_event(void* context, SceneManagerEvent event) { subghz_txrx_gen_secplus_v1_protocol(subghz->txrx, "AM650", 390000000); break; case SubmenuIndexSecPlus_v2_310_00: + key = (key & 0x7FFFF3FC); // 850LM pairing generated_protocol = subghz_txrx_gen_secplus_v2_protocol( subghz->txrx, "AM650", 310000000, key, 0x68, 0xE500000); break; case SubmenuIndexSecPlus_v2_315_00: + key = (key & 0x7FFFF3FC); // 850LM pairing generated_protocol = subghz_txrx_gen_secplus_v2_protocol( subghz->txrx, "AM650", 315000000, key, 0x68, 0xE500000); break; case SubmenuIndexSecPlus_v2_390_00: + key = (key & 0x7FFFF3FC); // 850LM pairing generated_protocol = subghz_txrx_gen_secplus_v2_protocol( subghz->txrx, "AM650", 390000000, key, 0x68, 0xE500000); break;