[review] dcbw/huawei-voice
Riccardo Vangelisti
riccardo.vangelisti at sadel.it
Fri May 5 14:40:29 UTC 2017
Hi,
> On Thu, 2017-05-04 at 16:30 +0200, Riccardo Vangelisti wrote:
>> Hi,
>> sorry for late reply but we took some time to test this branch using
>> these Huawei modems:
>>
>> +-------------------+-----------------+--------------------------+---
>> ----+
>>> Modem | Firmware | ^CVOICE Support |
>>> Voice |
>> +-------------------+-----------------+--------------------------+---
>> ----+
>>> Huawei ME909s-120 | 11.617.01.00.00 | ^CVOICE: 1, 8000, 16, 20 |
>>> Yes |
>>> Huawei MU709s-2 | 11.651.67.00.00 | ^CVOICE: 1, 8000, 16, 20 |
>>> Yes |
>>> Huawei E1150 | 11.609.18.00.00 | ^CVOICE:0,8000,16,20 |
>>> Yes |
>> +-------------------+-----------------+--------------------------+---
>> ----+
>>
>> First of all, when ^CVOICE command is not supported by the modem all
>> of
>> voice capabilities are disabled.
>> For example, ME909s and MU709s modems have voice capabilities
>> supported
>> by the firmware but voice is disabled anyway.
> So for these devices, they don't implement CVOICE, but do support voice
> via non-host-routed mechanisms, is that correct?
Yes, I don't know why manufacturer disable CVOICE command in these modems.
>
> eg, they have pins for I2C audio or something like that? How do we
> know that these devices support voice, can we tell from firmware
> commands?
Yes, they have a PCM audio interface (data in, data out, clk and sync on
Mini-PCI express) connected to an external audio codec like TLV320AIC3204.
>
>> Our proposal is to use ^CVOICE command only for checking PCM audio
>> port
>> capabilities and not for all voice capabilities.
>> Can voice capabilities be enabled or not using ATH or AT+CHUP command
>> ?
> No, because most modems support these commands, but do not include
> voice capabilities because they have no mechanism to get audio in/out
> of the device. Only modems with specific voice routing (I2C, USB, PCM
> etc) actually have the voice capabilitiy, and I don't think we should
> enable the interface unless we know.
>
> Ideally we can use some other firmware commands to detect that voice is
> possible on devices that do not support CVOICE.
After a quick search I cannot find a specific command that can be used
to check if modem+firmware supports voice.
I think that manufacturer deploy a general purpose firmware in most of
their modems.
I've attached a text file with some test that show voice related at
command can't be used to check if voice is supported or not.
In particular Huawei E172 make voice call but voice related AT commands
return an error.
>
> If we cannot, then I think we have to fall back to udev tags or
> something.
Right, if CVOICE is not supported we can enable voice capability from
udev specifying the audio mode, for example external PCM audio or CVOICE
mode.
Also when CVOICE is supported we could use external PCM audio using udev
tags.
Something like ID_MM_HUAWEI_FORCE_EXTAUDIO=1
>
>> Actually master don't check if modem has voice capabilities but
>> simply
>> returns an error when you try to make a call.
> Right, I changed the check on master to make the CVOICE call for Huawei
> to ensure the modem had voice capability. Since I only know the voice
> checks for Huawei, that's the only plugin that (in the branch) exhibits
> voice capability.
Actually master don't check if modem has voice capabilities because all
generic modem that support voice audio interface could make call.
In the branch only Huawei modem (with CVOICE or with udev tags) will
support voice call. To me it seems to be a regression from master.
Can be udev tags made with global scope ? So users can enable it as they
want.
>
> I also have a Sierra 860 PCMCIA card with voice capability (has a
> headset jack on the card itself) that I was going to improve the branch
> with. But I know there are Sierra-specific commands that would allow
> me to check whether the modem supports voice calls or not.
>
>> Aleksander, did you check if this branch works on your MU709 dev
>> board ?
>>
>> Second, we tried to start and receive voice's calls using E1150
>> (CVOICE
>> supported) but no audio coming from /dev/ttyUSB1 (qcdm).
>> # mmcli -m 0 -o 0
> This would be a bug if incoming calls are not correctly handled. I
> will investigate and fix it. Did outgoing calls work on the E1150?
>
>>> encoding: 'unknown'
>>> resolution: 'unknown'
>>> rate: 'unknown'
>> If we make calls using mmcli --command in debug mode and enabling
>> CVOICE
>> support (AT^CVOICE=0) and the audio port (AT^DDSETEX=2) all works
>> correctly and audio coming from /dev/ttyUSB1.
>> Example: # cat /dev/ttyUSB1 | aplay -f S16_BE
>>
>> Dan, could you indicate the correct sequence to make a call when
>> CVOICE
>> is supported ? How ModemManager tells me what is the correct device
>> used
>> by audio stream ?
> At the moment with the branch, only Huawei supports voice calls, and
> the code currently assumes that any detected QCDM port (there is almost
> always only one) is also the audio port. I was unable to find
> documentation that described what the value returned from "AT^DDSETEX?"
> actually means, though perhaps it means the USB interface # or
> something. But the only usage I can find is for "2", so it's unclear.
>
> Is there any way with the MU709 and ME909 to determine conclusively
> that they support voice or not, via AT commands if possible?
>
> Thanks for testing!!
>
> Dan
>
>> Thanks,
>> Riccardo
>>
>>
>> Il 18/04/2017 12:29, Aleksander Morgado ha scritto:
>>> On Mon, Apr 17, 2017 at 7:08 PM, Dan Williams <dcbw at redhat.com>
>>> wrote:
>>>> Reworked the audio format stuff and added mmcli support.
>>>>
>>>> Removed the 'blocked' stuff and started using 'connected'
>>>> instead.
>>>>
>>>> Now the larger change: call state handling in mm-base-call.c. I
>>>> removed most of the base class call state setting for the MO
>>>> (mobile-
>>>> originated, eg outgoing) call stuff. I think the call state
>>>> handling
>>>> there was wrong; only the subclasses know when the call is
>>>> ringing and
>>>> has been picked up (answered) on the remote end through
>>>> unsolicited
>>>> notifications. So the subclasses must be the ones to update the
>>>> call
>>>> state when they get these notifications, not the base call class.
>>>> Huawei calls will now go through UNKNOWN -> DIALING ->
>>>> RINGING_OUT ->
>>>> ACCEPTED, where previously they went UNKNOWN -> RINGING_OUT ->
>>>> ACTIVE
>>>> and at the wrong times.
>>>>
>>>> Eventually we should implement +CLCC (list current calls) polling
>>>> in
>>>> the base class and then we can get this information generically
>>>> for
>>>> subclasses that don't implement unsolicited notifications. Newer
>>>> devices may have support for +CMCCS/+CMCCSI unsolicited
>>>> notifications
>>>> which could also be used in a generic implementation.
>>> Riccardo, Marco, could you guys also review Dan's branch?
>>>
>> _______________________________________________
>> ModemManager-devel mailing list
>> ModemManager-devel at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
> _______________________________________________
> ModemManager-devel mailing list
> ModemManager-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
-------------- next part --------------
Huawei USB Stick E3276 4G
Voice is disabled, but voice device mode is "Headset"
/org/freedesktop/ModemManager1/Modem/1 (device id 'f7f567c2985cd67c9d2a45df0a116a17914928b0')
-------------------------
Hardware | manufacturer: 'huawei'
| model: 'E3276'
| revision: '21.192.05.00.00'
| supported: 'gsm-umts'
| current: 'gsm-umts'
| equipment id: '863781014194410'
-------------------------
System | device: '/sys/devices/pci0000:00/0000:00:15.0/0000:03:00.0/usb1/1-4/1-4.1'
| drivers: 'huawei_cdc_ncm, option1'
| plugin: 'Huawei'
| primary port: 'cdc-wdm0'
| ports: 'ttyUSB0 (at), cdc-wdm0 (at), wwan0 (net)'
-------------------------
Numbers | own : 'unknown'
-------------------------
Status | lock: 'none'
| unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)'
| state: 'registered'
| power state: 'on'
| access tech: 'umts'
| signal quality: '54' (recent)
-------------------------
Modes | supported: 'allowed: 2g; preferred: none
| allowed: 3g; preferred: none
| allowed: 4g; preferred: none
| allowed: 2g, 3g, 4g; preferred: none'
| current: 'allowed: 2g, 3g, 4g; preferred: none'
-------------------------
Bands | supported: 'unknown'
| current: 'unknown'
-------------------------
IP | supported: 'ipv4, ipv6, ipv4v6'
-------------------------
3GPP | imei: '863781014194410'
| enabled locks: 'none'
| operator id: '22201'
| operator name: 'I TIM'
| subscription: 'unknown'
| registration: 'home'
-------------------------
SIM | path: '/org/freedesktop/ModemManager1/SIM/1'
-------------------------
Bearers | paths: 'none'
# mmcli -m 0 --command="^VMSET?"
response: '^VMSET: 3'
# mmcli -m 0 --command="DXXXXXXXXXX;"
error: command failed: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Connection.NoCarrier: No carrier'
ModemManager[7278]: <debug> [1493971637.548622] [mm-port-serial-at.c:459] debug_log(): (cdc-wdm0): --> 'ATDXXXXXXXXXX;<CR><LF>'
ModemManager[7278]: <debug> [1493971637.551035] [mm-port-serial-at.c:459] debug_log(): (cdc-wdm0): <-- '<CR><LF>NO CARRIER<CR><LF>'
# mmcli -m 0 --command="^CVOICE?"
response: '^CVOICE: 1, 8000, 16, 20'
# mmcli -m 0 --command="^CPCM?"
error: command failed: 'GDBus.Error:org.freedesktop.ModemManager1.Error.MobileEquipment.Unknown: Unknown error'
ModemManager[7278]: <debug> [1493971962.177527] [mm-port-serial-at.c:459] debug_log(): (cdc-wdm0): --> 'AT^CPCM?<CR><LF>'
ModemManager[7278]: <debug> [1493971962.180047] [mm-port-serial-at.c:459] debug_log(): (cdc-wdm0): <-- '<CR><LF>COMMAND NOT SUPPORT<CR><LF>'
Huawei USB Stick E172 3G
Voice is enabled, but every command except ATD fails
/org/freedesktop/ModemManager1/Modem/2 (device id '41dff0eb87b48e86b7293ab35e0de553a488c27a')
-------------------------
Hardware | manufacturer: 'huawei'
| model: 'E17X'
| revision: '11.415.05.03.00'
| supported: 'gsm-umts'
| current: 'gsm-umts'
| equipment id: '359298014743899'
-------------------------
System | device: '/sys/devices/pci0000:00/0000:00:15.0/0000:03:00.0/usb1/1-3/1-3.1'
| drivers: 'option1'
| plugin: 'Huawei'
| primary port: 'ttyUSB1'
| ports: 'ttyUSB0 (at), ttyUSB1 (at)'
-------------------------
Numbers | own : 'unknown'
-------------------------
Status | lock: 'none'
| unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)'
| state: 'registered'
| power state: 'on'
| access tech: 'umts'
| signal quality: '61' (recent)
-------------------------
Modes | supported: 'allowed: 2g, 3g; preferred: none
| allowed: 2g, 3g; preferred: 2g
| allowed: 2g, 3g; preferred: 3g
| allowed: 2g; preferred: none
| allowed: 3g; preferred: none'
| current: 'allowed: 2g, 3g; preferred: 3g'
-------------------------
Bands | supported: 'unknown'
| current: 'unknown'
-------------------------
IP | supported: 'ipv4'
-------------------------
3GPP | imei: '359298014743899'
| enabled locks: 'none'
| operator id: '22201'
| operator name: 'Telecom Italia M'
| subscription: 'unknown'
| registration: 'home'
-------------------------
SIM | path: '/org/freedesktop/ModemManager1/SIM/2'
-------------------------
Bearers | paths: 'none'
# mmcli -m 2 --command="^VMSET?"
error: command failed: 'GDBus.Error:org.freedesktop.ModemManager1.Error.MobileEquipment.Unknown: Unknown error'
ModemManager[7278]: <debug> [1493972976.559547] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): --> 'AT^VMSET?<CR>'
ModemManager[7278]: <debug> [1493972976.579239] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): <-- '<CR><LF>ERROR<CR><LF>'
# mmcli -m 2 --command="DXXXXXXXXXX;"
response: ''
# mmcli -m 2 --command="+CHUP"
response: ''
# mmcli -m 2 --command="^CVOICE?"
error: command failed: 'GDBus.Error:org.freedesktop.ModemManager1.Error.MobileEquipment.Unknown: Unknown error'
ModemManager[7278]: <debug> [1493973070.824929] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): --> 'AT^CVOICE?<CR>'
ModemManager[7278]: <debug> [1493973070.845816] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): <-- '<CR><LF>ERROR<CR><LF>'
# mmcli -m 2 --command="^CPCM?"
error: command failed: 'GDBus.Error:org.freedesktop.ModemManager1.Error.MobileEquipment.Unknown: Unknown error'
ModemManager[7278]: <debug> [1493973136.480884] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): --> 'AT^CPCM?<CR>'
ModemManager[7278]: <debug> [1493973136.496861] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): <-- '<CR><LF>ERROR<CR><LF>'
# mmcli -m 2 --command="^DVCFG?"
error: command failed: 'GDBus.Error:org.freedesktop.ModemManager1.Error.MobileEquipment.Unknown: Unknown error'
ModemManager[7278]: <debug> [1493973359.203694] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): --> 'AT^DVCFG?<CR>'
ModemManager[7278]: <debug> [1493973359.223369] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): <-- '<CR><LF>ERROR<CR><LF>'
Huawei USB Stick E1550 4G
Voice is enabled, cvoice is supported
/org/freedesktop/ModemManager1/Modem/3 (device id '3d10f2d6fa30714d729763fd31d06ea20218b3f0')
-------------------------
Hardware | manufacturer: 'HUAWEI COMMUNICATION'
| model: '33'
| revision: 'M6246A-KPRBL-1.2.0022_3H 1 [Aug 04 2010 20:00:33]'
| supported: 'gsm-umts'
| current: 'gsm-umts'
| equipment id: '354638048086143'
-------------------------
System | device: '/sys/devices/pci0000:00/0000:00:15.0/0000:03:00.0/usb1/1-4/1-4.1'
| drivers: 'qmi_wwan, option1'
| plugin: 'Huawei'
| primary port: 'cdc-wdm0'
| ports: 'ttyUSB0 (at), ttyUSB1 (qcdm), ttyUSB2 (at), cdc-wdm0 (qmi), wwan0 (net)'
-------------------------
Numbers | own : 'unknown'
-------------------------
Status | lock: 'sim-pin2'
| unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)'
| state: 'registered'
| power state: 'on'
| access tech: 'umts'
| signal quality: '60' (recent)
-------------------------
Modes | supported: 'allowed: 2g; preferred: none
| allowed: 3g; preferred: none
| allowed: 2g, 3g; preferred: none
| allowed: 2g, 3g; preferred: 2g
| allowed: 2g, 3g; preferred: 3g'
| current: 'allowed: any; preferred: none'
-------------------------
Bands | supported: 'unknown'
| current: 'unknown'
-------------------------
IP | supported: 'ipv4, ipv6, ipv4v6'
-------------------------
3GPP | imei: '354638048086143'
| enabled locks: 'none'
| operator id: '22201'
| operator name: 'I TIM'
| subscription: 'unknown'
| registration: 'home'
-------------------------
SIM | path: '/org/freedesktop/ModemManager1/SIM/3'
-------------------------
Bearers | paths: 'none'
# mmcli -m 3 --command="^VMSET?"
error: command failed: 'GDBus.Error:org.freedesktop.ModemManager1.Error.MobileEquipment.Unknown: Unknown error'
ModemManager[7278]: <debug> [1493973695.218430] [mm-port-serial-at.c:459] debug_log(): (ttyUSB2): --> 'AT^VMSET?<CR>'
ModemManager[7278]: <debug> [1493973695.237628] [mm-port-serial-at.c:459] debug_log(): (ttyUSB2): <-- '<CR><LF>ERROR<CR><LF>'
# mmcli -m 2 --command="DXXXXXXXXXX;"
response: ''
# mmcli -m 3 --command="+CHUP"
response: '^ORIG:1,0
^CONF:1
^CEND:1,0,29,16'
# mmcli -m 3 --command="^CVOICE?"
response: '^CVOICE:0,8000,16,20'
# mmcli -m 3 --command="^CPCM?"
error: command failed: 'GDBus.Error:org.freedesktop.ModemManager1.Error.MobileEquipment.Unknown: Unknown error'
ModemManager[7278]: <debug> [1493973836.772244] [mm-port-serial-at.c:459] debug_log(): (ttyUSB2): --> 'AT^CPCM?<CR>'
ModemManager[7278]: <debug> [1493973836.788706] [mm-port-serial-at.c:459] debug_log(): (ttyUSB2): <-- '<CR><LF>ERROR<CR><LF>'
# mmcli -m 3 --command="^DVCFG?"
error: command failed: 'GDBus.Error:org.freedesktop.ModemManager1.Error.MobileEquipment.Unknown: Unknown error'
ModemManager[7278]: <debug> [1493973880.886118] [mm-port-serial-at.c:459] debug_log(): (ttyUSB2): --> 'AT^DVCFG?<CR>'
ModemManager[7278]: <debug> [1493973880.905751] [mm-port-serial-at.c:459] debug_log(): (ttyUSB2): <-- '<CR><LF>ERROR<CR><LF>'
More information about the ModemManager-devel
mailing list