knxd: Add uci config and knxd_args to ini convert

Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
This commit is contained in:
Patrick Grimm 2017-10-06 14:51:22 +02:00
parent 53caa112be
commit ade26942ac
3 changed files with 53 additions and 3 deletions

View File

@ -48,6 +48,7 @@ endef
define Package/knxd/conffiles
/etc/knxd.ini
/etc/config/knxd
endef
TARGET_CXXFLAGS+= -std=c++0x
@ -73,6 +74,7 @@ define Package/knxd/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) ./files/knxd.ini $(1)/etc/knxd.ini
$(INSTALL_DATA) ./files/knxd.config $(1)/etc/config/knxd
endef
$(eval $(call BuildPackage,knxd))

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:'

View File

@ -37,7 +37,6 @@ start_service() {
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"
@ -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 "/etc/knxd.ini"
procd_set_param command $PROG "/tmp/etc/knxd.ini"
procd_set_param respawn
procd_close_instance
}