From 6265dad0b735de36db4d0a41c214390141a1c1ec Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Thu, 15 Jan 2026 03:22:32 +0300 Subject: [PATCH] Fix for sommer? [ci skip] --- documentation/SubGHzSupportedSystems.md | 2 +- lib/subghz/devices/cc1101_configs.c | 2 +- lib/subghz/devices/preset.h | 2 +- lib/subghz/protocols/keeloq.c | 8 ++++++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/documentation/SubGHzSupportedSystems.md b/documentation/SubGHzSupportedSystems.md index 4f7214abd..b011bc36c 100644 --- a/documentation/SubGHzSupportedSystems.md +++ b/documentation/SubGHzSupportedSystems.md @@ -119,7 +119,7 @@ The following manufacturers have KeeLoq support in Unleashed firmware: - Nice Smilo - `433.92MHz` `AM650` (KeeLoq, 64 bits) (8bit serial part in Hop - simple learning) - Normstahl - `433.92MHz` `AM650` (KeeLoq, 64 bits) - Novoferm - `433.92MHz` `AM650` (KeeLoq, 64 bits) -- Sommer `434.42MHz, 868.80MHz` `FSK12K (or FSK476)` (KeeLoq, 64 bits) (normal learning) +- Sommer `434.42MHz, 868.80MHz` `FSK12K (or FSK476)` (KeeLoq, 64 bits) (normal learning) (TX03-868-4, Pearl, and maybe other models are supported (SOMloq2)) - Steelmate - `433.92MHz` `AM650` (KeeLoq, 64 bits) (12bit serial part in Hop - normal learning) - Stilmatic - `433.92MHz` `AM650` (KeeLoq, 64 bits) (normal learning) diff --git a/lib/subghz/devices/cc1101_configs.c b/lib/subghz/devices/cc1101_configs.c index 971c3cb28..5a550ba5d 100644 --- a/lib/subghz/devices/cc1101_configs.c +++ b/lib/subghz/devices/cc1101_configs.c @@ -248,7 +248,7 @@ const uint8_t subghz_device_cc1101_preset_2fsk_dev12khz_async_regs[] = { CC1101_MDMCFG4, 0x67, //Rx BW filter is 270.833333 kHz CC1101_DEVIATN, - 0x30, //Deviation ~12 kHz + 0x30, //Deviation 12.695312 kHz /* Main Radio Control State Machine */ CC1101_MCSM0, diff --git a/lib/subghz/devices/preset.h b/lib/subghz/devices/preset.h index 6f67594af..e80b4b4bd 100644 --- a/lib/subghz/devices/preset.h +++ b/lib/subghz/devices/preset.h @@ -6,7 +6,7 @@ typedef enum { FuriHalSubGhzPresetOok270Async, /**< OOK, bandwidth 270kHz, asynchronous */ FuriHalSubGhzPresetOok650Async, /**< OOK, bandwidth 650kHz, asynchronous */ FuriHalSubGhzPreset2FSKDev238Async, /**< FM, deviation 2.380371 kHz, asynchronous */ - FuriHalSubGhzPreset2FSKDev12KAsync, /**< FM, deviation ~12 kHz, asynchronous */ + FuriHalSubGhzPreset2FSKDev12KAsync, /**< FM, deviation 12.695312 kHz, asynchronous */ FuriHalSubGhzPreset2FSKDev476Async, /**< FM, deviation 47.60742 kHz, asynchronous */ FuriHalSubGhzPresetMSK99_97KbAsync, /**< MSK, deviation 47.60742 kHz, 99.97Kb/s, asynchronous */ FuriHalSubGhzPresetGFSK9_99KbAsync, /**< GFSK, deviation 19.042969 kHz, 9.996Kb/s, asynchronous */ diff --git a/lib/subghz/protocols/keeloq.c b/lib/subghz/protocols/keeloq.c index a13066ed2..e0bfaef57 100644 --- a/lib/subghz/protocols/keeloq.c +++ b/lib/subghz/protocols/keeloq.c @@ -526,6 +526,11 @@ static bool klq_last_custom_btn = 0xD; } + uint32_t gap_duration = subghz_protocol_keeloq_const.te_short * 40; + if((strcmp(instance->manufacture_name, "Sommer") == 0)) { + gap_duration = subghz_protocol_keeloq_const.te_short * 29; + } + btn = subghz_protocol_keeloq_get_btn_code(klq_last_custom_btn); // Generate new key @@ -580,8 +585,7 @@ static bool // send end instance->encoder.upload[index++] = level_duration_make(true, (uint32_t)subghz_protocol_keeloq_const.te_short); - instance->encoder.upload[index++] = - level_duration_make(false, (uint32_t)subghz_protocol_keeloq_const.te_short * 40); + instance->encoder.upload[index++] = level_duration_make(false, gap_duration); return true; }