How to send and receive some data via a GSM modem during an active call (Python and AT Command) How to send and receive some data via a GSM modem during an active call (Python and AT Command) python python

How to send and receive some data via a GSM modem during an active call (Python and AT Command)


Question 1:

I think that what you need are DTMF Tones. DTMF tones are those sounds that you can hear if you're talking with your friend Jimmy and he presses the number buttons. Each button ([0-9],#,*,[A-D],P) has its specific tone.

You can find a good description about how they are composed here.

I just report here that there are two standard commands allowing you to deal with DTMF tones:

  • AT+VTD=<duration> - Setting tones duration
  • AT+VTS=<dtmfSequence> - Sending a sequence of tones

Question 2:

As correctly reported in one comment above, URCs (unsolicited result codes) for incoming Short Messages can be enabled by means of AT+CNMI command, which description can be found here.


Most GSM modems will need some initialization so that they signal incoming SMSs.I believe that's what Khalil was refering to. These come as a set of AT commands you should send before entering your loop.

I've done this successfully in the past with a few different GSM modem brands and recall that even though there are some device specific details, the general commands you need to send are the same.

A quick search lead me to:

Maybe you can use them as a starting point.