pmaports/device/community/device-pine64-pinephone/setup-modem.sh
Bart Ribbers bb41f53879
pine64-pinephone: clean setup-modem.sh script (MR 1701)
Since we now use the in-kernel modem driver of Megi's 5.9 kernel, the
majority of the setup script has become unnecessary. Remove all the now
unnecessary commands and keep it just for enabling VoLTE auto profile
selecting

https://megous.com/git/linux/tree/drivers/misc/modem-power.c?h=orange-pi-5.10#n531
https://megous.com/git/linux/tree/drivers/misc/modem-power.c?h=orange-pi-5.10#n580
https://megous.com/git/linux/tree/drivers/misc/modem-power.c?h=orange-pi-5.10#n610
2020-11-13 01:08:58 -08:00

25 lines
510 B
Bash

#!/bin/sh
log() {
echo "$@" | logger -t "postmarketOS:modem-setup"
}
QMBNCFG_CONFIG="1"
# Read current config
QMBNCFG_ACTUAL_CONFIG=$(echo 'AT+QMBNCFG="AutoSel"' | atinout - $DEV -)
if echo $QMBNCFG_ACTUAL_CONFIG | grep -q $QMBNCFG_CONFIG
then
log "Modem already configured"
exit 0
fi
# Configure VoLTE auto selecting profile
RET=$(echo "AT+QMBNCFG=\"AutoSel\",$QMBNCFG_CONFIG" | atinout - $DEV -)
if ! echo $RET | grep -q OK
then
log "Failed to enable VoLTE profile auto selecting: $RET"
exit 1
fi