Skip to content

Commit

Permalink
Latest RM0907-1313-0.104.1-e659585 on PATREON - TEMP REMOVAL
Browse files Browse the repository at this point in the history
  • Loading branch information
RogueMaster committed Sep 9, 2024
1 parent 0655e81 commit dd30ef7
Show file tree
Hide file tree
Showing 13 changed files with 3 additions and 1,881 deletions.
1 change: 1 addition & 0 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ This software is for experimental purposes only and is not meant for any illegal
- Added: [Voyah Password v0.2 (By bolknote)](https://github.com/bolknote/Flipper-Zero-Voyah-Password)
- UL: SubGHz: [Add new protocols: Hay21 and Hollarm (By xMasterX)](https://github.com/RogueMaster/flipperzero-firmware-wPlugins/commit/bc19dbfbda5db4aee1ed39e2ccf29cfa1d8bd508)
- UL: [Extra checks for power enable on GPIO (By xMasterX)](https://github.com/RogueMaster/flipperzero-firmware-wPlugins/commit/4b89203cbd8e918a840314c29f7765f0c6a99478)
- Temp Revert: UL: SubGHz: [Add new protocols: GangQi, Hay21 and Hollarm (By xMasterX)](https://github.com/RogueMaster/flipperzero-firmware-wPlugins/commit/bc19dbfbda5db4aee1ed39e2ccf29cfa1d8bd508)
- Coming Soon: OFW: [Storage: remove LFS #3577](https://github.com/flipperdevices/flipperzero-firmware/pull/3577) [FuriEventLoop Pt.2 #3703](https://github.com/flipperdevices/flipperzero-firmware/pull/3703) [#3824](https://github.com/flipperdevices/flipperzero-firmware/pull/3824) [#3836](https://github.com/flipperdevices/flipperzero-firmware/pull/3836) [#3834](https://github.com/flipperdevices/flipperzero-firmware/pull/3834) [#3830](https://github.com/flipperdevices/flipperzero-firmware/pull/3834) [#3837](https://github.com/flipperdevices/flipperzero-firmware/pull/3837) [#3839](https://github.com/flipperdevices/flipperzero-firmware/pull/3839) [#3849](https://github.com/flipperdevices/flipperzero-firmware/pull/3849) [#3852](https://github.com/flipperdevices/flipperzero-firmware/pull/3852) [#3879](https://github.com/flipperdevices/flipperzero-firmware/pull/3879) [#3875](https://github.com/flipperdevices/flipperzero-firmware/pull/3875) [#3859](https://github.com/flipperdevices/flipperzero-firmware/pull/3859) [#3863](https://github.com/flipperdevices/flipperzero-firmware/pull/3863) [#3866](https://github.com/flipperdevices/flipperzero-firmware/pull/3866) [#3865](https://github.com/flipperdevices/flipperzero-firmware/pull/3865) [#3887](https://github.com/flipperdevices/flipperzero-firmware/pull/3887)

<a name="release">
Expand Down
3 changes: 0 additions & 3 deletions applications/main/subghz/helpers/subghz_custom_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@ typedef enum {
SetTypePricenton315,
SetTypePricenton433,
SetTypeBETT_433,
SetTypeGangQi_433,
SetTypeHollarm_433,
SetTypeMarantec24_868,
SetTypeLinear_300_00,
// SetTypeNeroSketch, //Deleted in OFW
// SetTypeNeroRadio, //Deleted in OFW
Expand Down
32 changes: 0 additions & 32 deletions applications/main/subghz/helpers/subghz_txrx_create_protocol_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,35 +382,3 @@ bool subghz_txrx_gen_secplus_v1_protocol(
}
return ret;
}

void subghz_txrx_gen_serial_gangqi(uint64_t* result_key) {
uint64_t randkey;
uint64_t only_required_bytes;
uint16_t sum_of_3bytes;
uint8_t xorbytes;

do {
randkey = (uint64_t)rand();
only_required_bytes = (randkey & 0x0FFFF0000) | 0x200000000;
sum_of_3bytes = ((only_required_bytes >> 32) & 0xFF) +
((only_required_bytes >> 24) & 0xFF) +
((only_required_bytes >> 16) & 0xFF);
xorbytes = ((only_required_bytes >> 32) & 0xFF) ^ ((only_required_bytes >> 24) & 0xFF) ^
((only_required_bytes >> 16) & 0xFF);
} while(
!((((!(sum_of_3bytes & 0x3)) && ((0xB < sum_of_3bytes) && (sum_of_3bytes < 0x141))) &&
((((only_required_bytes >> 32) & 0xFF) == 0x2) ||
(((only_required_bytes >> 32) & 0xFF) == 0x3))) &&
((((xorbytes == 0xBA) || (xorbytes == 0xE2)) ||
((xorbytes == 0x3A) || (xorbytes == 0xF2))) ||
(xorbytes == 0xB2))));

// Serial 01 button 01
uint64_t new_key = only_required_bytes | (0b01 << 14) | (0xD << 10) | (0b01 << 8);

uint8_t crc = -0xD7 - ((new_key >> 32) & 0xFF) - ((new_key >> 24) & 0xFF) -
((new_key >> 16) & 0xFF) - ((new_key >> 8) & 0xFF);

// Add crc sum to the end
*result_key = (new_key | crc);
}
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,3 @@ bool subghz_txrx_gen_secplus_v1_protocol(
SubGhzTxRx* instance,
const char* name_preset,
uint32_t frequency);

/**
* Generate valid serial number for GangQi protocol
*
* @return uint64_t if success
*/
void subghz_txrx_gen_serial_gangqi(uint64_t* result_key);
47 changes: 2 additions & 45 deletions applications/main/subghz/scenes/subghz_scene_set_type.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ static const char* submenu_names[SetTypeMAX] = {
[SetTypeCAMESpace] = "KL: CAME Space 433MHz",
[SetTypePricenton315] = "Princeton 315MHz",
[SetTypePricenton433] = "Princeton 433MHz",
[SetTypeGangQi_433] = "GangQi 433MHz",
[SetTypeHollarm_433] = "Hollarm 433MHz",
[SetTypeMarantec24_868] = "Marantec24 868MHz",
[SetTypeBETT_433] = "BETT 433MHz",
[SetTypeLinear_300_00] = "Linear 300MHz",
// [SetTypeNeroSketch] = "Nero Sketch", // Deleted in OFW
Expand Down Expand Up @@ -114,7 +111,7 @@ typedef struct {
union {
struct {
const char* name;
uint64_t key;
uint32_t key;
uint8_t bits;
uint16_t te;
} data;
Expand Down Expand Up @@ -182,11 +179,7 @@ bool subghz_scene_set_type_on_event(void* context, SceneManagerEvent event) {
return true;
}

uint64_t key = (uint64_t)rand();

uint64_t gangqi_key;
subghz_txrx_gen_serial_gangqi(&gangqi_key);

uint32_t key = (uint32_t)rand();
GenInfo gen_info = {0};
switch(event.event) {
case SetTypePricenton433:
Expand Down Expand Up @@ -309,42 +302,6 @@ bool subghz_scene_set_type_on_event(void* context, SceneManagerEvent event) {
.data.bits = 24,
.data.te = 0};
break;
case SetTypeGangQi_433:
gen_info = (GenInfo){
.type = GenData,
.mod = "AM650",
.freq = 433920000,
.data.name =
SUBGHZ_PROTOCOL_GANGQI_NAME, // Add button 0xD arm and crc sum to the end
.data.key = gangqi_key,
.data.bits = 34,
.data.te = 0};
break;
case SetTypeHollarm_433:
gen_info = (GenInfo){
.type = GenData,
.mod = "AM650",
.freq = 433920000,
.data.name = SUBGHZ_PROTOCOL_HOLLARM_NAME, // Add button 0x2 and crc sum to the end
.data.key = (key & 0x000FFF0000) | 0xF0B0002200 |
((((((key & 0x000FFF0000) | 0xF0B0002200) >> 32) & 0xFF) +
((((key & 0x000FFF0000) | 0xF0B0002200) >> 24) & 0xFF) +
((((key & 0x000FFF0000) | 0xF0B0002200) >> 16) & 0xFF) +
((((key & 0x000FFF0000) | 0xF0B0002200) >> 8) & 0xFF)) &
0xFF),
.data.bits = 42,
.data.te = 0};
break;
case SetTypeMarantec24_868:
gen_info = (GenInfo){
.type = GenData,
.mod = "AM650",
.freq = 868350000,
.data.name = SUBGHZ_PROTOCOL_MARANTEC24_NAME, // Add button code 0x8 to the end
.data.key = (key & 0xFFFFF0) | 0x000008,
.data.bits = 24,
.data.te = 0};
break;
case SetTypeFaacSLH_433:
gen_info = (GenInfo){
.type = GenFaacSLH,
Expand Down
Loading

0 comments on commit dd30ef7

Please sign in to comment.