decode dtmf with fona

Adafruit cellular platform - SMS and IoT over celluar

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
fredpet
 
Posts: 22
Joined: Wed Feb 13, 2019 6:30 pm

decode dtmf with fona

Post by fredpet »

hi folks,
I have a featherfona wth SIM800H perfectly running, doing all the things I request.

But now I get into a problem with decoding DTMF-tones. When my fona picks a call, and the other participant sends a dtmf-tone (means: presses a digit key), I don't know how to decode this.
Is there a possibility by software (preferred) or hardware to do this task?

many greetings
fred

User avatar
sj_remington
 
Posts: 997
Joined: Mon Jul 27, 2020 4:51 pm

Re: decode dtmf with fona

Post by sj_remington »

The Goertzel algorithm is popular for decoding DTMF signals, but is said to be hard to tune for reliable results.

https://forum.arduino.cc/t/dtmf-decoder-library/118979

User avatar
rskup
 
Posts: 230
Joined: Sat Aug 01, 2020 9:04 pm

Re: decode dtmf with fona

Post by rskup »

Hi Fred,

It looks like both the Sim800 and the Sim5320 (FONA3G) have the following AT command:

AT+DDET=1

that is labeled "DTMF Detection Control" in both of their AT Command manuals. From my reading, if I'm understanding it correctly, looks like when enabled, someone pressing a 1 shows up as +RXDTMF:1 on the serial port, and so on. Gonna try it out on my FONA3G later, sounds like a cool option to have if it works.

Question for you...what SIM card are you using for your 800? Are you in the US?

User avatar
rskup
 
Posts: 230
Joined: Sat Aug 01, 2020 9:04 pm

Re: decode dtmf with fona

Post by rskup »

Hi Fred,

Well, I "sorta" got the DTMF detection working on the FONA3G. Turns out besides the AT+DDET=1 command, there's also a AT+DDPARAM = #,#,#,#,#,#,#,#,# command, with 9 (yes, 9!) different values to control how the 5320 chip interprets the DTMF tones. The default parameters for the DDPARAM command would not work at all for me. It was only after I started adjusting those values (best I could from reading the manual) did things finally start working.

However, some numbers are being interpreted correctly, some are not (sending the FONA3G a 7 shows up as a 4 for example), and some numbers didn't show up at all. Clearly there's still tweaking to do on those DDPARAM values. Some of the DDPARAM fields are just goofy, like "threshold reverse twist", honest, not making that up! If you're interested, that command starts on page 159 of version 2.05 of the Sim5320 AT manual. Oddly I do not see it listed in earlier versions of the manual.

Anyways, I notice the 800 does not seem to have the DDPARAM command (at least in the manual I have), maybe sending that AT+DDET=1 command is all you need to do, hope so anyways.

Still would be interested in hearing what SIM card you have in the 800, and what country you're in.

Hoping the best for your 800!

Locked
Please be positive and constructive with your questions and comments.

Return to “FONA”