New LuCI protocol - luci-proto-modemmanager testing


#1

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.

Source code here:
https://bitbucket.org/mips171/luci-proto-modemmanager/wiki/Home

54%20am


#2

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.


#3

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.


#4

Thank you for putting it together. That worked.


#5

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


#6

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)


#7

Hey,

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.


#8

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


#9

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.


#10

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.


#11
/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:
...sr/lib/lua/luci/model/network/proto_modemmanager.lua:53: 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>

#12

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


#13

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


#14

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.


#15

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


#16

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.


#17

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


#19

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.