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
This commit is contained in:
Yalu Zhang 2021-12-02 16:41:44 +01:00
parent 64f9e23850
commit d8e5dcf859
3 changed files with 27 additions and 7 deletions

11
dectmngr/Config.in Normal file
View file

@ -0,0 +1,11 @@
if PACKAGE_dectmngr
menu "Configuration"
config ENABLE_LINE_SETTINGS_EXTENSION
bool "Enable Line Settings List extension "
default y
endmenu
endif

View file

@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dectmngr PKG_NAME:=dectmngr
PKG_RELEASE:=3 PKG_RELEASE:=3
PKG_VERSION:=3.3.0 PKG_VERSION:=3.3.1
LOCAL_DEV=0 LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1) ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=3944bc06c010dc0efcbd879e949665ac1e71c323 PKG_SOURCE_VERSION:=78f5116cd479072dad803fa76442d8fff5d172d5
PKG_MIRROR_HASH:=skip PKG_MIRROR_HASH:=skip
endif 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. DECT manager is a daemon that provides UBUS RPC objects and sends UBUS events for communication with the DECT chip.
endef endef
define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
endef
ifeq ($(LOCAL_DEV),1) ifeq ($(LOCAL_DEV),1)
define Build/Prepare define Build/Prepare
rsync -av --exclude=.* ~/git/voip/dectmngr/* $(PKG_BUILD_DIR)/ rsync -av --exclude=.* ~/git/voip/dectmngr/* $(PKG_BUILD_DIR)/
@ -51,6 +55,10 @@ TARGET_CFLAGS += \
-Wall \ -Wall \
-I$(STAGING_DIR)/usr/include/libxml2 -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 define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc $(INSTALL_DIR) $(1)/etc

View file

@ -34,11 +34,12 @@ start_service() {
rfpi=$(db -q get hw.board.dect_rfpi) rfpi=$(db -q get hw.board.dect_rfpi)
[ -n "$rfpi" -a ${#rfpi} -eq 14 ] && opt_ext="$opt_ext -rfpi $rfpi" [ -n "$rfpi" -a ${#rfpi} -eq 14 ] && opt_ext="$opt_ext -rfpi $rfpi"
# model_id=$(db -q get hw.board.dect_model_id) 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 [ -n "$model_id" -a ${#model_id} -eq 8 ] || {
# TODO: remove below line and uncomment the line above to get value from db when the problem is solved echo "Invalid hw.board.dect_model_id:$model_id. Set to 30.3B.06"
model_id="01.02.03" model_id="30.3B.06"
[ -n "$model_id" -a ${#model_id} -eq 8 ] && opt_ext="$opt_ext -model $model_id" }
opt_ext="$opt_ext -model $model_id"
config_load dect config_load dect
config_get_bool log_dect_cmbs global log_dect_cmbs 0 config_get_bool log_dect_cmbs global log_dect_cmbs 0