Luci-proto-modemmanager support thread

Good day,

I am submitting this LuCI protocol that works with Aleksander0m’s ModemManager-openwrt package. It is able to set up and configure basic options of a modem.
Update: ModemManager-openwrt is now located here:
Update ModemManager pull request here:

Source code here:
Update - also here:


getting this...

Failed to execute arcombine dispatcher target for entry '/admin/network/network/broadband'. The called action terminated with an exception: .../luci/model/cbi/admin_network/proto_modemmanager.lua:20: attempt to index global 'handle' (a nil value) stack traceback: .../luci/model/cbi/admin_network/proto_modemmanager.lua:20: in main chunk /usr/lib/lua/luci/model/cbi/admin_network/ifaces.lua:411: in function 'func' /usr/lib/lua/luci/cbi.lua:66: in function 'load' /usr/lib/lua/luci/dispatcher.lua:838: in function 'target' /usr/lib/lua/luci/dispatcher.lua:956: in function </usr/lib/lua/luci/dispatcher.lua:952>

I am building with 18.06.1 if this matters.

Thank you for reporting that (and thanks for using). It was because a variable was misnamed. Sorry for the careless mistake. I have pushed the change to the repository.

Thank you for putting it together. That worked.

I see you have ipv6 stuff going. I can't seem to get ipv6 working on modemmanager. Any tricks to get it going?

At the moment that tick box will not cause ModemManager to start the connection with IPv6. That is a feature I'd like to have though. To connect using IPv6 issue something like this:

mmcli -m 0 --simple-connect="apn=yourapn,ip-type=ipv6"

Possible options for ip-type are: ipv4, ipv6, ipv4v6 (the last one defaults to IPv4)


I have just added LuCI support for specifying IP connection type. I have a PR against modemmanager-openwrt with the required changes for it to work. It has been merged so you'll just need to update ModemManager-openwrt and luci-proto-modemmanager to use it.

Will using the ipv4v6 option connect both the ipv4 and ipv6 address from the modem into a single interface?

To my limited knowledge it simply tries IPv6 and if that fails it uses IPv4. I cannot test it because in my part of the world IPv6 is not available.

I'll do some testing tomorrow. Maybe I just do a wan w/modemmanager-proto for the ipv4 and then set up a wan6 using the modemmanager protocol as well for ipv6 option.

1 Like
/usr/lib/lua/luci/dispatcher.lua:460: Failed to execute arcombine dispatcher target for entry '/admin/network/network'.
The called action terminated with an exception: attempt to call method 'register_error_code' (a nil value)
stack traceback:
	[C]: in function 'assert'
	/usr/lib/lua/luci/dispatcher.lua:460: in function 'dispatch'
	/usr/lib/lua/luci/dispatcher.lua:141: in function </usr/lib/lua/luci/dispatcher.lua:140>

Hey, can you try latest master? Unsure what the cause of that might be, but I've uploaded my latest working copy.

Hey, I found the cause of that and fixed it. Sorry about that!

Thank you.

Also I am trying to run 2 modems using mwan3. When I bring the second modem online I loose all data flow from both modems.

Edit: got it working, nevermind.

Just a request, would it be possible to add in a "use gateway metric" insert box?

Nice, I will be wanting to try that very soon. How did you get it to work?

I'll look into adding use gateway metric.

Had to use metrics on both interfaces is how I got it working.

That is really good, looks like it is pretty much feature complete. I had a look at the code but couldn't find any license, which means we may have to treat it as if it is under copyright. Where did you find it? Maybe the author would want to make it open source.

Just a short update/plug. Work is being done to upgrade the OpenWrt integration to be used with future versions of ModemManager, such as 1.9 and above. Namely support for the new key/value style output is underway. Anyone can track progress and/or contribute here:

The integration is mainly implemented as shell scripts. At this stage everything except for DNS seems to work, but we also need to add support for attributes that have multiple values. The DNS issue could potentially be fixed by someone with someone with better awk skills than me.

Just an update for anyone wanting to use the latest modemmanager. DNS is now working with the latest commit in the WIP branch, but it only supports one DNS server at the moment.