<div dir="ltr">Hello Alexander,<div><br></div><div>From the log file I uploaded/attached, I found one problem.</div><div>Our modem talks with a specific settings - /dev/ttyUSB1, baudrate:115200, parity:none, data:8, stop:1, flow:xon_xoff.</div><div>But ModemManager tried with baudrate 57600 only.</div><div><br></div><div>Can I change baudrate and other settings to fit to mine?</div><div>If so, where can I configure these parameters?</div><div><br></div><div>Thank you very much in advance!</div><div><br></div><div>Jeonghum</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">2020년 5월 4일 (월) 오후 12:06, Jeonghum Joh <<a href="mailto:oosaprogrammer@gmail.com">oosaprogrammer@gmail.com</a>>님이 작성:<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"><div>Hello, Alexander</div><div><br></div><div>Thank you for the reply message.</div><div><br></div><div>I retested my linux box with your recommendation and got a log message.</div><div>I attach the log file in this email but I wonder if the attached file can be uploaded to the maillist also..</div><div><br></div><div>I used the device path you suggested - "/sys/devices/platform/1a0c0000.usb/usb2/2-1 ".</div><div>And I added "--debug" at the last of command in the file /etc/init.d/modemmanager as shown below:</div><div><br></div><div>procd_set_param command /usr/sbin/ModemManager --debug<br></div><div><br></div><div>And I rebooted my linux box and wait some time and got this log file via a command below:</div><div><br></div><div>"logread > logread.log"</div><div><br></div><div>When I invoke mmcli commands, it spits out an error message:</div><div><br></div><div>root@LEDE:~# mmcli -L<br>error: couldn't create manager: Timeout was reached<br></div><div><br></div><div>root@LEDE:~# mmcli -m 0<br>error: couldn't create manager: Timeout was reached<br></div><div><br></div><div>Could you figure out what went wrong?</div><div><br></div><div>Thank you very much in advance!</div><div>Jeonghum</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">2020년 4월 30일 (목) 오전 12:33, Aleksander Morgado <<a href="mailto:aleksander@aleksander.es" target="_blank">aleksander@aleksander.es</a>>님이 작성:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hey,<br>
<br>
See comments below.<br>
<br>
><br>
> I am newbie in the ModemManager world.<br>
> I am developing a router which has 5G Modem as one of WAN I/F.<br>
><br>
> The WAN I/F works now with a modem vender's CM software.<br>
> But we want our product to be independent from specific modem H/W.<br>
> So I guessed utilizing ModemManager would be beneficial than utilizing modem vender specific CM software.<br>
> So I am now trying to use ModemManager.<br>
> I've just firstly tried applying ModemManager instead of vender specific CM. And of course, this first trial failed.<br>
><br>
> I will let you know my testing environment. Could you please give some advice to me about what to do next?<br>
><br>
> ==== Testing environment ====<br>
><br>
> Target Model : MediaTek MT7622 AC4300rfb1 board<br>
> Firmware Version : LEDE Reboot 17.01-SNAPSHOT unknown / LuCI<br>
> Kernel Version : 4.4.124<br>
> Modem : HUCOM HM-900<br>
> ModemManager<br>
> Version : 1.12.8<br>
> menuconfig : (QMI on, MBIM off)<br>
<br>
Did you enable libqmi? and CONFIG_MODEMMANAGER_WITH_QMI?<br>
<br>
> git clone URL : <a href="https://github.com/openwrt/packages/tree/master/net/modemmanager" rel="noreferrer" target="_blank">https://github.com/openwrt/packages/tree/master/net/modemmanager</a><br>
><br>
<br>
If you're running openwrt, you should better use the official openwrt<br>
packaging, which doesn't use that github URL, it uses the official<br>
release tarball instead.<br>
<br>
> Noted Device Files : Those files and paths are noted/watched<br>
> qmichannel : /dev/cdc-wdm0<br>
> usbnet_adapter : /sys/class/net/wwan0<br>
> /sys/bus/usb/devices/2-1/manufacturer : QCOM<br>
> /sys/bus/usb/devices/2-1/idVendor :05C6<br>
> /sys/bus/usb/devices/2-1/idProduct :90db<br>
> /sys/bus/usb/devices/2-1/speed :5000<br>
> /sys/bus/usb/devices/2-1/product :SDXPRAIRIE-MTP _SN:B02CE51B<br>
> /sys/bus/usb/devices/2-1/version :3.20<br>
> /sys/bus/usb/devices/2-1:1.2/net/wwan0<br>
> /sys/bus/usb/devices/2-1:1.2/net/wwan0/device/driver<br>
> /sys/bus/usb/devices/2-1:1.2/net/wwan0/device<br>
> /sys/bus/usb/devices/2-1:1.2/usbmisc/cdc-wdm0<br>
> /sys/devices/platform/1a0c0000.usb/usb2/2-1/2-1:1.2<br>
<br>
Ok, so this is a QMI modem and correctly detected by the kernel it seems?<br>
Once the modem is exposed in the system, is it also detected by<br>
ModemManager itself?<br>
Could you setup /etc/init.d/modemmanager to launch the daemon with --debug?<br>
Does the modem info show when you run "mmcli -m 0" ?<br>
<br>
><br>
> Kernel modules watched via lsmod<br>
> cdc_wdm 8821 1 qmi_wwan<br>
> qmi_wwan 6252 0<br>
> 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>
> usbnet 19027 3 qmi_wwan,cdc_ncm,cdc_ether<br>
><br>
> Above is original environment.<br>
> On this circumstances, I disabled CM provided from modem provider : hucom-cm<br>
> And I added one configuration section into the bottom of /etc/config/network :<br>
> config interface 'broadband'<br>
> option device '/sys/devices/platform/1a0c0000.usb/usb2/2-1/2-1:1.2'<br>
<br>
I believe the correct device path is<br>
'/sys/devices/platform/1a0c0000.usb/usb2/2-1'.<br>
<br>
<br>
> option proto 'modemmanager'<br>
> option apn '<a href="http://5g-internet.sktelecom.com" rel="noreferrer" target="_blank">5g-internet.sktelecom.com</a>'<br>
> option username ''<br>
> option password ''<br>
> option pincode ''<br>
> option lowpower '1'<br>
><br>
> Under these settings, I confirmed that<br>
> - hucom-cm is disabled<br>
> - ModemManager is alive<br>
> 4430 root 229m D /usr/sbin/ModemManager<br>
><br>
> The wwan0 is not shown from ifconfig and ping 8.8.8.8 fails saying Network is unreachable.<br>
> So, My first trying to utilize MM seemed to be failed.<br>
><br>
> Originally hucom-cm sets bridge mode like shown below:<br>
> BRIDGE_MODE_FILE : /sys/module/qmi_wwan/parameters/bridge_mode<br>
> BRIDGE_IPV4_FILE : /sys/module/qmi_wwan/parameters/bridge_ipv4<br>
<br>
Do you know why that connection manager sets that up?<br>
<br>
> But under ModemManager these files are not shown.<br>
><br>
> And I've found many plugin libraries under /usr/lib/ModemManager:<br>
> libmm-plugin-altair-lte.so libmm-plugin-mtk.so libmm-plugin-thuraya.so<br>
><br>
<br>
Yes, there are lots of vendor-specific plugins. But if your device is<br>
QMI based, you're probably fine with the generic plugin for now.<br>
<br>
> Could someone help me?<br>
><br>
> Do I need to look deeper into ModemManager?<br>
<br>
See the comments above. You should at least run MM with --debug to see<br>
all the inner messages sent/received to/from the modem.<br>
<br>
> Do I need to implement new plugin library for our product?<br>
<br>
Maybe. It depends on whether the generic QMI implementation is enough or not.<br>
<br>
> Or do I need to forget about ModemManager?<br>
><br>
<br>
That is up to you :D<br>
<br>
> My already given hucom-cm anyway works. It brings data via wwan0 and establish network interface wwan0.<br>
> 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.<br>
<br>
ModemManager doesn't do any of those things, it just integrates with<br>
the standard netifd in openwrt and netifd is the one doing the real<br>
management of the connection.<br>
<br>
> 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..<br>
<br>
Yes, that is the main purpose of ModemManager. One API to rule them all!<br>
<br>
><br>
> I am not sure of anything. Could someone give me some light so that I can find the best way to go?<br>
><br>
<br>
Hope my answers above will help you.<br>
<br>
> 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?<br>
><br>
<br>
You cannot use a commercial license for the plugin; the plugin would<br>
need to be GPL, as the ModemManager daemon sources.<br>
<br>
Cheers!<br>
<br>
-- <br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a><br>
</blockquote></div></div>
</blockquote></div>