pmaports/device/main/device-pine64-pinephone/setup-modem.sh
Bart Ribbers c981d35ce6
pine64-pinephone: move from community to main (MR 1752)
First actual phone in main 🎉
Fits the requirements for main devices as listed on
https://wiki.postmarketos.org/wiki/Device_categorization.
2020-12-02 02:30:13 +01: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