[OpenWrt-Devel] [ModemManager] How can I make ModemManager work right?
Jeonghum Joh
oosaprogrammer at gmail.com
Wed Apr 29 03:58:09 EDT 2020
Hello Michael,
I will keep in mind your message about mmcli and netifd.
And thank you for letting me know the ModemManager project urls.
Thank you very much!
Jeonghum
2020년 4월 29일 (수) 오후 3:58, Michael Jones <mike at meshplusplus.com>님이 작성:
>
>
> On Wed, Apr 29, 2020 at 1:30 AM Jeonghum Joh <oosaprogrammer at gmail.com>
> wrote:
>
>> Hello,
>> Thanks to many people in this list, I was able to find ModemManager and
>> I've tried applying it.
>>
>> ==== 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
>> ModemManager
>> Version : 1.12.8
>> menuconfig : (QMI on, MBIM off)
>> git clone URL :
>> https://github.com/openwrt/packages/tree/master/net/modemmanager
>>
>> 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
>> /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
>>
>> 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 '5g-internet.sktelecom.com'
>> 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 8.8.8.8 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:
>> libmm-plugin-altair-lte.so libmm-plugin-mtk.so
>> libmm-plugin-thuraya.so
>>
>> 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
>> abstraction..
>>
>> 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.
>> Jeonghum
>>
>>
>>
> Is it practical for you to upgrade to a newer version of OpenWRT? 17.01 is
> pretty old
>
> But since I've been dealing with modem manager related problems in my own
> work, I can try to give you some advice.
>
> First, I recommend *not* trying to start with the OpenWRT Netifd
> integration. It's a massive pain to work with. Lots of undocumented parts
> of the protocol that netifd scripts use to communicate with the netifd c
> language binary that I gave up on trying to understand, and just built
> work-arounds for.
>
> Instead, before using netifd, try talking directly to modemmanager using
> "mmcli".
>
> mmcli can be used to determine if modemmanager understands how to talk to
> your modem, and if it does it can be used to issue the connect command
> (e.g. mmcli --simple-connect) and then display the connection parameters
> that the modem reports are to be used for internet connectivity.
>
> Once you've verified that your modem and modemmanager are able to talk to
> each other, then you can investigate getting netifd to work.
>
> You can, and should, reach out to the ModemManager project here:
> https://gitlab.freedesktop.org/mobile-broadband/ModemManager, or on their
> mailing list
> https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200429/f70d8cad/attachment.htm>
-------------- 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