ModemManager using QMI doesnt always work in the first attemp.
José
Joseddg92 at gmail.com
Tue Jan 19 09:36:47 PST 2016
Looking at http://cgit.freedesktop.org/ModemManager/ModemManager/tree/plugins/telit/mm-plugin-telit.c?id=1.4.12
seems like the Telit plugin only handles tty port, but I am using QMI
with the Telit LE910. Should it still be using the Telit plugin?
The following lines appear at the log (in this order):
(Telit) [wwan0] filtered by subsystem
(Telit) [ttyUSB4] filtered by udev tags
(Telit) [ttyUSB1] filtered by udev tags
(Telit) [ttyUSB2] filtered by udev tags
(Telit) [ttyUSB3] filtered by udev tags
(Telit) [ttyUSB0] filtered by udev tags
(Telit) [cdc-wdm0] filtered by subsystem
I think at least one of the ttyUSBn device nodes should NOT filter
Telit plugin, right? From the code:
/* If we didn't match any udev tag: unsupported */
if (!self->priv->udev_tags[i]) {
mm_dbg ("(%s) [%s] filtered by udev tags",
self->priv->name,
g_udev_device_get_name (port));
return TRUE;
}
I have been looking at
http://cgit.freedesktop.org/ModemManager/ModemManager/commit/?h=mm-1-4&id=0505021ac6c79c28bd28184a9daa988b0712c71f
and seems like the idProduct is not in the udev rules. Should the
idProduct 1201 be added? Looking around (for exapmle
http://www.spinics.net/lists/linux-usb/msg115457.html) seems like this
is the right productId for Telit LE910.
I attach all the relevant information (I think) for the modem.
root at ccimx6sbc:~# lsusb
Bus 001 Device 003: ID 1bc7:1201 Telit
root at ccimx6sbc:~# udevadm info -a -p /sys/class/tty/ttyUSB0 | head -100
looking at device
'/devices/soc0/soc.0/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.3/1-1.3:1.0/ttyUSB0/tty/ttyUSB0':
KERNEL=="ttyUSB0"
SUBSYSTEM=="tty"
DRIVER==""
looking at parent device
'/devices/soc0/soc.0/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.3/1-1.3:1.0/ttyUSB0':
KERNELS=="ttyUSB0"
SUBSYSTEMS=="usb-serial"
DRIVERS=="option1"
ATTRS{port_number}=="0"
looking at parent device
'/devices/soc0/soc.0/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.3/1-1.3:1.0':
KERNELS=="1-1.3:1.0"
SUBSYSTEMS=="usb"
DRIVERS=="option"
ATTRS{bInterfaceClass}=="ff"
ATTRS{bInterfaceSubClass}=="ff"
ATTRS{bInterfaceProtocol}=="ff"
ATTRS{bNumEndpoints}=="02"
ATTRS{supports_autosuspend}=="1"
ATTRS{bAlternateSetting}==" 0"
ATTRS{bInterfaceNumber}=="00"
looking at parent device
'/devices/soc0/soc.0/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.3':
KERNELS=="1-1.3"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{devpath}=="1.3"
ATTRS{idVendor}=="1bc7"
ATTRS{speed}=="480"
ATTRS{bNumInterfaces}==" 7"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{busnum}=="1"
ATTRS{devnum}=="3"
ATTRS{configuration}==""
ATTRS{bMaxPower}=="500mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="80"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="0"
ATTRS{bcdDevice}=="0232"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{serial}=="0123456789ABCDEF"
ATTRS{version}==" 2.00"
ATTRS{urbnum}=="11"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="Android"
ATTRS{removable}=="removable"
ATTRS{idProduct}=="1201"
ATTRS{bDeviceClass}=="00"
ATTRS{product}=="Android"
looking at parent device
'/devices/soc0/soc.0/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1':
KERNELS=="1-1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="02"
ATTRS{devpath}=="1"
ATTRS{idVendor}=="0424"
ATTRS{speed}=="480"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{busnum}=="1"
ATTRS{devnum}=="2"
ATTRS{configuration}==""
ATTRS{bMaxPower}=="2mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="4"
ATTRS{bcdDevice}=="0bb3"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{version}==" 2.00"
ATTRS{urbnum}=="37"
ATTRS{ltm_capable}=="no"
ATTRS{removable}=="unknown"
ATTRS{idProduct}=="2514"
ATTRS{bDeviceClass}=="09"
root at ccimx6sbc:~# udevadm info -a -p /sys/class/tty/ttyUSB1 | head -18
looking at device
'/devices/soc0/soc.0/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.3/1-1.3:1.3/ttyUSB1/tty/ttyUSB1':
KERNEL=="ttyUSB1"
SUBSYSTEM=="tty"
DRIVER==""
looking at parent device
'/devices/soc0/soc.0/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.3/1-1.3:1.3/ttyUSB1':
KERNELS=="ttyUSB1"
SUBSYSTEMS=="usb-serial"
DRIVERS=="option1"
ATTRS{port_number}=="0"
root at ccimx6sbc:~# udevadm info -a -p /sys/class/tty/ttyUSB2 | head -18
looking at device
'/devices/soc0/soc.0/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.3/1-1.3:1.4/ttyUSB2/tty/ttyUSB2':
KERNEL=="ttyUSB2"
SUBSYSTEM=="tty"
DRIVER==""
looking at parent device
'/devices/soc0/soc.0/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.3/1-1.3:1.4/ttyUSB2':
KERNELS=="ttyUSB2"
SUBSYSTEMS=="usb-serial"
DRIVERS=="option1"
ATTRS{port_number}=="0"
root at ccimx6sbc:~# udevadm info -a -p /sys/class/tty/ttyUSB3 | head -18
looking at device
'/devices/soc0/soc.0/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.3/1-1.3:1.5/ttyUSB3/tty/ttyUSB3':
KERNEL=="ttyUSB3"
SUBSYSTEM=="tty"
DRIVER==""
looking at parent device
'/devices/soc0/soc.0/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.3/1-1.3:1.5/ttyUSB3':
KERNELS=="ttyUSB3"
SUBSYSTEMS=="usb-serial"
DRIVERS=="option1"
ATTRS{port_number}=="0"
root at ccimx6sbc:~# udevadm info -a -p /sys/class/tty/ttyUSB4 | head -18
looking at device
'/devices/soc0/soc.0/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.3/1-1.3:1.6/ttyUSB4/tty/ttyUSB4':
KERNEL=="ttyUSB4"
SUBSYSTEM=="tty"
DRIVER==""
looking at parent device
'/devices/soc0/soc.0/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.3/1-1.3:1.6/ttyUSB4':
KERNELS=="ttyUSB4"
SUBSYSTEMS=="usb-serial"
DRIVERS=="option1"
ATTRS{port_number}=="0"
On Tue, Jan 19, 2016 at 5:34 PM, Aleksander Morgado
<aleksander at aleksander.es> wrote:
> On Tue, Jan 19, 2016 at 4:51 PM, José <Joseddg92 at gmail.com> wrote:
>> I have update to the last firmware (17.01.522 1 [Oct 16 2014
>> 07:00:00]) and the issue is still reproducible.
>>
>> I am almost sure that the issue is related to power management.
>>
>> When the modem is in AT+CFUN=4, trying to enable it with ModemManager
>> (mmcli -m 0 -e) does not work. Trying to change the power state does
>> also not work (mmcli --set-power-state-on).
>>
>> root at ccimx6sbc:~# mmcli -m 0 --set-power-state-on
>> ModemManager[791]: Couldn't reload current power state: Unhandled
>> power state: 'reset' (4)
>> error: couldn't set new power state in the modem:
>> 'GDBus.Error:org.freedesktop.libqmi.Error.Protocol.InvalidTransaction:
>> Couldn't set operating mode: QMI protocol error (60):
>> 'InvalidTransaction''
>> root at ccimx6sbc:~# mmcli -m 0 -e
>> ModemManager[791]: <info> Modem
>> /org/freedesktop/ModemManager1/Modem/0: state changed (disabled ->
>> enabling)
>> ModemManager[791]: <warn> (ttyUSB2): port attributes not fully set
>> ModemManager[791]: <warn> (ttyUSB3): port attributes not fully set
>> ModemManager[791]: Couldn't reload current power state: Unhandled
>> power state: 'reset' (4)
>> ModemManager[791]: <info> Modem
>> /org/freedesktop/ModemManager1/Modem/0: state changed (enabling ->
>> disabled)
>> error: couldn't enable the modem:
>> 'GDBus.Error:org.freedesktop.libqmi.Error.Protocol.InvalidTransaction:
>> Couldn't set operating mode: QMI protocol error (60):
>> 'InvalidTransaction''
>>
>> Note that a SIM card is inserted.
>>
>>
>> I have also noticed that ModemManager uses not documented AT+CFUN modes:
>>
>> root at ccimx6sbc:~# mmcli -m 0 --set-power-state-off
>> ModemManager[791]: <info> Modem powered off... may no longer be accessible
>> successfully set new power state in the modem
>> root at ccimx6sbc:~# microcom /dev/ttyUSB2
>>
>> OK
>> at+cfun?
>> +CFUN: 7
>>
>> OK
>> root at ccimx6sbc:~# mmcli -m 0 --set-power-state-low
>> successfully set new power state in the modem
>> root at ccimx6sbc:~# microcom /dev/ttyUSB2
>> at+cfun?
>> +CFUN: 6
>>
>> OK
>>
>> The only documented modes are 0, 1, 4 ,5 (see
>> http://www.coniugo.de/tl_files/dateien/downloads/at/AT%20Commands%20LE910.pdf,
>> page 106).
>>
>> I have noticed that mmcli -m 0 reports that the Generic plugin is
>> being used. Should it be using some specific for Telit?
>>
>
> Yes, it should be using the Telit plugin.
>
>
>> Just in case this is the report of mmcli -m 0 when the modem is in low
>> power state:
>>
>> root at ccimx6sbc:~# mmcli -m 0
>>
>> /org/freedesktop/ModemManager1/Modem/0 (device id
>> 'dff8e6a4b1f4c5db7b0e79cea559b461ae4f450e')
>> -------------------------
>> Hardware | manufacturer: 'QUALCOMM INCORPORATED'
>> | model: '3'
>> | revision: '17.01.522 1 [Oct 16 2014 07:00:00]'
>> | supported: 'gsm-umts
>> | lte
>> | gsm-umts, lte'
>> | current: 'gsm-umts, lte'
>> | equipment id: 'unknown'
>> -------------------------
>> System | device:
>> '/sys/devices/soc0/soc.0/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.3'
>> | drivers: 'qmi_wwan, option1'
>> | plugin: 'Generic'
>> | primary port: 'cdc-wdm0'
>> | ports: 'ttyUSB0 (qcdm), ttyUSB2 (at), ttyUSB3
>> (at), wwan0 (net), cdc-wdm0 (qmi)'
>> -------------------------
>> Numbers | own : 'unknown'
>> -------------------------
>> Status | lock: 'sim-pin2'
>> | unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10),
>> sim-puk2 (10)'
>> | state: 'disabled'
>> | power state: 'low'
>> | access tech: 'unknown'
>> | signal quality: '0' (cached)
>> -------------------------
>> Modes | supported: 'allowed: 2g, 3g, 4g; preferred: none'
>> | current: 'allowed: 2g, 3g, 4g; preferred: none'
>> -------------------------
>> Bands | supported: 'cdma-bc15-aws, dcs, egsm, u2100, u800,
>> u850, u900, eutran-iii, eutran-vii, eutran-xx'
>> | current: 'cdma-bc15-aws, dcs, egsm, u2100, u800,
>> u850, u900, eutran-iii, eutran-vii, eutran-xx'
>> -------------------------
>> IP | supported: 'ipv4, ipv6, ipv4v6'
>> -------------------------
>> 3GPP | imei: 'unknown'
>> | enabled locks: 'none'
>> | operator id: 'unknown'
>> | operator name: 'unknown'
>> | subscription: 'unknown'
>> | registration: 'unknown'
>> -------------------------
>> SIM | path: '/org/freedesktop/ModemManager1/SIM/0'
>>
>> -------------------------
>> Bearers | paths: 'none'
>>
>
>
>
> --
> Aleksander
> https://aleksander.es
More information about the ModemManager-devel
mailing list