<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 29, 2020 at 1:30 AM Jeonghum Joh <<a href="mailto:oosaprogrammer@gmail.com">oosaprogrammer@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<div>Thanks to many people in this list, I was able to find ModemManager and I've tried applying it.</div><div><br></div><div>==== Testing environment ====</div><div><br></div><div>Target Model : MediaTek MT7622 AC4300rfb1 board<br></div><div>Firmware Version : LEDE Reboot 17.01-SNAPSHOT unknown / LuCI</div><div>Kernel Version : 4.4.124</div><div>Modem : HUCOM HM-900<br></div><div>ModemManager<br></div><div>Version : 1.12.8<br></div><div>menuconfig : (QMI on, MBIM off)</div><div>git clone URL : <a href="https://github.com/openwrt/packages/tree/master/net/modemmanager" target="_blank">https://github.com/openwrt/packages/tree/master/net/modemmanager</a><br></div><div><br></div><div>Noted Device Files : Those files and paths are noted/watched</div><div>qmichannel : /dev/cdc-wdm0</div><div>usbnet_adapter : /sys/class/net/wwan0</div><div>/sys/bus/usb/devices/2-1/manufacturer : QCOM<br></div><div>/sys/bus/usb/devices/2-1/idVendor :05C6</div><div>
/sys/bus/usb/devices/2-1/idProduct :90db</div><div>
/sys/bus/usb/devices/2-1/speed :5000</div><div>
/sys/bus/usb/devices/2-1/product :SDXPRAIRIE-MTP _SN:B02CE51B</div><div>/sys/bus/usb/devices/2-1/version :3.20</div><div>/sys/bus/usb/devices/2-1:1.2/net/wwan0<br></div><div><div>/sys/bus/usb/devices/2-1:1.2/net/wwan0/device/driver<br></div><div><div>/sys/bus/usb/devices/2-1:1.2/net/wwan0/device</div></div><div></div></div><div><div><div>/sys/bus/usb/devices/2-1:1.2/usbmisc/cdc-wdm0<br></div><div><div></div></div></div><div>/sys/devices/platform/1a0c0000.usb/usb2/2-1/2-1:1.2<br></div><div></div></div><div><br></div><div>Kernel modules watched via lsmod</div><div>cdc_wdm 8821 1 qmi_wwan<br></div><div>qmi_wwan 6252 0<br></div><div>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<br></div><div>usbnet 19027 3 qmi_wwan,cdc_ncm,cdc_ether<br></div><div><br></div><div>Above is original environment.</div><div>On this circumstances, I disabled CM provided from modem provider : hucom-cm</div><div>And I added one configuration section into the bottom of /etc/config/network :</div><div>config interface 'broadband'</div><div> option device '/sys/devices/platform/1a0c0000.usb/usb2/2-1/2-1:1.2'<br> option proto 'modemmanager'<br> option apn '<a href="http://5g-internet.sktelecom.com" target="_blank">5g-internet.sktelecom.com</a>'<br> option username ''<br> option password ''<br> option pincode ''<br> option lowpower '1'<br></div><div><br></div><div>Under these settings, I confirmed that</div><div>- hucom-cm is disabled</div><div>- ModemManager is alive</div><div> 4430 root 229m D /usr/sbin/ModemManager<br></div><div><br></div><div>The wwan0 is not shown from ifconfig and ping 8.8.8.8 fails saying Network is unreachable.</div><div>So, My first trying to utilize MM seemed to be failed.</div><div><br></div><div>Originally hucom-cm sets bridge mode like shown below:</div><div><div>BRIDGE_MODE_FILE : /sys/module/qmi_wwan/parameters/bridge_mode</div><div>BRIDGE_IPV4_FILE : /sys/module/qmi_wwan/parameters/bridge_ipv4</div><div>But under ModemManager these files are not shown.<br></div><div><br></div><div>And I've found many plugin libraries under /usr/lib/ModemManager:</div><div>libmm-plugin-altair-lte.so libmm-plugin-mtk.so libmm-plugin-thuraya.so<br></div><div><br></div><div>Could someone help me?</div><div><br></div><div>Do I need to look deeper into ModemManager?</div><div>Do I need to implement new plugin library for our product?</div><div>Or do I need to forget about ModemManager?</div><div><br></div><div>My already given hucom-cm anyway works. It brings data via wwan0 and establish network interface wwan0.</div><div>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.</div><div>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..</div><div><br></div><div>I am not sure of anything. Could someone give me some light so that I can find the best way to go?</div><div><br></div><div>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?</div><div><br></div><div>Thank you very much in advance.</div><div>Jeonghum</div><div><br></div><div><br></div></div></div></blockquote><div><div><br></div><div>Is it practical for you to upgrade to a newer version of OpenWRT? 17.01 is pretty old </div></div><div><br></div><div>But since I've been dealing with modem manager related problems in my own work, I can try to give you some advice.</div><div><br></div><div>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.</div><div><br></div><div>Instead, before using netifd, try talking directly to modemmanager using "mmcli".</div><div><br></div><div>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.</div><div><br></div><div>Once you've verified that your modem and modemmanager are able to talk to each other, then you can investigate getting netifd to work.</div><div><br></div><div>You can, and should, reach out to the ModemManager project here: <a href="https://gitlab.freedesktop.org/mobile-broadband/ModemManager">https://gitlab.freedesktop.org/mobile-broadband/ModemManager</a>, or on their mailing list <a href="https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel">https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel</a></div><div><br></div><div><br></div></div></div>