[OpenWrt-Devel] [ModemManager] How can I make ModemManager work right?

Jeonghum Joh oosaprogrammer at gmail.com
Wed May 6 01:37:26 EDT 2020


Hello Alexander and people in the list,

Let me provide some additional information and new test log messages.

The problem I reported is improved one setp. Originally it was like:
   root at LEDE:~# mmcli -L
   error: couldn't create manager: Timeout was reached

Now it is like:
   root at LEDE:~# mmcli -L
   No modems were found

I had to enable "dbus-utils" under "Utilities" of openwrt make menuconfig.
So it seems that now mmcli talks with ModemManager at last. The problem now
belongs to ModemManager not in the mmcli.


And I created the rule file you provided:

# vim /lib/udev/rules.d/78-mm-custom.rules to fit to my modem:
ACTION!="add|change|move", GOTO="mm_custom_end"
DEVPATH=="/sys/devices/platform/1a0c0000.usb/usb2/2-1",
ENV{ID_MM_TTY_BAUDRATE}="115200"
DEVPATH=="/sys/devices/platform/1a0c0000.usb/usb2/2-1",
ENV{ID_MM_TTY_FLOW_CONTROL}="xon-xoff"
LABEL="mm_custom_end"

I wonder if these rule files are supposed to be provided from the modem
provider. In my case, it is Hucom wireless.
Can I ask them to provide this file?

My modem is supposed to operate with this configs:

device      : /dev/ttyUSB1
baudrate  : 115200,
parity        : none,
data         : 8,
stop          : 1,
flow          : xon_xoff

And I added config section like shown below in the /etc/config/network:

config interface 'broadband'
        option device '/sys/devices/platform/1a0c0000.usb/usb2/2-1'
        option proto 'modemmanager'
        option apn '5g-internet.sktelecom.com'
        option username ''
        option password ''
        option pincode ''
        option lowpower '1'

I don't know the username and password, but maybe it wouldn't be needed at
all. the pincode... I have no idea with this..

And also I added "--debug" in the start script /etc/rc.d/S70modemmanager:

procd_set_param command /usr/sbin/ModemManager --debug

And with these conditions, I rebooted my linux box and after the reboot is
done, maybe 5 minutes later I captured log message:
logread > logread_last.log

And I attached it in this email. Please find the log message and see it
through.

And you wanted to know what modem is mine:
The modem is HUCOM HM-900

