modemmanager.proto issue?

Amol Lad Amol.Lad at 4rf.com
Tue Sep 17 07:15:58 UTC 2019


Hi Aleksander,

Regarding modemmanager.proto file @ https://gitlab.freedesktop.org/mobile-broadband/mobile-broadband-openwrt/blob/master/modemmanager/files/modemmanager.proto

Did you mean "while [ $idx -le $bearercount ];" in below function instead of " while [ $idx -ge $bearercount ];" ?

modemmanager_cleanup_connection() {
local modemstatus="$1"

local bearercount idx bearerpath

bearercount=$(modemmanager_get_field "${modemstatus}" "modem.generic.bearers.length")

# do nothing if no bearers reported
[ -n "${bearercount}" ] && [ $bearercount -ge 1 ] && {
# explicitly disconnect just in case
/usr/bin/mmcli --modem="${device}" --simple-disconnect >/dev/null 2>&1
# and remove all bearer objects, if any found
idx=1
while [ $idx -ge $bearercount ]; do
bearerpath=$(modemmanager_get_field "${modemstatus}" "modem.generic.bearers.value\[$idx\]")
/usr/bin/mmcli --modem "${device}" --delete-bearer="${bearerpath}" >/dev/null 2>&1
idx=$(expr $idx + 1)
done
}
}

Thanks
Amol

The information in this email communication (inclusive of attachments) is confidential to 4RF Limited and the intended recipient(s). If you are not the intended recipient(s), please note that any use, disclosure, distribution or copying of this information or any part thereof is strictly prohibited and that the author accepts no liability for the consequences of any action taken on the basis of the information provided. If you have received this email in error, please notify the sender immediately by return email and then delete all instances of this email from your system. 4RF Limited will not accept responsibility for any consequences associated with the use of this email (including, but not limited to, damages sustained as a result of any viruses and/or any action or lack of action taken in reliance on it).


More information about the ModemManager-devel mailing list