From d8e5dcf859ac8eb46173815663f5729b87bbae59 Mon Sep 17 00:00:00 2001 From: Yalu Zhang Date: Thu, 2 Dec 2021 16:41:44 +0100 Subject: [PATCH] dectmngr 3.3.1: add some extensions to Line Settings List defined in CAT-iq 2.0 - /etc/init.d/dectmngr: set model id from hw.board.dect_model_id if the value in the database is valid. Otherwise set to 30.3B.06 - Add a config option: ENABLE_LINE_SETTINGS_EXTENSION in the package --- dectmngr/Config.in | 11 +++++++++++ dectmngr/Makefile | 12 ++++++++++-- dectmngr/files/etc/init.d/dectmngr | 11 ++++++----- 3 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 dectmngr/Config.in diff --git a/dectmngr/Config.in b/dectmngr/Config.in new file mode 100644 index 000000000..180d43ea4 --- /dev/null +++ b/dectmngr/Config.in @@ -0,0 +1,11 @@ +if PACKAGE_dectmngr + +menu "Configuration" + +config ENABLE_LINE_SETTINGS_EXTENSION + bool "Enable Line Settings List extension " + default y + +endmenu + +endif diff --git a/dectmngr/Makefile b/dectmngr/Makefile index 07492a758..01978a570 100644 --- a/dectmngr/Makefile +++ b/dectmngr/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dectmngr PKG_RELEASE:=3 -PKG_VERSION:=3.3.0 +PKG_VERSION:=3.3.1 LOCAL_DEV=0 ifneq ($(LOCAL_DEV),1) PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=3944bc06c010dc0efcbd879e949665ac1e71c323 +PKG_SOURCE_VERSION:=78f5116cd479072dad803fa76442d8fff5d172d5 PKG_MIRROR_HASH:=skip endif @@ -41,6 +41,10 @@ define Package/$(PKG_NAME)/description DECT manager is a daemon that provides UBUS RPC objects and sends UBUS events for communication with the DECT chip. endef +define Package/$(PKG_NAME)/config + source "$(SOURCE)/Config.in" +endef + ifeq ($(LOCAL_DEV),1) define Build/Prepare rsync -av --exclude=.* ~/git/voip/dectmngr/* $(PKG_BUILD_DIR)/ @@ -51,6 +55,10 @@ TARGET_CFLAGS += \ -Wall \ -I$(STAGING_DIR)/usr/include/libxml2 +ifeq ($(CONFIG_ENABLE_LINE_SETTINGS_EXTENSION),y) +TARGET_CFLAGS += -DENABLE_LINE_SETTINGS_EXTENSION +endif + define Package/$(PKG_NAME)/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/etc diff --git a/dectmngr/files/etc/init.d/dectmngr b/dectmngr/files/etc/init.d/dectmngr index 7c1c6e8e3..0fa970fec 100755 --- a/dectmngr/files/etc/init.d/dectmngr +++ b/dectmngr/files/etc/init.d/dectmngr @@ -34,11 +34,12 @@ start_service() { rfpi=$(db -q get hw.board.dect_rfpi) [ -n "$rfpi" -a ${#rfpi} -eq 14 ] && opt_ext="$opt_ext -rfpi $rfpi" - # model_id=$(db -q get hw.board.dect_model_id) - # Setting model_id to 0x010203 is a workaround to reduce synchronisation time of some handset - # TODO: remove below line and uncomment the line above to get value from db when the problem is solved - model_id="01.02.03" - [ -n "$model_id" -a ${#model_id} -eq 8 ] && opt_ext="$opt_ext -model $model_id" + model_id=$(db -q get hw.board.dect_model_id) + [ -n "$model_id" -a ${#model_id} -eq 8 ] || { + echo "Invalid hw.board.dect_model_id:$model_id. Set to 30.3B.06" + model_id="30.3B.06" + } + opt_ext="$opt_ext -model $model_id" config_load dect config_get_bool log_dect_cmbs global log_dect_cmbs 0