Kernel message related to the hucom modem:
==== [hucom_wwan_bind] : HUCOM HM9xx ====
qmi_wwan_hucom 2-1:1.2: cdc-wdm0: USB WDM device
HUCOM usbnet bind here
qmi_wwan_hucom 2-1:1.2 wwan0: register 'qmi_wwan_hucom' at
usb-1a0c0000.usb-1, HUCOM wwan/QMI device, a2:25:55:58:dd:dd
==== [hucom_wwan_bind] : HUCOM HM9xx ====
ahci 1a200000.sata: couldn't get PHY in node sata: -517
qmi_wwan_hucom: probe of 2-1:1.3 failed with error -22
==== [hucom_wwan_bind] : HUCOM HM9xx ====
qmi_wwan_hucom: probe of 2-1:1.4 failed with error -22
usbcore: registered new interface driver qmi_wwan_hucom
l2tp_ppp: PPPoL2TP kernel driver, V2.0
usbcore: registered new interface driver option
usbserial: USB Serial support registered for GSM modem (1-port)
option 2-1:1.0: GSM modem (1-port) converter detected
usb 2-1: GSM modem (1-port) converter now attached to ttyUSB0
option 2-1:1.1: GSM modem (1-port) converter detected
ahci 1a200000.sata: couldn't get PHY in node sata: -517
usb 2-1: GSM modem (1-port) converter now attached to ttyUSB1
option 2-1:1.3: GSM modem (1-port) converter detected
ahci 1a200000.sata: couldn't get PHY in node sata: -517
option 2-1:1.4: GSM modem (1-port) converter detected
ahci 1a200000.sata: couldn't get PHY in node sata: -517
option 2-1:1.5: GSM modem (1-port) converter detected
ahci 1a200000.sata: couldn't get PHY in node sata: -517
usb 2-1: GSM modem (1-port) converter now attached to ttyUSB4
ahci 1a200000.sata: couldn't get PHY in node sata: -517
kmodloader: done loading kernel modules from /etc/modules.d/*


My system environement(HW/SW) :

Target Model        : MediaTek MT7622 AC4300rfb1 board
Firmware Version : LEDE Reboot 17.01-SNAPSHOT unknown / LuCI
Kernel Version      : 4.4.124
Modem                 : HUCOM HM-900
ModemManager
Version                 : 1.12.8
menuconfig          : (QMI on, MBIM off)

It is QMI device.
qmichannel                                            : /dev/cdc-wdm0
usbnet_adapter                                      : /sys/class/net/wwan0
/sys/bus/usb/devices/2-1/manufacturer : QCOM
/sys/bus/usb/devices/2-1/idVendor        :05C6
/sys/bus/usb/devices/2-1/idProduct       :90db
/sys/bus/usb/devices/2-1/speed             :5000
/sys/bus/usb/devices/2-1/product          :SDXPRAIRIE-MTP _SN:B02CE51B
/sys/bus/usb/devices/2-1/version           :3.20
/sys/bus/usb/devices/2-1:1.2/net/wwan0
/sys/bus/usb/devices/2-1:1.2/net/wwan0/device/driver
/sys/bus/usb/devices/2-1:1.2/net/wwan0/device
/sys/bus/usb/devices/2-1:1.2/usbmisc/cdc-wdm0
/sys/devices/platform/1a0c0000.usb/usb2/2-1/2-1:1.2

Kernel modules watched via lsmod
cdc_wdm                 8821  1 qmi_wwan
qmi_wwan                6252  0
usbcore               153512 20
option,usb_wwan,qmi_wwan,cdc_ncm,cdc_ether,usbserial,usbnet,usblp,cdc_wdm,cdc_acm,usb_storage,xhci_mtk,xhci_plat_hcd,xhci_pci,xhci_hcd,uhci_hcd,ohci_platform,ohci_hcd,ehci_platform,ehci_hcd
usbnet                 19027  3 qmi_wwan,cdc_ncm,cdc_ether

And usbnet adapter kernel module : qmi_wwan.c  written by Bjørn Mork
USB serial driver option.c written by Matthias Urlichs

Do I miss anything?

F.Y.I. the modemmanager was not included in my OpenWRT source code. I
copied it from https://github.com/openwrt/packages and I just enabled it
via openwrt make menuconfig.

Thank you very much in advance!

Jeonghum


2020년 5월 6일 (수) 오전 12:22, Aleksander Morgado <aleksander at aleksander.es>님이
작성:

> Hey Jeonghum,
>
> > Thank you for the very kind message!
> > I tried "mmcli -L" and received an error message:
> >   root at LEDE:~# mmcli -L
> >   error: couldn't create manager: Timeout was reached
> >
>
> This is extremely weird, and it would show some issue with your setup,
> maybe with how DBus is installed/running in the system. mmcli should
> never fail in that way; if the ModemManager daemon owns the
> well-known-name in DBus, a manager object should be created; and if
> there is no MM daemon running, mmcli would just return with a
> different error (couldn't find the ModemManager process in the bus).
> The fact that you're getting a timeout when trying to talk to the DBus
> server is not expected at all.
>
> > I added "--debug" option into the ModemManager start command.
> > I used device path: "/sys/devices/platform/1a0c0000.usb/usb2/2-1" in the
> /etc/config/network.
> >
> > And I got an logread output file.
> > I will attach it to this email.
> >
> > I already posted this question to the ModemManager maillist also:
> >
> https://lists.freedesktop.org/archives/modemmanager-devel/2020-May/007798.html
> >
> > So now I'm waiting Alexander's reply message about my problem.
>
> I'm also in this mailing list :D
>
> > But, If you have any idea, please let me know.
> >
>
> Did you try with the suggestion to configure baudrate and flow control
> settings? Looking at the kind of modem you're working with, I highly
> doubt those port settings will have any effect at the end, as you're
> really a device that exposes the TTY via USB port, and it also looks
> like you have a cdc-wdm+wwan pair (QMI? MBIM?). What modem
> manufacturer/model is this?
>
> --
> Aleksander
> https://aleksander.es
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200506/fd1622d7/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logread_last.log
Type: application/octet-stream
Size: 67466 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200506/fd1622d7/attachment.obj>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list