From 864c69d8aef3ca61472af470f22c9b665d0346d6 Mon Sep 17 00:00:00 2001 From: Yalu Zhang Date: Thu, 17 Jun 2021 15:14:06 +0200 Subject: [PATCH] Update package: dectmngr Set model-id --- dectmngr/Makefile | 4 ++-- dectmngr/files/etc/init.d/dectmngr | 14 +++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/dectmngr/Makefile b/dectmngr/Makefile index 39b840f96..25481526d 100644 --- a/dectmngr/Makefile +++ b/dectmngr/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dectmngr PKG_RELEASE:=3 -PKG_VERSION:=3.1.5 +PKG_VERSION:=3.1.6 LOCAL_DEV=0 ifneq ($(LOCAL_DEV),1) PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=c0b513ebd6762cf97bd085c404119378aa0b2383 +PKG_SOURCE_VERSION:=2dfbe1dd7538d33c758b482e0bce88a3a562a436 PKG_MIRROR_HASH:=skip endif diff --git a/dectmngr/files/etc/init.d/dectmngr b/dectmngr/files/etc/init.d/dectmngr index 069f150d6..c91bc33a3 100755 --- a/dectmngr/files/etc/init.d/dectmngr +++ b/dectmngr/files/etc/init.d/dectmngr @@ -23,17 +23,25 @@ stop_and_wait_dectmngr() { } start_service() { + local opt_ext= local rfpi= - local opt_rfpi= + local model_id= + test $(db get hw.board.hasDect) = "0" && return echo 1 > /sys/class/gpio/gpio14/value rfpi=$(db -q get hw.board.dect_rfpi) - [ -n "$rfpi" -a ${#rfpi} -eq 14 ] && opt_rfpi="-rfpi $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" procd_open_instance - procd_set_param command $PROG -comname ttyH0 -log $LOG_PATH/dect-cmbs.log $opt_rfpi + procd_set_param command $PROG -comname ttyH0 -log $LOG_PATH/dect-cmbs.log $opt_ext procd_set_param respawn 6 2 3 procd_set_param term_timeout 20 procd_set_param triggers asterisk