option lowpower '1'
option signalrate '30'
option allow_roaming '1'
+ option force_connection '1'
option init_epsbearer '<none|default|custom>'
Only 'device' and 'proto' are mandatory options, the remaining ones are all
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
+The 'force_connection' option is designed to ensure that the modem automatically
+attempts to reconnect regardless of any errors encountered during the
+connection process.
+
If there is no Circuit switch network available, then an initial EPS
bearer must be set, so this could be used during the network registration
process in 4G and 5G network. For this resaon a new configuration option
proto_config_add_int signalrate
proto_config_add_boolean lowpower
proto_config_add_boolean allow_roaming
+ proto_config_add_boolean force_connection
proto_config_add_string init_epsbearer
proto_config_add_string init_iptype
proto_config_add_string 'init_allowedauth:list(string)'
local device apn allowedauth username password pincode
local iptype plmn metric signalrate allow_roaming
+ local force_connection
local init_epsbearer
local init_iptype init_allowedauth
json_get_vars device apn allowedauth username password
json_get_vars pincode iptype plmn metric signalrate allow_roaming
- json_get_vars allowedmode preferredmode
+ json_get_vars allowedmode preferredmode force_connection
json_get_vars init_epsbearer
json_get_vars init_iptype init_allowedauth
mmcli --modem="${device}" \
--timeout 120 \
--3gpp-register-in-operator="${plmn}" || {
- proto_notify_error "${interface}" MM_3GPP_OPERATOR_REGISTRATION_FAILED
- proto_block_restart "${interface}"
+
+ if [ -n "${force_connection}" ] && [ "${force_connection}" -eq 1 ]; then
+ echo "3GPP operator registration failed -> attempting restart"
+ proto_notify_error "${interface}" MM_INTERFACE_RESTART
+ else
+ proto_notify_error "${interface}" MM_3GPP_OPERATOR_REGISTRATION_FAILED
+ proto_block_restart "${interface}"
+ fi
return 1
}
}
append_param "${password:+password=${password}}"
mmcli --modem="${device}" --timeout 120 --simple-connect="${connectargs}" || {
- proto_notify_error "${interface}" MM_CONNECT_FAILED
- proto_block_restart "${interface}"
+ if [ -n "${force_connection}" ] && [ "${force_connection}" -eq 1 ]; then
+ echo "Connection failed -> attempting restart"
+ proto_notify_error "${interface}" MM_INTERFACE_RESTART
+ else
+ proto_notify_error "${interface}" MM_CONNECT_FAILED
+ proto_block_restart "${interface}"
+ fi
return 1
}