summaryrefslogtreecommitdiff
path: root/utils/quectel-timesync
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2023-10-08 23:18:19 +0200
committerDavid Bauer <mail@david-bauer.net>2023-10-09 00:45:06 +0200
commita2838a20323a541360123e72ff7c81524f5455f6 (patch)
tree461cecc6572742e58bb044883a451d9351cc1579 /utils/quectel-timesync
parent597df3585fae16ac1e8a64b839c7159a907e70af (diff)
quectel-timesync: add package
This tool allows for acquiring the current time from the cellular network for configuring the local clock. Compared to NTP, this has the advantage of nut using up mobile traffic. It takes advantage of the AT+QLTS command found on Quectel modems. This functionality depends on support of the mobile network. Compile-tested: ath79-nand Run-tested: ath79-nand (GL.iNET GL-XE300) Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'utils/quectel-timesync')
-rw-r--r--utils/quectel-timesync/Makefile51
1 files changed, 51 insertions, 0 deletions
diff --git a/utils/quectel-timesync/Makefile b/utils/quectel-timesync/Makefile
new file mode 100644
index 000000000..f624683c2
--- /dev/null
+++ b/utils/quectel-timesync/Makefile
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=quectel-timesync
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL=https://github.com/freifunk-darmstadt/quectel-timesync.git
+PKG_SOURCE_DATE:=2023-10-08
+PKG_SOURCE_VERSION:=4333888cb8025b92511597a95859943fae0a0bc8
+PKG_MIRROR_HASH:=696b878891f884318847069b0590cbdbab2ff48461864ecb418e4575935a29e3
+
+PKG_MAINTAINER:=David Bauer <mail@david-bauer.net>
+PKG_LICENSE:=GPL-2.0-only
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/quectel-timesync
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Tool for configuring system clock using Quectel cellular modems
+ DEPENDS:=+kmod-usb-serial-option
+endef
+
+define Package/quectel-timesync/description
+This tool allows for acquiring the current time from
+the cellular network for configuring the local clock.
+Compared to NTP, this has the advantage of nut using up
+mobile traffic.
+
+It takes advantage of the AT+QLTS command found on Quectel
+modems. This functionality depends on support of the mobile
+network.
+endef
+
+define Package/quectel-timesync/conffiles
+/etc/config/quectel-timesync
+endef
+
+define Package/quectel-timesync/install
+ $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config
+
+ $(CP) $(PKG_BUILD_DIR)/openwrt/quectel-timesync/files/quectel-timesync.config $(1)/etc/config/quectel-timesync
+
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/quectel-timesync/files/quectel-timesync.init $(1)/etc/init.d/quectel-timesync
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/quectel-timesync $(1)/usr/sbin/quectel-timesync
+endef
+
+$(eval $(call BuildPackage,quectel-timesync))