Skip to content

Commit 418b66e

Browse files
committed
move base pack here
0 parents  commit 418b66e

22 files changed

+2109
-0
lines changed

LICENSE

+674
Large diffs are not rendered by default.

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
![Image](pics/dialer.jpg)
2+
3+
[Original Link](https://github.com/litui/dtmf_dolphin)
4+
5+
## DTMF Dolphin
6+
7+
DTMF (Dual-Tone Multi-Frequency) dialer, Bluebox, and Redbox.
8+
9+
Now in a release-ready state for both Dialer, Bluebox, and Redbox (US/UK) functionality!
10+
11+
Please note that using the current tone output method, the 2600 tone is scaled about 33 Hz higher than it should be. This is a limitation of the current sample rate.
12+
13+
### Educational Links:
14+
15+
* http://www.phrack.org/issues/25/7.html#article
16+
* https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling
17+
* https://en.wikipedia.org/wiki/Blue_box
18+
* https://en.wikipedia.org/wiki/Red_box_(phreaking)

application.fam

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
App(
2+
appid="dtmf_dolphin",
3+
name="DTMF Dolphin",
4+
apptype=FlipperAppType.EXTERNAL,
5+
entry_point="dtmf_dolphin_app",
6+
requires=[
7+
"storage",
8+
"gui",
9+
"dialogs",
10+
],
11+
fap_icon="phone.png",
12+
stack_size=8 * 1024,
13+
order=20,
14+
fap_category="Tools",
15+
fap_author="@litui & @xMasterX",
16+
fap_version="1.0",
17+
fap_description="DTMF (Dual-Tone Multi-Frequency) dialer, Bluebox, and Redbox.",
18+
)

dtmf_dolphin.c

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
#include "dtmf_dolphin_i.h"
2+
3+
#include <furi.h>
4+
#include <furi_hal.h>
5+
6+
static bool dtmf_dolphin_app_custom_event_callback(void* context, uint32_t event) {
7+
furi_assert(context);
8+
DTMFDolphinApp* app = context;
9+
return scene_manager_handle_custom_event(app->scene_manager, event);
10+
}
11+
12+
static bool dtmf_dolphin_app_back_event_callback(void* context) {
13+
furi_assert(context);
14+
DTMFDolphinApp* app = context;
15+
return scene_manager_handle_back_event(app->scene_manager);
16+
}
17+
18+
static void dtmf_dolphin_app_tick_event_callback(void* context) {
19+
furi_assert(context);
20+
DTMFDolphinApp* app = context;
21+
22+
scene_manager_handle_tick_event(app->scene_manager);
23+
}
24+
25+
static DTMFDolphinApp* app_alloc() {
26+
DTMFDolphinApp* app = malloc(sizeof(DTMFDolphinApp));
27+
28+
app->gui = furi_record_open(RECORD_GUI);
29+
app->view_dispatcher = view_dispatcher_alloc();
30+
app->scene_manager = scene_manager_alloc(&dtmf_dolphin_scene_handlers, app);
31+
view_dispatcher_enable_queue(app->view_dispatcher);
32+
view_dispatcher_set_event_callback_context(app->view_dispatcher, app);
33+
34+
view_dispatcher_set_custom_event_callback(
35+
app->view_dispatcher, dtmf_dolphin_app_custom_event_callback);
36+
view_dispatcher_set_navigation_event_callback(
37+
app->view_dispatcher, dtmf_dolphin_app_back_event_callback);
38+
view_dispatcher_set_tick_event_callback(
39+
app->view_dispatcher, dtmf_dolphin_app_tick_event_callback, 100);
40+
41+
view_dispatcher_attach_to_gui(app->view_dispatcher, app->gui, ViewDispatcherTypeFullscreen);
42+
43+
app->main_menu_list = variable_item_list_alloc();
44+
view_dispatcher_add_view(
45+
app->view_dispatcher,
46+
DTMFDolphinViewMainMenu,
47+
variable_item_list_get_view(app->main_menu_list));
48+
49+
app->dtmf_dolphin_dialer = dtmf_dolphin_dialer_alloc();
50+
view_dispatcher_add_view(
51+
app->view_dispatcher,
52+
DTMFDolphinViewDialer,
53+
dtmf_dolphin_dialer_get_view(app->dtmf_dolphin_dialer));
54+
55+
app->notification = furi_record_open(RECORD_NOTIFICATION);
56+
notification_message(app->notification, &sequence_display_backlight_enforce_on);
57+
58+
scene_manager_next_scene(app->scene_manager, DTMFDolphinSceneStart);
59+
60+
return app;
61+
}
62+
63+
static void app_free(DTMFDolphinApp* app) {
64+
furi_assert(app);
65+
view_dispatcher_remove_view(app->view_dispatcher, DTMFDolphinViewMainMenu);
66+
view_dispatcher_remove_view(app->view_dispatcher, DTMFDolphinViewDialer);
67+
variable_item_list_free(app->main_menu_list);
68+
69+
dtmf_dolphin_dialer_free(app->dtmf_dolphin_dialer);
70+
71+
view_dispatcher_free(app->view_dispatcher);
72+
scene_manager_free(app->scene_manager);
73+
74+
notification_message(app->notification, &sequence_display_backlight_enforce_auto);
75+
76+
furi_record_close(RECORD_GUI);
77+
furi_record_close(RECORD_NOTIFICATION);
78+
free(app);
79+
}
80+
81+
int32_t dtmf_dolphin_app(void* p) {
82+
UNUSED(p);
83+
DTMFDolphinApp* app = app_alloc();
84+
85+
view_dispatcher_run(app->view_dispatcher);
86+
87+
app_free(app);
88+
return 0;
89+
}

0 commit comments

Comments
 (0)