Version bump

This commit is contained in:
Gerben Jan Dijkman 2022-01-19 14:27:11 +01:00
parent 084afd5a22
commit 8d7b56aa01
5 changed files with 69 additions and 9 deletions

View File

@ -0,0 +1,5 @@
SUBSYSTEMS=="usb", ENV{.LOCAL_ifNum}="$attr{bInterfaceNumber}"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ENV{.LOCAL_ifNum}=="01", SYMLINK+="EG25.NMEA", MODE="0660"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ENV{.LOCAL_ifNum}=="02", SYMLINK+="EG25.AT", MODE="0660"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ENV{.LOCAL_ifNum}=="03", SYMLINK+="EG25.MODEM", MODE="0660"

View File

@ -0,0 +1,22 @@
msg() {
ALL_OFF="\e[1;0m"
BOLD="\e[1;1m"
GREEN="${BOLD}\e[1;32m"
local mesg=$1; shift
printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
}
post_install() {
msg "Setting up Modem-Scripts"
ln -sfv "/usr/bin/pinephone-modem-setup-common.sh" "/usr/bin/pinephone-modem-setup.sh"
}
post_upgrade() {
post_install
if [[ ! -e "/etc/systemd/system/multi-user.target.wants/eg25-manager.service" ]]; then
msg "Enabling eg25-manager ..."
systemctl enable eg25-manager --now
msg "Disabling pinephone-modem service ..."
systemctl disable pinephone-modem-scripts.pinephone-modem --now
fi
}

View File

@ -0,0 +1,9 @@
[Unit]
Description=Setup modem
[Service]
Type=simple
ExecStart=/usr/sbin/pinephone-modem-setup.sh
[Install]
WantedBy=graphical.target

View File

@ -0,0 +1,27 @@
#!/bin/sh
log() {
echo "$@" | logger -t "manjaro:modem-setup"
}
QMBNCFG_CONFIG="1"
DEV="/dev/EG25.AT"
while [ ! -e $DEV ]; do sleep 0.2 ; done
# 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

View File

@ -5,9 +5,9 @@ EAPI=7
inherit udev systemd git-r3 inherit udev systemd git-r3
DESCRIPTION="Modem scripts for the PinePhone" DESCRIPTION="A collection of scripts for setting up the PinePhone's modem"
HOMEPAGE="https://gitlab.manjaro.org/manjaro-arm/packages/community/phosh/pinephone-modem-scripts.git" HOMEPAGE="https://gitlab.manjaro.org/manjaro-arm/packages/community/pinephone/pinephone-modem-scripts"
EGIT_REPO_URI="https://gitlab.manjaro.org/manjaro-arm/packages/community/phosh/pinephone-modem-scripts.git" EGIT_REPO_URI="https://gitlab.manjaro.org/manjaro-arm/packages/community/pinephone/pinephone-modem-scripts"
EGIT_BRANCH=eg25-manager EGIT_BRANCH=eg25-manager
LICENSE="GPL-3" LICENSE="GPL-3"
@ -28,11 +28,8 @@ src_prepare() {
} }
src_install() { src_install() {
udev_dorules ${S}/*.rules udev_dorules ${FILESDIR}/*.rules
# exeinto /etc/gpsd/ systemd_dounit ${FILESDIR}/*.service
# newexe ${S}/gpsd_device-hook.sh device-hook dobin ${FILESDIR}/pinephone-modem-setup.sh
# systemd_dounit ${S}/*.service
dobin ${S}/pinephone-modem-setup.sh
#dobin ${S}/pinephone-modem-setup-ofono.sh
} }