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

Aleksander Morgado aleksander at aleksander.es
Fri May 8 08:47:40 EDT 2020


Hey,

> We have Sierra modem. HL7528
> So I tested my linux box with this modem and I received first prints below:
>
> root at LEDE:/lib/udev/rules.d# mmcli -L
>     /org/freedesktop/ModemManager1/Modem/0 [Sierra Wireless] HL7528
> root at LEDE:/lib/udev/rules.d# mmcli -m 0
>   -----------------------------
>   General  |         dbus path: /org/freedesktop/ModemManager1/Modem/0
>            |         device id: a643b0bb58dac30a2cd4ff6b486e826b483d298b
>   -----------------------------
>   Hardware |      manufacturer: Sierra Wireless
>            |             model: HL7528
>            | firmware revision: THL7528_778_tb3_utp426.0.0.152000.202004221951.x7160_1
>            |         supported: gsm-umts, lte
>            |           current: gsm-umts, lte
>            |      equipment id: 356170062941712
>   -----------------------------
>   System   |            device: /sys/devices/platform/1a0c0000.usb/usb1/1-2
>            |           drivers: cdc_acm, cdc_ncm
>            |            plugin: Generic
>            |      primary port: ttyACM0
>            |             ports: wwan3 (net), ttyACM0 (at), wwan0 (net), wwan1 (net),
>            |                    wwan2 (net), ttyACM2 (at)
>   -----------------------------
>   Status   |             state: failed
>            |     failed reason: sim-missing
>            |       power state: on
>            |    signal quality: 0% (cached)
>   -----------------------------
>   Modes    |         supported: allowed: 2g, 3g, 4g; preferred: none
>            |           current: allowed: any; preferred: none
>
> I did this test to verify if my applying ModemManager have any issue. With this print result, can I judge that ModemManager is ported well?
>

Is this device relatively new? What is the "vid:pid" of the device?
Could you get a full "lsusb -v" output of the device?

I see the modem is exposing multiple AT and net ports, but
unfortunately ModemManager doesn't know how to handle those net ports,
so if you get that modem connected it will be using PPP over a TTY,
which is not optimal. The connection and management will work, but it
won't be as good as it can be,

> I from now on will test with this modem. I think I need rule file for this modem and I found one:
> /lib/udev/rules.d/77-mm-sierra.rules
>
> The content of this rule file:
>
> # do not edit this file, it will be overwritten on update
> ACTION!="add|change|move|bind", GOTO="mm_sierra_end"
> SUBSYSTEMS=="usb", ATTRS{idVendor}=="1199", GOTO="mm_sierra"
> GOTO="mm_sierra_end"
>
> LABEL="mm_sierra"
> SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="?*", ENV{.MM_USBIFNUM}="$attr{bInterfaceNumber}"
>
> # Netgear AC341U: enable connection status polling explicitly
> ATTRS{idVendor}=="1199", ATTRS{idProduct}=="9057", ENV{ID_MM_QMI_CONNECTION_STATUS_POLLING_ENABLE}="1"
>
> # MC74XX: Add port hints
> #  if 03: primary port
> #  if 02: raw NMEA port
> #  if 00: diag/qcdm port
> ATTRS{idVendor}=="1199", ATTRS{idProduct}=="9071", ENV{.MM_USBIFNUM}=="03", ENV{ID_MM_PORT_TYPE_AT_PRIMARY}="1"
> ATTRS{idVendor}=="1199", ATTRS{idProduct}=="9071", ENV{.MM_USBIFNUM}=="02", ENV{ID_MM_PORT_TYPE_GPS}="1"
> ATTRS{idVendor}=="1199", ATTRS{idProduct}=="9071", ENV{.MM_USBIFNUM}=="00", ENV{ID_MM_PORT_TYPE_QCDM}="1"
>
> # EM7565: Add port hints
> #  if 03: primary port
> #  if 02: raw NMEA port
> #  if 00: diag/qcdm port
> ATTRS{idVendor}=="1199", ATTRS{idProduct}=="9091", ENV{.MM_USBIFNUM}=="03", ENV{ID_MM_PORT_TYPE_AT_PRIMARY}="1"
> ATTRS{idVendor}=="1199", ATTRS{idProduct}=="9091", ENV{.MM_USBIFNUM}=="02", ENV{ID_MM_PORT_TYPE_GPS}="1"
> ATTRS{idVendor}=="1199", ATTRS{idProduct}=="9091", ENV{.MM_USBIFNUM}=="00", ENV{ID_MM_PORT_TYPE_QCDM}="1"
>
> LABEL="mm_sierra_end"
>
>
> Is this rule file fit to my modem?
> Or do I need new rule file for this modem?
>

The rule files are "helpers" really, there is no need for the rule
files usually. In your case, I believe the modem isn't using any of
the rule files that ModemManager provides.

> And do I need special settings in /etc/config/network ? I know basic settings for this:
> config interface 'broadband'
>         option device '/sys/devices/platform/1a0c0000.usb/usb1/1-2'
>         option proto 'modemmanager'
>         option apn 'whatever corect apn here'
>         option username ''
>         option password ''
>         option pincode ''
>         option lowpower '1'
>

As in the previous email, you probably don't need username, password,
and lowpower. And you only need pincode if your SIM card is
PIN-locked, which may not be.

Cheers!

-- 
Aleksander
https://aleksander.es

_______________________________________________
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