Merge branch 'DarkFlippers:dev' into dev

This commit is contained in:
Dmitry422
2026-02-01 10:03:56 +07:00
committed by GitHub
5 changed files with 87 additions and 13 deletions

View File

@@ -11,6 +11,7 @@
* SubGHz: **Alutech AT-4N & Nice Flor S turbo speedup** (PR #942 | by @Dmitry422)
* SubGHz: **Sommer fm2 in Add manually now uses FM12K modulation** (Sommer without fm2 tag uses FM476) (try this if regular option doesn't work for you)
* SubGHz: **Sommer - last button code 0x6 support** (mapped on arrow keys)
* SubGHz: **V2 Phoenix (Phox) added 2 counter modes support** (docs updated)
* SubGHz: Add 390MHz, 430.5MHz to default hopper list (6 elements like in OFW) (works well with Hopper RSSI level set for your enviroment)
* SubGHz: Fixed button mapping for **FAAC RC/XT**
* SubGHz: KeeLoq **display decrypted hop** in `Hop` instead of showing encrypted as is (encrypted non byte reversed hop is still displayed in `Key` field)

View File

@@ -52,6 +52,7 @@ static Protocols protocols[] = {
{"CAME Atomo", 4},
{"Alutech AT-4N", 3},
{"KeeLoq", 7},
{"Phoenix_V2", 3},
};
#define PROTOCOLS_COUNT (sizeof(protocols) / sizeof(Protocols));

View File

@@ -129,6 +129,24 @@ CounterMode: 1
---
### 5. V2 Phoenix (Phox)
**Mode 0 (Default):**
- Standard - acts like regular remote
- Uses rolling counter multiplier from global settings (default +1)
- Counter increments based on the multiplier value (default +1)
- Resets to 0 when overflow occurs (> 0xFFFF)
**Mode 1 (ofex like):**
- Counter sequence: `0x0000 / 0x0001 / 0xFFFE / 0xFFFF`
- Verified as working
**Mode 2 (0 - 4):**
- Counter sequence: `0x0000 / 0x0001 / 0x0002 / 0x0003 / 0x0004`
- Might work (let us know!)
---
## Notes and Warnings
### Important Considerations:

View File

@@ -20,7 +20,7 @@ That list is only for default SubGHz app, apps like *Weather Station* have their
- AN-Motors (Alutech) AT4 `433.92MHz` `AM650` (64 bits, Pseudo-Dynamic, KeeLoq based)
- Ansonic `433MHz` `FM` (12 bits, Static)
- BETT `433.92MHz` `AM650` (18 bits, Static)
- Beninca ARC (TOGO2VA) `433.92MHz` `AM650` (128 bits, Dynamic AES)
- Beninca ARC (TOGO2VA) `433.92MHz` `AM650` (128 bits, Dynamic AES) (button code `0` emulates `hidden button` option on the remote)
- BFT Mitto `433.92MHz` `AM650` (64 bits, Dynamic, KeeLoq based with Seed)
- CAME Atomo `433.92MHz, 868MHz` `AM650` (62 bits, Dynamic)
- CAME TWEE `433.92MHz` `AM650` (54 bits, Static)
@@ -46,7 +46,7 @@ That list is only for default SubGHz app, apps like *Weather Station* have their
- Nice One `433.92MHz` `AM650` (72 bits, Dynamic)
- Revers RB2 (Реверс РБ-2 (М)) `433.92MHz` `AM650` (64 bits, Static)
- Roger `433.92MHz` `AM650` (28 bits, Static)
- V2 Phoenix (Phox) `433.92MHz` `AM650` (52 bits, Dynamic)
- V2 Phoenix (Phox) `433.92MHz` `AM650` (52 bits, Dynamic) (receivers have option to enable Static mode, making them ignore rolling part of the key)
- Marantec `433.92MHz, 868MHz` `AM650` (49 bits, Static)
- Marantec24 `868MHz` `AM650` (24 bits, Static)
- Somfy Keytis `433.92MHz, 868MHz` `AM650` (80 bits, Dynamic)
@@ -98,7 +98,7 @@ The following manufacturers have KeeLoq support in Unleashed firmware:
- Aprimatic - `433.92MHz` `AM650` (KeeLoq, 64 bits) (12bit serial number art in Hop + 2bit "parity" in front of it replacing first 2 bits of serial)
- Beninca - `433.92MHz, 868MHz` `AM650` (KeeLoq, 64 bits) (no serial part in Hop - magic XOR)
- CAME Space - `433.92MHz` `AM650` (KeeLoq, 64 bits) (12bit serial part in Hop - simple learning)
- Cardin S449 - `433.92MHz` `FSK12K` (KeeLoq, 64 bits) (12bit (original remotes) or 10bit (chinese remotes) serial part in Hop - normal learning)
- Cardin S449 - `433.92MHz` `FSK12K` (KeeLoq, 64 bits) (12bit (original remotes) or 10bit (chinese remotes) serial part in Hop - normal learning) (receiver checks for 10bit only (unverified))
- Centurion - `433.92MHz` `AM650` (KeeLoq, 64 bits) (no serial in Hop, uses fixed value 0x1CE - normal learning)
- Comunello - `433.92MHz, 868MHz` `AM650` (KeeLoq, 64 bits) (normal learning)
- DEA Mio - `433.92MHz` `AM650` (KeeLoq, 64 bits) (modified serial in Hop, uses last 3 digits modifying first one (example - 419 -> C19) - simple learning)
@@ -124,7 +124,7 @@ The following manufacturers have KeeLoq support in Unleashed firmware:
- Novoferm - `433.92MHz` `AM650` (KeeLoq, 64 bits)
- Sommer `434.42MHz, 868.80MHz` `FSK12K (or FSK476)` (KeeLoq, 64 bits) (normal learning) (TX03-868-4, Pearl, and maybe other models are supported (SOMloq))
- Steelmate - `433.92MHz` `AM650` (KeeLoq, 64 bits) (12bit serial part in Hop - normal learning)
- Stilmatic (R-Tech) - `433.92MHz` `AM650` (KeeLoq, 64 bits) (12bit serial part in Hop - normal learning)
- Stilmatic (R-Tech) - `433.92MHz` `AM650` (KeeLoq, 64 bits) (12bit serial part in Hop - normal learning) (receiver checks for 10bit only (unverified))
### Alarms, unknown origin, etc.
- APS-1100/APS-2550 (KeeLoq, 64 bits)

View File

@@ -91,6 +91,8 @@ void subghz_protocol_encoder_phoenix_v2_free(void* context) {
free(instance);
}
static uint8_t v2_phoenix_counter_mode = 0;
// Pre define functions
static uint16_t subghz_protocol_phoenix_v2_encrypt_counter(uint64_t full_key, uint16_t counter);
static void subghz_protocol_phoenix_v2_check_remote_controller(SubGhzBlockGeneric* instance);
@@ -252,18 +254,30 @@ static bool
btn = subghz_protocol_phoenix_v2_get_btn_code();
// Reconstruction of the data
// Check for OFEX (overflow experimental) mode
if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF) {
// standart counter mode. PULL data from subghz_block_generic_global variables
if(!subghz_block_generic_global_counter_override_get(&instance->generic.cnt)) {
// if counter_override_get return FALSE then counter was not changed and we increase counter by standart mult value
if((instance->generic.cnt + furi_hal_subghz_get_rolling_counter_mult()) > 0xFFFF) {
if(v2_phoenix_counter_mode == 0) {
// Check for OFEX (overflow experimental) mode
if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF) {
// standart counter mode. PULL data from subghz_block_generic_global variables
if(!subghz_block_generic_global_counter_override_get(&instance->generic.cnt)) {
// if counter_override_get return FALSE then counter was not changed and we increase counter by standart mult value
if((instance->generic.cnt + furi_hal_subghz_get_rolling_counter_mult()) > 0xFFFF) {
instance->generic.cnt = 0;
} else {
instance->generic.cnt += furi_hal_subghz_get_rolling_counter_mult();
}
}
} else {
if((instance->generic.cnt + 0x1) > 0xFFFF) {
instance->generic.cnt = 0;
} else if(instance->generic.cnt >= 0x1 && instance->generic.cnt != 0xFFFE) {
instance->generic.cnt = 0xFFFE;
} else {
instance->generic.cnt += furi_hal_subghz_get_rolling_counter_mult();
instance->generic.cnt++;
}
}
} else {
} else if(v2_phoenix_counter_mode == 1) {
// Mode 1 (ofex like)
// 0000 / 0001 / FFFE / FFFF
if((instance->generic.cnt + 0x1) > 0xFFFF) {
instance->generic.cnt = 0;
} else if(instance->generic.cnt >= 0x1 && instance->generic.cnt != 0xFFFE) {
@@ -271,6 +285,14 @@ static bool
} else {
instance->generic.cnt++;
}
} else {
// Mode 2 (0 to 4)
// 0x0000 / 0x0001 / 0x0002 / 0x0003 / 0x0004
if(instance->generic.cnt >= 0x0004) {
instance->generic.cnt = 0;
} else {
instance->generic.cnt++;
}
}
uint64_t local_data_rev = subghz_protocol_blocks_reverse_key(
@@ -326,6 +348,18 @@ SubGhzProtocolStatus
flipper_format_read_uint32(
flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1);
if(!flipper_format_rewind(flipper_format)) {
FURI_LOG_E(TAG, "Rewind error");
break;
}
uint32_t tmp_counter_mode;
if(flipper_format_read_uint32(flipper_format, "CounterMode", &tmp_counter_mode, 1)) {
v2_phoenix_counter_mode = (uint8_t)tmp_counter_mode;
} else {
v2_phoenix_counter_mode = 0;
}
subghz_protocol_phoenix_v2_check_remote_controller(&instance->generic);
if(!subghz_protocol_encoder_phoenix_v2_get_upload(instance)) {
@@ -333,6 +367,11 @@ SubGhzProtocolStatus
break;
}
if(!flipper_format_rewind(flipper_format)) {
FURI_LOG_E(TAG, "Rewind error");
break;
}
uint8_t key_data[sizeof(uint64_t)] = {0};
for(size_t i = 0; i < sizeof(uint64_t); i++) {
key_data[sizeof(uint64_t) - i - 1] = (instance->generic.data >> i * 8) & 0xFF;
@@ -582,10 +621,25 @@ SubGhzProtocolStatus
subghz_protocol_decoder_phoenix_v2_deserialize(void* context, FlipperFormat* flipper_format) {
furi_assert(context);
SubGhzProtocolDecoderPhoenix_V2* instance = context;
return subghz_block_generic_deserialize_check_count_bit(
SubGhzProtocolStatus ret = SubGhzProtocolStatusError;
ret = subghz_block_generic_deserialize_check_count_bit(
&instance->generic,
flipper_format,
subghz_protocol_phoenix_v2_const.min_count_bit_for_found);
if(!flipper_format_rewind(flipper_format)) {
FURI_LOG_E(TAG, "Rewind error");
return SubGhzProtocolStatusError;
}
uint32_t tmp_counter_mode;
if(flipper_format_read_uint32(flipper_format, "CounterMode", &tmp_counter_mode, 1)) {
v2_phoenix_counter_mode = (uint8_t)tmp_counter_mode;
} else {
v2_phoenix_counter_mode = 0;
}
return ret;
}
void subghz_protocol_decoder_phoenix_v2_get_string(void* context, FuriString* output) {