Luci-proto-modemmanager support thread

Im trying to build with this but after update and installing feeds luci-proto-modemmanager does not show up in the menuconfig. Any idea what i have missed?

Did you try doing a ./scripts/feeds update -a && ./scripts/feeds install -a?

Yes, but the build failed any way, I'll start again and let you know how it goes.

Post the output if you have trouble

As requested, gateway metric is now added (on master branch)

Compiled fine on x86/64 APU2, have not tested with a 4G USB modem yet.
See the issue raised/commented on your Atlassian repo.

Doublecheck to ensure that upstream dependencies are met for libqmi and libmbim

For ubuntu build host, include the following along normal packages needed for openwrt builds - some of this might be redundant

apt-get install build-essential git pkg-config automake autoconf intltool libtool gtk-doc-tools libglib2.0-dev libgudev-1.0-dev intltool xsltproc

FYI - upstream for ModemManager has moved from BitBucket to GitLab

From

https://bitbucket.org/aleksander0m/modemmanager-openwrt/src/master/

To

So folks that are working on this should shift the src-git lines if pulling directly...

As a side note - MM and the luci-protocol-modemmanager add-ins are working well with ar71xx on Master with several modems that support QMI.

Tested on GL-iNet AR-150...

Really nice work, and I think the community would benefit - even though it's a bit large as it pulls in a ton of code.

@biangbiangmian - pls add a proper README file to your repo, and you'll likely want to choose a license (GPL, etc...) for code to get accepted in.

Also note in your bitbucket repo is that you're nested, folder within a folder.

That being said - code works under Master, and touch up a couple of items, and perhaps with with Aleksander Morgado to get your stuff integrated directly, and this could be a real win.

best,

sfx

2 Likes

Thanks for that @sfx2000. I have added the license, moved it out of the nested directory, and also copied it to Github to make it potentially easier to pull it into LuCI when the time comes. https://github.com/nickberry17/luci-proto-modemmanager

Great news, and much appreciate the effort taken.

There is some work underway to incorporate ModemManager as an official OpenWrt package.

1 Like

Added additional info on the github thread - AR9331 (64/16) with uBlox Sara R4, works good...

Good job getting things to this stage, lets keep fingers crossed that it MM and the LUCI side get accepted into Master.

That kind of opened up a whole lot of discussion - which is good... peer review exposes everything to the light of day.

Happy to be one of those to provide the "nudge" to move it forward.

Now is the question of who will be the maintainer - and that's a significant time commitment.

1 Like

Cant tell how happy and graetful I am for this.

Using a Quectel EC25 modem on many MIFI type devices, and in QMI mode, the operation is completely inconsistent with UQMI:

  1. If the device disconnects from the network, uqmi still reports "connected".
  2. In QMI mode the led trigger is also not working (in case of disconnect, the LED is till on, see point 1. above).
  3. Not possible to actually set roaming state.
  4. Cannot provide "empty" APN (which should be the default state), as UQMI will not override a previously set APN in that case (modem tries to activate PDN with old wrong APN instead of the correct "" (empty) APN.

etc.

I am going to start testing this if it fixes the above issues.

Started testing, first problem already appeared:

In case the modem looses connectivity (out of coverage), the wwan0 interface is still up, therefor the netdev ledtrig still blinks/illuminates the LED. Nothing present in the syslog either that a state change happened.

This is an issue with uqmi as well.

  1. If the device disconnects from the network, uqmi still reports "connected".

Can you put ModemManager into debug mode, and send the logs when it happens?

ModemManager Debug mode

  1. Edit /etc/init.d/modemmanager
  2. Change the line procd_set_param command /usr/sbin/ModemManager to procd_set_param command /usr/sbin/ModemManager --debug
  3. Stop/start ModemManager (/etc/init.d/modemmanager restart), or just reboot

Now its not even want to connect at all.... When I swtich back from mademanager to QMI, it at least works.

Question: do I need to disable any modules before I compile the source with MOdemManager? is it possible that some drivers or modules are conflicting with modemmanager? Do I need to complete clear the source (make clean, or make dirlcean) before I build with modemanager? Thats not quite clear.

This is how the debug log looks now:

https://pastebin.com/BKacDPJe

This is the relevant part of the dmesg about what drivers are loaded:

https://pastebin.com/ATg0kxes

It looks like ModemManager has control of the modem, it is getting the signal information, etc. but it is not connecting. As for drivers, it will depend on the modem. To reconnect, as you did before, have you checked your ModemManager interface configuration? If all is set up correctly you should be able to just run ifup on the interface and let MM take it from there. Can you start with the example config in the readme and go from there?

Note you cannot use qmicli or mbimcli without the -p switch while ModemManager is running. Explanation on that here: https://sigquit.wordpress.com/2013/09/13/sharing-a-qmi-port-between-processes/

This is my current config by the way:

config interface 'test'
        option proto 'modemmanager'
        option delegate '0'
        option device '/sys/devices/platform/ehci-platform/usb1/1-1/1-1.2'
        option auth 'none'
        option iptype 'ipv4'

I just tried "ifup test" and it worked. The wwan0 in ifconfig received the IP and service is running fine.

Question is, why do I need to manually invoke ifup when this interface is configured for "bring up on boot" and the modem manager is also set among the startup apps?