uqmi: set RAT preference before attach

Set the RAT preference before attaching. This handles cases better,
where a network might be available but not with the preferred RAT.

If RAT is changed to a non-available RAT after attach, QMI does not fail
with missing registration but with failing to establish a PDP session.

Signed-off-by: David Bauer <mail@david-bauer.net>
This commit is contained in:
David Bauer 2023-10-09 16:29:59 +02:00
parent 0bc2b2a780
commit c1fcce1112

View file

@ -252,6 +252,13 @@ proto_qmi_setup() {
uqmi -s -d "$device" --network-register > /dev/null 2>&1
[ -n "$modes" ] && {
uqmi -s -d "$device" --set-network-modes "$modes" > /dev/null 2>&1
sleep 3
# Scan network to not rely on registration-timeout after RAT change
uqmi -s -d "$device" --network-scan > /dev/null 2>&1
}
echo "Waiting for network registration"
sleep 5
local registration_timeout=0
@ -281,7 +288,6 @@ proto_qmi_setup() {
return 1
done
[ -n "$modes" ] && uqmi -s -d "$device" --set-network-modes "$modes" > /dev/null 2>&1
echo "Starting network $interface"