
The sad state of voice support in cellular modems - bahjoite
http://laforge.gnumonks.org/blog/20170902-cellular_modems-voice/
======
mixedbit
I have recently bought Huawei USB modem and discovered that these things run
Linux with Android. This is pretty off-putting. With such a modem it is no
longer enough to keep your system & drivers up to date, because the device has
it's own full-blown operating system. An attacker no longer needs to hack your
machine to capture your traffic or make you a part of a botnet, it can hack
your modem. And the modem, like Android phones, is probably not going to
receive software updates for long.

~~~
tekstar
how is that a different threat profile than your router or any other IoT you
may own?

~~~
mixedbit
There is a large selection of routers or general purpose devices that can be
used as routers (for example Rasberry Pi) on which you can easily run standard
Linux distributions. You can configure such distribution to install software
updates automatically and have a quite secure setup for years.

With these USB modems, although they run Linux & Android, the images are of
course proprietary and you fully rely on Huawei for security patches. The
patches also don't install automatically, you need to check for them, download
and install by yourself.

Most IoT devices have the same problem, so I personally avoid buying them,
although they can work behind your home firewall, which can protect against
many remote attacks. GSM modem is your gateway to the internet, so you can't
put a firewall at front of it.

------
derefr
Do cellular modems really "need" to do audio any more? I don't mean because
everyone could just be using data-only SIMs with OTT SIP software. I mean,
instead: sure, audio is part of the cellular _standards_ —but why is it part
of the cellular _baseband hardware_? Phones aren't made in a way where the
baseband chip "is" the phone any more. The modem is now a tiny part of the
processing power of even the dumbest of dumbphones.

So, given this, why can't the standards require that the modem expect there to
be some _other_ chip (e.g. the SoC in a smartphone; a specialized DSP on a
dumbphone; a ground resistor on a mobile data stick) to feed the modem audio
packets which have been pre-encoded and serialized to the format it would have
done itself, so it can just take them, wrap them in baseband frames, and
directly put them on the wire?

In other words, why is the (DAC + GSM/G.722/etc. DSP + ser/des) logic a
feature of _cellular modems_ , rather than a feature of _phones_?

Think about it by analogy: you wouldn't expect a PSTN modem to come with a
feature where a computer can make analogue telephone calls using it by hooking
it up directly to your microphone and speakers. You'd expect that, if it did
any such thing, it'd be by DMAing pre-encoded-for-the-wire packets out of a
realtime ring buffer, the same way any network card consumes any other packet.
Maybe your sound-card would provide hardware support for some codecs (by
consuming one DMA ring and producing another. Or maybe you'd do the audio
encoding on your GPU with a GPGPU shader, allowing your phone to speak new
voice codecs with just a firmware update.

~~~
mmjaa
Captain Crunch called. He wants his whistle back.

------
mseebach
I suspect that the reason for this is the behaviour of most OS's around USB
audio devices: switch over the default inputs and outputs to the new device --
which would mean that when you plug in your modem, suddenly your Skype would
configure itself to "use" that device for it's audio IO.

Also, I'm not sure how easy it would be to even configure the OS to route
modem output to default sound card input (your headphones), and the same
soundcard's output (your microphone) to the modem input. The assumption of
most OS's seems to be that you have one active input and one active output at
any given time. It's certainly not something I'd immediately know how to wire
up using the default mixer in Windows.

~~~
IshKebab
You wouldn't have to wire it up using the default mixer yourself. Whatever
program you were using to make calls could do that for you.

The only vaguely valid technical reason I can think to do it how they have is
to reduce latency. Of course the real reason is laziness.

------
mmjaa
The 'reason' for this distinction between breaking out the audio of the modem
to a standard interface, versus not breaking it out - but rather requiring a
secondary processor to submit proprietary packets - is simply this: cell
equipment manufacturers have to comply with the requirement that it be
relatively difficult _to record calls made with their equipment_.

Putting the DAC elsewhere absolves them of this requirement and drastically
simplifies their time-to-market statistics. If you make the OS and other
layers of the stack responsible for the ADAC, then you don't need to worry
about it - as long as there is a usable interface.

Around the world, different markets have regulations governing the recording
of calls. Its never supposed to be easy to do this, at a hardware level,
because its supposed to be very hard even for the players in various markets
to do this - without a third party (i.e. government) involved.

tl;dr the reason this is so, is because hardware vendors have to comply with
legislation, and doing squirrely ADAC instead of out of the box Audio routing
absolves them of the responsibility.

------
TorKlingberg
One correction: Modems in phones are not normally LGA modules, but rather
components soldered directly to the main board. Sometimes the baseband
processor and protocol stack are even integrated in the main processor SoC.

Systems that use the LGA or m.2 modules often don't use the audio at all, so
nobody has cared to make a nice interface.

~~~
anyfoo
I stumbled over that as well at first when reading the article, but then
realized that it was likely talking about modem modules for computers, not
phones.

------
Nexxxeh
How annoying. Especially as several of the Huawei USB dongles support voice
over USB.

[https://stackoverflow.com/questions/8367864/how-make-use-
of-...](https://stackoverflow.com/questions/8367864/how-make-use-of-the-voice-
api-to-make-calls-using-huawei-3g-modems)

~~~
mseebach
That answer seems to be exactly what the article is describing:

> Instead, what some modem vendors have implemented as an ugly hack is the
> transport of 8kHz 16bit PCM samples over one of the UARTs.

------
cesarb
Would VoLTE make the situation better, since voice is sent as data?

~~~
jsjohnst
From my experience with cellular chipsets, no. The voice channel is exposed
the same way on the chip, it’s just sent differently over the network. The
“bad thing” about VoLTE additionally for ultra small embedded applications is
that it requires two antennas.

~~~
wl
The diversity antenna requirement is a carrier one, not a technical one. You
can get waivers if it makes sense for your application.

~~~
jsjohnst
Do you have a source for that info? Every chip manufacturer (3 of top 4) and
carrier (every US carrier) I’ve talked to said different.

~~~
wl
You'd be looking at Category 1 LTE, which is LTE without the MIMO. Some
Category 1 modules are starting to support VoLTE. This stuff is relatively
new, which might explain the answers you've got if it has been awhile since
you've asked. It's still strongly recommended that Category 1 devices use a
receive diversity antenna, but they work without it. Less robust, obviously.

~~~
jsjohnst
Ah! Cat1 modules aren’t actually shipping yet with VoLTE in volume.
Manufacturers are sampling them, but as of June weren’t shipping yet. Expected
by year end last I heard. Maybe you have better sourcing, but that info makes
more sense now. I’d love to pick your brain more, if you’re up for it, my
contact info is in my profile.

