How can I make ModemManager work right?

Jeonghum Joh oosaprogrammer at gmail.com
Wed May 6 05:43:08 UTC 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월 4일 (월) 오후 9:35, Aleksander Morgado <aleksander at aleksander.es>님이 작성:

> Hey
>
> >
> > From the log file I uploaded/attached, I found one problem.
> > Our modem talks with a specific settings - /dev/ttyUSB1,
> baudrate:115200, parity:none, data:8, stop:1, flow:xon_xoff.
> > But ModemManager tried with baudrate 57600 only.
> >
>
> You need to add udev tags to configure the baudrate and flow control
> settings.
>
> # vim /lib/udev/rules.d/78-mm-custom.rules
> ACTION!="add|change|move", GOTO="mm_custom_end"
> DEVPATH=="/devices/platform/1a0c0000.usb/usb2/2-1",
> ENV{ID_MM_TTY_BAUDRATE}="115200"
> DEVPATH=="/devices/platform/1a0c0000.usb/usb2/2-1",
> ENV{ID_MM_TTY_FLOW_CONTROL}="xon-xoff"
> LABEL="mm_custom_end"
>
> And reboot the system. Make sure you run MM in debug mode, so that we
> can check whether the tags were detected or not.
>
> --
> Aleksander
> https://aleksander.es
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20200506/aab54952/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logread_last.log
Type: application/octet-stream
Size: 67466 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20200506/aab54952/attachment-0001.obj>


More information about the ModemManager-devel mailing list