public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: app-mobilephone/pinephone-modem-scripts/files/, ...
@ 2021-06-25 17:40 Marco Scardovi
  0 siblings, 0 replies; only message in thread
From: Marco Scardovi @ 2021-06-25 17:40 UTC (permalink / raw
  To: gentoo-commits

commit:     c8dfe3dac8a1471d2efa0136d420acc345638d47
Author:     Marco Scardovi <marco <AT> scardovi <DOT> com>
AuthorDate: Fri Jun 25 17:40:35 2021 +0000
Commit:     Marco Scardovi <marco <AT> scardovi <DOT> com>
CommitDate: Fri Jun 25 17:40:35 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c8dfe3da

app-mobilephone/pinephone-modem-scripts: add package

scripts for the modem

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Marco Scardovi <marco <AT> scardovi.com>

 .../files/90-modem-eg25.rules                      |  5 ++++
 ...one-modem-scripts.pinephone-modem-setup.service |  9 +++++++
 .../files/pinephone-modem-setup.sh                 | 25 ++++++++++++++++++
 .../pinephone-modem-scripts/metadata.xml           |  8 ++++++
 .../pinephone-modem-scripts-0.20.8.ebuild          | 30 ++++++++++++++++++++++
 5 files changed, 77 insertions(+)

diff --git a/app-mobilephone/pinephone-modem-scripts/files/90-modem-eg25.rules b/app-mobilephone/pinephone-modem-scripts/files/90-modem-eg25.rules
new file mode 100644
index 000000000..cd0031422
--- /dev/null
+++ b/app-mobilephone/pinephone-modem-scripts/files/90-modem-eg25.rules
@@ -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"

diff --git a/app-mobilephone/pinephone-modem-scripts/files/pinephone-modem-scripts.pinephone-modem-setup.service b/app-mobilephone/pinephone-modem-scripts/files/pinephone-modem-scripts.pinephone-modem-setup.service
new file mode 100644
index 000000000..e79986065
--- /dev/null
+++ b/app-mobilephone/pinephone-modem-scripts/files/pinephone-modem-scripts.pinephone-modem-setup.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Setup modem
+
+[Service]
+Type=simple
+ExecStart=/usr/sbin/pinephone-modem-setup.sh
+
+[Install]
+WantedBy=graphical.target

diff --git a/app-mobilephone/pinephone-modem-scripts/files/pinephone-modem-setup.sh b/app-mobilephone/pinephone-modem-scripts/files/pinephone-modem-setup.sh
new file mode 100644
index 000000000..ea06ab3b0
--- /dev/null
+++ b/app-mobilephone/pinephone-modem-scripts/files/pinephone-modem-setup.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+log() {
+	echo "$@" | logger -t "manjaro: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

diff --git a/app-mobilephone/pinephone-modem-scripts/metadata.xml b/app-mobilephone/pinephone-modem-scripts/metadata.xml
new file mode 100644
index 000000000..144c8091c
--- /dev/null
+++ b/app-mobilephone/pinephone-modem-scripts/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>marco@scardovi.com</email>
+		<name>Marco Scardovi</name>
+	</maintainer>
+</pkgmetadata>

diff --git a/app-mobilephone/pinephone-modem-scripts/pinephone-modem-scripts-0.20.8.ebuild b/app-mobilephone/pinephone-modem-scripts/pinephone-modem-scripts-0.20.8.ebuild
new file mode 100644
index 000000000..b65436de9
--- /dev/null
+++ b/app-mobilephone/pinephone-modem-scripts/pinephone-modem-scripts-0.20.8.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit udev systemd
+
+COMMIT="cefcd46502acca9bd396c885df445a712c8c4eff"
+
+DESCRIPTION="Modem scripts for the PinePhone"
+HOMEPAGE="https://gitlab.manjaro.org/manjaro-arm/packages/community/phosh/pinephone-modem-scripts"
+EGIT_REPO_URI="https://gitlab.manjaro.org/manjaro-arm/packages/community/phosh/pinephone-modem-scripts/-/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+EGIT_BRANCH=eg25-manager
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~arm64"
+
+RDEPEND="
+	net-dialup/atinout
+	sci-geosciences/gpsd
+"
+
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+src_install() {
+	udev_dorules "${S}"/90-modem-eg25.rules
+	systemd_dounit "${S}"/pinephone-modem-scripts.pinephone-modem-setup.service
+	dobin "${S}"/pinephone-modem-setup.sh
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-25 17:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-25 17:40 [gentoo-commits] repo/proj/guru:dev commit in: app-mobilephone/pinephone-modem-scripts/files/, Marco Scardovi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox