How can I make ModemManager work right?

Jeonghum Joh oosaprogrammer at
Wed Apr 29 07:11:45 UTC 2020


I am newbie in the ModemManager world.
I am developing a router which has 5G Modem as one of WAN I/F.

The WAN I/F works now with a modem vender's CM software.
But we want our product to be independent from specific modem H/W.
So I guessed utilizing ModemManager would be beneficial than utilizing
modem vender specific CM software.
So I am now trying to use ModemManager.
I've just firstly tried applying ModemManager instead of vender specific
CM. And of course, this first trial failed.

I will let you know my testing environment. Could you please give some
advice to me about what to do next?

==== Testing environment ====

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

Noted Device Files : Those files and paths are noted/watched
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

Kernel modules watched via lsmod
cdc_wdm                 8821  1 qmi_wwan
qmi_wwan                6252  0
usbcore               153512 20
usbnet                 19027  3 qmi_wwan,cdc_ncm,cdc_ether

Above is original environment.
On this circumstances, I disabled CM provided from modem provider : hucom-cm
And I added one configuration section into the bottom of
/etc/config/network :
config interface 'broadband'
        option device '/sys/devices/platform/1a0c0000.usb/usb2/2-1/2-1:1.2'
        option proto 'modemmanager'
        option apn ''
        option username ''
        option password ''
        option pincode ''
        option lowpower '1'

Under these settings, I confirmed that
- hucom-cm is disabled
- ModemManager is alive
 4430 root      229m D    /usr/sbin/ModemManager

The wwan0 is not shown from ifconfig and ping fails saying Network
is unreachable.
So, My first trying to utilize MM seemed to be failed.

Originally hucom-cm sets bridge mode like shown below:
BRIDGE_MODE_FILE : /sys/module/qmi_wwan/parameters/bridge_mode
BRIDGE_IPV4_FILE    : /sys/module/qmi_wwan/parameters/bridge_ipv4
But under ModemManager these files are not shown.

And I've found many plugin libraries under /usr/lib/ModemManager:

Could someone help me?

Do I need to look deeper into ModemManager?
Do I need to implement new plugin library for our product?
Or do I need to forget about ModemManager?

My already given hucom-cm anyway works. It brings data via wwan0 and
establish network interface wwan0.
Problem is that hucom-cm sets up firewall rules and routing settings
redundantly and unnecessarily. So I can make it not to do these unneeded
settings. This way would be good approach I believe.
But we'd like to make our product indepecntant from specific modem. I
guessed that opensource ModemManager infrastructure would give us some sort
of independence from specific modem and in other words it would give some

I am not sure of anything. Could someone give me some light so that I can
find the best way to go?

Additional question : If I write our own logic as a plugin library of
ModemManager, wouldn't it necessarily have to stick to GPL? Can we apply
commercial license for the plugin?

Thank you very much in advance.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ModemManager-devel mailing list