Commit 9e6c35c5 authored by Alexander Couzens's avatar Alexander Couzens
Browse files

ensure the interface format matches between qmi <> linux

parent 4fec91c9
......@@ -52,6 +52,22 @@ unlock_sim() {
enable_internet() {
# need to change interface format?
linuxtype=$(_qmicli --get-expected-data-format)
qmitype=$(_qmicli --wda-get-data-format |grep 'Link layer protocol:' | awk -F"'" '{ print $2 }')
if [ "$linuxtype" != "$qmitype" ] ; then
_log "$DEVICE doesnt match. linux: $linuxtype qmi: $qmitype"
iface=$(_qmicli --get-wwan-iface)
if [ -z "$iface" ] ; then
_err "Could not get the interface device"
exit 1
ip link set "$iface" down
_qmicli "--set-expected-data-format=$qmitype"
ip link set "$iface" up
if ! _qmicli --uim-verify-pin=PIN1,$PIN1CODE 2>/dev/null >/dev/null; then
_qmicli --wds-set-autoconnect-settings=enabled
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment