Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Commit

Permalink
Squashed 'dtmf_dolphin/' changes from f7e924b..5793814
Browse files Browse the repository at this point in the history
5793814 fix catalog versions
92645d9 combine 1
418b66e move base pack here
REVERT: f7e924b Update README.md
REVERT: 837ce09 Merge pull request #9 from xMasterX/redbox_ca_fix
REVERT: fba220c Add Redbox (CA) to menu, apply ./fbt format
REVERT: 6006c9f Merge pull request #7 from LambdaCalculus37/main
REVERT: db16f72 Fixed tone generation for Redbox (CA) to add second tone set to 0.0 to satisfy PR issue and to follow with Redbox (US) and Redbox (UK) data
REVERT: 320015c Added redbox data for Canadaian payphone coin tones
REVERT: 610de49 Update README.md
REVERT: a443d34 Redbox functionality complete!
REVERT: 5e8e559 Fixed misc menu.
REVERT: 85a5fed Cleanup and fixing misc menu.
REVERT: 3b366ce Merge pull request #3 from kowalski7cc/fap-icon
REVERT: 90cc9b0 Updated for upstream flipperzero 0.69. Nice.
REVERT: d4821c4 Add fap icon
REVERT: a2b5ccc Update README.md
REVERT: 368dbed Added some edumacational links
REVERT: fd0895a Update README.md
REVERT: 75c0118 Create LICENSE
REVERT: 78050ff Merge pull request #2 from litui/refactor
REVERT: cb02b72 Now functional as dialer and bluebox.
REVERT: 1f0730d Refactor in progress. Many items not working.
REVERT: 508d20a Tweaked README, added image.
REVERT: 4754832 Migrated existing state to a new repo.

git-subtree-dir: dtmf_dolphin
git-subtree-split: 5793814
  • Loading branch information
Willy-JL committed Nov 9, 2023
1 parent f7e924b commit 9f06522
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 10 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
![Image](assets/dialer.jpg)
![Image](pics/dialer.jpg)

[Original Link](https://github.com/litui/dtmf_dolphin)

## DTMF Dolphin

Expand All @@ -8,8 +10,6 @@ Now in a release-ready state for both Dialer, Bluebox, and Redbox (US/UK) functi

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.

This is for educational/entertainment purposes only. While the code generates sine waves, the buzzer on the Flipper Zero uses PWM which interferes with the cleanness of the signal. While the tones generated sound fairly accurate, they may not be detected by DTMF applications. This is a hardware limitation.

### Educational Links:

* http://www.phrack.org/issues/25/7.html#article
Expand Down
4 changes: 3 additions & 1 deletion application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ App(
name="DTMF Dolphin",
apptype=FlipperAppType.EXTERNAL,
entry_point="dtmf_dolphin_app",
cdefines=["DTMF_DOLPHIN"],
requires=[
"storage",
"gui",
Expand All @@ -13,4 +12,7 @@ App(
stack_size=8 * 1024,
order=20,
fap_category="Tools",
fap_author="@litui & @xMasterX",
fap_version="1.2",
fap_description="DTMF (Dual-Tone Multi-Frequency) dialer, Bluebox, and Redbox.",
)
17 changes: 11 additions & 6 deletions dtmf_dolphin_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,16 +214,20 @@ bool dtmf_dolphin_audio_play_tones(
generate_waveform(current_player, 0);
generate_waveform(current_player, current_player->half_buffer_length);

dtmf_dolphin_speaker_init();
dtmf_dolphin_dma_init((uint32_t)current_player->sample_buffer, current_player->buffer_length);

furi_hal_interrupt_set_isr(
FuriHalInterruptIdDma1Ch1, dtmf_dolphin_audio_dma_isr, current_player->queue);

dtmf_dolphin_dma_start();
dtmf_dolphin_speaker_start();
current_player->playing = true;
return true;
if(furi_hal_speaker_acquire(1000)) {
dtmf_dolphin_speaker_init();
dtmf_dolphin_dma_start();
dtmf_dolphin_speaker_start();
current_player->playing = true;
return true;
} else {
current_player->playing = false;
return false;
}
}

bool dtmf_dolphin_audio_stop_tones() {
Expand All @@ -238,6 +242,7 @@ bool dtmf_dolphin_audio_stop_tones() {
}
dtmf_dolphin_speaker_stop();
dtmf_dolphin_dma_stop();
furi_hal_speaker_release();

furi_hal_interrupt_set_isr(FuriHalInterruptIdDma1Ch1, NULL, NULL);

Expand Down
Binary file added img/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified phone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes

0 comments on commit 9f06522

Please sign in to comment.