Browse Source

modemmanager: added new proto options

Added signal refresh rate option
modemmanager: update readme.md
Added description for added proto options.

Added compile option to compile --with-at-command-via-dbus for allowing
AT commands to modem without --debug flag

 Changes to be committed:
	modified:   net/modemmanager/Config.in
	modified:   net/modemmanager/Makefile
	modified:   net/modemmanager/files/modemmanager.init
	modified:   net/modemmanager/files/modemmanager.proto
	modified:   README.md

Signed-off-by: Valtteri Holopainen <valtsu@gmail.com>
lilik-openwrt-22.03
Valtteri Holopainen 4 years ago
parent
commit
46f5937ad1
4 changed files with 25 additions and 2 deletions
  1. +6
    -0
      net/modemmanager/Config.in
  2. +4
    -0
      net/modemmanager/Makefile
  3. +4
    -0
      net/modemmanager/README.md
  4. +11
    -2
      net/modemmanager/files/modemmanager.proto

+ 6
- 0
net/modemmanager/Config.in View File

@ -12,4 +12,10 @@ depends on PACKAGE_modemmanager
default y default y
help help
Compile ModemManager with QMI support Compile ModemManager with QMI support
config MODEMMANAGER_WITH_AT_COMMAND_VIA_DBUS
bool "Allow AT commands via DBus"
default n
help
Compile ModemManager allowing AT commands without debug flag
endmenu endmenu

+ 4
- 0
net/modemmanager/Makefile View File

@ -59,6 +59,10 @@ CONFIGURE_ARGS += \
--disable-rpath \ --disable-rpath \
--disable-gtk-doc --disable-gtk-doc
ifeq ($(CONFIG_MODEMMANAGER_WITH_AT_COMMAND_VIA_DBUS),y)
CONFIGURE_ARGS += --with-at-command-via-dbus
endif
ifdef CONFIG_MODEMMANAGER_WITH_MBIM ifdef CONFIG_MODEMMANAGER_WITH_MBIM
CONFIGURE_ARGS += --with-mbim CONFIGURE_ARGS += --with-mbim
else else


+ 4
- 0
net/modemmanager/README.md View File

@ -23,6 +23,7 @@ Once installed, you can configure the 2G/3G/4G modem connections directly in
option pincode '7423' option pincode '7423'
option iptype 'ipv4' option iptype 'ipv4'
option lowpower '1' option lowpower '1'
option signalrate '30'
Only 'device' and 'proto' are mandatory options, the remaining ones are all Only 'device' and 'proto' are mandatory options, the remaining ones are all
optional. optional.
@ -34,3 +35,6 @@ allowing all protocols.
The 'iptype' option supports any of these values: 'ipv4', 'ipv6' or 'ipv4v6'. The 'iptype' option supports any of these values: 'ipv4', 'ipv6' or 'ipv4v6'.
It will default to 'ipv4' if not given. It will default to 'ipv4' if not given.
The 'signalrate' option set's the signal refresh rate (in seconds) for the device.
You can call signal info with command: mmcli -m 0 --signal-get

+ 11
- 2
net/modemmanager/files/modemmanager.proto View File

@ -343,6 +343,7 @@ proto_modemmanager_init_config() {
proto_config_add_string password proto_config_add_string password
proto_config_add_string pincode proto_config_add_string pincode
proto_config_add_string iptype proto_config_add_string iptype
proto_config_add_int signalrate
proto_config_add_boolean lowpower proto_config_add_boolean lowpower
proto_config_add_defaults proto_config_add_defaults
} }
@ -354,11 +355,11 @@ proto_modemmanager_setup() {
local bearermethod_ipv4 bearermethod_ipv6 auth cliauth local bearermethod_ipv4 bearermethod_ipv6 auth cliauth
local operatorname operatorid registration accesstech signalquality local operatorname operatorid registration accesstech signalquality
local device apn allowedauth username password pincode iptype metric
local device apn allowedauth username password pincode iptype metric signalrate
local address prefix gateway mtu dns1 dns2 local address prefix gateway mtu dns1 dns2
json_get_vars device apn allowedauth username password pincode iptype metric
json_get_vars device apn allowedauth username password pincode iptype metric signalrate
# validate sysfs path given in config # validate sysfs path given in config
[ -n "${device}" ] || { [ -n "${device}" ] || {
@ -403,6 +404,14 @@ proto_modemmanager_setup() {
return 1 return 1
} }
# check if Signal refresh rate is set
if [ -n "${signalrate}" ] && [ "${signalrate}" -eq "${signalrate}" ] 2>/dev/null; then
echo "setting signal refresh rate to ${signalrate} seconds"
mmcli --modem="${device}" --signal-setup="${signalrate}"
else
echo "signal refresh rate is not set"
fi
# log additional useful information # log additional useful information
modemstatus=$(mmcli --modem="${device}" --output-keyvalue) modemstatus=$(mmcli --modem="${device}" --output-keyvalue)
operatorname=$(modemmanager_get_field "${modemstatus}" "modem.3gpp.operator-name") operatorname=$(modemmanager_get_field "${modemstatus}" "modem.3gpp.operator-name")


Loading…
Cancel
Save