Skip to content

Commit 771a649

Browse files
author
David Lee
committed
Added signal repeat feature
1 parent cc0c618 commit 771a649

File tree

9 files changed

+56
-5
lines changed

9 files changed

+56
-5
lines changed

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,27 @@ Means that the SubGhz Code is being generated for the configured range
2727
### Purple Blinking LED
2828
Means that SubGhz Signals are being sent
2929

30+
## Settings Explanation
31+
32+
### Pager Type
33+
Sets the current Pager type your targeting. Each model uses a different encoding, you cannot trigger multiple models at once
34+
35+
### First Station / Last Station
36+
Each Station has a unique id. This is important so many stations can run in one location without conflicting each other. Use these settings to define a range of stations to trigger
37+
38+
I do not recommend a lager range than 10
39+
40+
### Fist Pager / Last Pager
41+
The range of numbers on the pagers to be triggered. Most stations don't have many pagers, so a range of 0 - 31 probably is enough for all.
42+
43+
### Signal Repeat
44+
How many times a single pager trigger is sent. Usually a signal is sent multiple times to combat radio noise that can cause a signal not to be recognised.
45+
This is the total number of signals, so a setting of 0 will not send anything. More signals take longer, less have a higher risk of no effect. Set a number between 1 and 10.
46+
47+
3048
## Can this Brute-Force Attacks
3149
This is a Proof-of-Concept. In Theory it could, but I wouldn't recommend trying it. Its annoying for people targeted and it could get you into trouble. Seriously, don't be that person, nobody will like your for it.
32-
Appart from that, most pagers support 8191 Stations. Triggering ~30 Pagers per station would easily take a long time. That when only sending each trigger once. It is recommended is to repeat the signal approx 10x (currently not possible, but possible that stations don't react to a single call), so that would already take all day.
50+
Appart from that, most pagers support 8191 Stations. Triggering ~30 Pagers per station would easily take a long time. That when only sending each trigger once. It is recommended is to repeat the signal approx 10x, so that would already take all day.
3351
Also your Flipper Zero will crash in that time, as the generated signals use RAM which is limited in the device. There may be ways to work around this, but I think its better to have such a limitation.
3452

3553
## Does this even work

docs/changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## v0.8
2+
- Added Repeats feature
3+
- Repeats configuration in settings
4+
- Usage of repeats in T119
5+
- Usage of repeats in TD157
6+
17
## v0.7
28

39
- Added support for TD157

helpers/meal_pager_storage.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ void meal_pager_save_settings(void* context) {
126126
flipper_format_write_uint32(
127127
fff_file, MEAL_PAGER_SETTINGS_KEY_FIRST_PAGER, &app->first_pager, 1);
128128
flipper_format_write_uint32(fff_file, MEAL_PAGER_SETTINGS_KEY_LAST_PAGER, &app->last_pager, 1);
129+
flipper_format_write_uint32(fff_file, MEAL_PAGER_SETTINGS_KEY_LAST_PAGER, &app->last_pager, 1);
130+
flipper_format_write_uint32(fff_file, MEAL_PAGER_SETTINGS_KEY_REPEATS, &app->repeats, 1);
129131
flipper_format_write_uint32(fff_file, MEAL_PAGER_SETTINGS_KEY_HAPTIC, &app->haptic, 1);
130132
flipper_format_write_uint32(fff_file, MEAL_PAGER_SETTINGS_KEY_SPEAKER, &app->speaker, 1);
131133
flipper_format_write_uint32(fff_file, MEAL_PAGER_SETTINGS_KEY_LED, &app->led, 1);
@@ -185,6 +187,7 @@ void meal_pager_read_settings(void* context) {
185187
flipper_format_read_uint32(
186188
fff_file, MEAL_PAGER_SETTINGS_KEY_FIRST_PAGER, &app->first_pager, 1);
187189
flipper_format_read_uint32(fff_file, MEAL_PAGER_SETTINGS_KEY_LAST_PAGER, &app->last_pager, 1);
190+
flipper_format_read_uint32(fff_file, MEAL_PAGER_SETTINGS_KEY_REPEATS, &app->repeats, 1);
188191
flipper_format_read_uint32(fff_file, MEAL_PAGER_SETTINGS_KEY_HAPTIC, &app->haptic, 1);
189192
flipper_format_read_uint32(fff_file, MEAL_PAGER_SETTINGS_KEY_SPEAKER, &app->speaker, 1);
190193
flipper_format_read_uint32(fff_file, MEAL_PAGER_SETTINGS_KEY_LED, &app->led, 1);

helpers/meal_pager_storage.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <flipper_format/flipper_format_i.h>
77
#include "../meal_pager_i.h"
88

9-
#define MEAL_PAGER_SETTINGS_FILE_VERSION 1
9+
#define MEAL_PAGER_SETTINGS_FILE_VERSION 2
1010
#define CONFIG_FILE_DIRECTORY_PATH EXT_PATH("apps_data/meal_pager")
1111
#define MEAL_PAGER_SETTINGS_SAVE_PATH CONFIG_FILE_DIRECTORY_PATH "/meal_pager.conf"
1212
#define MEAL_PAGER_SETTINGS_SAVE_PATH_TMP MEAL_PAGER_SETTINGS_SAVE_PATH ".tmp"
@@ -16,6 +16,7 @@
1616
#define MEAL_PAGER_SETTINGS_KEY_LAST_STATION "Last Station"
1717
#define MEAL_PAGER_SETTINGS_KEY_FIRST_PAGER "First Pager"
1818
#define MEAL_PAGER_SETTINGS_KEY_LAST_PAGER "Last Pager"
19+
#define MEAL_PAGER_SETTINGS_KEY_REPEATS "Repeats"
1920
#define MEAL_PAGER_SETTINGS_KEY_HAPTIC "Haptic"
2021
#define MEAL_PAGER_SETTINGS_KEY_LED "Led"
2122
#define MEAL_PAGER_SETTINGS_KEY_SPEAKER "Speaker"

helpers/retekess/meal_pager_retekess_t119.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ static void meal_pager_retekess_t119_generate_pager(
6767
//FURI_LOG_D(TAG, "Manchester: %s", manchester);
6868
char* rawSignal = genRawDataT119(200, 600, manchester);
6969
//FURI_LOG_D(TAG, "RAW_Data: %s", rawSignal);
70-
flipper_format_write_string_cstr(ff, "RAW_Data", rawSignal);
70+
for(u_int32_t i = 1; app->repeats >= i; i++) {
71+
flipper_format_write_string_cstr(ff, "RAW_Data", rawSignal);
72+
}
73+
//flipper_format_write_string_cstr(ff, "RAW_Data", rawSignal);
7174
free(manchester);
7275
free(rawSignal);
7376
}

helpers/retekess/meal_pager_retekess_td157.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ static void meal_pager_retekess_td157_generate_pager(
5555
customConcat(fullId, actionId);
5656
char* manchester = encManchester(fullId, 0);
5757
char* rawSignal = genRawDataTD157(200, 600, manchester);
58-
flipper_format_write_string_cstr(ff, "RAW_Data", rawSignal);
58+
for(u_int32_t i = 1; app->repeats >= i; i++) {
59+
flipper_format_write_string_cstr(ff, "RAW_Data", rawSignal);
60+
}
5961
free(manchester);
6062
free(rawSignal);
6163
}

meal_pager.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,15 @@ Meal_Pager* meal_pager_app_alloc() {
4949
app->pager_type = 0;
5050
app->first_station = 0;
5151
app->first_station_char = "0";
52-
app->last_station = 255;
52+
app->last_station = 10;
5353
app->last_station_char = "10";
5454
app->first_pager = 0;
5555
app->first_pager_char = "0";
5656
app->last_pager = 31;
5757
app->last_pager_char = "31";
5858
app->stop_transmit = false;
59+
app->repeats = 1;
60+
app->repeats_char = "1";
5961

6062
// Used for File Browser
6163
app->dialogs = furi_record_open(RECORD_DIALOGS);

meal_pager_i.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ typedef struct {
5757
uint32_t current_station;
5858
uint32_t current_pager;
5959
bool stop_transmit;
60+
uint32_t repeats;
61+
char* repeats_char;
6062
} Meal_Pager;
6163

6264
typedef enum {

scenes/meal_pager_scene_settings.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,15 @@ static void meal_pager_scene_settings_set_last_pager(VariableItem* item) {
101101
app->last_pager = index;
102102
}
103103

104+
static void meal_pager_scene_settings_set_repeats(VariableItem* item) {
105+
Meal_Pager* app = variable_item_get_context(item);
106+
uint32_t index = variable_item_get_current_value_index(item);
107+
108+
snprintf(app->repeats_char, 20, "%lu", index);
109+
variable_item_set_current_value_text(item, app->repeats_char);
110+
app->repeats = index;
111+
}
112+
104113
static void meal_pager_scene_settings_set_haptic(VariableItem* item) {
105114
Meal_Pager* app = variable_item_get_context(item);
106115
uint8_t index = variable_item_get_current_value_index(item);
@@ -189,6 +198,11 @@ void meal_pager_scene_settings_on_enter(void* context) {
189198
variable_item_set_current_value_text(item, app->last_pager_char);
190199

191200
// Repeat Attacks
201+
item = variable_item_list_add(
202+
app->variable_item_list, "Signal Repeat", 11, meal_pager_scene_settings_set_repeats, app);
203+
variable_item_set_current_value_index(item, app->repeats);
204+
snprintf(app->repeats_char, 20, "%lu", app->repeats);
205+
variable_item_set_current_value_text(item, app->repeats_char);
192206

193207
// Vibro on/off
194208
item = variable_item_list_add(

0 commit comments

Comments
 (0)