Adding AT commands to activate call audio over USB endpoint

Aleksander Morgado aleksander at aleksander.es
Tue Aug 7 11:49:03 UTC 2018


Hey,

> We're using a SIMCom SIM7100 modem which has the ability to exchange
> call audio data over a USB serial endpoint⁰.  To enable this, the modem
> needs an AT command after the call has connected, AT+CPCMREG=1, and a
> command after call has disconnected, AT+CPCMREG=0.
>

Would these commands be needed as soon as a call is started (even if
not established)? or just when established?
Also, how would it work for received calls, at which point should the
command be executed?

> Not knowing the internals of ModemManager too well, I'm wondering if
> anyone could advise on an appropriate way to add these AT commands for
> our particular modem?
>

The way to do this would be to define a new async command in the Voice
interface struct (mm-iface-modem-voice.h) and then in the same voice
interface implementation setup the logic to call that command whenever
needed, but only if it is implemented (e.g. in this case we would have
NULL defaults as others modems don't need this). Once that logic is in
place, we would need a new "simcom" plugin (there is none right now),
which creates a new MMBroadbandModemSimcom that implements the voice
interface and subclasses the specific command.

The asynccommand could just be something like:

gboolean (* setup_audio) (
    MMIfaceModemVoice *self,
    GAsyncReadyCallback callback,
    gpointer user_data);
gboolean (* setup_audio_finish) (
    MMIfaceModemVoice *self,
    GAsyncResult *res,
    GError **error);

It's a bit of work to set it up, but that is how we're able to support
multiple different modems of very different kinds, by providing common
logic (e.g. in the interface implementations) that may be subclassed
differently by the different plugins.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list