Browse Source

Merge pull request #4907 from stargieg/master

knxd: Fix config file location and init script.
lilik-openwrt-22.03
champtar 7 years ago
committed by GitHub
parent
commit
48625fbed0
3 changed files with 58 additions and 8 deletions
  1. +5
    -3
      net/knxd/Makefile
  2. +43
    -0
      net/knxd/files/knxd.config
  3. +10
    -5
      net/knxd/files/knxd.init

+ 5
- 3
net/knxd/Makefile View File

@ -12,7 +12,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=knxd
PKG_VERSION:=0.14.18
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/knxd/knxd.git
@ -47,7 +47,8 @@ EIB KNX Daemon
endef
define Package/knxd/conffiles
/etc/config/knxd.ini
/etc/knxd.ini
/etc/config/knxd
endef
TARGET_CXXFLAGS+= -std=c++0x
@ -72,7 +73,8 @@ define Package/knxd/install
$(INSTALL_BIN) ./files/knxd.init $(1)/etc/init.d/knxd
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) ./files/knxd.ini $(1)/etc/config/knxd.ini
$(INSTALL_DATA) ./files/knxd.ini $(1)/etc/knxd.ini
$(INSTALL_DATA) ./files/knxd.config $(1)/etc/config/knxd
endef
$(eval $(call BuildPackage,knxd))

+ 43
- 0
net/knxd/files/knxd.config View File

@ -0,0 +1,43 @@
config daemon args
# driver:[arg] a Layer-2 driver to use (knxd supports more than one)
#option layer2 ""
# enable caching of group communication networkstate
option GroupCache 0
# FILE start the programm as daemon. Output will be written to FILE if given
option daemon "/var/log/knxd.log"
#enable the EIBnet/IP server to answer discovery and description requests (SEARCH, DESCRIPTION)
option Discovery 1
# EIBADDR set our EIB address to EIBADDR (default 0.0.1)
option eibaddr "0.0.2"
# LEVEL set error level
option error 0
# PORT listen at TCP port PORT (default 6720)
option listen_tcp "6720"
# wait for L_Data_ind while sending (for all EMI based backends)
option no_emisend_queuing 0
# SERVERNAME name of the EIBnet/IP server (default is 'knxd')
option Name "KNX2"
# do not assume KNXnet/IP Tunneling bus interface can handle parallel cEMI requests
option no_tunnel_client_queuing 0
# the next Layer2 interface may not enter monitor mode
option no_monitor 0
# enable EIBnet/IP Routing in the EIBnet/IP server
option Routing 1
# [ip[:port]] starts an EIBnet/IP multicast server
option Server '224.0.23.12'
# MASK set trace flags (bitmask)
option trace 0
# tpuarts backend should generate L2 acks for all group telegrams
option tpuarts_ack_all_group 0
# tpuarts backend should generate L2 acks for all individual telegrams
option tpuarts_ack_all_individual 0
# tpuarts backend should should use a full interface reset (for Disch TPUART interfaces)
option tpuarts_disch_reset 0
# enable EIBnet/IP Tunneling in the EIBnet/IP server
option Tunnelling 1
# FILE listen at Unix domain socket FILE (default /tmp/eib)
option listen_local "/var/run/knxd"
# example with tpuarts interface
# option url 'tpuarts:/dev/ttyAMA0'
# example with IP interface in tunnel mode
option url 'usb:'

+ 10
- 5
net/knxd/files/knxd.init View File

@ -33,15 +33,14 @@ start_service() {
local options url
config_load knxd
append_parm args eibaddr "eibaddr" "0.0.1"
append_parm args client-addrs "client-addrs" "0.0.2:10"
append_parm args client_addrs "client-addrs" "0.0.2:10"
append_parm args layer2 "layer2"
append_bool args GroupCache "GroupCache" 0
append_parm args daemon "daemon" "/var/log/knxd.log"
append_bool args Discovery "Discovery" 1
append_parm args error "error" # "5"
append_parm args listen_tcp "listen-tcp" "6720"
append_parm args Interface "Interface" # "eth0"
append_parm args send-delay "send-delay" # "50"
append_parm args send_delay "send-delay" # "50"
append_parm args Name "Name" "OpenWrt"
append_bool args no_monitor "no-monitor" 0
append_bool args Routing "Routing" 0
@ -50,11 +49,17 @@ start_service() {
append_bool args tpuarts_ack_all_individual "tpuarts-ack-all-individual" 0
append_bool args tpuarts_disch_reset "tpuarts-disch-reset" 0
append_bool args Tunnelling "Tunnelling" 1
append_bool args Server "Server" 1
append_bool args Discovery "Discovery" 1
append_parm args Server "Server" "224.0.23.12"
append_parm args listen_local "listen-local" "/var/run/knxd"
config_get url args url
if [ "$url" == "usb:" ] ; then
url="usb:""$(findknxusb | tail -n1 | sed -e 's/device: \([0-9]:[0-9]:[0-9]\):[0-9].*/\1/')"
fi
echo "/usr/lib/knxd_args $params $url"
/usr/lib/knxd_args $params $url > /tmp/etc/knxd.ini
procd_open_instance
procd_set_param command $PROG $params $url
procd_set_param command $PROG "/tmp/etc/knxd.ini"
procd_set_param respawn
procd_close_instance
}


Loading…
Cancel
Save