Raspberry Pi: EIB/KNX IP Gateway and Router with knxd

Hi,

in my previous posts EIB/KNX Router with an USB Interface and KNX/EIB Router with a TPUART module I described how to use a Raspberry PI as EIB/KNX Router with eibd.

eibd is no longer in development so I decided to give knxd, a fork of eibd, a try:-) The script attached at the end of the post is written for raspbian but should also work an all debian system with systemd imit system.


This post is based on my previous posts regarding eibd. The script at the end of the post installs knxd with support for EIB/KNX Router with TPUART and for USB EIB/KNX interfaces. This is the first shot if you got any errors feel free to report it by a comment.

First of all install raspbian in the well known way and update to the latest version of firmware and operating system

pi@raspberry~: $ sudo su -
root@raspberry:~# apt-get update && apt-get upgrade
root@raspberry:~# rpi-update
root@raspberry:~# reboot

Hint for Raspberry Pi 3 User (Comment from Adrian): It is import to enable the serial device within raspi-config. The serial port must be set to ttyS0 not ttyAMA0 on RPI3 at the latest raspbian release.

login as root and configure a static IP Address. To get a root, login as user pi and call sudo

pi@raspberry~: $ sudo su -
root@raspberry:~#

Create new file /etc/systemd/network/eth0.network Name is not importend, just the suffix/extension network.

[Match]
# You can also use wildcards. Maybe you want enable dhcp
# an all eth* NICs
Name=eth0
[Network]
#DHCP=v4
# static IP
# 192.168.100.2 netmask 255.255.255.0
Address=192.168.100.2/24
Gateway=192.168.100.1
DNS=192.168.100.1
# Route for Multicast Address EIB/KNX
[Route]
Destination=224.0.23.12/32

Disable the old way to configure the network, enable systemd based network configuration, enable systemd generated resolve.conf (DNS resolution) and disable dhcpcd.

root@raspberry:~# mv /etc/network/interfaces /etc/network/interfaces.save
root@raspberry:~# systemctl enable systemd-networkd.service
root@raspberry:~# systemctl enable systemd-resolved.service
root@raspberry:~# systemctl start systemd-resolved.service
root@raspberry:~# systemctl disable dhcpcd.service
root@raspberry:~# systemctl enable systemd-networkd-wait-online.service

Set an link from the system wide resolve.conf to systemd

root@raspberry:~# mv /etc/resolv.conf /etc/resolv.conf.save
root@raspberry:~# ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

Reboot to get the config active

root@raspberry:~# reboot

Make sure an internet connection is available

root@raspberry~: $  ping -c 2 www.heise.de
PING www.heise.de (193.99.144.85) 56(84) bytes of data
64 bytes from 193.99.144.85: icmp_req=1 ttl=128 time=8.551 ms
64 bytes from 193.99.144.85: icmp_req=2 ttl=128 time=9.680 ms

--- 193.99.144.85 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 0.551/0.615/0.680/0.069 ms

Time to start installing knxd. The script must be run as root because some files are copied and modified in locations where only root have the appropriate permissions. Access to /dev/ttyAMA0 is just requiered if you want to use TPUART or a FT1.2 (BCU2) backend.

What the script does:

  • Check for root permissions
  • Download and compile pthsem
  • Download knxd sources from github
  • installing knxd binaries to /usr/local/bin
  • create a systemd service knxd
  • Add a user and group knxd with group membership dialout (to access serial device /dev/ttyAMA0)
  • Add user pi to knxd group
  • Disable bootmessages on serial interface /dev/ttyAMA0
  • Disable console on serial interface /dev/ttyAMA0
  • Define udev rules to accessing the KNX USB Device at a low level layer by group knxd. I have added all interfaces for which I found a USB Vendor- and ProductID. Maybe your device is not in the list, then you have to add this manually to file /etc/udev/rules.d/90-knxusb-devices.rules. Determine the ID by lsusb.
  • On Raspberry Pi 3 it disable the bluetooth module because its uses ttyAMA0 by default

For the following devices a udev rule is installed (Source KNX User Forum).

KNX USB Interface Vendor ID Product ID
Siemens KNX/EIB-USB Interface (Flush mounted) 0e77 0111
Siemens KNX/EIB-USB Interface (DIN rail) 0e77 0112
Siemens OCI700 Service Interface 0681 0014
Merlin Gerin KNX-USB Interface (Flush mounted) 0e77 0141
Hensel KNX-USB Interface (Rail mounted) 0e77 0121
Busch-Jaeger KNX-USB Interface (Flush mounted) 145C 1330
Busch-Jaeger KNX-USB Interface (surface mounted) 145C 1490
ABB STOTZ-KONTAKT KNX-USB Interface (MDRC) 147B 5120
Feller KNX-USB Data Interface 135E 0026
JUNG KNX-USB Data Interface 135E 0023
Gira KNX-USB Data Interface 135E 0022
Berker KNX-USB Data Interface 135E 0021
Insta KNX-USB Data Interface 135E 0020
Weinzierl KNX-USB Interface (Flush mounted) 0e77 0102
Weinzierl KNX-USB Interface (RS232) 0e77 0103
Weinzierl KNX-USB Interface (Rail mounted) 0e77 0104
Tapko USB Interface 16D0 0490
Hager KNX-USB Data Interface 135E 0025
Preussen Automation USB2KNX 16D0 0492
Merten KNX-USB Data Interface 135E 0024
b+b EIBWeiche USB 04cc 0301
MDT KNX_USB_Interface 16D0 0491

If there are further more, please let me know and I will integrate them to script.

On a Raspberry Pi 3 it is strongly recommended to update to the latest Kernel to addressing some issues with the serial device ttyAMA0

pi@raspberry~: $ sudo su
root@raspberry~: # rpi-update
root@raspberry~: # reboot

Start a root shell, get the script.

pi@raspberry~: $ sudo su
root@raspberry~: #
root@raspberry~: # wget http://michlstechblog.info/blog/download/electronic/install_knxd_systemd.sh

The highlighted eibd features are enabled. Alter the script if you need additional features.
–enable-ft12 enable FT1.2 backend
–enable-pei16 enable BCU1 kernel driver backend
–enable-pei16s enable BCU1 user driver backend (very experimental)
–enable-tpuarts enable TPUART user driver backend
–enable-eibnetip enable EIBnet/IP routing backend
–enable-eibnetiptunnel enable EIBnet/IP tunneling backend
–enable-usb enable USB backend
–enable-eibnetipserver enable EIBnet/IP server frontend
–enable-groupcache enable Group Cache (default: yes)
–enable-java build java client library

Start the script. This should be run about 20 minutes. Do not execute update-rc.d on debian jessie.

root@raspberry~: # chmod +x ./install_knxd_systemd.sh
root@raspberry~: # ./install_knxd_systemd.sh

After the script has finished. knxd, findknxusb, knxtool, findknxusb and some other tools should be installed at /usr/local/bin, the systemd service script for knxd in /lib/systemd/system/knxd.service and the link to start knxd at boottime /etc/systemd/system/multi-user.target.wants/knxd.service must exists..

root@raspberry~: # ls -l /usr/local/bin
.....
-rwxr-xr-x 1 root staff 839016 Jun 13 22:14 knxd
-rwxr-xr-x 1 root staff   7584 Jun 13 22:14 findknxusb
....
root@raspberry~: # ls -l /etc/systemd/system/multi-user.target.wants/knxd.service
lrwxrwxrwx 1 root root 14 Jun 13 22:15 ...  -> /lib/systemd/system/knxd.service

Reboot your device

If you want to disable the graphic desktop and just want to boot into the text console change the default target

root@raspberry~: # systemctl set-default -f multi-user.target

After installing you have to decide which interfaces you want to use(Default TPUARTS at /dev/ttyAMA0). With this configuration knxd must come up after a reboot because knxd could check if a TPUART module is present.

root@raspberry~: # ps ax|grep knxd
 416 ?        Ss     0:00 /usr/local/bin/knxd -p /run/knxd/knxd.pid --eibaddr=1.1.128 -d -D -T -R -S -i --listen-local=/tmp/knx tpuarts:/dev/ttyAMA0

If you want use a USB Interfacces open /etc/default/knxd and comment the TPUART line and remove the comment # character at the begin of the USB definition.

# Command line parameters for knxd. TPUART Backend
# Serial device Raspberry
# KNXD_OPTIONS="--eibaddr=1.1.128 --client-addrs=1.1.129:8 -d -D -T -R -S -i --listen-local=/tmp/knx -b tpuart:/dev/ttyAMA0"
# Serial device PC
# KNXD_OPTIONS="--eibaddr=1.1.128 --client-addrs=1.1.129:8 -d -D -T -R -S -i --listen-local=/tmp/knx -b tpuart:/dev/ttyS0"
# Tunnel Backend
# KNXD_OPTIONS="--eibaddr=1.1.128 --client-addrs=1.1.129:8 -d -D -T -R -S -i --listen-local=/tmp/knx -b ipt:192.168.56.1"
# USB Backend
KNXD_OPTIONS="--eibaddr=1.1.128 --client-addrs=1.1.129:8 -d -D -T -R -S -i --listen-local=/tmp/knx -b usb:"

Since knxd Version 0.14 it is no longer necessary to specify the USB Device ID. knxd recognize possible devices at startup. Nevertheless when knxd is not running, you can look if a USB devices were found by using findknxusb.

The following knxd options are predefined at /etc/default/knxd

  • EIB Busaddress of the daemon 1.1.128
  • A range of EIB Busaddresses which were assigned to clients(e.q. ETS ..) connected to knxd. 1.1.129:8 means a range of 8 client addresses from 1.1.129 to 1.1.136
  • EIBnet/IP server
  • EIBnet/IP Routing
  • EIBnet/IP Tunneling
  • Answer discovery and description requests
  • Listen on UNIX domain socket /tmp/knx
  • Listen on TCP port, default 6720

Check if you see EIB packets on wire.

pi@raspberry~: # knxtool vbusmonitor1 ip:localhost
LPDU: BC 11 17 00 03 C1 00 81 06 :L_Data low from 1.1.23 to 0/0/3 hops: 04 T_DATA_XXX_REQ A_GroupValue_Write (small) 01 LPDU: CC :ACK
LPDU: BC 11 17 00 03 81 00 81 46 :L_Data low from 1.1.23 to 0/0/3 hops: 00 T_DATA_XXX_REQ A_GroupValue_Write (small) 01 LPDU: CC :ACK

Thats it. Comments are welcome!

Michael

Troubleshooting notes: When knxd does not start as system service/daemon start it in foreground with trace enabled to see whats happend:

Switch to user knxd

sudo su knxd -s /bin/bash

Then get your knxd options from /etc/default/knxd (for example –eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuart:/dev/ttyAMA0) , remove the -d switch, add the trace switches and start it

knxd -t 1023 --eibaddr=1.1.128 --client-addrs=1.1.129:8 -D -T -R -S -i --listen-local=/tmp/knx -t 1023 -b tpuart:/dev/ttyAMA0

If you have trouble to get knxd running you can also try the calimero server. I have written a script (first release expermimental) which do all tasks to install them.

Script to compile and install knxd on debian jessie/buster
Script to compile and install knxd on debian jessie/buster
install_knxd_systemd.sh
Version: 0.7.19
14.7 KiB
16933 Downloads
Details...

556 thoughts on “Raspberry Pi: EIB/KNX IP Gateway and Router with knxd”

  1. Hi, Thanks for the info
    I have a problem when I run the scrip “chmod + x ./install_knxd_systemd.sh” and “./install_knxd_systemd.sh”
    nothing appears on the console.
    I am using a RPi2 and raspbian jessie

    Thank you so much!!

      1. Hello, Thanks for your help
        This is what he writes
        root@raspberrypi:~# chmod +x ./install_knxd_systemd.sh
        root@raspberrypi:~# ls -l
        total 12
        -rwxr-xr-x 1 root root 9886 Jul 14 06:53 install_knxd_systemd.sh
        root@raspberrypi:~# ./install_knxd_systemd.sh
        root@raspberrypi:~# ls -l
        total 12
        -rwxr-xr-x 1 root root 9886 Jul 14 06:53 install_knxd_systemd.sh
        root@raspberrypi:~#

  2. hey thanks for that great script. everything runs fine the knxd deamon is running on my side but when i try to see packets on the bus i cant see anything. i did a clean install on a Raspberry 2 with Jessie. I am an absolute Linux Noob and it took me nearly 2 nights to come to this point.
    I am using an ABB USB/S 1.1 KNX Interface changed the /etc/default/knxd to the USB option. and did everything as described. do i have to set parameters for the USB Interface from ETS Side ? or is something wrong with the route ip [Route]
    Destination=224.0.23.12/32
    i set everthing there like you described for static IP configuration accept for the IP an DNS Gateway. mine is 192.168.1.100 and gateway at 192.168.1.1

    this is what i get with the command you described

    pi@raspberrypi:~ $ ps ax|grep knxd
    414 ? Ss 0:00 /usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.128 -d -D -T -R -S -i –listen-local=/tmp/knx usb:%DEVICEID%
    473 pts/0 S+ 0:00 grep –color=auto knxd
    pi@raspberrypi:~ $ knxtool vbusmonitor1 ip:localhost

    and then nothing 🙁

    do you have an idea what i can check to confirm service is running in htop it looks like everything is running fine htop is listing the knxd service.

    1. this is what eth0.network config looks like

      pi@raspberrypi:~ $ ip addr show
      1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
      inet6 ::1/128 scope host
      valid_lft forever preferred_lft forever
      2: eth0: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
      link/ether b8:27:eb:82:fb:77 brd ff:ff:ff:ff:ff:ff
      inet 192.168.1.100/24 brd 192.168.1.255 scope global eth0
      valid_lft forever preferred_lft forever
      inet6 fe80::ba27:ebff:fe82:fb77/64 scope link
      valid_lft forever preferred_lft forever

    2. Hi Philipp,

      pi@raspberrypi:~ $ ps ax|grep knxd
      414 ? Ss 0:00 /usr/local/bin/knxd -p /run/knxd/knxd.pid -eibaddr=1.1.128 -d -D -T -R -S -i -listen-local=/tmp/knx usb:%DEVICEID%
      473 pts/0 S+ 0:00 grep -color=auto knxd

      There is something wrong. %DEVICEID% as command line parameter is wrong. /usr/local/bin/knxd-findusb.sh must set the Device ID of your USB device in /etc/default/knxd .

      Can you execute

      /usr/local/bin/knxd-findusb.sh

      to see what’s happend. Whats the content of /etc/default/knxd

      cat /etc/default/knxd

      Michael

      1. Thanks for your fast reply. Yes this is what i was figuring out within the last few hours. I ran the findusb.sh and found the correct type of usb interface i am using abb. I did nothing just rebooted a few times checked knxd pid status and there it was i checked a groupwrite and the interface was blinking and the lamp turned on. Somehow i still get no response from vbusmonitor1 but some of the other busmonitor tools are working and i can check the traffic of the bus. awesome work dude !!!!

        All this is still blackmagic to me ^^ but now i connected the knxd service to fhem and can toggle the whole knx system through my ipad now. again thanks a lot for all your work realy appreciate this.

        Ah one point just to give some feedback from a linux noob point of view. Somehow your advice

        Create new file /etc/systemd/network/eth0.network. Name is not importend, just the prefix network.

        Confused me a lot and took me a whole night to figure out. I just didnt realize that you realy did a dot at the end of a sentence. I read it like i must call the file eth0.network.config or something else. The second sentence about the prefix network with again a dot at the end just confused everything for me. I think this is no prefix its an extension isnt it ? Maybe you can set this in ” ” to make everythin absolutly noob proof. But it was also the first time i was setting up a static ip on an linux system. I think everything i did the last two days was for the first time. But i learned a lot thx again. Have a nice day.

  3. Hi Michael, thanks a lot for your excelent work. I got yesterday my raspi3 and now knxd is running:-)
    Just a comment (maybe improvement). I have a USB interface, which wasn’t found by /usr/local/bin/knxd-findusb.sh (the grep didn’t work). I did the steps in your script manually and the USBID was found.
    Just change your grep to
    grep -e “^\s*KNXD_OPTIONS\=.*usb\:” /etc/default/knxd
    dont escape ^ like you did \^.

    As the device could change, e.g. when you change the USB connector, than the originally found USB device will be the wrong, but is hardcoded in /etc/defaults/knxd.
    Wouldn’t it be better to export the $USBID and just leave the variable in etc/defaults/knxd. Like this
    export USBID=$(/usr/local/bin/findknxusb | grep device: | cut -d’ ‘ -f2)

    KNXD_OPTIONS=”–eibaddr=0.1.254 -d -D -T -R -S -i –listen-local=/tmp/knx usb:$USBID”

    . /etc/defaults/knxd ; echo $KNXD_OPTIONS

    Than, the USBID can change and despite of the start script get the right ID.

    Unfortunately the knxd.service didn’t work as well. Don’t know why.
    A manually start of
    knxd –eibaddr=0.1.254 -d -D -T -R -S -i –listen-local=/tmp/knx usb:1:5:1:0:0 -p /run/knxd/knxd.pid
    works.

    1. Hi Michael,

      thank you. I fixed the bug with grep. You’re right. Just $ and ` have to escape by creating files with “cat”.

      “export USBID=$(/usr/local/bin/findknxusb | grep device: | cut -d’ ‘ -f2)

      KNXD_OPTIONS=”–eibaddr=0.1.254 -d -D -T -R -S -i –listen-local=/tmp/knx usb:$USBID”

      . /etc/defaults/knxd ; echo $KNXD_OPTIONS

      Then, the USBID can change and despite of the start script get the right ID.” => This is also a possibility. The USB device id is not hardcoded at /etc/default/knxd. In the knxd systemd service file findknxusb is called at each the service unit starts and should update /etc/default/knxd with the new USB Address.

      The problem on plugging the usb interface is that knxd have to restart each time you do such an action, because the Address is a command line parameter and could not changed for a running daemon. :-). An approach is to add a udevd rule on inserting a device. For example, if you owned a GIRA Interface add this line to /etc/udev/rules.d/90-knxusb-devices.rules

      SUBSYSTEM==”usb”, ATTR{idVendor}==”135e”, ATTR{idProduct}==”0022″, ACTION==”add”, RUN+=”systemctl restart knxd.service”

      But not 100% sure if this will work. I can’t test it because I have no USB device.

      Michael

      1. Hi Michael,
        >The USB device id is not hardcoded at /etc/default/knxd. In the knxd systemd service file findknxusb is called at each the service unit starts and should update /etc/default/knxd with the new USB Address.

        As far as I understand your script, it runs on every restart, that’s right. But the substitution in /etc/defaults/knxd can just take place once, as than the $USBID variable disapperes after the first start and your substitution wouldn’t find that string. In place of $USBID is now a different string.
        That’s why I made the above mentioned suggestion. The $USBID must be dynamic.

        At the moment I have no chance to look at your script (as I’m at work), so finally I could be wrong.

        Michael

        1. Hi Michael,

          substitution (should) is also done at every time the script runs:

          sed -e”s/usb:.*\$/usb:$USBID\”/”

          sed looks for the string “usb:Any Characters till end of line” and replaces them with usb:$USBID

          If not you found another bug 😉

          Michael

          1. No, I think you are right and I was wrong. Everything is fine then 🙂
            Thanks a lot for your excellent work!

  4. Hi Michael,
    I wonder if you could help me debug an issue I’m having. I have installed openhab with a KNX binding and your excellent knxd service on Raspberry Pi. I can connect to the knxd router from ETS4 and monitor KNX telegrams on the Pi using vbusmonitor1. However when trying to change a group address setting to turn off a light via Openhab it just doesn’t work. Everything in the logs looks ok, and I believe the configuration is correct for Openhab – I have tried various different combinations.
    Please see log snippet from openhab
    00:06:02.282 [DEBUG] [.KNXBindingDatapointReaderTask:58 ] – Autorefresh: Waiting for new item in reader queue
    00:06:02.289 [DEBUG] [b.k.i.connection.KNXConnection:296 ] – KNXBinding configuration present. Setting up KNX bus connection.
    00:06:02.295 [DEBUG] [b.k.i.connection.KNXConnection:408 ] – Not connected yet. Trying to connect.
    00:06:02.388 [INFO ] [b.k.i.connection.KNXConnection:212 ] – Established connection to KNX bus on 224.0.23.12:6720 in mode ROUTER.
    00:06:02.407 [DEBUG] [b.k.i.connection.KNXConnection:419 ] – Success: connected.
    00:06:17.520 [DEBUG] [.b.knx.internal.bus.KNXBinding:138 ] – Wrote value ‘ON’ to datapoint ‘command DP 2/0/0 light, DPT main 0 id 1.001, low pri ority’
    00:06:17.524 [DEBUG] [.b.knx.internal.bus.KNXBinding:169 ] – Received groupWrite Event.
    00:06:21.876 [DEBUG] [.b.knx.internal.bus.KNXBinding:138 ] – Wrote value ‘OFF’ to datapoint ‘command DP 2/0/0 light, DPT main 0 id 1.001, low pr iority’
    00:06:21.876 [DEBUG] [.b.knx.internal.bus.KNXBinding:169 ] – Received groupWrite Event.
    00:06:23.394 [DEBUG] [.b.knx.internal.bus.KNXBinding:169 ] – Received groupWrite Event.
    00:06:23.395 [DEBUG] [.b.knx.internal.bus.KNXBinding:138 ] – Wrote value ‘ON’ to datapoint ‘command DP 2/0/0 light, DPT main 0 id 1.001, low pri ority’
    00:06:25.157 [DEBUG] [.b.knx.internal.bus.KNXBinding:138 ] – Wrote value ‘OFF’ to datapoint ‘command DP 2/0/0 light, DPT main 0 id 1.001, low pr iority’
    00:06:25.157 [DEBUG] [.b.knx.internal.bus.KNXBinding:169 ] – Received groupWrite Event.
    00:06:26.310 [DEBUG] [.b.knx.internal.bus.KNXBinding:138 ] – Wrote value ‘ON’ to datapoint ‘command DP 2/0/0 light, DPT main 0 id 1.001, low pri ority’

    Very much hope you can help.
    Thanks – Colin

  5. Hi Michael,

    thanks for the great job! It works perfect for me and I learnt a lot.

    However, it looks like that the wireless network adapter on the Pi3 is now being deactivated and I wonder what needs to be done to get the wlan up and running again under systemd. I already spent some hours trying to find a solution but without any success.

    Can you please give some advice to a newbie?

    Best regards
    Joachim

  6. I’m running into some issues (two to be precise) as well.

    1) Knxd service is not starting (see: goo.gl/oZmxDt)
    /etc/systemd/system/multi-user.target.wants/knxd.service is there and configured as mentioned in your article. My initial idea is that there’s something wrong with the KNXD_OPTIONS environment variable, as I am able to get the knxd started by specifying the options manually and calling for instance “/usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.128 -d -D -T -R -S -i –listen-local=/tmp/knx tpuarts:/dev/ttyAMA0” via the console. Also if I do “export KNXD_OPTIONS –eibaddr=1.1.128 -d -D -T -R -S -i –listen-local=/tmp/knx tpuarts:/dev/ttyAMA0” and then call “/usr/local/bin/knxd -p /run/knxd/knxd.pid ${KNXD_OPTIONS}” through console, the knxd is starting so… Any thoughts / troubleshooting tips to pinpoint what’s happening here? “systemctl status knxd” isn’t really providing much more information other than the generic ERROR: 1/FAILED knxd not being able to start.

    2) Using knxd as an interface in ETS5
    Issue 1 aside, starting knxd manually *briefly* shows the knxd interface under discovered interfaces in ETS5 (along with Qualcomm Atheros? I think it’s the wireless network card of my laptop? weird). However selecting knxd as my interface and clicking the “Test” button results in “The interface is not reachable” (see: goo.gl/emKTDd). What is weird to me as well is that when I kill and restart knxd, the device becomes discoverable again but under a different port number (see: goo.gl/F6mDTg). Adding the interface manually under “Configured Interfaces” by providing the same details and default port 6720 doesn’t help.

    The only thing that I recall now is that I’ve set up the static IP on my raspberry pi as described in your initial article (the eibd one):

    auto eth0
    iface eth0 inet static
    address 192.168.1.31
    netmask 255.255.255.0
    gateway 192.168.1.1
    post-up route add -net 224.0.23.12 netmask 255.255.255.255 eth0
    pre-down route del -net 224.0.23.12 netmask 255.255.255.255 eth0

    It has been working flawlessly for connecting remotely to the pi through Putty. I’ll try the approach as described in the knxd article when I get back home and report back. In the meantime if you have any other suggestions / troubleshooting tips, I would be glad to hear them!

    1. Hi Nick,

      first of all please configure a static ip over systemd. What kind of Raspberry Pi are you using and how much LAN Adapters are configured?

      Can you post the content of /etc/default/knxd please.

      Your PC is in the same network/IP Range? What is the IP Address of your PC?

      What happens you try to start knxd manually

      sudo systemctl start knxd

      sudo journalctl -xn -u knxd

      Michael

  7. Hello Michael,
    I’m getting a little desperate overhere. I was using KNXD for a couple of months on my RPI3 until my USB Bus Coupler Died. I thought the easiest way is to buy the exact same bus coupler. I’m using a Hager TH101. In the beginning I was not using your script to install KNXD and it worked perfectly just compiling KNXD and PTHSEM myself. Tonight I noticed that the only thing that does work with the new buscoupler is the busmonitor. not the vbusmonitor that connects to the routermode. When I noticed this I gave it another shot and installed KNXD the way you describe above. Since my RPI3 started updating and upgrading I was a bit hopeful but after starting al services I have the exact same problem.

    When I perform knxtool busmonitor1 ip:localhost I can see my telegrams.

    When I try knxtool vbusmonitor1 ip:localhost I see nothing ..

    All settings are exactly as you described above. Do you have any clue how I can debug such issue?

    Kind regards,
    Stijn

    1. Did you solved the Problem i think i ran into the same Situation here.
      Can see Telegrams in Busmonitor but not in vbusmonitor anymore.

      I can connect via ETS. but do not see Telegrams from Lightswitches. only when i do a ETS Groupswrite or KNXD Groupswrite i am able to see those via vbusmonitor.

      1. I have a board that use a NCN5130 chip from ON Semiconductor and i think that work in SPI mode, would this work with the raspberrypi’SPI interface? and how to set up.Thanks a lot.

        Kind regards,
        Adrian

        1. Hello Adrian,

          a NCN5120 is supported by knxd:
          –enable-eibnetiptunnel enable EIBnet/IP tunneling backend
          –enable-usb enable USB backend
          –enable-ncn5120 enable NCN5120 backend
          –enable-eibnetipserver enable EIBnet/IP server frontend
          –enable-groupcache enable Group Cache (default: yes)

          maybe it works also with a NCN5130. If want to test it you must change my script and add a line to enable the NCN5120 backend. like this:

          –enable-eibnetipserver \
          –enable-groupcache \
          –enable-usb \
          –enable-ncn5120 \
          ….
          to the configure section at line 84.

          I have taken a look at the knxd source code:
          NCN5120SerialLayer2Driver::NCN5120SerialLayer2Driver (const char *dev,
          L2options *opt, Layer3 * l3)
          : Layer2::Layer2(l3, opt)
          {

          I think SPI wouldn’t work but NCN5120 and 5130 also speaks UART so you have to connect it to the serial interface of the raspberry.

          To enable the backend set
          KNXD_OPTIONS=”–eibaddr=1.1.128 -d -D -T -R -S -i –listen-local=/tmp/knx ncn5120:/dev/ttyAMA0″
          in
          /etc/default/knxd

          Michael

          1. Hi Michael:
            Thans for your help,i tested so many times folow your guide,that work with USB interface is well.but one issue is that always got a random port(the default IP Tunneling port 3671)and when I use ETS to select this Raspberrypi IP Router .the Raspberrypi IP Router is gone from the ETS’s “Discovered Interface”list and I only can use the computer’s network adapter with 224.0.23.12 to connect to the bus.

            work with the tpuarts
            I cant got any telegram from the KNX BUS,i have tested when I use a USB to TTL
            cable connect to NCN5120’uart side ,there a lot of date from the NCN5120 to the Serial Port Utility but from the raspberrypi’s side is got nothing. I’m use a raspberrypi 3B with 2016-09-23-raspbian-jessie-lite

            Regards
            Adrian

          2. Hi Adrian,

            what do mean exactly with “always got a random port(the default IP Tunneling port 3671)and when I use ETS”. Which port do you mean? The port knxd listens to?

            A NCN5120 is not a tpuart but knxd supports that chip. I have altered the script to Version 0.6.3 and added the support for the ncn5120 backend. So have to recompile the knxd by downloading and executing the script again.

            In /etc/default/knxd you have to set

            KNXD_OPTIONS=”–eibaddr=1.1.128 -d -D -T -R -S -i –listen-local=/tmp/knx ncn5120:/dev/ttyAMA0

            Michael

          3. for example:192.168.100.2:3671 for IP tunneling connect with ETS,but it got a random port like;192.168.100.2:36766 or else.

            I have seted
            KNXD_OPTIONS=”–eibaddr=1.1.128 -d -D -T -R -S -i –listen-local=/tmp/knx ncn5120:/dev/ttyAMA0″
            is that format correct? tow —

            Adrian

          4. Hi Adrian,

            192.168.100.2 is the ip address where your knxd is running?

            NXD_OPTIONS=”–eibaddr=1.1.128 -d -D -T -R -S -i –listen-local=/tmp/knx ncn5120:/dev/ttyAMA0″ yes IMOO

            Michael

          5. Hi Michael:
            actually this my setting:
            [Match]
            # You can also use wildcards. Maybe you want enable dhcp
            # an all eth* NICs
            Name=eth0
            [Network]
            #DHCP=v4
            # static IP
            # 192.168.1.1 netmask 255.255.255.0
            Address=192.168.1.198/24
            Gateway=192.168.1.1
            DNS=192.168.1.1
            # Route for Multicast Address EIB/KNX
            [Route]
            Destination=224.0.23.12/32

            when I run ps ax|grep knxd got this;
            476 pts/0 S+ 0:00 grep –color=auto knxd

            Adrian

          6. Hi Adrian,

            192.168.100.2 is the IP Address of the box where ETS is running? Then the random port makes sence. Because outgoing connections usually uses random ports (source port). The import thing is the destination port in your environment 192.168.1.198:3671.

            To check the ports to which knxd is listen to

            root@debdev:~# netstat -pln|grep knxd
            tcp        0      0 0.0.0.0:6720            0.0.0.0:*               LISTEN      1587/knxd
            udp        0      0 0.0.0.0:3671            0.0.0.0:*                           1587/knxd
            

            But it seems your knxd isn’t running:
            ps ax|grep knxd got this;
            476 pts/0 S+ 0:00 grep –color=auto knxd
            because only the grep process is listed.

            What is the output of

            journalctl -xu knxd.service
            

            Michael

          7. HI Michael;
            knxd is listen to:
            root@raspberrypi:/home/pi# netstat -pln|grep knxd
            tcp 0 0 0.0.0.0:6720 0.0.0.0:* LISTEN 448/knxd
            udp 0 0 0.0.0.0:41315 0.0.0.0:* 448/knxd
            udp 0 0 0.0.0.0:3671 0.0.0.0:* 448/knxd
            unix 2 [ ACC ] STREAM LISTENING 8857 448/knxd / tmp/knx

            That is the output of:
            root@raspberrypi:/home/pi# journalctl -xu knxd.service
            — Logs begin at Thu TIME UTC, end at Thu TIME UTC
            TIME raspberrypi systemd[1]: Starting KNX Daemon…
            — Subject: Unit knxd.service has begun with start-up
            — Defined-By: systemd
            — Support:

            — Unit knxd.service has begun starting up.
            TIME raspberrypi systemd[1]: Started KNX Daemon.
            — Subject: Unit knxd.service has finished start-up
            — Defined-By: systemd
            — Support:

            — Unit knxd.service has finished starting up.

            — The start-up result is done.
            lines 1-15/15 (END)
            — Logs begin at Thu TIME UTC, end at Thu TIME UTC. —
            TIME raspberrypi systemd[1]: Starting KNX Daemon…
            — Subject: Unit knxd.service has begun with start-up
            — Defined-By: systemd
            — Support: //lists.freedesktop.org/mailman/listinfo/systemd-devel

            — Unit knxd.service has begun starting up.
            TIME raspberrypi systemd[1]: Started KNX Daemon.
            — Subject: Unit knxd.service has finished start-up
            — Defined-By: systemd
            — Support:lists.freedesktop.org/mailman/listinfo/systemd-devel

            — Unit knxd.service has finished starting up.

            — The start-up result is done.

          8. Hi Adrian,

            ok, it looks good 🙂 Aleady recompilied with the ncn5120 backend? And whats happend now? Connection possible?

            Michael

          9. HI Michael:
            sorry,those rebort above is running in tpuarts mode!

            This is running in ncn5120 mode:

            pi@raspberrypi:~ $ ps ax|grep knxd
            476 pts/0 S+ 0:00 grep –color=auto knxd

            root@raspberrypi:/home/pi# netstat -pln|grep knxd
            root@raspberrypi:/home/pi# (got nothing)

            root@raspberrypi:/home/pi# journalctl -xu knxd.service
            — Logs begin at Thu TIME UTC, end at Thu TIME UTC. —
            Dec TIME raspberrypi systemd[1]: Starting KNX Daemon…
            — Subject: Unit knxd.service has begun with start-up
            — Defined-By: systemd
            — Support:

            — Unit knxd.service has begun starting up.
            Dec TIME raspberrypi knxd[439]: url not supported: No such file or directory
            Dec TIME raspberrypi systemd[1]: knxd.service: control process exited, code=exited status=1
            Dec TIME raspberrypi systemd[1]: Failed to start KNX Daemon.
            — Subject: Unit knxd.service has failed
            — Defined-By: systemd
            — Support:

            — Unit knxd.service has failed.

            — The result is failed.
            Dec TIME raspberrypi systemd[1]: Unit knxd.service entered failed state.

            Adrian

          10. Hi Adrian,

            have you specified the correct serial device?

            url not supported: No such file or directory

            it seems knxd could not find the serial device. How your KNXD_OPTIONS option variable looks like?

            Michael

          11. Hi Michael”
            this my configuration:
            KNXD_OPTIONS=”–eibaddr=1.1.128 -d -D -T -R -S -i –listen-local=/tmp/knx ncn5120:/dev/ttyAMA0″

            by the way,the raspberrypi’s’serial work in which mode,8bit or 9bit?

          12. Hi Adrian,

            you are using an Raspberry Pi 3. Right? There are Raspberry Pi3 Serial devices regarding the serial interface since Pi2. By default the “real” serial device is used by the bluetooth module => install_knxd_systemd.sh changes this. There is also a second serial device, called miniUART, but this cannot be used for knxd. I think the name is also changed to /dev/serial0. Check the name of the device:

            dmesg|grep tty
            dmesg|grep serial

            Michael

          13. Hi Michael
            Finally I got this worked,a big step:)for me! more details :
            i have updated image to the 2016-11-25-raspbian-jessie-lite and reinstall the Script 0.63. a little tips for the newbee like me.
            two need to be done before you install the script .
            1.enable the serial in the raspi-config and the serial port must be set to ttyS0 not ttyAMA0 on RPI3 with the latest raspbine.
            2.install rpi-update before use it:(
            a little trouble with my board that only can received date from the BUS can’t send,late I fix it I will give it a completely test.
            thank a lot for your patience to answer me and the great work!

            Best regards

            Adrian

        2. HI Michael:
          This is report with :
          root@raspberrypi:/home/pi# dmesg|grep tty
          [ 0.000000] Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm 2709.boardrev=0xa02082 bcm2709.serial=0x30944112 smsc95xx.macaddr=B8:27:EB:94:41:12 bcm2708_fb.fbswap=1 bcm2709.uart_clock =48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 enable_uart=1 dtoverlay=pi3-disable- bt console=tty1 console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
          [ 0.001357] console [tty1] enabled
          [ 0.282638] console [ttyS0] disabled
          [ 0.285078] 3f215040.uart: ttyS0 at MMIO 0x3f215040 (irq = 59, base_baud = 31250000) is a 16550
          [ 1.024337] console [ttyS0] enabled
          [ 2.941084] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
          [ 4.055001] systemd[1]: Expecting device dev-ttyS0.device…
          [ 4.748102] systemd[1]: Starting system-getty.slice.
          [ 4.755856] systemd[1]: Created slice system-getty.slice.
          [ 4.763641] systemd[1]: Starting system-serial\x2dgetty.slice.
          [ 4.772323] systemd[1]: Created slice system-serial\x2dgetty.slice.

          and :
          root@raspberrypi:/home/pi# dmesg|grep serial
          [ 0.000000] Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm 2709.boardrev=0xa02082 bcm2709.serial=0x30944112 smsc95xx.macaddr=B8:27:EB:94:41:12 bcm2708_fb.fbswap=1 bcm2709.uart_clock =48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 enable_uart=1 dtoverlay=pi3-disable- bt console=tty1 console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
          [ 4.763641] systemd[1]: Starting system-serial\x2dgetty.slice.
          [ 4.772323] systemd[1]: Created slice system-serial\x2dgetty.slice.

          1. Hi Adrian

            /dev/ttyAMA0 is the right one. Please check /etc/default/knxd, reboot and check if knxd is starting.

            Michael

  8. Hi Michael,

    great site and want to thank you for your work. Very nice your´re sharing this. Unfortunately I am stuck. I tried a lot the last 10 hours but can´t connect to the knx bus.
    I have a raspi b, the siemens AB12 buscoupler and ADUM1201ARZ. I installed Jessie lite,
    followed exactly your instructions and to be sure, twice (clean install). No error was shown while install. I can see the process but after calling “knxtool vbusmonitor1 ip:localhost” ist happens nothing. I tried to enable logging but the file remains zero byte.

    Sylog says:
    /var/log/syslog:Nov 26 21:04:41 raspberrypi knxd[417]: Layer 0(01A462B0,5839F8E9) Open
    /var/log/syslog:Nov 26 21:04:41 raspberrypi knxd[417]: Layer 0(01A462B0,5839F8E9) Openend
    /var/log/syslog:Nov 26 21:04:41 raspberrypi knxd[417]: Layer 0(01A56C50,5839F8E9) Open
    /var/log/syslog:Nov 26 21:04:41 raspberrypi knxd[417]: Layer 0(01A56C50,5839F8E9) Openend
    /var/log/syslog:Nov 26 21:04:41 raspberrypi knxd[417]: Layer 2(01AA8620,5839F8E9) Open
    /var/log/syslog:Nov 26 21:04:41 raspberrypi knxd[417]: Layer 2(01AA8620,5839F8E9) Openend
    /var/log/syslog:Nov 26 21:04:41 raspberrypi knxd[417]: Layer 2(01AA8620,5839F8E9) open-reset(001): 01

    and repeating.

    I only added the logging parameter in knxd conf.

    PS says:
    425 ? Ss 0:00 /usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.128 –daemon=/tmp/knxd.log –trace=5 -d -D -T -R -S -i –listen-local=/tmp/knx tpuarts:/dev/ttyAMA0
    466 pts/0 S+ 0:00 grep knxd

    Nothing. Any help would be appreciated. What else can i check for errors.

    Regards
    Vince

    1. I tested some more. After playing and starting ETS5.5.1 some times, i could see for some seconds a found interface at 1.1.128 an my IP. Test told me to be Ok, choosing the interface the same. But, right after clicking onto Busmonitor oder looking for devices in programing mode, knxd stopped.

      Nov 27 14:57:10 raspberrypi systemd[1]: Started KNX Daemon.
      root@raspberrypi:/home/pi# systemctl status knxd.service
      ● knxd.service – KNX Daemon
      Loaded: loaded (/lib/systemd/system/knxd.service; enabled)
      Active: active (running) since Sun 2016-11-27 14:57:10 UTC; 31s ago
      Process: 517 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)
      Process: 513 ExecStartPre=/usr/local/bin/knxd-findusb.sh (code=exited, status=0/SUCCESS)
      Main PID: 518 (knxd)
      CGroup: /system.slice/knxd.service
      └─518 /usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.128 -d -D -T -R -S -i –listen-local=/tmp/knx tpuarts:/dev/ttyAMA0

      Nov 27 14:57:10 raspberrypi systemd[1]: Started KNX Daemon.
      root@raspberrypi:/home/pi# systemctl status knxd.service
      ● knxd.service – KNX Daemon
      Loaded: loaded (/lib/systemd/system/knxd.service; enabled)
      Active: failed (Result: signal) since Sun 2016-11-27 14:57:48 UTC; 7s ago
      Process: 517 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)
      Process: 513 ExecStartPre=/usr/local/bin/knxd-findusb.sh (code=exited, status=0/SUCCESS)
      Main PID: 518 (code=killed, signal=ABRT)

      Nov 27 14:57:10 raspberrypi systemd[1]: Started KNX Daemon.
      Nov 27 14:57:48 raspberrypi systemd[1]: knxd.service: main process exited, code=killed, status=6/ABRT
      Nov 27 14:57:48 raspberrypi systemd[1]: Unit knxd.service entered failed state.
      root@raspberrypi:/home/pi#

      Btw. im using ETS on my Mac in a VM, network is in bridged mode.

      Any ideas ?

    2. Hi Vince

      another post describes also issues with knxtool vbusmonitor1. Habe you also tried

      knxtool busmonitor1 ip:localhost

      ? Your hardware is working correctly?

      Michael

    3. Hi Michael,

      oder können wir auch auf Deutsch ?
      I tried busmonitor parameter without v. I dunno if hardware works. KNX aktor, power supply and Siemens bus coupler and ADUM1201 are new. I ordered now an scn000.02 IP interface from MDT at voltus. Tomorrow I will try one last time with a backup raspberry pi 2. I don´t unterstand why knxd closes right after confirming the found interface with “choose/auswählen” in ETS5.5 (5.05. is acting same way).
      Thanks for your reply.

      Ciao,
      Vince

      1. Hi Vince,

        don´t unterstand why knxd closes right after confirming the found interface with “choose/auswählen” => Starte den knxd auf der command line und nicht als daemon um mehr Details zu bekommen:

        # Make root
        sudo su
        # Stop knxd
        systemctl stop knxd.service
        # Kill processes if exist
        killall knxd
        # Switch to User knxd. Start Shell as user
        su knxd -s /bin/sh
        # knxd in foreground
        /usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.128 -D -T -R -S -i –-trace=5 –error=5 –listen-local=/tmp/knx tpuarts:/dev/ttyAMA0

        und teste anschließend nochmal die Verbindung von ETS aus.

        eibd hatte sich wenn das Interface nicht verfügbar war nicht beendet.

        Michael

        1. Guten Abend Michael,

          leider nicht möglich. Jessie ist noch frisch und unverändert. Aufruf der URL sagt in der knxd shell invalid url. Wenn ich — statt – vor eibaddr und error=5 setze, bekomme ich “initialisation of the knxd inet protocol failed”. Also so:

          /usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.128 -D -T -R -S -i –-trace=5 –error=5 –listen-local=/tmp/knx tpuarts:/dev/ttyAMA0

          Danke für Deine Unterstützung bisher.

          Gruß
          Vince

          1. Hallo Vince,

            ist es dann bei dem Fehler “initialisation of the knxd inet protocol failed” geblieben? Also korrekter Aufruf wäre

            /usr/local/bin/knxd -p /run/knxd/knxd.pid --eibaddr=1.1.128 -D -T -R -S -i --trace=5 --error=5 --listen-local=/tmp/knx tpuarts:/dev/ttyAMA0
            

            Michael

  9. Hello Michael,

    I have a question, a raspberry and your script knxd can replace an IP KNX gateway ?

    or is it necessary to buy other things ?

    Thanks for your feed-back

    Laurent Friboulet

  10. Hi
    I’m trying to install the daemon on Jessie 8 Light version (to be combined Jeedom) but I can not. There are incompatibilities with this version of the OS?
    thank you

    1. Hi pete68,

      please read comment from Adrian, maybe you ran into the same problem.

      I never tried it on Jessie Light. Any error messages form the script?

      Michael

      1. Hmmm … I can not even Jessie Full. With Jessie and Knx was easier!
        just a question!
        since we all have problems, it would not be logical that someone who is able to install knxd share the image?

      2. I’m back!
        I managed to install knxd du jessie, but I still have a problem, I’m trying to configure Jeedom to interface to knxd just installed. Unfortunately the Jeedom Plugin KNX does not provide the serial interface AMA0 and expects the connection to an external router KNX.
        I think it can “confuse” Jeedom into believing they are connected to an external router, however, giving an ip address of that raspberry it’s running knxd.

        Basically, if you’ve installed knxd with address on raspberry:

        Address = 192 168 200 201/24
        Gateway = 192.168.200.1
        DNS = 192.168.200.1
        [Route]
        Destination = 224.0.23.12 / 32

        which address should I provide Jeedom to link to this fictitious router (which runs on the same Raspberry)?

        thanks for your patience

        1. Hi pete68,

          you cannot use a serial interface from more then one process.

          We’re right you have to connect via network. If Jeedom runs at the same host you can use 127.0.0.1 (loopback/localhost interface) Port 6720 or the public IP Address 192 168 200 201.

          Michael

  11. HI Michael
    Good news is that ncn5120 backed finally got worked,a big step for me(:

    more details:
    I have updated the baspbine to the latest version 2016-11-25-raspbian-jessie-lite
    nad reinstalled the script 0.63

    a little tip for the newbee like me.
    1.before install the script you must have enabled the serial port in the raspi-config and the correct is ttyS0 not the ttyAMA0 on a raspberrypi3

    2.install rpi-update before use it ):

    now I can monitor the group telegram but can’t sent any to the bus.I have checked the pi’s side is worked well, I think this is due to my hardware’s problem. when I solved this issue i will give it a complete test.and I expect it will work in SPI(:

    a lot thanks for your patience to help me and great work.

    Best regard !

    Adrian

  12. Hallo Michael,

    ich versuche mittels deines Scripts den KNXD unter Ubuntu (aktuelle Server LTS) ans Laufen zu bekommen; leider bricht er mir die eigentliche KNXD-Installation bzw. Compilierung ab mit
    checking systemd/sd-daemon.h usability… no
    checking systemd/sd-daemon.h presence… no
    checking for systemd/sd-daemon.h… no
    ./configure: line 17574: syntax error near unexpected token `SYSTEMD,’
    ./configure: line 17574: ` PKG_CHECK_MODULES(SYSTEMD, libsystemd-daemon)’
    make: *** No rule to make target ‘clean’. Stop.

    Ich vermute mal, dass “er” es nicht mag, dass es unter Ubuntu keinen Systemd mehr gibt, oder?

    Hast Du mir einen Tipp?

    Danke und Grüße
    Hans

    1. Grund gefunden – es fehlten Libraries, die ich mit dpkg identifizieren konnte:

      dpkg-checkbuilddeps: error: Unmet build dependencies: libusb-1.0-0-dev (>= 1.0.10) pkg-config dh-systemd | base-files (<= 1.0.10) pkg-config dh-systemd hat das Problem gelöst

  13. Hi,

    nice description … I like to setup a raspberry (still connected to a heater) as an KNX forwarding device, because I have WIFI available there only.

    Main KNX Installation KNX IP Router Raspberry secondary KNX Installation

    Is this possible to use a local FT1.2 KNX Interface to forward all telegrams to the secondary bus?

    Grüße,
    Nils

    Any ideas regarding this?

    Cheers,
    Nils

  14. Hey,

    your script no longer seems to work since knxd moved to 0.12. Could you please check this? Would be great.

    I came across the issue when using openhabian’s config option “Install KNX” which internally uses your script. This fails due to the above mentioned reason. At least that’s my first guess.

    After adding ‘git checkout tags/v0.10.18 -b install’ after ‘git clone … cd knxd’ in your script, the installation succeeds. However, I guess it’s better to migrate your script to knxd 0.12 (no pthsem dependency).

    Are there any chances that you “fix” this soon? I guess a lot of people are stumbling over this when they want to try out the new openhab 2.0 release via openhabian (+KNX)

    By the way: Thank you for your great work!

  15. Hi,

    I have problems with the install. I have tested it with a few fresh installation on Rasp 3. When I execute the script it ends with message:

    configure: error: libev not found
    make: *** No rule to make target ‘clean’. Schluss.

    After that there is no knxd folder and I cannot find it anywhere:

    pi@raspberrypi:~ $ ls -l /usr/local/bin
    insgesamt 8
    -rwxr-xr-x 1 root staff 408 Jan 24 22:12 knxd-findusb.sh
    -rwxr-xr-x 1 root staff 3973 Jan 24 22:09 pthsem-config

    Is there missing a requirement? Hopefully someone can give me hint. Thanks!

  16. Hi,

    script always stops with:

    checking for LIBUSB… yes
    EMI because of usb
    checking for ev_run in -lev… no
    configure: error: libev not found
    make: *** No rule to make target ‘clean’. Stop.

    tried: apt-get install libev-dev
    didn’t help

    Thx

  17. Hey Michael.

    After spending several hours with knxd I’m here again asking you for help because I don’t get any further.

    My setup:

    – Raspberry 3
    – Busware TUL flashed with “transparent TPUART” firmware plugged into RPI3 and connected to KNX bus (done by my electrician, so should be okay)
    – clean install of openHABian (raspbian + openhab2 + …)
    – nothing else has been done (neither on software nor on hardware side)

    My expectations:

    – install “knxd” by simply executing “./install_knxd_systemd.sh” (nothing else)
    – after successful installation “knxtool vbusmonitor1 ip:localhost” on my pi should list some KNX packages when I turn on/off my lights, shutters, …

    Real world:

    – I need to adjust the install script to successfully install knxd 0.10.18 or 0.11.18 instead of master (fails)
    – Even after successful installation of knxd the command “knxtool vbusmonitor1 ip:localhost” on my pi never brings any output

    Questions?

    – Are my expectations wrong?
    – Is there anything I misundestood?
    – Is the “transparent TPUART” firmware the correct one or do I have to use the “FT1.2 serial port BCU” firmware (IMHO not, but I also tried this without success)
    – “knxtool vbusmonitor1 ip:localhost” SHOULD list something when I switch lights, right?

    Thank you so much.

  18. Sorry for spamming you. Just wanted to let you know that it’s working as expected now.

    What I did:
    – new clean install of openHABian
    – build the latest source code of knxd (0.12.x) exactly as detailed on their Github homepage.
    – followed the stuff in section “Adding a TPUART USB interface”
    – modified /etc/knxd.conf
    – reboot

    Done. I can see the packages with knxtool. Perfect. Now I can move on …

  19. Hallo,

    ich habe das KNXD ueber die aktuelen OpenHABianPi Release 2.0 installiert (Raspian Pi 2B GNU/Limux 8 )jessie
    Angebunden werden soll Busch Jaeger Powernet ueber USB
    Dort wird die Installation auch ueber das Script michlstechblog.info/blog/download/electronic/install_knxd_systemd.sh
    Installiert, allerdings funktioniert die USB Port Erkennung danach nicht, weiterhin fehlen auch die knxtools , Dort sind nur folgende Programme:

    [19:22:55] root@openHABianPi:/usr/local/bin# ls
    knxd-findusb.sh openhabian-config pthsem-config

    Der Dienst scheint aber vorhanden zu sein:
    [19:22:56] root@openHABianPi:/usr/local/bin# ps -ax | grep knxd
    1549 pts/0 S+ 0:00 grep –color=auto knxd

    Auch ein manuelle Nachinstallieren über das install_knxd_systemd.sh Script brachte nichts

    Die letzten Meldungen des Script:

    checking whether __APPLE__ is declared… no
    checking for gethostbyname_r… yes
    EMI because of ft12
    checking for LIBUSB… yes
    EMI because of usb
    checking for ev_run in -lev… no
    configure: error: libev not found
    make: *** No rule to make target ‘clean’. Stop.

    Irgend jemand eine Idee?

    Im /var/log/messages wird das USB Device wohl erkannt…
    Jan 26 21:29:04 openHABianPi kernel: [ 3.737192] usb 1-1.5: new full-speed USB device number 4 using dwc_otg
    Jan 26 21:29:04 openHABianPi kernel: [ 3.857222] usb 1-1.5: New USB device found, idVendor=145c, idProduct=1330
    Jan 26 21:29:04 openHABianPi kernel: [ 3.859061] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    Jan 26 21:29:04 openHABianPi kernel: [ 3.860873] usb 1-1.5: Product: KNX-USB Interface (Flush mounted)
    Jan 26 21:29:04 openHABianPi kernel: [ 3.862714] usb 1-1.5: Manufacturer: Busch-Jaeger Elektro GmbH
    Jan 26 21:29:04 openHABianPi kernel: [ 3.880048] hid-generic 0003:145C:1330.0001: hiddev0,hidraw0: USB HID v1.01 Device [Busch-Jaeger Elektro GmbH KNX-USB Interface (Flush mounted)] on usb-3f980000.usb-1.5/input0

    Gruß Boris

  20. Hi Michael,
    danke für die echt ausführliche Beschreibung!

    Leider beendet sich das Installskript mit folgenden Fehler:
    checking whether SA_SIZE is declared… no
    checking whether __FreeBSD__ is declared… no
    checking whether __APPLE__ is declared… no
    checking for gethostbyname_r… yes
    EMI because of ft12
    checking for LIBUSB… yes
    EMI because of usb
    checking for ev_run in -lev… no
    configure: error: libev not found
    make: *** No rule to make target ‘clean’. Stop.

    Ich habe bereits mehrfach Jessie neu aufgesetzt und nichts weiter als die oben gelisteten Punkte ausgeführt.
    Eine Idee?

    Es ist ein Pi3

    Danke und Grüße
    Marc

        1. Hi Marc,

          have you tried

          knxtool busmonitor1 ip:localhost

          instead of

          knxtool vbusmonitor1 ip:localhost ?

          I think vbusmonitor1 has some problems.

          Michael

          1. Hi Michael,
            i have flashed my BUSSER and use tpuarts:/dev/ttyACM0 instead of tpuarts:/dev/ttyAMA0.

            Now i see traffic on my bus.

            Thanks
            Marc

  21. Hallo,

    ich habe alles komplett nach der Anleitung von Boerni aufgesetzt und möchte den KNXD einfach auf mein bereits mit dem Homeserver laufendendes Busch Jaeger IP Gateway connecten lassen.

    Leider kommt bei jedem Schaltversuch immer nur folgende Fehlermeldung:

    Feb 2 19:41:31 raspberrypi homebridge[998]: [2017-02-02 19:41:31] [homebridge-knx.KNX] DEBUG got dest=4622
    Feb 2 19:41:31 raspberrypi homebridge[998]: [2017-02-02 19:41:31] [homebridge-knx.KNX] [ERROR] knxwrite:openTGroup: Error: request invalid

    hab schon massig KNX_Opts versucht – aktuell ist diese hier aktiv:

    KNXD_OPTS=”-e 1.7.199 -D -T -R -S”

    Fehlermeldung ist aber immer die gleiche – egal welche Opts ich setze.
    IP Gateway hat die IP 192.168.0.200

    Bin für jede Hilfe sehr dankbar !

    1. Hi Oliver,

      was heißt Schaltversuch? Welche knxd Installation verwendest Du? KNXD_OPTS deutet nicht auf mein Installscript hin. Weche knxd/knxtool Version ist installiert? Wie ist die komplette knxd Konfig?

      Grüße Michael

      1. The same error when i run the status of homebridge:
        pi@raspberrypi:~ $ sudo systemctl status homebridge
        ● homebridge.service – Node.js HomeKit Server
        Loaded: loaded (/etc/systemd/system/homebridge.service; enabled)
        Active: active (running) since Mon 2017-02-13 14:10:25 MSK; 3min 52s ago
        Main PID: 661 (homebridge)
        CGroup: /system.slice/homebridge.service
        └─661 homebridge

        Feb 13 14:12:27 raspberrypi homebridge[661]: ================================
        Feb 13 14:12:27 raspberrypi homebridge[661]: [2/13/2017, 2:12:27 PM] [homebridge-knx.KNX] DEBUG got dest=4103
        Feb 13 14:12:27 raspberrypi homebridge[661]: [2/13/2017, 2:12:27 PM] [homebridge-knx.KNX] [ERROR] knxwrite:openTGroup: Error: request invalid
        Feb 13 14:12:28 raspberrypi homebridge[661]: —iterating——————–
        Feb 13 14:12:28 raspberrypi homebridge[661]: address: 2/0/7
        Feb 13 14:12:28 raspberrypi homebridge[661]: reversed: false
        Feb 13 14:12:28 raspberrypi homebridge[661]: dptype: DPT1
        Feb 13 14:12:28 raspberrypi homebridge[661]: ================================
        Feb 13 14:12:28 raspberrypi homebridge[661]: [2/13/2017, 2:12:28 PM] [homebridge-knx.KNX] DEBUG got dest=4103
        Feb 13 14:12:28 raspberrypi homebridge[661]: [2/13/2017, 2:12:28 PM] [homebridge-knx.KNX] [ERROR] knxwrite:openTGroup: Error: request invalid

        I have to say that first i installed your new knxd (v0.7.4), got it worked with my ABB USB/S 1.1 and after that i installed homebridge-knx from this page:
        boernyblog dot de/raspberry-pi-3-als-knx-bridge-fuer-ios-homekit/
        and it seems that they do not want to work together.
        Commands from HomeKit dont go to the knxd. Certainly, HomeKit can not get the status of any lamp.
        There is a 4-th day of my battle with the homebridge-knx 🙂

          1. Hi Tim,

            I altered the script. Master branch is currently under heavy development and unstable. The script checks out v0.12 by default.

            Michael

        1. Hi Tim,

          I think this issue is not knxd related. Your knxd is running and your config is ok? Can you post the homebridge knxd config the device config of 2/0/7?

          Have you tried to query the group address with knxtool?

          Michael

          1. Hi Michael!
            Thank your for your replay!
            My config for the lamp:
            {
            “knxd_ip”: “192.168.0.31”,
            “knxd_port”: 6720,
            “AllowKillHomebridge”: true,
            “Devices”: [
            {
            “DeviceName”: “Lamp”,
            “Services”: [
            {
            “ServiceType”: “Lightbulb”,
            “ServiceName”: “WorkTable”,
            “Characteristics”: [
            {
            “Type”: “On”,
            “Set”: [
            “2/0/7”
            ],
            “Listen”: [
            “2/2/6”
            ]
            }
            ]
            }
            ]
            }
            ]
            }
            Yes. i’ve tried to control the lamp with knxtool. It’s ok, only if i stopped the homebridge service. Overwise, it seys folowing:
            pi@raspberrypi:~ $ sudo knxtool groupswrite ip:localhost 2/0/7 0
            Connect failed: Connection reset by peer
            pi@raspberrypi:~ $ sudo systemctl stop homebridge
            pi@raspberrypi:~ $ sudo knxtool groupswrite ip:localhost 2/0/7 0
            Send request
            pi@raspberrypi:~ $ sudo knxtool groupswrite ip:localhost 2/0/7 1
            Send request
            pi@raspberrypi:~ $
            I guess i sow somewhere command “knxtool groupswrite” without “ip:localhost”.
            One more thing. I found that: github dot com/snowdd1/homebridge-knx/issues/80

          2. Hi Tim,

            as written in my previous post the homebridge-knx maintainer have something to do 🙂

            Yes. i’ve tried to control the lamp with knxtool. It’s ok, only if i stopped the homebridge service. Overwise, it seys folowing:
            pi@raspberrypi:~ $ sudo knxtool groupswrite ip:localhost 2/0/7 0

            => There is a new option in knxd which assigns an individual KNX Adresse to each connected client. If have set this to just one:

            –client-addrs=1.1.129:1

            may be when you increase it to 2 or more you do not have to stop the homebridge service to use knxtool and homebridge together:

            –client-addrs=1.1.129:4

  22. Hi

    using: knxtool busmonitor1 ip:localhost
    brings: knxtool: error while loading shared libraries: libeibclient.so.0: cannot open shared object file: No such file or directory

    Why does libeibclient.so.0 not exit ? How to Install it?
    THX
    Roland

    1. Hi Roland,

      the reason is the switch from static to dynamic linked binaries. Debian is not looking into /usr/local/lib for libraries.

      Copy the following lines into a shell:

      cat > /etc/ld.so.conf.d/knxd.conf <

  23. OK, this is a stupid question from the current maintainer of knxd.

    What is wrong with installing knxd via the .deb file it creates? That’d install libeibclient.so.0 to /usr/lib where it’ll be found without playing with ld.so.conf, and register dependencies like libev.

    Also, knxd already comes with a working systemd script.

    Also, “-b usb:” should be sufficient. No need to hard-code the device’s bus ID (which may change).

    1. Why would you need to create a pid file?
      Don’t add knxd to dialout, fix permissions with udev instead. (my personal opinion)
      You still have a –with-pth option in your configure call.

      I’ll add your USB rules to the udev file that’s shipped with knxd.

      1. Hi Matthias,

        thanks for your comments:-)

        The script has it origins in compiling and installing eibd at once. May be some things are not up to date what’s currently possible with knxd 🙂

        What is wrong with installing knxd via the .deb file it creates? => Well I’ll give it a try. Currently my time is really rare.

        “-b usb:” should be sufficient. => Ok, I’ll add this to /etc/default/knxd as an option example. I don’t know that the ID is not needed anymore. However the device id isn’t hardcoded. It is determined by findknx-usb and /etc/default/knxd is changed before knxd starts. But the smartest way is when knxd finds the device itself 🙂

        libeibclient.so.0 to /usr/lib => Because I strictly want to isolate the debian system files from self installed binaries. Another possibility is a symink from /usr/local/lib/libeibclient.so.0 to /usr/lib

        Don’t add knxd to dialout, fix permissions with udev instead. (my personal opinion) => My approach is keep it simple and stupid 🙂 The permissions (group dialout) on the serial device(s) are already in place and serial devices are usually very static (like ttyAMA0 of the Raspberry). In my opinion udevd is oversized for that case.

        You still have a –with-pth option in your configure call. => I remove it

        Why would you need to create a pid file? => Because I compiled knxd without direct systemd support. Some earlier version of knxd aborted compiling with builtin systemd support. To control the daemon by systemctl and systemd I need the pid file.

        I really appreciate your work. Thank you!

        I think most guys which want to use knxd have less experience in Linux Systems. They need a “one shot” solution (in case of the raspberry: installing/compiling knxd, modifing /boot/cmdline, …..) to get knxd running. May be this is an option for future releases of knxd to provide some platform specific scripts. This would make my script no longer necessary 😉 If you are intressent I can spend some lines code 🙂

        Michael

  24. Thank you for all your work on this! I am using your latest script from github and it fails while building:

    In file included from ncn5120.cpp:23:0:
    ncn5120.h:36:8: error: extra qualification ‘NCN5120SerialLayer2Driver::’ on member ‘setstate’ [-fpermissive]
    void NCN5120SerialLayer2Driver::setstate(enum TSTATE state);
    ^
    In file included from ncn5120.h:24:0,
    from ncn5120.cpp:23:
    tpuartserial.h: In member function ‘virtual void NCN5120SerialLayer2Driver::setstate(TSTATE)’:
    tpuartserial.h:36:8: error: ‘virtual void TPUARTSerialLayer2Driver::setstate(TSTATE)’ is private
    void setstate(enum TSTATE state);
    ^
    ncn5120.cpp:66:47: error: within this context
    TPUARTSerialLayer2Driver::setstate(new_state);
    ^
    ncn5120.cpp:66:48: error: expected ‘}’ at end of input
    TPUARTSerialLayer2Driver::setstate(new_state);
    ^
    Makefile:452: recipe for target ‘ncn5120.o’ failed
    make[3]: *** [ncn5120.o] Error 1
    make[3]: Leaving directory ‘/root/knxdbuild/knxd/src/backend’
    Makefile:385: recipe for target ‘all-recursive’ failed
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory ‘/root/knxdbuild/knxd/src’
    Makefile:434: recipe for target ‘all-recursive’ failed
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory ‘/root/knxdbuild/knxd’
    Makefile:369: recipe for target ‘all’ failed
    make: *** [all] Error 2

    Any advice on what I can do to fix this is appreciated!

  25. Hello!
    Almost a week i’m trying to set up the homebridge-knx on Raspberry Pi3.
    Found your manual. Thank you so much!
    Unfortunately i got the error:

    Making install in tools
    make[2]: Entering directory ‘/root/knxdbuild/knxd/tools’
    make[3]: Entering directory ‘/root/knxdbuild/knxd/tools’
    make[3]: Nothing to be done for ‘install-exec-am’.
    make[3]: Nothing to be done for ‘install-data-am’.
    make[3]: Leaving directory ‘/root/knxdbuild/knxd/tools’
    make[2]: Leaving directory ‘/root/knxdbuild/knxd/tools’
    make[1]: Leaving directory ‘/root/knxdbuild/knxd’
    chmod: cannot access ‘/usr/local/bin/knxd-findusb.sh’: No such file or directory
    root@raspberrypi:/home/pi#

    on the clean system twice. So, i dont know, if the script finished correctly. And i dont have /usr/local/bin/knxd-findusb.sh
    How can i configure my ABB USB/S 1.1 in this case?
    Thank you in advance!

  26. Dear Michael,

    as a complete noob to the field of KNX/Raspberry, please apologize my silly questions in advance …

    I am trying to setup openHABian (running on a Pi3) to connect to my Hager USB interface. Following your excellent script and instructions, the installation (install_knxd_systemd.sh) script stopped when trying to execute /usr/local/bin/knxd-findusb.sh: actually, there is no such file in the directory. However, since an executable named findknxusb is present, I changed the installation script correspondingly and re-started it. After commenting another line (useradd knxd failed since this user was already known), the installation script completes successfully and findknxusb correctly identifies my Hager interface (device: 1:4:1:0:0 Hager…).

    However, after rebooting, there is no knxd service running. And listening to the bus using knxtool busmonitor1 ip:localhost fails with the error “Connection refused”. All installation steps took place with superuser privileges, though.

    Any idea what I am doing wrong …?

    Thanks & best regards,

    Thorsten

    1. P.S: When manually starting the knxd (/usr/local/bin/knxd -p /run/knxd/knx.pid –eibaddr=1.1.128 -D -T -R -S -i –trace=5 –error=5 –listen-local=/tmp/knx usb:%DEVICEID%, as described in one of the previous comments), it is successfully tracing EIB activity! That’s my personal glimpse of light for today 🙂

      1. Hi Thorsten,

        when you start knxd manually, you do this as which user? Command line changed in newer versions of knxd. Try the following cmommands to start as user knxd(like daemon also run)

        sudo su -s/bin/bash knxd
        /usr/local/bin/knxd –eibaddr=1.1.128 –client-addrs=1.1.129:1 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:

        May be if you start knxd as root you habe to manually remove /tmp/knx otherwise you will have no permissions with user knxd.

        When knxd does not start at boot time. What are the log entries about knxd:

        sudo journalctl -u knxd.service

        Michael

        1. Hi Michael,

          many thanks for your ultra-fast response!

          Immediately after booting, the log entries (journalctl -u knxd.service) read as follows:
          — Logs begin at Mon 2017-02-13 18:11:18 CET, end at Mon 2017-02-13 18:13:57 CET. —
          Feb 13 18:12:23 openHABianPi systemd[1]: Starting KNX Daemon…
          Feb 13 18:12:24 openHABianPi knxd[388]: initialization of the EIBnet/IP server failed: No such device
          Feb 13 18:12:24 openHABianPi systemd[1]: knxd.service: control process exited, code=exited status=1
          Feb 13 18:12:24 openHABianPi systemd[1]: Failed to start KNX Daemon.
          Feb 13 18:12:24 openHABianPi systemd[1]: Unit knxd.service entered failed state.

          Starting the knxd service as user knxd following your description succeeds, though! Afterwards, knxtool busmonitor1 ip:localhost appears to work and starts tracing the EIB activity.

          So apparently my problem boils down to an issue related to the knxd configuration at boot time? Is the missing bash script knxd-findusb.sh somehow related to this?

          Thanks,
          Thorsten

          P.S.: I immediately checked that the USB is configured in my /etc/bin/knxd:

          # Command line parameters for knxd. TPUART Backend
          # Serial device Raspberry
          # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:1 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyAMA0″
          # Serial device PC
          # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:1 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyS0″
          # Tunnel Backend
          # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:1 -d -D -T -R -S -i –listen-local=/tmp/knx -b ipt:192.168.56.1″
          # USB Backend
          KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:1 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:”

          1. Hi Thorsten,

            it seems the Network isn’t ready when knxd tries to start. Have you set a static IP Address? What happens when you boot your Raspberry and try the systemd method to start knxd manually:

            sudo systemctl start knxd.service

            Michael

          2. Hi Michael,

            ah, we are getting closer! Manually starting the knxd service (using exactly the command you suggested) works without problems.

            Here is the point: yes, my Raspberry does have a static IP address. BUT: a) the PI3 connects to my router using Wifi (no LAN connection) and b) it’s the router (a Fritz!Box) which assigns the static IP (thought that would be easiest and safest way). So one could at least imagine that the IP gets assigned only after (!) the system tries to start knxd.

            Looks like I have to figure out how to delay the start of knxd until Wifi is up and connected?

            Thorsten

          3. Hi Michael,

            bad luck: looks like I completely messed up the network configuration when trying to set up a static IP 🙁 – currently, the Raspberry does neither connect to LAN nor to Wifi. Getting this fixed might take a few days: I don’t have a USB keyboard available, so I will probably re-install openHabian from scratch. Regarding the Wifi setup: the openHabian configuration includes a corresponding option, which is what I used.
            I will let you know how this proceeds …

            Thorsten

          4. Hi Michael,

            just a brief update: success! After a) setting up my PI3 from scratch (openHABian), including b) customized Wifi setup according to your instructions, c) assigning a static IP following your guide and d) running through your setup instructions (again), knxd starts up successfully when booting the PI, connects to the EIB via the Hager USB interface and readily monitors bus traffic. ETS4 recognizes the knxd interface, and the integrated bus-monitor works. Yes 🙂 🙂 :)!

            openHAB(2) might still require some configuration (it does not show the knx binding in the Inbox after installation of the corresponding addon), but that’s probably a different story … If you know of any links to noob-proof setup instructions, please let me know!

            Thanks again for your great support and excellent blog!

            Thorsten

          5. Hi Thorsten,

            first thank you for all the effort you put into this!
            I’ve installed knxd on a fresh debian stretch install on a rpi2. I’ve not setup the static IP (yet, last time I tried something went wrong), but unlike Michael, I cannot even start knxd with the manual command. I get a timeout (see below). FYI, at some point I could see that knxd had correctly recognised my GIRA USB interface. Anything I might try?

            root@raspberrypi:/home/pi# sudo systemctl start knxd.service
            Job for knxd.service failed because a timeout was exceeded.
            See “systemctl status knxd.service” and “journalctl -xe” for details.
            root@raspberrypi:/home/pi# service knxd status
            ● knxd.service – KNX Daemon
            Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
            Active: failed (Result: timeout) since Fri 2017-08-25 17:00:07 UTC; 36s ago
            Process: 520 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)

            Aug 25 16:58:37 raspberrypi systemd[1]: Starting KNX Daemon…
            Aug 25 17:00:07 raspberrypi systemd[1]: knxd.service: Start operation timed out. Terminating.
            Aug 25 17:00:07 raspberrypi systemd[1]: Failed to start KNX Daemon.
            Aug 25 17:00:07 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
            Aug 25 17:00:07 raspberrypi systemd[1]: knxd.service: Failed with result ‘timeout’.

            Thank you!

          6. Hi Thorsten,

            I have now managed to set the static IP:
            I needed to change Name=eth0 to the name of the interface provided by “ifconfig”.

            However my problem persists, also when runing the suggest command:

            knxd@raspberrypi:/home/pi$ /usr/local/bin/knxd –eibaddr=1.1.128 –client-addrs=1.1.129:1 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:1:4:1:0
            I don’t know of options for –eibaddr=1.1.128
            E00000055: [ 1:main] There is no KNX addr= in section ‘main’.
            F00000000: [ 1:main] Error setting up the KNX router.

            Marc

          7. Hi Marc,

            how your setup looks like? USB..?

            Whats the content of /etc/default/knxd

            cat /etc/default/knxd

            knxd logs/state

            journalctl -xu knxd.service

            Michael

          8. Hi Michael,

            I have a GIRA USB interface.

            pi@raspberrypi:~ $ cat /etc/default/knxd
            # Command line parameters for knxd. TPUART Backend
            # Serial device Raspberry
            #KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:1 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyAMA0″
            # Serial device PC
            # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:1 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyS0″
            # Tunnel Backend
            # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:1 -d -D -T -R -S -i –listen-local=/tmp/knx -b ipt:192.168.56.1″
            # USB Backend
            KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:4 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:”

            —————————-
            journalctl -xu knxd.service
            — Logs begin at Sat 2017-08-26 14:33:15 UTC, end at Sat 2017-09-30 12:07:13 UTC
            Aug 26 14:33:26 raspberrypi systemd[1]: Starting KNX Daemon…
            — Subject: Unit knxd.service has begun start-up
            — Defined-By: systemd


            — Unit knxd.service has begun starting up.
            Aug 26 14:33:28 raspberrypi knxd[280]: E00000032: [20:router] router: setup rout
            Aug 26 14:33:28 raspberrypi systemd[1]: knxd.service: Control process exited, co
            Aug 26 14:33:28 raspberrypi systemd[1]: Failed to start KNX Daemon.
            — Subject: Unit knxd.service has failed
            — Defined-By: systemd


            — Unit knxd.service has failed.

            — The result is failed.
            Aug 26 14:33:28 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
            Aug 26 14:33:28 raspberrypi systemd[1]: knxd.service: Failed with result ‘signal
            lines 1-19/19 (END)…skipping…
            — Logs begin at Sat 2017-08-26 14:33:15 UTC, end at Sat 2017-09-30 12:07:13 UTC. —
            Aug 26 14:33:26 raspberrypi systemd[1]: Starting KNX Daemon…
            — Subject: Unit knxd.service has begun start-up
            — Defined-By: systemd


            — Unit knxd.service has begun starting up.
            Aug 26 14:33:28 raspberrypi knxd[280]: E00000032: [20:router] router: setup router: failed
            Aug 26 14:33:28 raspberrypi systemd[1]: knxd.service: Control process exited, code=killed status=6
            Aug 26 14:33:28 raspberrypi systemd[1]: Failed to start KNX Daemon.
            — Subject: Unit knxd.service has failed
            — Defined-By: systemd


            — Unit knxd.service has failed.

            — The result is failed.
            Aug 26 14:33:28 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
            Aug 26 14:33:28 raspberrypi systemd[1]: knxd.service: Failed with result ‘signal’.

            Thank you !

          9. Hi,
            I just restarted the raspberry and managed to get a different message in the log:

            journalctl -xu knxd.service
            — Logs begin at Sat 2017-09-30 12:51:19 UTC, end at Sat 2017-09-30 12:58:17 UTC. —
            Sep 30 12:51:47 raspberrypi systemd[1]: Starting KNX Daemon…
            — Subject: Unit knxd.service has begun start-up
            — Defined-By: systemd


            — Unit knxd.service has begun starting up.
            Sep 30 12:51:49 raspberrypi knxd[295]: E00000000: [16:C.usb] send_Local timed out!
            Sep 30 12:51:49 raspberrypi knxd[295]: F00000035: [18:C.usb] Send while buffer not empty
            Sep 30 12:51:49 raspberrypi systemd[1]: knxd.service: Control process exited, code=killed status=6
            Sep 30 12:51:49 raspberrypi systemd[1]: Failed to start KNX Daemon.
            — Subject: Unit knxd.service has failed
            — Defined-By: systemd

            — Unit knxd.service has failed.

            — The result is failed.
            Sep 30 12:51:49 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
            Sep 30 12:51:49 raspberrypi systemd[1]: knxd.service: Failed with result ‘signal’.
            —————————-
            I hope that helps

  27. Thank you, this is a grade script! Two things could be improved.
    * Check if the user knxd already exists. So the script can be executed a second time.
    * Checkout the v0.12 branch also when the repository already exists.

    Michael

  28. Hello
    Thank you so much for the great work
    I have a problem running the script:
    EMI because of ft12
    checking for LIBUSB… yes
    EMI because of usb
    configure: error: libfmt (string formatting library) is not installed.
    root@raspberrypi:~#
    Because it may be failing?
    I’ve searched for the missing library, but I can not find it.
    a greeting

    1. Hi Pedro,

      I’ve added support for the libfmt lib. But currently (19.2.2017 commit 6f477ea802b7989267cda85a61bb046d1c138dd6)the master branch stops with an error when compiling against libfmt. Must take a closer look at this…

      Michael

          1. Hi Michael,

            now i have got it working, thx. vbusmonitor, groupswrite etc is working. I want to use this also with OPENHAB2/KNX2.0 from Karel Goderis and I configured knx.cfg for OPENHAB2 where i have put as serialport /tty/ttyAMA0 but i get the following error:

            17:58:57.367 [INFO ] [tuwien.auto.calimero ] – FT1.2 /dev/ttyAMA0: open rxtx library serial port connection
            17:58:57.368 [ERROR] [nx.handler.KNXBridgeBaseThingHandler] – An exception occurred while connecting to the KNX bus: Serial port ‘/dev/ttyAMA0’ could not be opened. Available ports are:

            Does this have to do with ownership of ttyAMA0? What can i do to rectify this?

            Regards,

            Bert

          2. Hi Bert,

            what permissions are set to ttyAMA0?

            ls -l /dev/ttyAMA0

            is the port opened by another program?

            lsof|grep tty

            Michael

          3. Hi Michael,

            i just ran the 2 commands and here are the results:

            root@raspberrypi:/home/pi# ls -l /dev/ttyAMA0
            crwxrwxrwx 1 root tty 204, 64 Feb 22 16:13 /dev/ttyAMA0

            root@raspberrypi:/home/pi# lsof |grep tty
            lsof: WARNING: can’t stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
            Output information may be incomplete.
            systemd-l 381 root 6r REG 0,16 4096 2166 /sys/devices/virtual/tty/tty0/active
            systemd-l 381 root 13u CHR 4,6 0t0 1047 /dev/tty6
            vncserver 446 root 8r REG 0,16 4096 2166 /sys/devices/virtual/tty/tty0/active
            vncserver 446 14068 root 8r REG 0,16 4096 2166 /sys/devices/virtual/tty/tty0/active
            login 452 root mem REG 179,2 9520 14919 /lib/arm-linux-gnueabihf/security/pam_securetty.so
            login 452 root 0u CHR 4,1 0t0 1042 /dev/tty1
            login 452 root 1u CHR 4,1 0t0 1042 /dev/tty1
            login 452 root 2u CHR 4,1 0t0 1042 /dev/tty1
            agetty 453 root cwd DIR 179,2 4096 2 /
            agetty 453 root rtd DIR 179,2 4096 2 /
            agetty 453 root txt REG 179,2 30508 11722 /sbin/agetty
            agetty 453 root mem REG 179,2 46820 14154 /lib/arm-linux-gnueabihf/libnss_files-2.19.so
            agetty 453 root mem REG 179,2 38612 14156 /lib/arm-linux-gnueabihf/libnss_nis-2.19.so
            agetty 453 root mem REG 179,2 71628 14151 /lib/arm-linux-gnueabihf/libnsl-2.19.so
            agetty 453 root mem REG 179,2 30592 14152 /lib/arm-linux-gnueabihf/libnss_compat-2.19.so
            agetty 453 root mem REG 179,2 1607760 1945 /usr/lib/locale/locale-archive
            agetty 453 root mem REG 179,2 1242776 13269 /lib/arm-linux-gnueabihf/libc-2.19.so
            agetty 453 root mem REG 179,2 18920 138554 /usr/lib/arm-linux-gnueabihf/libarmmem.so
            agetty 453 root mem REG 179,2 134448 13266 /lib/arm-linux-gnueabihf/ld-2.19.so
            agetty 453 root 0u CHR 204,64 0t0 1026 /dev/ttyAMA0
            agetty 453 root 1u CHR 204,64 0t0 1026 /dev/ttyAMA0
            agetty 453 root 2u CHR 204,64 0t0 1026 /dev/ttyAMA0
            Xorg 568 root 7u CHR 4,7 0t0 1048 /dev/tty7
            llvmpipe- 568 587 root 7u CHR 4,7 0t0 1048 /dev/tty7
            llvmpipe- 568 588 root 7u CHR 4,7 0t0 1048 /dev/tty7
            llvmpipe- 568 589 root 7u CHR 4,7 0t0 1048 /dev/tty7
            llvmpipe- 568 590 root 7u CHR 4,7 0t0 1048 /dev/tty7
            bash 608 pi 0u CHR 4,1 0t0 1042 /dev/tty1
            bash 608 pi 1u CHR 4,1 0t0 1042 /dev/tty1
            bash 608 pi 2u CHR 4,1 0t0 1042 /dev/tty1
            bash 608 pi 255u CHR 4,1 0t0 1042 /dev/tty1

            Regards,

            Bert

          4. Hi Bert,

            your serial device is opened by agetty (Console)

            agetty 453 root 0u CHR 204,64 0t0 1026 /dev/ttyAMA0

            Please check /boot/cmdline.txt there should be NO options containing /dev/ttyAMA0.

            Whats the state of the serial getty:

            systemctl status serial-getty@ttyAMA0.service

            Michael

      1. Hello
        Thank you very much for the help
        Now works perfectly
        Just a detail, setting a fixed ip address, ETS does not detect any programmer but if I leave the ip dhcp, if it detects raspberry and works perfectly.

  29. Hi Michl,

    Can we find your last Script on Github ?
    I will check all changes for the future 😉

    Thanks again for your Script

    Is this your Git Place ?
    https : // github.com / Race666 / install-knxd

  30. Dear Michail ;
    First of all many thanks for the clever solutions . But I fortunately I tried may be 100 times it’s not working .
    You are technical person and you are thinking that everybody know the linux or whatever else language commands . If its possible can you explain all issues from the begining step by step . For example how can I do static ip fixing on my rpi . Some part of your explain is not enough for get the any solution .

    Thanks and Regards ….

    1. Hi Bego,

      the post is already written for less experienced Linux Users but some basics operating system know how like creating/editing a file, executing commands is essential. WhenI should explain that too the post would grow and grow… I think you should start with a linux for beginner tutorial otherwise you will have no fun with your Raspberry at all.

      Michael

      1. KNX support answered that win10 must be emulated on the PI. Never seen anybody managed to do that. But interesting is that ELKA Elektronik GMBH saying they managed to get ETS Inside running on Win10IoT.

  31. Hi Michael,

    if you thinks that the following questions are off-topic, please feel free to ignore this post.

    After the successful setup of knxd on my PI3 (see previous discussion – thanks again!), I am stuck with the corresponding binding in openHAB. Using knxtool, I am able to control my rollershutter on GA 3/2/1. In my .items, the device is configured as

    Rollershutter Rolladen_Test “Rolladen Test” [“Rollershutter”] {knx=”3/2/1″}

    It shows up correctly in the openHAB Basic UI – however, the shutter does not do anything when pushing the “up” or “down” buttons. In knx.cfg, the binding is configured as ROUTER, and openhab2.log confirms the connection (I also tried TUNNEL mode, but this leads to a timeout error):

    2017-03-12 12:12:14.517 [INFO ] [nx.internal.connection.KNXConnection] – Established connection to KNX bus on 224.0.23.12:6720 in mode ROUTER.

    After enabling some traces in the Karaf console, the log file contains additional information when pressing the “up” button (attached below), but no obvious indication of errors.

    Any help or hint would be highly appreciated!

    Thorsten

    2017-03-12 13:36:31.543 [TRACE] [.binding.knx.internal.bus.KNXBinding] – Received update (item=’Rolladen_Test’, state=’UP’)
    2017-03-12 13:36:31.547 [TRACE] [.binding.knx.internal.bus.KNXBinding] – Received command (item=’Rolladen_Test’, command=’UP’)
    2017-03-12 13:36:31.553 [TRACE] [g.knx.internal.dpt.KNXCoreTypeMapper] – toTypeClass looking for dptId = 1.008
    2017-03-12 13:36:31.554 [TRACE] [g.knx.internal.dpt.KNXCoreTypeMapper] – toTypeClass looking for dptId = 1.008
    2017-03-12 13:36:31.555 [TRACE] [.binding.knx.internal.bus.KNXBinding] – found 1 compatible datapoints for item Rolladen_Test (org.openhab.core.library.types.UpDownType)
    2017-03-12 13:36:31.555 [TRACE] [.binding.knx.internal.bus.KNXBinding] – found 1 compatible datapoints for item Rolladen_Test (org.openhab.core.library.types.UpDownType)
    2017-03-12 13:36:31.582 [DEBUG] [tuwien.auto.calimero ] – KNXnet/IP Routing 224.0.23.12:3671: add to multicast loopback frame buffer: L-Data.ind from 0.0.0 to 3/2/1, low priority hop count 6 tpdu 00 80
    2017-03-12 13:36:31.583 [DEBUG] [tuwien.auto.calimero ] – KNXnet/IP Routing 224.0.23.12:3671: add to multicast loopback frame buffer: L-Data.ind from 0.0.0 to 3/2/1, low priority hop count 6 tpdu 00 80
    2017-03-12 13:36:31.589 [DEBUG] [tuwien.auto.calimero ] – KNXnet/IP Routing 224.0.23.12:3671: sending cEMI frame seq 0, non-blocking, attempt 1 (channel 0) 06 10 05 30 00 11 29 00 bc e0 00 00 1a 01 01 00 80
    2017-03-12 13:36:31.590 [DEBUG] [.binding.knx.internal.bus.KNXBinding] – Wrote value ‘UP’ to datapoint ‘command DP 3/2/1 Rolladen_OG_Ankleidezimmer, DPT main 0 id 1.008, low priority’
    2017-03-12 13:36:31.592 [DEBUG] [.binding.knx.internal.bus.KNXBinding] – Wrote value ‘UP’ to datapoint ‘command DP 3/2/1 Rolladen_OG_Ankleidezimmer, DPT main 0 id 1.008, low priority’
    2017-03-12 13:36:31.593 [DEBUG] [tuwien.auto.calimero ] – KNXnet/IP Routing 224.0.23.12:3671: discard multicast loopback cEMI frame: L-Data.ind from 0.0.0 to 3/2/1, low priority hop count 6 tpdu 00 80
    2017-03-12 13:36:31.594 [DEBUG] [tuwien.auto.calimero ] – KNXnet/IP Routing 224.0.23.12:3671: sending cEMI frame seq 0, non-blocking, attempt 1 (channel 0) 06 10 05 30 00 11 29 00 bc e0 00 00 1a 01 01 00 80
    2017-03-12 13:36:31.596 [DEBUG] [tuwien.auto.calimero ] – KNXnet/IP Routing 224.0.23.12:3671: discard multicast loopback cEMI frame: L-Data.ind from 0.0.0 to 3/2/1, low priority hop count 6 tpdu 00 80

    1. Hi Thorsten,

      have you tried to increase the number of clients?

      /etc/default/knxd

      …. –client-addrs=1.1.129:16 …..

      I think my default value is choosen too small.

      Michael

      1. Hi Michael,

        my error: knx.cfg was configured to use the KNX gateway port 6720. After changing this to 3671 (and using TUNNEL instead of ROUTER connection type – with port 3671, TUNNELing works), openHAB successfully operates the roller shutter!

        Thanks again for your ultra-fast responses!

        Thorsten

  32. Hi Michael,

    thanks for the great work – the installation on a Raspberry Pi3 with busware TUL worked fine and the installation didn´t show an error-message.

    But when I try to see if the knxd runs the ps ax | grep knxd only provides:
    1604 pts/0 S+ 0:00 grep –color=auto knxd
    and
    root@RasPi:/home/pi# systemctl status knxd
    ● knxd.service
    Loaded: masked (/dev/null)
    Active: inactive (dead)

    checking on some logs/status doesn´t tell me much:
    /etc/default/knxd has the active line:
    # Serial device Raspberry
    KNXD_OPTIONS=”–eibaddr=1.0.1 –client-addrs=1.0.2:1 -d -D -T -R -S -i –listen-
    local=/tmp/knx -b tpuarts:/dev/ttyAMA0″

    root@RasPi:/dev# ls -als ttyA*
    0 crw-rw—- 1 root dialout 166, 0 Mär 19 21:17 ttyACM0
    0 crw-rw—- 1 root dialout 166, 1 Mär 19 21:17 ttyACM1
    0 crw-rw—- 1 root dialout 204, 64 Mär 19 21:17 ttyAMA0

    And as expected any connection to the KNX-Bus doesn´t work
    root@RasPi:~# knxtool busmonitor1 ip:localhost
    Open failed: Connection refused

    Any help welcome where to look into to figure out what is going on and what to fix.

    Thanks in advance

    Peter

  33. Hi Michael

    did some further test and trial after browsing through the Blog – the best result via manual start I could achieve so far is the follwing start&trace – but a parallel busmonitor call just hangs until ^C:

    pi@RasPi:/dev $ /usr/local/bin/knxd -e 1.0.1 -E 1.0.2:8 -t1023 -c -u /tmp/knx -p /run/knxd/knxd.pid -i -D -T -R -S –trace=5 –error=5 tpuarts:/dev/ttyAMA0
    [1] 1371
    pi@RasPi:/dev $ knxd: Layer 3 [ 2:layer3 0.000] Open
    knxd: Layer 3 [ 2:layer3 0.000] L3 started
    knxd: Layer 4 [ 3:cache 0.000] GroupCacheInit
    knxd: Layer 3 [ 2:layer3 0.001] registerLayer2 3:cache
    knxd: Layer 3 [ 2:layer3 0.001] registerLayer2 3:cache = 1
    knxd: Layer 4 [ 3:cache 0.001] GroupCacheEnable
    knxd: Layer 8 [ 4:/tmp/knx 0.001] OpenLocalSocket /tmp/knx
    knxd: Layer 8 [ 4:/tmp/knx 0.001] LocalSocket opened
    knxd: Layer 3 [ 2:layer3 0.001] registerLayer2 4:/tmp/knx
    knxd: Layer 3 [ 2:layer3 0.001] registerLayer2 4:/tmp/knx = 1
    knxd: Layer 8 [ 5:inet 0.001] OpenInetSocket 6720
    knxd: Layer 8 [ 5:inet 0.001] InetSocket opened
    knxd: Layer 3 [ 2:layer3 0.001] registerLayer2 5:inet
    knxd: Layer 3 [ 2:layer3 0.001] registerLayer2 5:inet = 1
    knxd: Layer 8 [ 6:mcast:knxd 0.001] Open
    knxd: Layer 0 [ 6:mcast:knxd 0.001] Open
    knxd: Layer 0 [ 6:mcast:knxd 0.001] Openend
    knxd: Layer 8 [ 6:mcast:knxd 0.001] OpenD
    knxd: Layer 8 [ 6:mcast:knxd 0.002] OpenedD
    knxd: Layer 8 [ 6:mcast:knxd 0.002] Opened
    knxd: Layer 3 [ 2:layer3 0.002] registerLayer2 6:mcast:knxd
    knxd: Layer 3 [ 2:layer3 0.002] registerLayer2 6:mcast:knxd = 1
    knxd: Layer 2 [ 7:tpuarts:/dev/ttyAMA0 0.002] Open
    knxd: Layer 2 [ 7:tpuarts:/dev/ttyAMA0 0.002] Open
    knxd: Layer 0 [ 7:tpuarts:/dev/ttyAMA0 0.003] Opened /dev/ttyAMA0 with baud 19200
    knxd: Layer 2 [ 7:tpuarts:/dev/ttyAMA0 0.003] Openend
    knxd: Layer 2 [ 7:tpuarts:/dev/ttyAMA0 0.003] Buffer Setup
    knxd: Layer 3 [ 2:layer3 0.003] registerLayer2 7:tpuarts:/dev/ttyAMA0
    knxd: Layer 2 [ 7:tpuarts:/dev/ttyAMA0 0.003] open
    knxd: Layer 0 [ 7:tpuarts:/dev/ttyAMA0 0.003] SendReset 01
    knxd: Layer 3 [ 2:layer3 0.003] registerLayer2 7:tpuarts:/dev/ttyAMA0 = 1
    knxd: Layer 0 [ 1:main 0.003] 0.12.15:776a315: /usr/local/bin/knxd -e 1.0.1 -E 1.0.2:8 -t1023 -c -u /tmp/knx -p /run/knxd/knxd.pid -i -D -T -R -S –trace=5 –error=5 tpuarts:/dev/ttyAMA0
    knxd: I00000000: 0.12.15:776a315: /usr/local/bin/knxd -e 1.0.1 -E 1.0.2:8 -t1023 -c -u /tmp/knx -p /run/knxd/knxd.pid -i -D -T -R -S –trace=5 –error=5 tpuarts:/dev/ttyAMA0
    knxd: Layer 0 [ 7:tpuarts:/dev/ttyAMA0 0.600] SendReset 01
    knxd: Layer 0 [ 7:tpuarts:/dev/ttyAMA0 1.201] SendReset 01
    knxd: Layer 0 [ 7:tpuarts:/dev/ttyAMA0 1.802] SendReset 01


    knxd: Layer 0 [ 7:tpuarts:/dev/ttyAMA0 51.059] SendReset 01
    knxd: Layer 0 [ 7:tpuarts:/dev/ttyAMA0 51.660] SendReset 01
    knxd: Layer 8 [ 5:inet 51.820] New Connection
    knxd: Layer 8 [ 5:inet 51.820] ClientConnection Init
    knxd: Layer 8 [ 2:layer3 51.820] unknown addr 1.0.2
    knxd: Layer 3 [ 8:inet 51.821] Allocate 1.0.2
    knxd: Layer 0 [ 8:inet 51.821] ReadMessage(002): 00 11
    knxd: Layer 7 [ 9:inet:monitor 51.821] Open A_Busmonitor
    knxd: Layer 3 [ 2:layer3 51.821] registerBusmonitor 001774E8
    knxd: Layer 0 [ 7:tpuarts:/dev/ttyAMA0 51.821] Send openBusmonitor 7EE37E6F
    knxd: Layer 3 [ 2:layer3 51.821] registerBusmontitr 001774E8 = 1
    knxd: Layer 0 [ 8:inet 51.821] Send(002): 00 11

    # Start from separate shell
    pi@RasPi:~ $ ps ax | grep knxd
    1371 pts/0 S 0:00 /usr/local/bin/knxd -e 1.0.1 -E 1.0.2:8 -t1023 -c -u /tmp/knx -p /run/knxd/knxd.pid -i -D -T -R -S –trace=5 –error=5 tpuarts:/dev/ttyAMA0
    1395 pts/1 S+ 0:00 grep –color=auto knxd

    pi@RasPi:~ $ knxtool busmonitor1 ip:localhost

    ^C

    knxd: Layer 8 [ 8:inet 101.558] ClientConnection 1.0.2 closing
    knxd: Layer 3 [ 2:layer3 101.558] Release 1.0.2
    knxd: Layer 7 [ 9:inet:monitor 101.558] Close A_Busmonitor
    knxd: Layer 2 [ 7:tpuarts:/dev/ttyAMA0 101.558] leaveBusmonitor
    knxd: Layer 2 [ 7:tpuarts:/dev/ttyAMA0 101.558] open
    knxd: Layer 0 [ 7:tpuarts:/dev/ttyAMA0 101.558] SendReset 01
    knxd: Layer 3 [ 2:layer3 101.558] deregisterBusmonitor 001774E8 = 1
    knxd: Layer 0 [ 7:tpuarts:/dev/ttyAMA0 102.158] SendReset 01

    Hope this helps

    Peter

  34. Ciao Michael,

    that was quick – here is the log of dmesg – just can´t read it to understand which device is doing what:

    pi@RasPi:~ $ dmesg | grep tty
    [ 0.000000] Kernel command line: 8250.nr_uarts=1 bcm2708_fb.fbwidth=720 bcm2708_fb.fbheight=480 bcm2708_fb.fbswap=1 dma.dmachans=0x7f35 bcm2709.boardrev=0xa02082 bcm2709.serial=0x60c987c2 bcm2709.uart_clock=48000000 smsc95xx.macaddr=B8:27:EB:C9:87:C2 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 enable_uart=1 dtoverlay=pi3-disable-bt console=tty1 root=/dev/sda2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
    [ 0.001350] console [tty1] enabled
    [ 1.007158] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
    [ 5.766001] cdc_acm 1-1.4:1.0: ttyACM0: USB ACM device
    [ 5.767844] cdc_acm 1-1.4:1.2: ttyACM1: USB ACM device

    Thanks for your help

    Peter

  35. Ciao Michael

    changed tpuarts to ttyACM0 and it worked with this command directly:
    pi@RasPi:~ $ /usr/local/bin/knxd -e 1.0.1 -E 1.0.2:8 -p /run/knxd/knxd.pid -d -D -T -R -S -i -b tpuarts:/dev/ttyACM0
    pi@RasPi:~ $ knxtool groupsocketlisten ip:localhost
    Write from 1.1.123 to 2/1/34: 00
    Write from 1.1.106 to 1/1/10: 00

    But when I tried to start it as a service is tell me “masked” – Any idea ?

    pi@RasPi:~ $ sudo systemctl enable knxd.service
    Synchronizing state for knxd.service with sysvinit using update-rc.d…
    Executing /usr/sbin/update-rc.d knxd defaults
    Executing /usr/sbin/update-rc.d knxd enable

    pi@RasPi:~ $ sudo systemctl start knxd.service
    Failed to start knxd.service: Unit knxd.service is masked.
    pi@RasPi:~ $ sudo systemctl status knxd.service
    ● knxd.service
    Loaded: masked (/dev/null)
    Active: inactive (dead)

    Mär 20 23:56:21 RasPi systemd[1]: Stopped knxd.service.

    Any help welcome

    Peter

    1. Hi Peter,

      what says the log:

      sudo journalctl -xu knxd.service

      Try to unmask
      sudo systemctl unmask knxd.service

      and enable again
      sudo systemctl enable knxd.service

      Michael

  36. Hi Michael,

    pi@RasPi:~ $ sudo systemctl unmask knxd.service
    Removed symlink /etc/systemd/system/knxd.service.
    pi@RasPi:~ $ sudo systemctl enable knxd.service
    Synchronizing state for knxd.service with sysvinit using update-rc.d…
    Executing /usr/sbin/update-rc.d knxd defaults
    Executing /usr/sbin/update-rc.d knxd enable
    pi@RasPi:~ $ sudo systemctl start knxd.service
    Job for knxd.service failed. See ‘systemctl status knxd.service’ and ‘journalctl -xn’ for details.

    and then:
    Mär 22 08:31:36 RasPi systemd[1]: Starting KNX Daemon…
    — Subject: Unit knxd.service has begun with start-up
    — Defined-By: systemd
    — —
    — Unit knxd.service has begun starting up.
    Mär 22 08:31:36 RasPi systemd[1]: PID 2660 read from file /run/knxd/knxd.pid does not exist or is a zombie.
    Mär 22 08:31:36 RasPi systemd[1]: Failed to start KNX Daemon.
    — Subject: Unit knxd.service has failed
    — Defined-By: systemd

    — Unit knxd.service has failed.

    — The result is failed.
    Mär 22 08:31:36 RasPi systemd[1]: Unit knxd.service entered failed state.

    I know its cumbersome but may this have to do with access rights of users or groups ? –
    Thanks for your help

    Peter

    1. Hi Peter,

      access rights of users or groups => may be 🙂 have you you started knxd one time as root ?

      does /run/knxd/knxd.pid exists?

      ls -l /run/knxd/knxd.pid

      have you already rebooted your raspberry?

      Michael

  37. Hi Michael,

    Rebooted the Raspi, maybe I user root or sudo during installation or testing – that maybe the case – how do I found out if it created a problem?
    The folder /run/knxd exist for owner knxd and group knxd but it is empty and can only be accessed as user ‘su’ not as user ‘pi’ !
    When i try to start the systemctl start knxd.service it still shows the:
    Mär 22 18:15:12 RasPi systemd[1]: PID 2393 read from file /run/knxd/knxd.pid does not exist or is a zombie.
    Mär 22 18:15:12 RasPi systemd[1]: Failed to start KNX Daemon.
    message in the journalctl

    Is some process supposed to write such a pid file ? – does this fail ? –

    Best Regards

    Peter

  38. Hi Michael

    added the tracing to the /etc/defaul/knxd with -t1023 and I get a different log/behaviour after reboot and refreshing via “enable, start” of the service afterwards – maybe this gives a hint where the issue may be:

    pi@RasPi:~ $ sudo reboot
    pi@RasPi:~ $ sudo systemctl status knxd.service
    ● knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled)
    Active: failed (Result: exit-code) since Mit 2017-03-22 22:17:04 CET; 7min ago
    Process: 463 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=1/FAILURE)

    Mär 22 22:17:04 RasPi knxd[463]: knxd: Layer 8 [ 2:mcast:knxd 0.043] Open
    Mär 22 22:17:04 RasPi knxd[463]: knxd: Layer 0 [ 2:mcast:knxd 0.043] Open
    Mär 22 22:17:04 RasPi knxd[463]: knxd: Layer 0 [ 2:mcast:knxd 0.044] Openend
    Mär 22 22:17:04 RasPi knxd[463]: knxd: Layer 8 [ 2:mcast:knxd 0.044] OpenD
    Mär 22 22:17:04 RasPi knxd[463]: knxd: Layer 8 [ 2:mcast:knxd 0.044] CloseD
    Mär 22 22:17:04 RasPi knxd[463]: knxd: Layer 0 [ 2:mcast:knxd 0.044] Close
    Mär 22 22:17:04 RasPi knxd[463]: initialization of the EIBnet/IP server failed: No such device
    Mär 22 22:17:04 RasPi systemd[1]: knxd.service: control process exited, code=exited status=1
    Mär 22 22:17:04 RasPi systemd[1]: Failed to start KNX Daemon.
    Mär 22 22:17:04 RasPi systemd[1]: Unit knxd.service entered failed state.

    The try to restart:

    pi@RasPi:~ $ sudo systemctl stop knxd.service
    pi@RasPi:~ $ sudo systemctl daemon-reload
    pi@RasPi:~ $ sudo systemctl enable knxd.service
    Synchronizing state for knxd.service with sysvinit using update-rc.d…
    Executing /usr/sbin/update-rc.d knxd defaults
    Executing /usr/sbin/update-rc.d knxd enable
    pi@RasPi:~ $ sudo systemctl start knxd.service
    Job for knxd.service failed. See ‘systemctl status knxd.service’ and ‘journalctl -xn’ for details.
    pi@RasPi:~ $ sudo systemctl status knxd.service
    ● knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled)
    Active: failed (Result: resources) since Mit 2017-03-22 22:29:00 CET; 5s ago
    Process: 1586 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)

    Mär 22 22:29:00 RasPi knxd[1586]: knxd: Layer 0 [ 5:tpuarts:/dev/ttyACM0 0.002] Opening /dev/ttyACM0 failed: Permission denied
    Mär 22 22:29:00 RasPi knxd[1586]: knxd: Layer 3 [ 3:layer3 0.002] registerLayer2 5:tpuarts:/dev/ttyACM0
    Mär 22 22:29:00 RasPi knxd[1586]: knxd: Layer 2 [ 5:tpuarts:/dev/ttyACM0 0.002] open
    Mär 22 22:29:00 RasPi knxd[1586]: knxd: Layer 8 [ 5:tpuarts:/dev/ttyACM0 0.002] ser state 0>12
    Mär 22 22:29:00 RasPi knxd[1586]: knxd: Layer 8 [ 5:tpuarts:/dev/ttyACM0 0.002] ser state 0>5
    Mär 22 22:29:00 RasPi knxd[1586]: knxd: Layer 3 [ 3:layer3 0.003] registerLayer2 5:tpuarts:/dev/ttyACM0 = 1
    Mär 22 22:29:00 RasPi knxd[1586]: knxd: Layer 0 [ 1:main 0.003] 0.12.15:776a315: /usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.0….dev/ttyACM0
    Mär 22 22:29:00 RasPi systemd[1]: PID 1588 read from file /run/knxd/knxd.pid does not exist or is a zombie.
    Mär 22 22:29:00 RasPi systemd[1]: Failed to start KNX Daemon.
    Mär 22 22:29:00 RasPi systemd[1]: Unit knxd.service entered failed state.

    It looks like there is either a problem with the availability of the ttyACM01 at reboot time or some access right to the ttyACM0 ??

    I do not know how to get more tracing/logs to really figure out what to try next:-(

    Thanks in advance

    Peter

    1. Hi Peter,

      Mär 22 22:17:04 RasPi knxd[463]: initialization of the EIBnet/IP server failed: No such device => Is your network properly configured? Have you set a static IP and is the Mulitcast Address 224.0.23.12/32 in place? Post the output of

      route

      Opening /dev/ttyACM0 failed: Permission denied => knxd starts as user knxd. What are the permission on ttyACM0

      ls -l /dev/ttyACM0

      Mär 22 22:29:00 RasPi systemd[1]: PID 1588 read from file /run/knxd/knxd.pid does not exist or is a zombie. => Permissions here?

      ls -l /run/

      Try to start knxd as User knxd in foreground. Start a shell as user knxd

      sudo su knxd -s /bin/sh

      and start knxd without daemonize (without -d) and see whats happend. Adjust the tracelevel…..

      /usr/local/bin/knxd -e 1.0.1 -E 1.0.2:8 -p /run/knxd/knxd.pid -D -T -R -S -i -b tpuarts:/dev/ttyACM0

      Michael

      1. Hi Michael,
        thank’s for your job.
        I can’t get busware tul to work on my new Raspberry Pi 4.
        This is the configuration:
        Release = Raspbian GNU/Linux 10 (buster)
        Kernel = Linux 4.19.93-v7l+
        Platform = Raspberry Pi 4 Model B Rev 1.1

        When I run the commands:
        pi@raspberrypi:~$ sudo su knxd -s /bin/sh
        $ /usr/local/bin/knxd -e 1.0.1 -E 1.0.2:8 -p /run/knxd/knxd.pid -t1022 -D -T -R -S -i -b tpuarts:/dev/ttyACM0

        I get:
        Layer 3 [ 4:server/Server 0.000] registerLink: 4:server
        Layer 3 [ 4:server/Server 0.007] Start: cfg:server
        Layer 5 [ 4:server/Server 0.007] down => >up
        Layer 8 [ 4:server/Server 0.007] Open
        Layer 8 [17:router/driver 0.007] OpenD
        Layer 8 [17:router/driver 0.008] OpenedD
        Layer 3 [16:router/ConnC 0.008] registerLink: 16:router_16
        Layer 3 [16:router/ConnC 0.008] Start: cfg:router
        Layer 5 [16:router/ConnC 0.008] down => >up
        Layer 5 [16:router/ConnC 0.008] Starting
        Layer 5 [16:router/ConnC 0.008] >up => up
        Layer 4 [16:router/ConnC 0.008] up
        Layer 5 [16:router/ConnC 0.008] Started
        Layer 4 [16:router/ConnC 0.008] up
        Layer 8 [ 4:server/Server 0.008] Opened
        Layer 5 [ 4:server/Server 0.008] >up => up
        Layer 4 [ 4:server/Server 0.008] up
        Layer 5 [ 4:server/Server 0.008] Started
        Layer 4 [ 4:server/Server 0.008] up
        Layer 6 [ 4:server/Server 0.015] is OK
        Layer 6 [16:router/ConnC 0.015] is OK
        Layer 6 [16:router/ConnC 23.996] sending, send_more clear
        Layer 1 [ 4:server/Server 23.996] Send(011): 29 00 B4 D0 10 14 0D F9 01 00 80
        Layer 2 [18:router.pace_/router 23.996] out 1/2: delay for 0.017 sec
        Layer 6 [ 4:server/Server 23.996] is OK
        Layer 6 [16:router/ConnC 23.996] still waiting
        Layer 2 [18:router.pace_/router 24.013] delay done
        Layer 6 [16:router/ConnC 24.013] sendNext called, send_more set
        Layer 6 [ 4:server/Server 24.013] is OK
        Layer 6 [16:router/ConnC 24.013] is OK
        Layer 6 [16:router/ConnC 32.994] sending, send_more clear
        Layer 1 [ 4:server/Server 32.994] Send(011): 29 00 B4 D0 10 17 0D F9 01 00 81
        Layer 2 [18:router.pace_/router 32.994] out 1/2: delay for 0.017 sec
        Layer 6 [ 4:server/Server 32.994] is OK
        Layer 6 [16:router/ConnC 32.994] still waiting
        Layer 2 [18:router.pace_/router 33.011] delay done
        Layer 6 [16:router/ConnC 33.011] sendNext called, send_more set
        Layer 6 [ 4:server/Server 33.011] is OK
        Layer 6 [16:router/ConnC 33.011] is OK
        Layer 6 [16:router/ConnC 58.930] sending, send_more clear
        Layer 1 [ 4:server/Server 58.930] Send(011): 29 00 B4 D0 10 1C 0E 21 01 00 80
        Layer 2 [18:router.pace_/router 58.930] out 1/2: delay for 0.017 sec
        Layer 6 [ 4:server/Server 58.930] is OK
        Layer 6 [16:router/ConnC 58.930] still waiting
        Layer 2 [18:router.pace_/router 58.947] delay done
        Layer 6 [16:router/ConnC 58.947] sendNext called, send_more set
        Layer 6 [ 4:server/Server 58.947] is OK
        Layer 6 [16:router/ConnC 58.947] is OK
        Layer 6 [16:router/ConnC 108.096] sending, send_more clear
        Layer 1 [ 4:server/Server 108.096] Send(011): 29 00 B4 D0 10 1A 0E 11 01 00 80
        Layer 2 [18:router.pace_/router 108.096] out 1/2: delay for 0.017 sec
        Layer 6 [ 4:server/Server 108.096] is OK
        Layer 6 [16:router/ConnC 108.096] still waiting
        Layer 2 [18:router.pace_/router 108.113] delay done
        Layer 6 [16:router/ConnC 108.113] sendNext called, send_more set
        Layer 6 [ 4:server/Server 108.113] is OK
        Layer 6 [16:router/ConnC 108.113] is OK

        But I can’t get openhab to work.
        Do you have any suggestions?

          1. Hi Michael,
            this is my knx.cfg file:
            ip=localhost
            ignorelocalevents=true
            type=TUNNEL
            localIp=192.168.1.6
            autoReconnectPeriod=30

            Thanks in advance

          2. Hi Gabriele,

            please set the port

            port=3671

            Does knxd runs on the same host as openhab? If yes, omit the localIP property. If it runs on a different host set

            ip=localhost

            to the correct IP Address

            Michael

          3. Hi Michael,
            I think that the problem is the same of Peter because the system work correctly when I run the command:

            /usr/local/bin/knxd -e 1.0.1 -E 1.0.2:8 -p /run/knxd/knxd.pid -d -D -T -R -S -i -b tpuarts:/dev/ttyACM0

            but dosn’t work when I try to start it as a service.
            The following configuration of /etc/default/knxd is correct?

            KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -D -T -R -S -i –liste$-listen-local=/tmp/knx -b tpuarts:/dev/ttyACM0″

            Thank you for your support.

          4. Hi Gabriele,

            reboot the system and check if knxd is not running. Then post the log getting by

            journalctl -xu knxd.service
            

            Michael

          5. Hi Michael,
            this is the result:
            [21:43:53] pi@raspberrypi:~$ journalctl -xu knxd.service
            — Logs begin at Sun 2020-02-16 15:25:57 CET, end at Wed 2020-02-19 21:51:00 CET. —
            Feb 16 15:26:00 raspberrypi systemd[1]: Starting KNX Daemon…
            — Subject: A start job for unit knxd.service has begun execution
            — Defined-By: systemd

            — A start job for unit knxd.service has begun execution.

            — The job identifier is 81.
            Feb 16 15:26:01 raspberrypi knxd[388]: E00000064: [19:router] router: setup router: failed
            Feb 16 15:26:01 raspberrypi knxd[388]: F00000105: [ 4:server] Link down, terminating
            Feb 16 15:26:01 raspberrypi systemd[1]: knxd.service: Control process exited, code=exited, status=1/FAILURE
            — Subject: Unit process exited
            — Defined-By: systemd

            — An ExecStart= process belonging to unit knxd.service has exited.

            — The process’ exit code is ‘exited’ and its exit status is 1.
            Feb 16 15:26:01 raspberrypi systemd[1]: knxd.service: Failed with result ‘exit-code’.
            — Subject: Unit failed
            — Defined-By: systemd

            — The unit knxd.service has entered the ‘failed’ state with result ‘exit-code’.
            Feb 16 15:26:01 raspberrypi systemd[1]: Failed to start KNX Daemon.
            — Subject: A start job for unit knxd.service has failed
            — Defined-By: systemd

            — A start job for unit knxd.service has finished with a failure.

            — The job identifier is 81 and the job result is failed.
            Feb 16 16:17:57 raspberrypi systemd[1]: Starting KNX Daemon…
            — Subject: A start job for unit knxd.service has begun execution
            — Defined-By: systemd

            — A start job for unit knxd.service has begun execution.

            — The job identifier is 457.
            Feb 16 16:19:27 raspberrypi systemd[1]: knxd.service: Start operation timed out. Terminating.
            Feb 16 16:19:27 raspberrypi systemd[1]: knxd.service: Failed with result ‘timeout’.
            — Subject: Unit failed
            — Defined-By: systemd

            — The unit knxd.service has entered the ‘failed’ state with result ‘timeout’.
            Feb 16 16:19:27 raspberrypi systemd[1]: Failed to start KNX Daemon.
            — Subject: A start job for unit knxd.service has failed
            — Defined-By: systemd

            — A start job for unit knxd.service has finished with a failure.

            — The job identifier is 457 and the job result is failed.

            I look forward to hearing from you.

            Best Regards,
            Gabriele

          6. Hi Michael,
            my raspberry is connected through the wired network. I have disabled both WiFi and Bluetooth connections.

            Gabriele

          7. Hi Gabriele,

            can you remove the Hash from line

            ExecStartPre=/lib/systemd/systemd-networkd-wait-online --timeout=60

            in file /lib/systemd/system/knxd.service. This tells the unit to wait until the Network is up.
            then reload config

            root@devdeb ~ # systemctl daemon-reload
            

            Michael

          8. Hi Michael,
            I followed your instructions, but after restarting the raspberry the problem persists and to make the system work I have to give the command:
            /usr/local/bin/knxd -e 1.0.1 -E 1.0.2:8 -p /run/knxd/knxd.pid -d -D -T -R -S -i -b tpuarts:/dev/ttyACM0
            do you have any ideas to solve the problem?

          9. Hi Gabriele,

            starts knxd when you tried to start it manually via systemctl?

            systemctl start knxd.service
            

            Michael

        1. Hi Michael,
          I try to execute the command, but the respons is the following:

          [18:27:27] pi@raspberrypi:~$ sudo systemctl start knxd.service
          Job for knxd.service failed because a timeout was exceeded.
          See “systemctl status knxd.service” and “journalctl -xe” for details.

          The result of “systemctl status knxd.service” is:

          ● knxd.service – KNX Daemon
          Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: ena
          Active: failed (Result: timeout) since Sat 2020-03-07 18:29:13 CET; 1min 58s
          Process: 3616 ExecStartPre=/lib/systemd/systemd-networkd-wait-online –timeout
          Process: 3617 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTION

          Mar 07 18:27:43 raspberrypi systemd[1]: Starting KNX Daemon…
          Mar 07 18:27:43 raspberrypi systemd-networkd-wait-online[3616]: ignoring: lo
          Mar 07 18:29:13 raspberrypi systemd[1]: knxd.service: Start operation timed out.
          Mar 07 18:29:13 raspberrypi systemd[1]: knxd.service: Failed with result ‘timeou
          Mar 07 18:29:13 raspberrypi systemd[1]: Failed to start KNX Daemon.

          Best Regards,
          Gabriele

          1. Hi Gabriele,

            it seems ExecStartPre=/lib/systemd/systemd-networkd-wait-online –timeout is only working if the network interface(s) are configuered by systemd rather then networkManager.

            try

            ExecStartPre=sleep 30

            Michael

  39. Hi Michael,

    I think we are getting close.

    Concerning the Multicast Address I do not get the point why I would need an external internet address 224.0.23.12/32 setup – so the Raspi is currnenty fixed to
    192.168.1.15 and I need this fixed for other services as well.
    pi@RasPi:~ $ route provides:
    Kernel-IP-Routentabelle
    Ziel Router Genmask Flags Metric Ref Use Iface
    default 192.168.1.1 0.0.0.0 UG 202 0 0 eth0
    192.168.1.0 * 255.255.255.0 U 202 0 0 eth0

    ip addr
    2: eth0: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:c9:87:c2 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.15/24 brd 192.168.1.255 scope global eth0
    valid_lft forever preferred_lft forever
    inet6 fe80::6ed8:459c:aee3:be6b/64 scope link
    valid_lft forever preferred_lft forever

    and therefore no file in /etc/systemd/network: ls -als

    4 drwxr-xr-x 2 root root 4096 Jan 24 2016 .
    4 drwxr-xr-x 6 root root 4096 Jan 29 10:35 ..

    Concerning the rights: – The /dev/ttyAMCO is owned by root ?
    root@RasPi:~# ls -l /dev/ttyACM0
    crw-rw—- 1 root dialout 166, 0 Mär 23 21:17 /dev/ttyACM0

    and the knxd is owned by “knxd”
    pi@RasPi:~ $ ls -l /run/
    drwxr–r– 2 knxd knxd 40 Mär 23 22:03 knxd

    The starting of the knxd is failing (as user “root” and “pi” it actually works fine!):

    root@RasPi:~# sudo su knxd -s /bin/sh
    $ /usr/local/bin/knxd -e 1.0.1 -E 1.0.2:8 -p /run/knxd/knxd.pid -t1022 -D -T -R -S -i -b tpuarts:/dev/ttyACM0
    knxd: Layer 8 [ 2:mcast:knxd 0.000] Open
    knxd: Layer 8 [ 2:mcast:knxd 0.000] OpenD
    knxd: Layer 8 [ 2:mcast:knxd 0.001] OpenedD
    knxd: Layer 8 [ 2:mcast:knxd 0.001] Opened
    knxd: Layer 3 [ 3:layer3 0.001] Open
    knxd: Layer 3 [ 3:layer3 0.001] L3 started
    knxd: Layer 3 [ 3:layer3 0.001] registerLayer2 2:mcast:knxd
    knxd: Layer 3 [ 3:layer3 0.001] registerLayer2 2:mcast:knxd = 1
    knxd: Layer 8 [ 4:inet 0.001] OpenInetSocket 6720
    knxd: Layer 8 [ 4:inet 0.002] InetSocket opened
    knxd: Layer 3 [ 3:layer3 0.002] registerLayer2 4:inet
    knxd: Layer 3 [ 3:layer3 0.002] registerLayer2 4:inet = 1
    knxd: Layer 2 [ 5:tpuarts:/dev/ttyACM0 0.002] Open
    knxd: Layer 2 [ 5:tpuarts:/dev/ttyACM0 0.002] Open
    knxd: Layer 8 [ 5:tpuarts:/dev/ttyACM0 0.002] ser state 0>2
    knxd: Layer 3 [ 3:layer3 0.002] registerLayer2 5:tpuarts:/dev/ttyACM0
    knxd: Layer 2 [ 5:tpuarts:/dev/ttyACM0 0.002] open
    knxd: Layer 8 [ 5:tpuarts:/dev/ttyACM0 0.002] ser state 0>12
    knxd: Layer 8 [ 5:tpuarts:/dev/ttyACM0 0.002] ser state 0>5
    knxd: Layer 3 [ 3:layer3 0.002] registerLayer2 5:tpuarts:/dev/ttyACM0 = 1
    Segmentation fault

    Do I need to get ttyACM0 owned by knxd ?? – I do not even know how to do this?
    Whatfor do I need such a strange Multicast address ?

    Warm Regards

    Peter

    1. Hi Peter,

      224.0.23.12/32 is not an external IP Address. This is a multicast address and only available in your local network. The router will not forward this address to the internet. Simple explaintation: Mulicast addresses are used when multiple computer should talk together means one of them sends and all other should receive the packets. knxd needs this for tunneling.

      Do I need to get ttyACM0 owned by knxd ?? => No, the dialout group has permissions to the serial devices. Add the user knxd to the dialout group (what my script does 🙂 )

      Michael

  40. Hi Michael,

    thanks – something new I learned – I´ve setup the network address as described and now route shows:
    pi@RasPi:~ $ route
    Kernel-IP-Routentabelle
    Ziel Router Genmask Flags Metric Ref Use Iface
    default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
    192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
    224.0.23.12 * 255.255.255.255 UH 0 0 0 eth0

    But after reboot the Raspi still showed the:
    knxd: Layer 0 [ 5:tpuarts:/dev/ttyACM0 0.040] Opening /dev/ttyACM0 failed: Permission denied

    I´ve used initially your install_knxd_systemd.sh script for installation and didn´t see an error-message.
    As a try I added user “knxd” again to the group “dialout” – now it works and all is fine

    Thanks for your help and patience

    Warm Regards

    Peter

  41. Hi Michael,

    all fine with knxd but with the changes in /etc/resolv.conf the raspi doesn´t find any DNS names anymore: but /run/systemd/resolve/resolv.conf shows:
    nameserver 62.202.44.223
    nameserver 62.2.121.84
    which should work – but any ping leads to “unknown host” – any idea why this shoudl be now broken with the setup I used at the beginning of your article?

    Any help welcome

    Peter

    1. Hi Peter,

      the link from /etc/resolv.conf to /run/systemd/resolve/resolv.conf exists?

      ls -l /etc/resolv.conf

      Nameserver are working? Whats output of (without the leading http:// WordPress add this):

      nslookup http://www.heise.de 62.202.44.223

      Michael

      1. Hi Michael,

        the links exists as
        pi@RasPi:~ $ ls -l /etc/resolv.conf
        lrwxrwxrwx 1 root root 24 Mär 24 09:20 /etc/resolv.conf -> /run/systemd/resolv.conf

        but nslookup is not installed “-bash: nslookup: Kommando nicht gefunden.”
        and without nameserver I can not update or download packages 🙁
        Is there another way to see if the nameserver is working – it seems that there is the issue.
        Regards
        Peter

  42. upgraded to raspberry2 with latest release, eibd 100% problem. used your guide to set knxd up, worked at the first try. thanks for this great guide and the greater script!!!

  43. Hi Michael,

    I am trying to set this up with a RPi, OpenhabianPi as the installed OS, and a Weinzierl module: knx-baos-module-838

    Any idea if this will work with that setup? Will the Weinzierl module work with the TPUART config as indicated in your guide?

    Thanks for all your help!

  44. hi Michael,

    many thanks for all your help!

    I’ve been trying this all day with no luck. Here are my outputs:
    [ 0.000000] Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa02082 bcm2709.serial=0xf42202f7 smsc95xx.macaddr=B8:27:EB:22:02:F7 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3ea00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 enable_uart=1 dtoverlay=pi3-disable-bt console=tty1 elevator=deadline net.ifnames=0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait
    [ 0.001324] console [tty1] enabled
    [ 0.839357] 3f215040.uart: ttyS0 at MMIO 0x3f215040 (irq = 59, base_baud = 31250000) is a 16550
    [ 2.327040] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
    [ 9.391195] systemd[1]: Starting system-getty.slice.
    [ 9.395523] systemd[1]: Created slice system-getty.slice.

    /etc/default/knxd:

    KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:10 -d -D -T -R -S -i –listen-local=/tmp/knx -b ft12cemi:/dev/ttyAMA0″

    (I tried changing this to ft12:/dev/ttyAMA0 and ft12cemi:/dev/ttyS0

    knxtool vbusmonitor1 ip:localhost
    and
    knxtool busmonitor1 ip:localhost

    provide no output or:
    Open Busmonitor failed: Device or resource busy

    I have ETS5 with the following settings:
    individual address:
    1.1.128
    server:
    192.168.178.2 (openhabianpi)
    port:
    6720

    any help would be greatly appreciated

  45. Thank you for this great tutorial!!

    My Setup:
    – Raspberry Pi Zero W
    – Abelelectronics Serial Pi Zero (Pi RS232 Extension Board)
    – Busch Jäger 6186 (RS232 EIB Interface)

    I’ve tried various config setting but I cant get any connection via knxtool busmonitor.

    I tried the following configurations:
    KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:10 -d -D -T -R -S -i –listen-local=/tmp/knx -b ft12cemi:/dev/ttyAMA0″

    KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:10 -d -D -T -R -S -i –listen-local=/tmp/knx -b ft12:/dev/ttyAMA0″

    KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:10 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyAMA0″

    but nothing seems to work

    What am I doing wrong? 🙁

    Thanks in advance,
    Jan

    1. Hi Jan,

      in my opinion you cannot couple a Busch Jäger 6186 (http://archiv.busch-jaeger-katalog.de/files/files_ONLINE/b_6186_20.pdf) interface with the Raspberry Pi. I think this interface is just speaking PEI 16 protocol not FT1.2 nor tpuart which are the minimum requierments to couple with an Raspberry because these two interfaces types are needing only the RxD and the TxD lines of the serial interface. As descripted in the Datasheet for 6186 an addional RTS Pin (may be for Handshake), which a raspberry does not provide, is requiered.

      Michael

  46. Hi Michael

    Wrote you a few month ago. But now i am in trouble again. I managed to set up the Connection for a few month now.
    Accidently after a restart now i am not able to read the Bus anymore. I can see telegrams in busmonitor1 but not in vbusmonitor1 anymore. The same for ETS and FHEM. It is still possible to write to the bus via ETS FHEM or Groupswrite but i dont recieve Telegrams from Light Switches not in vbusmonitor nor in ETS. Funny thing is that it was working yesterday. i tried to stop and start the service manualy without success.
    You mentioned that %DEVICEID is not correct here is the result of

    ps ax|grep knxd
    438 ? Ss 0:00 /usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.128 -d -D -T -R -S -i –listen-local=/tmp/knx usb:%DEVICEID%
    914 pts/0 S+ 0:00 grep –color=auto knxd

    do you have any idea what i did wrong. i unplugged the system few days ago but it was working after that. I think i just switched off the System today to make some Installations and after that vbusmonitor was gone. Could it have something to do with the Problem the other Michael described. With the Substitution of USBID i am a total noob when it comes to debugging stuff like that.

  47. tried a little bit

    /usr/local/bin/knxd-findusb.sh

    the result is

    cat /etc/default/knxd
    # Command line parameters for knxd. TPUART Backend
    # Serial device Raspberry
    # KNXD_OPTIONS=”–eibaddr=1.1.128 -d -D -T -R -S -i –listen-local=/tmp/knx tpuarts:/dev/ttyAMA0″
    # Serial device PC
    # KNXD_OPTIONS=”–eibaddr=1.1.128 -d -D -T -R -S -i –listen-local=/tmp/knx tpuarts:/dev/ttyS0″
    # Tunnel Backend
    # KNXD_OPTIONS=”–eibaddr=1.1.128 -d -D -T -R -S -i –listen-local=/tmp/knx ipt:192.168.56.1″
    # USB Backend
    KNXD_OPTIONS=”–eibaddr=1.1.128 -d -D -T -R -S -i –listen-local=/tmp/knx usb:%DEVICEID%”

    route
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    default fritz.box 0.0.0.0 UG 0 0 0 eth0
    192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
    224.0.23.12 * 255.255.255.255 UH 0 0 0 eth0

    dmesg | grep tty
    [ 0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0xe bcm2708.serial=0xed82fb77 smsc95xx.macaddr=B8:27:EB:82:FB:77 bcm2708_fb.fbswap=1 bcm2708.uart_clock=3000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait fbcon=map:10 consoleblank=0
    [ 0.001388] console [tty1] enabled
    [ 0.204581] 20201000.uart: ttyAMA0 at MMIO 0x20201000 (irq = 81, base_baud = 0) is a PL011 rev2

  48. Sorry for spamming the last Info i could achieve was that. But i have no idea how to interpret that.

    sudo ls -l /dev/ttyAMA0
    crw-rw—- 1 root dialout 204, 64 May 2 23:38 /dev/ttyAMA0

  49. Okay Problem solved with ABB KNX USB Interface. I did a clean install of KNXD with your Script again and set the Option string in
    /etc/default/knxd manualy

    KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:10 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:1:4:1:0:0″

    somehow this changed at some point cause at first i got %DEVICEID% behind the usb. So seems you already updated your Script to new circumstances in KNXD.
    I read out the Device ID by

    pi@raspberrypi:/usr/local/bin $ findknxusb

    In Github smurfix already got this problem with another guy on Github. Same Interface ABB and only vbusmonitor not working for switches.

    USB only as root working #204
    was the thread

    Somehow this problem got realy close to mine and seems not have been solved at this point in time i think. So in the end after 2 month your Script runs flawless. Thanks a lot for keeping this stuff up to date its a great for noobs like me.
    sorry for just posting my thoughts here feel free to erase that stuff Michael.

    Keep up that great work.

    1. Hi Philipp,

      newer Versions (the version the script installs, stable 0.12) of knxd does not need to specify the USB Address. knxd finds the device himself at startup:

      KNXD_OPTIONS=”–eibaddr=$EIB_ADDRESS_KNXD –client-addrs=$EIB_START_ADDRESS_CLIENTS_KNXD:1 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:”

      so simply leave the KNXD_OPTIONS line as it is 🙂

      Michael

  50. Hi Michael

    I have a Pi 3 running the latest openhabian and a TPUART GIRA Busankoppier 3. I cannot get the busmonitor to show any output so am doing something wrong.

    The only doubt I have is the wiring to the BTM. The BTM PIN numbers in your schematic diagram in the previous post don’t seem to match with the standard TP-UART spec published by siemens, PCBA_UP117-12_datasheet.pdf.

    Please can you explain the mapping of the BTM PINs in your schematic.

    many thanks
    Rich

    1. Hi Rich,

      as described in a previous comment:
      I used a standard pin header in the schematic and this has an different pin layout/couterwise then the TPUART Module:

      http://www.hqs.sbt.siemens.com/cps_product_data/gamma-b2b/PCBA_UP117-12_datasheet.pdf

      TPUART layout is

      10 9 8 7 6
      1 2 3 4 5
      | | | |

      while PIN Header is

      2 4 6 8 10
      1 3 5 7 9

      And therefore you have to translate
      Pin 1 TPUART is Pin 2 Pin Header
      Pin 2 TPUART is Pin 4 Pin Header
      Pin 4 TPUART is Pin 8 Pin Header
      Pin 5 TPUART is Pin 10 Pin Header

      Which interface do you use? A Siemens TPUART module or an Gria Busankoppler? In my opinion this is not the same.

      Michael

      1. Hi Michael.

        Thanks for the reply and posting the pin translation (again). My interpretation of the PIN translation was correct ….

        … but I was using the Gira Busankoppler. I swapped it for the Siemens TPUART and huzzah! All working now. Simple user error.

        I now know the Busankoppler and TPUART are not interchangeable!

  51. Hi Michael,
    Thanks for this post. It works great.
    I have a question: I am using an knx/ip interface which is configured with dhcp address. so when i am using the ipt=”x.x.x.x” it works fine as long as i know the IP address of the interface. Is there a way to instruct knxd to search for the knx/IP and automatically use it in the ipt param (e.g. ipt=auto)
    Thank you again for the great post
    David Anidjar

    1. Hi David,

      I think not because a Tunnel always ends in an unicast address and you need to know this address.

      Why not assiging a static IP Address?

      Michael

      1. Hi Michael,
        Thank you for your answer.
        I do not have ETS program nor I am familiar with it. I thought it would be a nice feature to have.
        By the way, the /tmp/knx Unix domain socket uses Knx/IP protocol?
        Thanks again

  52. Hi Micheal,
    I’m trying to use openhab2 on my knx home installation. I followed all your steps.
    My first Problem is, that I’m completey new to Linux and the second is when i type
    ps ax|grep knxd all i get is 1616 pts/0 S+ 0:00 grep knxd.
    I try to use the knxd on a raspberry pi 3 with raspbian and a Merten USB interface.

    Thanks in advance,
    Carsten

    1. Hi Carsten,

      it seems your knxd isn’t running. ps ax lists all running processes and it only founds the grep process with parameter knxd.

      Post the systemd log of the knxd.service:
      sudo journalctl -xu knxd

      Which interface do you use?

      Michael

      1. Hey Michael,
        thanks for the help.
        I’m using a Merten USB interface.
        This is what the log says:

        Logs begin at So 2017-07-30 20:56:01 CEST, end at Mo 2017-07-31 20:56:00 CEST
        Jul 30 20:56:04 raspberrypi systemd[1]: Starting KNX Daemon…
        — Subject: Unit knxd.service has begun with start-up
        — Defined-By: systemd


        — Unit knxd.service has begun starting up.
        Jul 30 20:56:05 raspberrypi knxd[506]: initialization of the EIBnet/IP server fa
        Jul 30 20:56:05 raspberrypi systemd[1]: knxd.service: control process exited, co
        Jul 30 20:56:05 raspberrypi systemd[1]: Failed to start KNX Daemon.
        — Subject: Unit knxd.service has failed
        — Defined-By: systemd


        — Unit knxd.service has failed.

        — The result is failed.

        ~
        — Logs begin at So 2017-07-30 20:56:01 CEST, end at Mo 2017-07-31 20:56:00 CEST
        Jul 30 20:56:04 raspberrypi systemd[1]: Starting KNX Daemon…
        — Subject: Unit knxd.service has begun with start-up
        — Defined-By: systemd


        — Unit knxd.service has begun starting up.
        Jul 30 20:56:05 raspberrypi knxd[506]: initialization of the EIBnet/IP server fa
        Jul 30 20:56:05 raspberrypi systemd[1]: knxd.service: control process exited, co
        Jul 30 20:56:05 raspberrypi systemd[1]: Failed to start KNX Daemon.
        — Subject: Unit knxd.service has failed
        — Defined-By: systemd


        — Unit knxd.service has failed.

        — The result is failed.
        Jul 30 20:56:05 raspberrypi systemd[1]: Unit knxd.service entered failed state.

        1. Hi Carsten,

          have you set a static IP Address?

          Jul 30 20:56:05 raspberrypi knxd[506]: initialization of the EIBnet/IP server fa => Means no Network interface (Multicast Address) is available.

          Have you tried to start knxd manually:

          sudo systemctl start knxd.service

          Michael

          1. Hey Michael,
            that was the fault, I set a static IP on the Pixel interface, doesn’t seem to work.
            Now I set the IP in the config and it works, great, thank you!

    1. Hi maxx,

      I assume want to establish a tunnel connection to an IP Gateway, right?

      Edit /etc/default/knxd

      Comment the tpuarts config line
      # KNXD_OPTIONS=”–eibaddr=….. -b tpuarts:/dev/ttyAMA0″

      and remove the comment character from the ipt line
      KNXD_OPTIONS=”–eibaddr= ….. -b ipt:192.168.56.1″

      replace the IP Address with the address your gateway.

      Michael

  53. Hi Michael,

    Installation works partly.

    What works: communication between homeserver and KNX

    Does not work:
    root@Raspberrypi:~# knxtool busmonitor1 ip:localhost
    Open Busmonitor failed: Connection reset by peer

    ETS5 it finds ip Tunneling, but no Connection possible.

    More Information:
    root@Raspberrypi:~# findknxusb
    Possible addresses for KNX USB devices:
    device: 1:4:1:0:0 (Gira Giersiepen GmbH & Co. KG:KNX-USB Data Interface)

  54. Hi! Trying to set this up, but starting to wondering if it is possible to set it up on an older Raspberry Pi Model B or not?

    If it is I am wondering about the “destination IP” that one needs to setup when assigning static IP. Where is this IP supposed to point to?

  55. Hi. I have problem with start knxd.service for KNX Usb interface. I get failed to start KNX Daemon. Content error:
    Aug 16 12:29:33 Hunter1 knxd[1053]: initialisation of backend ‘usb:1:4:1:0:0’ failed: Resource temporarily unavailable
    Aug 16 12:29:33 pi systemd[1]: knxd.service: control process exited, code=exited status=1
    Aug 16 12:29:33 pi systemd[1]: Failed to start KNX Daemon.
    Aug 16 12:29:33 pi systemd[1]: Unit knxd.service entered failed state.

    I try in Raspberry Pi 3 and don’t working…
    I setting inside file /etc/default/knxd:
    KNXD_OPTIONS=”–eibaddr=1.1.128 -d -D -T -R -S -i –listen-local=/tmp/knx usb:%DEVICEID%”

    And add file /usr/local/bin/knxd-findusb.sh to get serial address usb which join interface KNX/USB

    1. Hi bmcor,

      which Version of the script did you use? In 0.76 findusb.sh is no longer necessary, knxd finds an available KNX device. The config line for USB in the latest version of the script in /etc/default/knxd is like:

      # KNXD_OPTIONS=”–eibaddr=$EIB_ADDRESS_KNXD –client-addrs=$EIB_START_ADDRESS_CLIENTS_KNXD:1 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:”

      Please retry it with the current version of the script.

      Michael

  56. Hi Michael,
    I used script with link in your post.
    # Michael Albert
    # 09.06.2016
    # Changes
    # Version: 0.1
    # This is the first release of the try to install knxd
    # Currently state is experimental

      1. Yes, I used this link.
        Now, I installed knxd and started daemon knxd.service:
        1590 ? Ss 0:00 /usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.128 –client-addrs=1.1.129:1 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:
        1593 pts/0 S+ 0:00 grep knxd

        Daemon:
        Active: active (running) since Wed 2017-08-16 15:20:11 CEST; 6s ago
        Process: 1588 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)
        Main PID: 1590 (knxd)
        CGroup: /system.slice/knxd.service
        └─1590 /usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.128 –client-addrs=1.1.129:1 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:

        But, when i want use knxtool busmonitor1 ip:localhost get fail:
        Open Busmonitor failed: Connection reset by peer

        1. Hi Michael,
          I installed new image for rapsberry pi 3 and used your script to configuration.
          Now, when I want to run knxd.service I getting error and I can’t to start knxd.service.
          And I don’t now where is problem…
          Content:
          Loaded: loaded (/lib/systemd/system/knxd.service; enabled)
          Active: failed (Result: exit-code) since Thu 2017-08-17 09:53:47 UTC; 10s ago
          Process: 576 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=1/FAILURE)
          Main PID: 441 (code=exited, status=0/SUCCESS)
          Aug 17 09:53:47 raspberrypi knxd[576]: initialisation of backend ‘usb:’ failed: Resource temporarily unavailable
          Aug 17 09:53:47 raspberrypi systemd[1]: knxd.service: control process exited, code=exited status=1
          Aug 17 09:53:47 raspberrypi systemd[1]: Failed to start KNX Daemon.
          Aug 17 09:53:47 raspberrypi systemd[1]: Unit knxd.service entered failed state.

          1. Hi bmcor,

            is your USB device recognized? Whats the output of command

            sudo lsusb

            respectivily

            dmesg | grep -i usb

            Michael

          2. root@raspberrypi:~# sudo lsusb
            Bus 001 Device 006: ID 135e:0024
            Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
            Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
            Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

            root@raspberrypi:~# dmesg | grep -i usb
            [ 0.152192] usbcore: registered new interface driver usbfs
            [ 0.152292] usbcore: registered new interface driver hub
            [ 0.152407] usbcore: registered new device driver usb
            [ 0.314939] usbcore: registered new interface driver smsc95xx
            [ 0.787697] dwc_otg 3f980000.usb: DWC OTG Controller
            [ 0.790014] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
            [ 0.792399] dwc_otg 3f980000.usb: irq 62, io mem 0x00000000
            [ 0.799371] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
            [ 0.801704] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
            [ 0.804012] usb usb1: Product: DWC OTG Controller
            [ 0.806262] usb usb1: Manufacturer: Linux 4.9.43-v7+ dwc_otg_hcd
            [ 0.808532] usb usb1: SerialNumber: 3f980000.usb
            [ 0.811617] hub 1-0:1.0: USB hub found
            [ 0.816796] usbcore: registered new interface driver usb-storage
            [ 0.844876] usbcore: registered new interface driver usbhid
            [ 0.847308] usbhid: USB HID core driver
            [ 1.231209] usb 1-1: new high-speed USB device number 2 using dwc_otg
            [ 1.460745] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
            [ 1.463247] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
            [ 1.466505] hub 1-1:1.0: USB hub found
            [ 1.790510] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
            [ 1.930791] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
            [ 1.933363] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
            [ 2.044219] smsc95xx 1-1.1:1.0 eth0: register ‘smsc95xx’ at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:b2:44:22
            [ 2.140464] usb 1-1.2: new full-speed USB device number 4 using dwc_otg
            [ 2.680510] usb 1-1.2: device not accepting address 4, error -32
            [ 3.020596] usb 1-1.2: new full-speed USB device number 6 using dwc_otg
            [ 3.171293] usb 1-1.2: New USB device found, idVendor=135e, idProduct=0024
            [ 3.171311] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
            [ 3.171319] usb 1-1.2: Product: KNX-USB Data Interface
            [ 3.171326] usb 1-1.2: Manufacturer: Merten GmbH & Co. KG
            [ 3.184121] hid-generic 0003:135E:0024.0001: hiddev0,hidraw0: USB HID v1.01 Device [Merten GmbH & Co. KG KNX-USB Data Interface] on usb-3f980000.usb-1.2/input0

          3. I see joined knx-usb interface. When use findknxusb i getted:
            root@raspberrypi:~# findknxusb
            Possible addresses for KNX USB devices:
            device: 1:6:1:0:0 (Merten GmbH & Co. KG:KNX-USB Data Interface)

          4. Hi bmcor,

            whats happend when you try to start knxd manually:

            systemctl start knxd.service
            journalctl -xu knxd.service
            knxd –version

            Michael

  57. Hi Michael you made an amazing work !

    When I want to see if packet on the bus it’s said connection refused. I tried manually to launch the usb but doesn’t work too.

    I tried this command systemctl start knxd.service and this is the answer.
    Aug 18 06:50:55 raspberrypi knxd[514]: initialization of the EIBnet/IP server failed: No such device
    Aug 18 06:50:55 raspberrypi systemd[1]: knxd.service: control process exited, code=exited status=1
    Aug 18 06:50:55 raspberrypi systemd[1]: Failed to start KNX Daemon.
    — Subject: Unit knxd.service has failed
    — Defined-By: systemd


    — Unit knxd.service has failed.

    — The result is failed.
    Aug 18 06:50:55 raspberrypi systemd[1]: Unit knxd.service entered failed state.
    Aug 18 06:58:30 raspberrypi systemd[1]: Starting KNX Daemon…
    — Subject: Unit knxd.service has begun with start-up
    — Defined-By: systemd

    I don’t understand the problem. I read the other comments with people who had the same problem and maybe my problem comes to my static IP?

    I wrote this in my dhcpcd.conf :
    nterface eth0
    static ip_address=10.108.146.55/24
    static routers=10.108.146.1
    static domain_name_servers=8.8.8.8 8.8.4.4
    # Route for Multicast Address EIB/KNX
    [Route]
    Destination=224.0.23.12/32

    I follow an other tutorial because when i follow yours after the reboot i lost all the connection ethernet and wifi on my rpi 3.

    Do you have some idea on my issue?
    Regards

    1. Oh i just re-installed and it’s semi works I have :
      root@raspberrypi:/home/pi# knxtool busmonitor1 ip:localhost
      LPDU: 03 :Unknown LPDU: 03

      But I thinks is my data on the bus which are false and not knxd, right?

    2. Hi Marc,

      initialization of the EIBnet/IP server failed: No such device => Means no device with a route to the mulicast Address 224.0.23.12 is found. Check with

      route -n

      This is usually a problem if some network interfaces uses dhcp instead of a static ip address. knxd starts before the interface is ready.

      Michael

      1. Thanks for the fast reply !

        I follow your tutorial to set a static address and now the deamon is running but I lost my internet connection and I don’t know if it’s normal like dhcpcd is disable?

        1. Now I can see the data on the bus thanks knxtool busmonitor1 ip:localhost. It’s work !
          However I would like to switch on/off the light thanks to the rpi but when i used this commands :
          knxtool on ip:localhost 0/0/1 it’s reply connect failed : connection reset by peer.

          and if I use knxtool groupswrite ip:localhost 0/0/1 1
          Nothing happening in real

          Some idea on the problem?

  58. Hi Michael
    Now everything is working, i can manage the bus from OpenHAB but just for a few second. I don’t know why but the knxd connection stop itself after 10/15s and if i reboot it’s working again for few seconds (i can send 2/3 commands and after it’s stop). Some ideas ?

    Regards

  59. Hello Michael,
    and Thanks for your work!
    I Use you tutorial and everything work correctly… for 1 min and 30 sec.

    I restart knxd with:
    sudo systemctl restart knxd.service
    and I can work for another 1 minute and 30 seconds then I get the error:

    Job for knxd.service failed. See ‘systemctl status knxd.service’ and ‘journalctl -xn’ for details.

    sudo systemctl status knxd.service
    * knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled)
    Active: failed (Result: timeout) since lun 2017-08-28 16:14:14 CEST; 3min 26s ago
    Process: 1221 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)

    ago 28 16:14:13 raspberrypi systemd[1]: knxd.service start operation timed out. Terminating.
    ago 28 16:14:14 raspberrypi systemd[1]: Failed to start KNX Daemon.
    ago 28 16:14:14 raspberrypi systemd[1]: Unit knxd.service entered failed state.

    Many thanks if you can help me.

    Bye,
    marco

    1. Hello Michael,
      I have downloaded the last RASPBIAN STRETCH LITE, and executed the steps of your post to use systemd, then executed the script V0.7.7 on a raspberry zero W.
      I have the same problem of my previous post: when I restart the knxd service, it work for 1 min and 30 sec, then it stop.
      I tryed with an ABB USB/S1.1 interface and with an GWA9705 IP Interface, but in both case, I have the timeout of 1 min and 30 sec.
      Can you give me some ideas to try to solve?
      Many Thanks.

        1. Hello Michael,

          When I use the ABB USB/S1.1 interface, I use the option:
          # USB Backend
          KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:1 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:”

          if I manually execute the i ./usr/local/bin/findknxusb i receive:
          device: 1:2:1:0:0 (ABB STOTZ-KONTAKT GmbH:KNX-USB Interface (MDRC)

          When I use the Gewiss GWA9705 IP Interface, I use the option:
          KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:1 -d -D -T -R -S -i –listen-local=/tmp/knx -b ipt:192.168.1.145″

          Thanks,
          Marco

          1. Hi Marco,

            try to start knxd with logging at command line. Change to user knxd

            su knxd -s /bin/bash

            and start knxd with logging/tracing

            knxd -t 1023 –eibaddr=1.1.128 –client-addrs=1.1.129:1 -D -T -R -S -i –listen-local=/tmp/knx -t -1023 -b usb:

            Do you see some hints why knxd terminates?
            Michael

          2. Hi Marco,

            I’ve investigated and there are some changes since 0.14 regarding process start of knxd. The systemd startup forking does not working anymore. I’ve updated the script to Version 0.7.8.

            Please let me know if this works for you.

            Michael

          3. Hello Michael,
            1)
            when I try:
            su knxd -s /bin/bash
            a password for knxd is required: I try with knxd, raspberry, empty, ma no one is correct (whitch is the correct one?)

            2)
            I executed the script V0.7.8, and:
            after the reboot, the service is stopped, but if I execute:
            sudo systemctl restart knxd.service, everything work correctly.

            This is the sudo systemctl status knxd.service immediatly after reboot:

            pi@raspberrypi:~ $ sudo systemctl status knxd.service
            ● knxd.service – KNX Daemon
            Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
            Active: failed (Result: signal) since Mon 2017-09-18 21:36:04 UTC; 2min 55s ago
            Process: 313 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=killed, signal=ABRT)
            Main PID: 313 (code=killed, signal=ABRT)

            Sep 18 21:36:03 raspberrypi systemd[1]: Started KNX Daemon.
            Sep 18 21:36:04 raspberrypi knxd[313]: E00000032: [20:router] router: setup router: failed
            Sep 18 21:36:04 raspberrypi knxd[313]: F00000000: [ 4:server] Link down, terminating
            Sep 18 21:36:04 raspberrypi systemd[1]: knxd.service: Main process exited, code=killed, status=6/ABRT
            Sep 18 21:36:04 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
            Sep 18 21:36:04 raspberrypi systemd[1]: knxd.service: Failed with result ‘signal’.
            pi@raspberrypi:~ $

            Thank
            Marco

          4. Hi Marco,

            “router: setup router: failed” => As describted in the post. Have you set a static IP Address in particulally the route for the multicast address in your network config?


            [Route]
            Destination=224.0.23.12/32

            When you try to run knxd as router the route for the multicast address is essential.

            “Link down” Or your network interface isn’t ready yet. Back to “Have you set a static IP Address”…. 🙂

            Michael

          5. Sossy Michael, but after some minutes of correct working, I get the error:

            pi@raspberrypi:~ $ knxtool off ip:localhost 1/5/201
            Open failed: Connection refused

            And this is the sudo systemctl status knxd.service:

            pi@raspberrypi:~ $ sudo systemctl status knxd.service
            ● knxd.service – KNX Daemon
            Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
            Active: failed (Result: exit-code) since Mon 2017-09-18 21:52:52 UTC; 21s ago
            Process: 509 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=1/FAILURE)
            Main PID: 509 (code=exited, status=1/FAILURE)

            Sep 18 21:44:13 raspberrypi systemd[1]: Started KNX Daemon.
            Sep 18 21:52:52 raspberrypi knxd[509]: F00000035: [18:C.usb] Send while buffer not empty
            Sep 18 21:52:52 raspberrypi knxd[509]: F00000000: [15:C.usb] Link down, terminating
            Sep 18 21:52:52 raspberrypi knxd[509]: E00000035: [18:C.usb] SendError 20013f0 status 3
            Sep 18 21:52:52 raspberrypi systemd[1]: knxd.service: Main process exited, code=exited, status=1/FAILURE
            Sep 18 21:52:52 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
            Sep 18 21:52:52 raspberrypi systemd[1]: knxd.service: Failed with result ‘exit-code’.
            pi@raspberrypi:~ $

            Bye,
            Marco

          6. Hi Marco,

            ” [15:C.usb] Link down” seems to be a problem with your USB Interface. You have written you also have a IP Router. Runs knxd stable when you connect to the ipt: backend instead of the USB device?

            Do see you a USB disconnect message in kernel log/messages at the same time knxd terminates? Type command:

            dmesg

            This is only working if knxd is running:
            pi@raspberrypi:~ $ knxtool off ip:localhost 1/5/201
            Open failed: Connection refused

            On the same host you can also connect to the SOCKET
            knxtool vbusmonitor1 local:/tmp/knx

            Michael

          7. Hi Michael,
            with IP interface, I have only problem after reboot.
            After Reboot the knxd is stopped.
            Is I restart with
            sudo systemctl restart knxd.service
            everything work properly (I have tested for 5 or 6 hours without any problems).

            This is the error immediatly after reboot (with KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b ipt:192.168.1.145″):

            pi@raspberrypi:~ $ sudo systemctl status knxd.service
            ● knxd.service – KNX Daemon
            Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
            Active: failed (Result: exit-code) since Tue 2017-09-19 19:42:32 UTC; 2min 30s ago
            Process: 312 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=1/FAILURE)
            Main PID: 312 (code=exited, status=1/FAILURE)

            Sep 19 19:42:31 raspberrypi systemd[1]: Started KNX Daemon.
            Sep 19 19:42:32 raspberrypi knxd[312]: E00000032: [19:router] router: setup router: failed
            Sep 19 19:42:32 raspberrypi systemd[1]: knxd.service: Main process exited, code=exited, status=1/FAILURE
            Sep 19 19:42:32 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
            Sep 19 19:42:32 raspberrypi systemd[1]: knxd.service: Failed with result ‘exit-code’.
            pi@raspberrypi:~ $

            Of couse I have in the /etc/systemd/network/wlan0.network the:
            [Route]
            Destination=224.0.23.12/32

            Bye,
            Marco

          8. Hi Marco,

            knxd terminates because the wlan interface isn’t ready. Please edit /lib/systemd/system/knxd.service and change the Unit section:
            [Unit]
            Description=KNX Daemon
            Requires=network-online.target
            After=network.target

            Then reload daemon config

            sudo systemctl daemon-reload

            Michael

          9. Hi Michael,
            I add the
            Requires=network-online.target
            in the file /lib/systemd/system/knxd.service, and reloaded the demon,
            but after reboot I alway get the error:

            pi@raspberrypi:~ $ sudo systemctl status knxd.service
            ● knxd.service – KNX Daemon
            Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
            Active: failed (Result: exit-code) since Wed 2017-09-20 13:13:25 UTC; 49s ago
            Process: 311 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=1/FAILURE)
            Main PID: 311 (code=exited, status=1/FAILURE)

            Sep 20 13:13:24 raspberrypi systemd[1]: Started KNX Daemon.
            Sep 20 13:13:25 raspberrypi knxd[311]: E00000032: [19:router] router: setup router: failed
            Sep 20 13:13:25 raspberrypi systemd[1]: knxd.service: Main process exited, code=exited, status=1/FAILURE
            Sep 20 13:13:25 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
            Sep 20 13:13:25 raspberrypi systemd[1]: knxd.service: Failed with result ‘exit-code’.
            pi@raspberrypi:~ $

            The system work correctly if I start the knxd manually with
            sudo systemctl start knxd.service

            Bye,
            Marco

          10. Hi Marco,

            ok, it seems wlan0 is still not ready. Make the following changes:

            Enable the systemd network wait online service
            systemctl enable systemd-networkd-wait-online.service

            Then edit the file /lib/systemd/system/knxd.service
            Insert the ExecStartPre right before ExecStart line, replace wlan0 with your interface name. Something like this:

            [Unit]
            Description=KNX Daemon
            Requires=network-online.target
            After=network.target

            [Service]
            EnvironmentFile=/etc/default/knxd
            ExecStartPre=/lib/systemd/systemd-networkd-wait-online --interface=wlan0 --timeout=60
            ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS
            Type=simple
            PIDFile=/run/knxd/knxd.pid
            User=knxd
            Group=knxd

            [Install]
            WantedBy=multi-user.target

            and reload config
            systemctl daemon-reload
            Michael

          11. Hi Michael,
            many tanks for you exemplary support.
            Now everything work!

            Instead of
            ExecStartPre=/lib/systemd/systemd-networkd-wait-online –interface=wlan0 –timeout=60
            I used
            ExecStartPre=/bin/sleep 10
            because the systemd-networkd-wait-online give me some errors…

            Thanks a lot.
            Bye
            Marco

  60. Hello Michael,

    thanks a lot for that great script.

    I tried to run your script (Version 0.7.6 19.02.2017) on a Raspberry 3 running Raspbian Stretch with Desktop (Release date: 2017-09-07, Kernel version: 4.9) and it terminated with following error:

    Paket libsystemd-daemon-dev ist nicht verfügbar, wird aber von einem anderen Paket
    referenziert. Das kann heißen, dass das Paket fehlt, dass es abgelöst
    wurde oder nur aus einer anderen Quelle verfügbar ist.
    Doch die folgenden Pakete ersetzen es:
    libsystemd-dev

    E: Für Paket »libsystemd-daemon-dev« existiert kein Installationskandidat.
    E: Paket libsystemd-daemon0 kann nicht gefunden werden.

    What am I doing wrong?

    Thanks in advance,
    Andre

  61. Hi Michael,

    thanks for your extremely quick first feedback!

    A year ago I used your ‘old’ script for EIBD on my RPI B+ and this installation works absolute fine up to now.
    Now I have to upgrade to RPI 3 and spent hours to get KNXD running but without success – hope you will find what’s wrong.

    Thanks for your efforts,
    Andre

    1. Hi Andre,

      I’ve already updated the script with the adjustments for Stretch in July, but forgotten to upload 🙁

      Version is 0.7.7 now.

      Let me know if it works.

      Michael

  62. Hi Michael,

    Many Thanks for your effort.
    I really don’t want to bother you. But I’m struggling with the set up for my USB knxd for days.

    Using:
    KNXD_OPTIONS=”–eibaddr=1.1.128 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:1:4:1:0:0″
    I’m always getting:

    pi@raspberrypi:/usr/local/bin $ sudo systemctl status knxd.service
    ● knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled)
    Active: failed (Result: exit-code) since Di 2017-09-19 08:43:17 CEST; 7s ago
    Process: 5035 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=2)

    Sep 19 08:43:17 raspberrypi knxd[5035]: Too many arguments for usb!
    Sep 19 08:43:17 raspberrypi knxd[5035]: E00000055: [ 1:main] There is no KNX addr= in section ‘main’.
    Sep 19 08:43:17 raspberrypi knxd[5035]: F00000000: [ 1:main] Error setting up the KNX router.
    Sep 19 08:43:17 raspberrypi systemd[1]: knxd.service: control process exited, code=exited status=2
    Sep 19 08:43:17 raspberrypi systemd[1]: Failed to start KNX Daemon.
    Sep 19 08:43:17 raspberrypi systemd[1]: Unit knxd.service entered failed state.

    I tried different combinations for KNXD options. But I don’t understand what “Too many arguments for usb” is about.

    Any help will be appreciated.

    Best regards
    Dirk

    1. Hi Dirk,

      which version of knxd have you running? Check with

      knxd –version

      Newer Versions, imo >0.12, does not need a device address as argument of usb:

      Simply define

      KNXD_OPTIONS=”–eibaddr=1.1.128 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:″

      and knxd is looking for a appropriated device.

      Michael

      1. Thanks Michael,

        I’m using
        pi@raspberrypi:/usr/local/bin $ knxd –version
        knxd 0.14.18:ef3c496
        Usage: knxd configfile [main_section]

        But when I leave the usb address empty I’m getting a timed out error:
        pi@raspberrypi:/usr/local/bin $ sudo systemctl status knxd.service
        ● knxd.service – KNX Daemon
        Loaded: loaded (/lib/systemd/system/knxd.service; enabled)
        Active: failed (Result: timeout) since Di 2017-09-19 09:35:17 CEST; 10s ago
        Process: 5394 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)

        Sep 19 09:35:17 raspberrypi systemd[1]: knxd.service start operation timed out. Terminating.
        Sep 19 09:35:17 raspberrypi systemd[1]: Failed to start KNX Daemon.
        Sep 19 09:35:17 raspberrypi systemd[1]: Unit knxd.service entered failed state.

        But findknxusb is working fine:
        pi@raspberrypi:/usr/local/bin $ findknxusb
        Possible addresses for KNX USB devices:
        device: 1:4:1:0:0 (Gira Giersiepen GmbH & Co. KG:KNX-USB Data Interface)

        Dirk

        1. Hi Dirk,

          “knxd.service start operation timed out. Terminating.” Due to a change in process start since Version 0.14 the systemd type in /lib/systemd/system/knxd.service has to altered:

          from
          Type=forking

          to
          Type=simple

          then reload config

          systemctl daemon-reload
          systemctl start knxd

          Also your option line in /etc/default/knxd must have –client-addrs parameter:
          KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyAMA0″

          Michael

  63. Hi,
    So i tried your Script again, this time like you recommended the knxd instead of the eibd, and this time I managed to kill my Network connection somehow. I was initially connected to my Raspberry Pi using VNC before. After a lot of mesing around I managed to get a Static I.P. set up and VNC running.
    SO since I was worried about losing this connection I decided to follow all your steps that came after the Network Setup, and decided to do the network setup at the end, once i have everything installed. Everything worked out fine it seems, only when I did do the Network setup, something seemed to go wrong.
    I created a file exactly like you said, only using my I.P. Settings::

    [Match]
    # You can also use wildcards. Maybe you want enable dhcp
    # an all eth* NICs
    Name=eth0
    [Network]
    #DHCP=v4
    # static IP
    # 192.168.100.2 netmask 255.255.255.0
    Address=192.168.0.222/24
    Gateway=192.168.0.1
    DNS=192.168.0.1
    # Route for Multicast Address EIB/KNX
    [Route]
    Destination=224.0.23.12/32

    Then I followed the steps::

    1root@raspberry:~# mv /etc/network/interfaces /etc/network/interfaces.save
    2root@raspberry:~# systemctl enable systemd-networkd.service
    3root@raspberry:~# systemctl enable systemd-resolved.service
    4root@raspberry:~# systemctl start systemd-resolved.service
    5root@raspberry:~# systemctl disable dhcpcd.service

    Set an link from the system wide resolve.conf to systemd
    1root@raspberry:~# mv /etc/resolv.conf /etc/resolv.conf.save
    2root@raspberry:~# ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

    Reboot to get the config active
    1root@raspberry:~# reboot

    Now I cant connect over VNC anymore, so I hooked up a Monitor and Keyboard/Mouse.
    At the top of the screen, when I MouseOver the Network symbol it says::
    “dhcpcd lost” which it should say since we want a static I.P. but I have no Internet Connection at all. When I right-click and click “Wireless&Wired Network Settings” nothing happens at all. When I left-click on the Network Symbol it says::
    “No wireless interfaces found”
    I assume he is trying to connect over wireless even though I dont have Wireless, but I cant get into the Settings anymore to make any changes either, and since I have very little knowledge regarding Raspberry Pi I wouldnt know what to edit or do to fix the problem.
    Any ideas on what went wrong or how to fix the problem?
    Thanks for your help and time!

    1. Hi Holo,

      you should use a terminal 🙂 to determine your IP Address. Open a terminal

      ifconfig

      shows your IP Address. Then test the connection from your PC

      ping IPAddressDeterminedFromRaspberry

      Whats the IP Address of your PC?

      Michael

      1. Thanks for th help!
        I used the terminal and the command “ifconfig” and I got::
        lo: flags =73 mtu 65536
        inet 127.0.0.1 netmask 255.0.0.0
        inet6 ::1 prefixlen 128 scopeid 0x10
        loop txqueuelen 1 (Local Loopback)
        RX packets 13 bytes 772 (772.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 13 bytes 772 (772.0 B)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

        Thats why the Ethernet connection isnt working i presume, if my I.P adress is:: 127.0.0.1
        and subnet: 255.0.0.0
        then im in the wrong address area, but in the File I had created I have::
        [Match]
        name=eth0
        [Network]
        #DHCP=v4
        # static IP
        # 192.168.100.2 netmask 255.255.255.0
        Address=192.168.0.222/24
        Gateway=192.168.0.1
        DNS=192.168.0.1
        # Route for Multicast Address EIB/KNX
        [Route]
        Destination=224.0.23.12/32

        With this IP it should work fine

        On my Laptop I got:: 192.168.0.162
        Setting up VNC shouldn’t be a problem, once the Network Connection on the Pi is working again properly.

        1. Hi Holo,

          your IP Address isn’t set properly. 127.0.0.1 is the loopback address which is available on all systems.

          Is the network interface recognized by the kernel:

          dmesg|grep eth

          Is the networking.service started?

          sudo systemctl status networking.service

          Try to bring up the interface manually
          sudo ifconfig eth0 up
          sudo ifconfig eth0 192.168.0.222 netmask 255.255.255.0

          and check from your PC if it is available
          ping 192.168.0.222

          Michael

          1. Hi,
            So i am moving along slowly, but surely. Well I clearly had F*!$ed something up with my Network settings and kept getting errors. I just did a complete clean swipe of everything and started from step 1: Installing Raspbian fresh and updating everything.
            I completed all your steps now, and in my task bar it shows me that I am not connected to the Internet, but I clearly am, and I managed to Ping my I.P. successfully from my Laptop. So I don’t really care what it shows me since I clearly have a connection, and a fixed I.P. or I wouldnt be writing you now.
            I commented out the TPUART line and commented in the USB line. and I can find my USB Device using “findknxusb”
            I just haven’t figured out how to connect to it or send anything over it yet via USB. I didn’t figure out how to activate the busmonitor, since the command “knxtool busmonitor1” expects “local:” or “ip:” and I dont know what to write. If you could maybe help me along that would be great! I’m already happy to have gotten this far finally, since it seems like everything is working fine, other than me being to dumb to use it properly 🙂
            Thanks a lot for your help so far.

          2. Hi Holo,

            I do not use a Desktop Environment, imo the task bar in any GUI needs the NetworkManager running in background, but we have configured the network manually. So do not trust the GUI in this case 🙂 ping is always your friend to check network connectivity 🙂

            To connect via knxtool you can use the socket

            knxtool vbusmonitor1 local:/tmp/knx

            or the localhost (127.0.0.1)

            knxtool vbusmonitor1 ip:localhost

            Michael

          3. Hi,
            I tried that now, but when I run ” knxtool vbusmonitor1 local:/tmp/knx”, then I get :”Open failed: No such file or directory”. When I run “knxtool vbusmonitor1 ip:localhost”/”knxtool vbusmonitor1 ip:127.0.0.1” then I get : “Open failed: Connection refused”
            When using “busmonitor1” instead of “vbusmonitor1” i get the same result.
            I tried running “sudo systemctl start knxd” to make sure its running but I dont get feedback.
            when I run “findknxusb”, I get : “device: 1:7:1:0:0 (Siemens:N 148/12 KNX Interface)”.
            Dont have a I.P. Interface, only a USB Interface.
            At one part you wrote:
            After installing you have to decide which interfaces you want to use(Default TPUARTS at /dev/ttyAMA0). With this configuration knxd must come up after a reboot because knxd could check if a TPUART module is present.
            When I run “ps ax|grep knxd” I get: “3001 pts/0 S+ 0:00 grep knxd”

            I am using a Pi 2 Model B v1.1 is that a problem?
            Feeling kind of lost now.

          4. Hi Holo

            ”Open failed: No such file or directory”. When I run “knxtool vbusmonitor1 ip:localhost”/”knxtool vbusmonitor1 ip:127.0.0.1” then I get : “Open failed: Connection refused” => Your knxd isn’t running.

            Check systemd and its journal about the knxd state:

            sudo systemctl status knxd.service
            sudo journalctl -xu knxd.service

            What’s the content of your config file:

            cat /etc/default/knxd

            Michael

          5. When I input “sudo systemctl status knxd.service” I got::
            knxd.service – KNX Daemon
            Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
            Active: failed (Result: signal) since Fri 2017-09-22 11:12:10 CEST: 2h 18min ago
            Process: 2839 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=killed, signal=SEGV)
            Main PID: 2839 (code=killed, signal=SEGV)

            Sep 22 11:12:10 raspberrypi system[1]: Started KNX Daemon.
            Sep 22 11:12:10 raspberrypi system[1]: knxd.service: Main process exited, code=killed, status=11/SEGV
            Sep 22 11:12:10 raspberrypi system[1]: knxd.service: Unit entered failed state.
            Sep 22 11:12:10 raspberrypi system[1]: knxd.service: Failed with result ‘signal’.

            when I Input “cat /etc/default/knxd” I got::
            # Command line parameters for knxd, TPUART Backend
            # Serial device Raspberry
            # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyAMA0″
            # Serial device PC
            # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyS0″
            # Tunnel Backend
            # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b ipt:192.168.56.1″
            # USB Backend
            # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:”

          6. Hi Holo,

            you have nothing configured 🙂 If you have a tpuart module conneted remove the leading # character from the line

            KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyAMA0″

            Michael

          7. Hi Michael,
            Sorry that was a typing mistake I made, I meant to use the USB device, now I took out the “#” from the USB line but now now I am getting this.
            This is what I get from: “sudo systemctl status knxd.service”
            ● knxd.service – KNX Daemon
            Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
            Active: failed (Result: signal) since Mon 2017-09-25 07:41:43 CEST; 3min 9s ago
            Process: 6259 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=k
            Main PID: 6259 (code=killed, signal=SEGV)

            Sep 25 07:41:43 raspberrypi systemd[1]: Started KNX Daemon.
            Sep 25 07:41:43 raspberrypi knxd[6259]: libusb: error [_get_usbfs_fd] libusb couldn’t ope
            Sep 25 07:41:43 raspberrypi knxd[6259]: libusb: error [_get_usbfs_fd] libusb requires wri
            Sep 25 07:41:43 raspberrypi knxd[6259]: E00000032: [15:C.usb] C.usb: setup C.usb: failed
            Sep 25 07:41:43 raspberrypi systemd[1]: knxd.service: Main process exited, code=killed, s
            Sep 25 07:41:43 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
            Sep 25 07:41:43 raspberrypi systemd[1]: knxd.service: Failed with result ‘signal’.

            This is what i get from: “sudo journalctl -xu knxd.service”
            — Logs begin at Thu 2016-11-03 18:16:43 CET, end at Mon 2017-09-25 07:46:33 CEST. —
            Sep 21 14:45:30 raspberrypi systemd[1]: Started KNX Daemon.
            — Subject: Unit knxd.service has finished start-up
            — Defined-By: systemd


            — Unit knxd.service has finished starting up.

            — The start-up result is done.
            Sep 21 14:45:30 raspberrypi knxd[366]: libusb: error [_get_usbfs_fd] libusb couldn’t open
            Sep 21 14:45:30 raspberrypi systemd[1]: knxd.service: Main process exited, code=killed, s
            Sep 21 14:45:30 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
            Sep 21 14:45:30 raspberrypi systemd[1]: knxd.service: Failed with result ‘signal’.
            Sep 21 14:56:52 raspberrypi systemd[1]: Started KNX Daemon.
            — Subject: Unit knxd.service has finished start-up
            — Defined-By: systemd


            — Unit knxd.service has finished starting up.

            — The start-up result is done.
            Sep 21 14:56:52 raspberrypi knxd[1055]: libusb: error [_get_usbfs_fd] libusb couldn’t ope
            Sep 21 14:56:52 raspberrypi knxd[1055]: libusb: error [_get_usbfs_fd] libusb requires wri
            Sep 21 14:56:52 raspberrypi knxd[1055]: E00000032: [15:C.usb] C.usb: setup C.usb: failed
            Sep 21 14:56:52 raspberrypi systemd[1]: knxd.service: Main process exited, code=killed, s
            Sep 21 14:56:52 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
            Sep 21 14:56:52 raspberrypi systemd[1]: knxd.service: Failed with result ‘signal’.
            Sep 22 11:12:10 raspberrypi systemd[1]: Started KNX Daemon.
            lines 1-28

            And this is what i have set up because I only have a USB Interface: “cat /etc/default/knxd”
            # Command line parameters for knxd. TPUART Backend
            # Serial device Raspberry
            # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyAMA0″
            # Serial device PC
            # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyS0″
            # Tunnel Backend
            # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b ipt:192.168.56.1″
            # USB Backend
            KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:”

            Thanks for trying to help me out!! I really appreciate it.

          8. Hi Holo,

            can you execute findknxusb as user knxd please :

            # Make root
            sudo su
            # switch to user knxd
            su knxd -s /bin/bash
            # execute
            findknxusb

            Is a device recognized?

            Which USB Device ID has the device:

            lsusb
            lsusb -n

            Michael

          9. HI,
            No it doesn’t find the USB device when I do that.
            root@raspberrypi:/home/pi# sudo su
            root@raspberrypi:/home/pi# su knxd -s /bin/bash
            knxd@raspberrypi:/home/pi$ findknxusb
            Possible addresses for KNX USB devices:
            knxd@raspberrypi:/home/pi$

            knxd@raspberrypi:/home/pi$ lsusb
            Bus 001 Device 008: ID 0908:02dd Siemens AG
            Bus 001 Device 006: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory
            Bus 001 Device 004: ID 046d:c03d Logitech, Inc. M-BT96a Pilot Optical Mouse
            Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
            Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
            Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
            The Siemens Device is the KNX Interface I am using; Bus 001 Device 008: ID 0908:02dd Siemens AG

          10. HI Holo,

            ok, edit /etc/udev/rules.d/90-knxusb-devices.rules add the following 2 lines at the end of file

            # Siemens 148/12 KNX Interface
            SUBSYSTEM==”usb”, ATTR{idVendor}==”0908″, ATTR{idProduct}==”02dd”, ACTION==”add”, GROUP=”knxd”, MODE=”0664″

            restart linux and try to start knxd again.

            Michael

          11. HI,
            I added the code to the file but still nothing 🙁 Added the code and restarted the Pi.
            then ran:
            pi@raspberrypi:~ $ sudo su
            root@raspberrypi:/home/pi# sudo systemctl start knxd
            root@raspberrypi:/home/pi# sudo systemctl status knxd.service
            ● knxd.service – KNX Daemon
            Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: ena
            Active: failed (Result: exit-code) since Mon 2017-09-25 13:08:28 CEST; 52s ag
            Process: 1450 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTION
            Main PID: 1450 (code=exited, status=1/FAILURE)

            Sep 25 13:08:11 raspberrypi systemd[1]: Started KNX Daemon.
            Sep 25 13:08:18 raspberrypi knxd[1450]: E00000000: [23:C.usb] EMI_common: send w
            Sep 25 13:08:28 raspberrypi knxd[1450]: E00000055: [15:C.usb] Driver timed out t
            Sep 25 13:08:28 raspberrypi systemd[1]: knxd.service: Main process exited, code=
            Sep 25 13:08:28 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
            Sep 25 13:08:28 raspberrypi systemd[1]: knxd.service: Failed with result ‘exit-c
            It seems to me that the KNXD isn’t starting or running properly still, but I got further regarding the Interface.
            Ok, well i have been doing a lot of research now and I have the feeling the problem could be coming from the USB Interface too. In the ETS 4 the Siemens USB Interface doesnt work either, only in ETS 5 and my older interface from ABB, works with ETS 4 and not with ETS 5. So now I hooked up my older USB Interface and tried the steps from before:
            # Make root
            sudo su
            # switch to user knxd
            su knxd -s /bin/bash
            # execute
            findknxusb
            And I get
            knxd@raspberrypi:/home/pi$ findknxusb
            Possible addresses for KNX USB devices:
            device: 1:7:1:0:0 (ABB STOTZ-KONTAKT GmbH:KNX-USB Interface (MDRC))
            when I run:
            root@raspberrypi:/home/pi# lsusb
            Bus 001 Device 006: ID 147b:5120
            Bus 001 Device 005: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory
            Bus 001 Device 004: ID 046d:c03d Logitech, Inc. M-BT96a Pilot Optical Mouse
            Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
            Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
            Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

            So it seems that he recognises the ABB STOTZ interface, so I will continue using the ABB Interface for this. But I still cant get the knxd to run properly, I keep getting

            root@raspberrypi:/home/pi# sudo systemctl start knxd

            root@raspberrypi:/home/pi# sudo systemctl status knxd.service
            ● knxd.service – KNX Daemon
            Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: ena
            Active: failed (Result: exit-code) since Mon 2017-09-25 13:39:10 CEST; 5min a
            Process: 675 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS
            Main PID: 675 (code=exited, status=1/FAILURE)

            Sep 25 13:38:45 raspberrypi systemd[1]: Started KNX Daemon.
            Sep 25 13:39:10 raspberrypi knxd[675]: F00000035: [18:C.usb] Send while buffer n
            Sep 25 13:39:10 raspberrypi knxd[675]: F00000000: [15:C.usb] Link down, terminat
            Sep 25 13:39:10 raspberrypi knxd[675]: E00000035: [18:C.usb] SendError 181dcc8 s
            Sep 25 13:39:10 raspberrypi systemd[1]: knxd.service: Main process exited, code=
            Sep 25 13:39:10 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
            Sep 25 13:39:10 raspberrypi systemd[1]: knxd.service: Failed with result ‘exit-c
            lines 1-13/13 (END)…skipping…
            ● knxd.service – KNX Daemon
            Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
            Active: failed (Result: exit-code) since Mon 2017-09-25 13:39:10 CEST; 5min ago
            Process: 675 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exi
            Main PID: 675 (code=exited, status=1/FAILURE)

            Sep 25 13:38:45 raspberrypi systemd[1]: Started KNX Daemon.
            Sep 25 13:39:10 raspberrypi knxd[675]: F00000035: [18:C.usb] Send while buffer not empty
            Sep 25 13:39:10 raspberrypi knxd[675]: F00000000: [15:C.usb] Link down, terminating
            Sep 25 13:39:10 raspberrypi knxd[675]: E00000035: [18:C.usb] SendError 181dcc8 status 3
            Sep 25 13:39:10 raspberrypi systemd[1]: knxd.service: Main process exited, code=exited, st
            Sep 25 13:39:10 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
            Sep 25 13:39:10 raspberrypi systemd[1]: knxd.service: Failed with result ‘exit-code’.
            root@raspberrypi:/home/pi# knxtool vbusmonitor1 ip:localhost
            Open failed: Connection refused
            root@raspberrypi:/home/pi# knxtool vbusmonitor1 local:/tmp/knx
            Open failed: No such file or directory

          12. Hi Holo,

            this seems to be a bug in knxd:
            Sep 25 13:39:10 raspberrypi knxd[675]: F00000035: [18:C.usb] Send while buffer n
            Sep 25 13:39:10 raspberrypi knxd[675]: F00000000: [15:C.usb] Link down, terminat
            Sep 25 13:39:10 raspberrypi knxd[675]: E00000035: [18:C.usb] SendError 181dcc8 s

            Are you at the latest version:

            knxd –version

            Michael

          13. HI,
            Not sure if its the newest version. 0.14.18?
            root@raspberrypi:/home/pi# knxd –version
            knxd 0.14.18:ef3c496
            Usage: knxd configfile [main_section]
            Please consult /usr/share/doc/knxd/inifile.rst

          14. Hi Michael!
            Got some more info for you 🙂 I am happy to say that this morning I thought I would give it another shot. So my results were the following:
            root@raspberrypi:/home/pi# sudo systemctl status knxd.service
            ● knxd.service – KNX Daemon
            Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
            Active: active (running) since Tue 2017-09-26 07:41:34 CEST; 2s ago
            Main PID: 2213 (knxd)
            CGroup: /system.slice/knxd.service
            └─2213 /usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:

            Sep 26 07:41:34 raspberrypi systemd[1]: Started KNX Daemon.
            root@raspberrypi:/home/pi# knxtool vbusmonitor1 local:/tmp/knx
            Open failed: No such file or directory
            root@raspberrypi:/home/pi# sudo systemctl start knxd
            root@raspberrypi:/home/pi# knxtool vbusmonitor1 local:/tmp/knx
            LPDU: BC FF 02 22 05 E1 00 80 F8 :L_Data low from 15.15.2 to 4/2/5 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 00
            LPDU: BC FF 02 22 06 E1 00 80 FB :L_Data low from 15.15.2 to 4/2/6 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 00
            LPDU: BC FF 02 22 09 E1 00 80 F4 :L_Data low from 15.15.2 to 4/2/9 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 00
            LPDU: BC FF FF ED 00 E1 00 80 CF :L_Data low from 15.15.255 to 29/5/0 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 00
            LPDU: BC FF 02 22 05 E1 00 80 F8 :L_Data low from 15.15.2 to 4/2/5 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 00
            LPDU: BC FF 02 22 06 E1 00 80 FB :L_Data low from 15.15.2 to 4/2/6 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 00
            LPDU: BC FF 02 22 09 E1 00 80 F4 :L_Data low from 15.15.2 to 4/2/9 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 00
            LPDU: BC FF FF ED 00 E1 00 81 CE :L_Data low from 15.15.255 to 29/5/0 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 01
            LPDU: BC FF 02 22 09 E1 00 80 F4 :L_Data low from 15.15.2 to 4/2/9 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 00
            LPDU: BC FF 02 22 05 E1 00 80 F8 :L_Data low from 15.15.2 to 4/2/5 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 00
            LPDU: BC FF 02 22 06 E1 00 80 FB :L_Data low from 15.15.2 to 4/2/6 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 00
            LPDU: BC FF FF ED 00 E1 00 80 CF :L_Data low from 15.15.255 to 29/5/0 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 00
            Read failed: Connection reset by peer

            It might seem weird because it is. But it turns out that knxd actually manages to run now for a very short time. It varies but in general it stays Active for about 2- 10 seconds. So if I am fast enough and Start knxd manually and then the busmonitor, I actually get telegrams over my ABB USB Interface for a little while before the knxd gets terminated for some reason. Do you have any ideas what could cause the knxd to crash/ stop? The message was : “Read failed: Connection reset by peer”. Does this have to do with the knxd version?
            Really happy to have gotten at least this far 🙂

          15. Hi Holo,

            The message was : “Read failed: Connection reset by peer” => This happens when knxd terminates. Then the connection resets. This is not the root cause.

            knxd runs in generally. Version 0.14.18:ef3c496 is ok too. Its the current stable release.

            This seems to be a bug in knxd. I’m not deep in programming to debug such an issue. I

            The behaviour that knxd terminates in reproduceable. I’m I right? I think you have to open an issue at the knxd project page https://github.com/knxd/knxd/issues. They need some logs/logfiles as input. First run knxd in foreground with tracing enabled:

            sudo su
            systemctl stop knxd.service
            # Switch to user knxd
            su knxd -s /bin/bash
            # Start in Foreground (without -d option) with logging
            knxd -t 1023 --eibaddr=1.1.128 --client-addrs=1.1.129:8 -D -T -R -S -i --listen-local=/tmp/knx -t 1023 -b usb:

            And look for errors at the console right before knxd (linux console prompt cames back) terminates. Then open an issue at https://github.com/knxd/knxd/issues. You can also ask for support or experiences for the Siemens N148 Interface.

            Michael

          16. Hi Michael,
            Thanks a lot for your help. Looks like the connection times out at one point, and terminates the connection. The Driver times out trying to Send for some reason.
            “E00000055: [15:C.usb] Driver timed out trying to send (C.usb)”
            I will see what I can do, or who could possibly help me from here.
            Thanks again for all the Support!!

          17. Hi Holo,

            you’re welcome 🙂 . Please open an issue at the project page to improve knxd. Hope the guys can fix it.

            If you need further support when the developer needs additional details for feel free to ask 🙂

            Michael

  64. Hi Michael,

    First of all thank you for the great script. The script runs perfect but I have a problem with the detect of my Pigator (busware). knxd service does not start. I use the default config with the serial port configuration of the raspi.

    pi@raspberrypi:~ $ sudo systemctl status knxd.service
    ● knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Sun 2017-09-24 20:43:38 UTC; 6min ago
    Process: 456 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=2)
    Main PID: 456 (code=exited, status=2)

    Sep 24 20:43:38 raspberrypi systemd[1]: Started KNX Daemon.
    Sep 24 20:43:38 raspberrypi knxd[456]: I don’t know of options for tpuart
    Sep 24 20:43:38 raspberrypi systemd[1]: knxd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
    Sep 24 20:43:38 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
    Sep 24 20:43:38 raspberrypi systemd[1]: knxd.service: Failed with result ‘exit-code’.

    pi@raspberrypi:~ $ sudo journalctl -xu knxd.service
    — Logs begin at Thu 2016-11-03 17:16:42 UTC, end at Sun 2017-09-24 20:50:16 UTC. —
    Sep 24 20:43:38 raspberrypi systemd[1]: Started KNX Daemon.
    — Subject: Unit knxd.service has finished start-up
    — Defined-By: systemd

    — Unit knxd.service has finished starting up.

    — The start-up result is done.
    Sep 24 20:43:38 raspberrypi knxd[456]: I don’t know of options for tpuart
    Sep 24 20:43:38 raspberrypi systemd[1]: knxd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
    Sep 24 20:43:38 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
    Sep 24 20:43:38 raspberrypi systemd[1]: knxd.service: Failed with result ‘exit-code’.
    pi@raspberrypi:~ $

  65. Hi Michael,

    Thank you for the fast response. That was also my first idea. I didn’t touch this file because the standard configuration should fit in my case.

    # Command line parameters for knxd. TPUART Backend
    # Serial device Raspberry
    KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyAMA0″
    # Serial device PC
    # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyS0″
    # Tunnel Backend
    # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b ipt:192.168.56.1″
    # USB Backend
    KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:”

    1. Hi alc,

      can you try to start knxd at command line:

      sudo su
      systemctl stop knxd.service
      # Switch to user knxd
      su knxd -s /bin/bash
      # Start in Foreground (without -d option) with logging
      knxd --eibaddr=1.1.128 --client-addrs=1.1.129:8 -D -T -R -S -i --listen-local=/tmp/knx -b tpuarts:/dev/ttyAMA0

      Michael

      1. Hi Michael,

        Today I started from scratch but I have still problems.
        The status of the knxd service is now:

        root@raspberrypi:/home/pi# sudo systemctl status knxd.service
        ● knxd.service – KNX Daemon
        Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: ena
        Active: failed (Result: exit-code) since Wed 2017-09-27 18:46:54 UTC; 2min 15
        Process: 457 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS
        Main PID: 457 (code=exited, status=1/FAILURE)

        Sep 27 18:46:53 raspberrypi systemd[1]: Started KNX Daemon.
        Sep 27 18:46:54 raspberrypi knxd[457]: E00000023: [18:C.tpuarts] Communication e
        Sep 27 18:46:54 raspberrypi systemd[1]: knxd.service: Main process exited, code=
        Sep 27 18:46:54 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
        Sep 27 18:46:54 raspberrypi systemd[1]: knxd.service: Failed with result ‘exit-c

        I also tried to start knxd at command line:
        knxd@raspberrypi:/home/pi$ knxd –eibaddr=1.1.128 –client-addrs=1.1.129:8 -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyAMA0
        E00000022: [18:C.tpuarts] Opening /dev/ttyAMA0 failed: Permission denied
        F00000000: [15:C.tpuarts] Link down, terminating

  66. after many months of struggling with this I finally got it to work. Setup:

    Rapsberry Pi 3 with Weinzierl kBerry 838 KNX module, running openHabian Pi

    The setup was actually quite simple:

    Install openHabian

    Run the config file and install knxd:
    sudo openhabian-config
    Option 20 → 27

    Edit the knxd config file: vi /etc/default/knxd and set options:
    KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b ft12cemi:/dev/ttyAMA0″

    Disable bluetooth:
    vi /boot/config.txt
    Add to the end of the file:
    dtoverlay=pi3-disable-bt

    disconnect the BT modem from the UART:
    sudo systemctl disable hciuart
    (not sure if this is necessary)

    Reboot

    1. Update: everything is working with openhab as it should, I am able to control the various devices in my home.

      Programming with ETS5 however is not working. I have two discovered interfaces (multicast address and IP of RPi) and I am able to connect to both of them. Connecting to the multicast address I am not seeing any activity on the bus when reading devices. With a direct connection to the IP with IP tunneling i can see packets on the bus, but I am unable to read/write any devices. The individual address keeps rotating between 1.1.129 to 1.1.136 and i am unable to read any device info. I read somewhere on the various forums the ETS5 is not compatible with ft12cemi, can you confirm?

  67. Hi Michael,

    Now knxd runs at my pi. Now i have only one problem an this is at the startup of my pi that knxd service fails when I restart the service everthing works perfekt any idea to fis this issue ?

    at startup:
    pi@raspberrypi:~ $ sudo journalctl -xu knxd.service
    — Logs begin at Thu 2016-11-03 17:16:42 UTC, end at Sun 2017-10-22 11:36:13 UTC. —
    Oct 22 11:28:26 raspberrypi systemd[1]: Started KNX Daemon.
    — Subject: Unit knxd.service has finished start-up
    — Defined-By: systemd

    — Unit knxd.service has finished starting up.

    — The start-up result is done.
    Oct 22 11:28:26 raspberrypi knxd[458]: E00000032: [20:router] router: setup router: failed
    Oct 22 11:28:26 raspberrypi systemd[1]: knxd.service: Main process exited, code=exited, status=1/FAILURE
    Oct 22 11:28:26 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
    Oct 22 11:28:26 raspberrypi systemd[1]: knxd.service: Failed with result ‘exit-code’.

    after service restart:
    pi@raspberrypi:~ $ sudo journalctl -xu knxd.service
    — Logs begin at Thu 2016-11-03 17:16:42 UTC, end at Sun 2017-10-22 11:36:55 UTC. —
    Oct 22 11:28:26 raspberrypi systemd[1]: Started KNX Daemon.
    — Subject: Unit knxd.service has finished start-up
    — Defined-By: systemd

    — Unit knxd.service has finished starting up.

    — The start-up result is done.
    Oct 22 11:28:26 raspberrypi knxd[458]: E00000032: [20:router] router: setup router: failed
    Oct 22 11:28:26 raspberrypi systemd[1]: knxd.service: Main process exited, code=exited, status=1/FAILURE
    Oct 22 11:28:26 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
    Oct 22 11:28:26 raspberrypi systemd[1]: knxd.service: Failed with result ‘exit-code’.
    Oct 22 11:36:51 raspberrypi systemd[1]: Started KNX Daemon.
    — Subject: Unit knxd.service has finished start-up
    — Defined-By: systemd

    — Unit knxd.service has finished starting up.

    — The start-up result is done.

    1. Hi Alc,

      which version of the script did you use? In the latest version I have added a additional dependency in /lib/systemd/system/knxd.service

      [Install]
      WantedBy=multi-user.target network-online.target

      so knxd will wait for start until network is completely up.

      Michael

  68. Hi,
    i just made a new installation of the last openhabianpi image including knxd install. When i try to start it, the following error occurs, any idea?

    knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled)
    Active: failed (Result: exit-code) since Wed 2017-11-01 12:02:49 CET; 12s ago
    Process: 17340 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=1/FAILURE)
    Main PID: 17340 (code=exited, status=1/FAILURE)

    Nov 01 12:02:46 openHABianPi systemd[1]: Started KNX Daemon.
    Nov 01 12:02:49 openHABianPi knxd[17340]: F00000000: [15:C.tpuarts] Link down, terminating
    Nov 01 12:02:49 openHABianPi systemd[1]: knxd.service: main process exited, code=exited, status=1/FAILURE
    Nov 01 12:02:49 openHABianPi systemd[1]: Unit knxd.service entered failed state.

  69. Hi Micheal,

    In the description you write

    “When your operating system is up, login as user pi and set a static IP Address to ensure the gateway is always reachable at the same IP Address.”

    Is this necessary for the KNX deamon to work or just for convenience of the user?

    You can alway’s find and connect to the RPi by it’s name (f.i. knxserver.local)

    Waiting for the download of jessie and then I give your script a try!!

    Regards,

    Willem

  70. Hello again Micheal,

    After I get the knx installed in my raspberry pi 3 and changed the interface in the /etc/default/knxd file, when i tried to watch the bus, the next message show up
    Open failed: Connection refused.

    Can you please help me trying to figure out to do this right.

    Thanks a lot

    root@raspberrypi:~# ls -l /usr/local/bin
    total 12912
    -rwxr-xr-x 1 root staff 23532 Nov 20 16:58 findknxusb
    -rwxr-xr-x 1 root staff 13108352 Nov 20 16:58 knxd
    -rwxr-xr-x 1 root staff 84696 Nov 20 16:58 knxtool

    root@raspberrypi:~# ls -l /etc/systemd/system/multi-user.target.wants/knxd.service
    lrwxrwxrwx 1 root root 32 Nov 20 16:58 /etc/systemd/system/multi-user.target.wants/knxd.service -> /lib/systemd/system/knxd.service

    root@raspberrypi:~# ps ax|grep knxd
    1119 pts/0 S+ 0:00 grep knxd

    root@raspberrypi:~# findknxusb
    Possible addresses for KNX USB devices:
    device: 1:4:1:0:0 (Merten GmbH & Co. KG:KNX-USB Data Interface)

    root@raspberrypi:~# knxtool vbusmonitor1 ip:localhost
    Open failed: Connection refused

      1. Hello Michael,

        this is the content of /etc/default/knxd

        # Command line parameters for knxd. TPUART Backend
        # Serial device Raspberry
        # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyAMA0″
        # Serial device PC
        # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyS0″
        # Tunnel Backend
        # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b ipt:192.168.56.1″
        # USB Backend
        KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:”

        Diogo

          1. I think that this is working now at least when write the command busmonitor1 the error doesn’t show up, I can’t confirm it now because the the project that i’m working on is in my University.

            You can expect a donation if this work 😀

  71. Hi Michael,

    if you thinks that the following questions are off-topic, please feel free to ignore this post.

    I have installed knxd on my Raspian in RP3 using KNX-USB Interface “ABB STOTZ-KONTAKT GmbH” it does not work sending bindings. Good sending telegrams with “knxtool groupswrite ip:localhost 4/0/1 1”

    I work knxd well sending telegrams with “knxtool groupswrite ip:localhost 4/0/1 1”

    > pi@raspberrypi:~ $ ps ax|grep knxd
    > 1319 ? Ssl 0:00 /usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.128 –client-addrs=1.1.129:16 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:
    > 1341 pts/0 S+ 0:00 grep –color=auto knxd
    >pi@raspberrypi:~ $ knxtool vbusmonitor1 ip:localhost
    >LPDU: BC 11 82 20 01 E1 00 81 91 :L_Data low from 1.1.130 to 4/0/1 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 01

    Connect a BUS KNX OK but not work he telegrams sent from openhab2.
    They are sent correctly but not received by the USB gateway.
    > 2017-11-27 12:37:06.294 [INFO ] [nx.internal.connection.KNXConnection] – Established connection to KNX bus on 224.0.23.12:3671 in mode ROUTER.

    I think something must have in the routing.

    I have tried all the options of the messages above and it does not work.

    My IP data: /etc/systemd/network/eth0.network

    [Match]
    # You can also use wildcards. Maybe you want enable dhcp
    # an all eth* NICs
    Name=eth0
    [Network]
    #DHCP=v4
    # static IP
    # 192.168.1.250 netmask 255.255.255.0
    Address=192.168.1.250/24
    Gateway=192.168.1.10
    DNS=80.58.61.254 8.8.8.8
    # Route for Multicast Address EIB/KNX
    [Route]
    Destination=224.0.23.12/32

    >pi@raspberrypi:~ $ ifconfig
    > eth0: flags=4163 mtu 1500
    > inet 192.168.1.250 netmask 255.255.255.0 broadcast 192.168.1.255
    > inet6 fe80::ba27:ebff:feb5:bfd7 prefixlen 64 scopeid 0x20
    > ether b8:27:eb:b5:bf:d7 txqueuelen 1000 (Ethernet)
    > RX packets 18635 bytes 2159944 (2.0 MiB)
    > RX errors 0 dropped 2 overruns 0 frame 0
    > TX packets 1263 bytes 183220 (178.9 KiB)
    > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    pi@raspberrypi:~ $ dmesg|grep eth
    [ 1.954250] smsc95xx 1-1.1:1.0 eth0: register ‘smsc95xx’ at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:b5:bf:d7
    [ 4.913742] smsc95xx 1-1.1:1.0 eth0: hardware isn’t capable of remote wakeup
    [ 4.914258] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [ 6.501103] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [ 6.504633] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
    > pi@raspberrypi:~ $ route
    > Kernel IP routing table
    > Destination Gateway Genmask Flags Metric Ref Use Iface
    > default 192.168.1.10 0.0.0.0 UG 0 0 0 eth0
    > 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    > 224.0.23.12 0.0.0.0 255.255.255.255 UH 0 0 0 eth0

    MORE CONFIGURATION INFORMATION:

    > lsusb -v
    >
    > Bus 001 Device 006: ID 147b:5120
    > Device Descriptor:
    > bLength 18
    > bDescriptorType 1
    > bcdUSB 1.01
    > bDeviceClass 0 (Defined at Interface level)
    > bDeviceSubClass 0
    > bDeviceProtocol 0
    > bMaxPacketSize0 8
    > idVendor 0x147b
    > idProduct 0x5120
    > bcdDevice 1.03
    > iManufacturer 1 ABB STOTZ-KONTAKT GmbH
    > iProduct 2 KNX-USB Interface (MDRC)
    > iSerial 0
    > bNumConfigurations 1
    >
    > pi@raspberrypi:~ $ sudo systemctl status knxd.service
    > ● knxd.service – KNX Daemon
    > Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled
    > Active: active (running) since Mon 2017-11-27 12:35:07 CET; 13min ago
    > Main PID: 1432 (knxd)
    > CGroup: /system.slice/knxd.service
    > └─1432 /usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.128 –clie
    >
    > nov 27 12:35:07 raspberrypi systemd[1]: Started KNX Daemon.
    > pi@raspberrypi:~ $ journalctl -xu knxd.service
    > — Logs begin at Thu 2016-11-03 18:16:42 CET, end at Mon 2017-11-27 12:48:51 CET. —
    > nov 27 00:17:05 raspberrypi systemd[1]: Started KNX Daemon.
    > — Subject: Unit knxd.service has finished start-up
    > — Defined-By: systemd
    > — Support: …..
    > —
    > — Unit knxd.service has finished starting up.
    > —
    > — The start-up result is done.
    > nov 27 00:17:05 raspberrypi systemd[1]: knxd.service: Main process exited, code=kill
    > nov 27 00:17:05 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
    > nov 27 00:17:05 raspberrypi systemd[1]: knxd.service: Failed with result ‘signal’.
    > nov 27 12:26:11 raspberrypi systemd[1]: Started KNX Daemon.
    > — Subject: Unit knxd.service has finished start-up

    “KNX.CFG”
    > openhab> config:list “(service.pid=org.openhab.knx)”
    > —————————————————————-
    > Pid: org.openhab.knx
    > Properties:
    > busaddr = 1.1.128
    > ignorelocalevents = true
    > ip = 224.0.23.12
    > localIp = 192.168.1.250
    > port = 3671
    > service.pid = org.openhab.knx
    > timeout = 100000
    > type = ROUTER

    “knxd”
    KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:16 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:”

    root@raspberrypi:/home/pi# netstat -pln|grep knxd
    tcp 0 0 0.0.0.0:6720 0.0.0.0:* LISTEN 1928/knxd
    udp 0 0 0.0.0.0:3671 0.0.0.0:* 1928/knxd
    unix 2 [ ACC ] STREAM LISTENING 35950 1928/knxd /tmp/knx

    TESTING
    ———-Monitor sending telegrams with “knxtool groupswrite ip:localhost 4/0/1 1”—————

    “On the bus knx listen”

    root@raspberrypi:/home/pi# knxtool groupsocketlisten ip:localhost
    Write from 1.1.134 to 4/0/15: 01
    Write from 1.1.121 to 4/0/15: 01
    *.log

    ==> /var/log/openhab2/events.log /var/log/openhab2/openhab.log ignore!
    2017-11-28 11:19:12.978 [TRACE] [.binding.knx.internal.bus.KNXBinding] – Received update (item=’knx_Vent2′, state=’ON’)
    2017-11-28 11:19:12.979 [TRACE] [g.knx.internal.dpt.KNXCoreTypeMapper] – toTypeClass looking for dptId = 1.001
    2017-11-28 11:19:12.981 [TRACE] [.binding.knx.internal.bus.KNXBinding] – found 1 compatible datapoints for item knx_Vent2 (org.openhab.core.library.types.OnOffType)
    2017-11-28 11:19:12.983 [INFO ] [tuwien.auto.calimero ] – calimero.link.224.0.23.12:3671: send message to 4/0/15, wait for confirmation
    2017-11-28 11:19:12.983 [DEBUG] [.binding.knx.internal.bus.KNXBinding] – Wrote value ‘ON’ to datapoint ‘command DP 4/0/15 knx_Vent2, DPT main 0 id 1.001, low priority’
    2017-11-28 11:19:12.986 [DEBUG] [tuwien.auto.calimero ] – calimero.link.224.0.23.12:3671: cEMI L-Data.ind from 1.1.128 to 4/0/15, low priority hop count 6 tpdu 00 81
    2017-11-28 11:19:12.987 [DEBUG] [tuwien.auto.calimero ] – KNXnet/IP Routing 224.0.23.12:3671: add to multicast loopback frame buffer: L-Data.ind from 1.1.128 to 4/0/15, low priority hop count 6 tpdu 00 81
    2017-11-28 11:19:12.989 [DEBUG] [tuwien.auto.calimero ] – KNXnet/IP Routing 224.0.23.12:3671: sending cEMI frame seq 0, non-blocking, attempt 1 (channel 0) 06 10 05 30 00 11 29 00 bc e0 11 80 20 0f 01 00 81
    2017-11-28 11:19:12.991 [DEBUG] [tuwien.auto.calimero ] – calimero.link.224.0.23.12:3671: send to 4/0/15 succeeded
    2017-11-28 11:19:12.993 [DEBUG] [tuwien.auto.calimero ] – process 224.0.23.12:3671: group write to 4/0/15 succeeded
    2017-11-28 11:19:12.994 [DEBUG] [tuwien.auto.calimero ] – KNXnet/IP Routing 224.0.23.12:3671: discard multicast loopback cEMI frame: L-Data.ind from 1.1.128 to 4/0/15, low priority hop count 6 tpdu 00 81

    —————–Monitor sent from openhab2. (NOT WORK)——————————————-

    “On the bus knx it don’t hear any message”

    root@raspberrypi:/home/pi# knxtool groupsocketlisten ip:localhost`


    *.log

    ==> /var/log/openhab2/events.log /var/log/openhab2/openhab.log Switch knx_Vent1 “Vent 1″ (LIGHT) { knx=”1.001:4/0/1” }
    >Switch knx_Vent2 “Vent 2″ (OTROS_USOS) { knx=”4/0/15” }

    OTHER OPTIONS: Use another busaddr for OH2/KNX (1.1.140)
    option 1:
    ip=224.0.23.12
    port=3671
    busaddr=1.1.140
    ignorelocalevents=true
    type=ROUTER
    localIp=192.168.1.250
    autoReconnectPeriod=30

    option 2: switch to TUNNEL mode
    ip=127.0.0.1
    port=3671
    busaddr=1.1.140
    ignorelocalevents=true
    type=TUNNEL
    localIp=192.168.1.250
    autoReconnectPeriod=30

    Thank you very much in advance and I feel the text so long.
    What is the problem?
    I think something must have in the routing.
    Jualom

      1. Yes Michael,
        Neither does openhab work in tunnel mode with KNX-USB Interface.
        Openhab works for me with a KNX-TCP/IP interface.

        Thank you anyway.
        Can it be the knx-usb interface?
        Although it works for me by sending telegrams from “knxtools”.

    1. Hi Bat,

      but this is only possible if enough RAM is available. After the build process the knxd build directory has a size of about 135MB. When you run it on an Raspberry 1 and have running a Desktop Environment too you may run out of memory:-(

      Michael

  72. Hi Michael,
    my knxd just does not want to start 🙁

    I tried to start it manually with:
    sudo systemctl start knxd.service

    but it isn’t running: ps ax|grep knxd
    572 pts/0 S+ 0:00 grep –color=auto knxd

    my /etc/default/knxd is set to
    # Command line parameters for knxd. TPUART Backend
    # Serial device Raspberry
    KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyAMA0″
    # Serial device PC
    # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyS0″
    # Tunnel Backend
    # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b ipt:192.168.56.1″
    # USB Backend
    # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:”

    knxtool vbusmonitor1 ip:localhost also just outpus
    Open failed: Connection refused

    What can I do to get it to start and work?

    I can anyways find my USB KNX Interface with findknxusb:
    Possible addresses for KNX USB devices:
    device: 1:4:1:0:0 (Berker GmbH & Co. KG:KNX-USB Data Interface)

    Louis

  73. Hi Michael,
    i think my problem is similiar to ohter questions. Unfortunately is my english not as well as it should be to unterstand everything 🙁 I hope you can help me.

    I´ve all commands i found in former comments tested and pasted the results below.

    pi@raspi:~ $ ps ax|grep knxd

    2637 pts/1 S+ 0:00 grep –color=auto knxd

    pi@raspi:~ $ knxtool vbusmonitor1 ip:localhost

    Open failed: Connection refused

    pi@raspi:~ $ sudo systemctl status knxd.service

    * knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
    Active: inactive (dead) since Fri 2018-01-05 12:43:03 CET; 3h 27min ago
    Process: 451 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)
    Main PID: 451 (code=exited, status=0/SUCCESS)

    Jan 05 12:43:03 raspi systemd[1]: Started KNX Daemon.

    pi@raspi:~ $ sudo journalctl -xu knxd.service

    — Logs begin at Thu 2016-11-03 18:16:42 CET, end at Fri 2018-01-05 16:11:52 CET. —
    Jan 05 12:43:03 raspi systemd[1]: Started KNX Daemon.
    — Subject: Unit knxd.service has finished start-up
    — Defined-By: systemd


    — Unit knxd.service has finished starting up.

    — The start-up result is done.

    pi@raspi:~ $ sudo vi /etc/default/knxd

    # Command line parameters for knxd. TPUART Backend
    # Serial device Raspberry
    #KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyAMA0″
    # Serial device PC
    # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyS0″
    # Tunnel Backend
    # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b ipt:192.168.56.1″
    # USB Backend
    KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:”

    Thank you very much!

    Christian

  74. Hi Michael,
    2 Years it works with FHEM and KNX and then the SD Card Crashed. Without Backup… 😉 And I forget everything…

    for 3 day´s I´m trying to setup my KNX Hardware:
    Raspberry 3
    Busch-Jaeger Elektro GmbH:KNX-USB Interface

    But the result: Active: inactive (dead)

    This are my Settings:
    *******
    pi@raspberrypi:~ $ sudo systemctl status knxd.service
    ● knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
    Active: inactive (dead) since Fri 2018-01-05 17:34:34 CET; 1h 27min ago
    Process: 635 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)
    Main PID: 635 (code=exited, status=0/SUCCESS)
    *******
    pi@raspberrypi:~ $ findknxusb
    Possible addresses for KNX USB devices:
    device: 1:7:1:0:0 (Busch-Jaeger Elektro GmbH:KNX-USB Interface (Flush mounted))
    *******
    pi@raspberrypi:~ $ cat /etc/systemd/network/eth0.network
    [Match]
    # You can also use wildcards. Maybe you want enable dhcp
    # an all eth* NICs
    Name=eth0
    [Network]
    #DHCP=v4
    # static IP
    # 192.168.10.50 netmask 255.255.255.0
    Address=192.168.10.50/24
    Gateway=192.168.10.1
    DNS=192.168.10.1
    # Route for Multicast Address EIB/KNX
    [Route]
    Destination=224.0.23.12/32
    *********
    pi@raspberrypi:~ $ lsusb
    Bus 001 Device 007: ID 04d9:a088 Holtek Semiconductor, Inc.
    Bus 001 Device 006: ID 058f:6254 Alcor Micro Corp. USB Hub
    Bus 001 Device 005: ID 045e:0040 Microsoft Corp. Wheel Mouse Optical
    Bus 001 Device 008: ID 145c:1330
    Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
    Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    **********
    pi@raspberrypi:~ $ cat /etc/default/knxd
    # Command line parameters for knxd. TPUART Backend
    # Serial device Raspberry
    # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyAMA0″
    # Serial device PC
    # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyS0″
    # Tunnel Backend
    # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b ipt:192.168.56.1″
    # USB Backend
    KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:”
    *********
    pi@raspberrypi:~ $ ps ax|grep knxd
    958 pts/0 S+ 0:00 grep –color=auto knxd
    ********
    pi@raspberrypi:~ $ knxtool vbusmonitor1 ip:localhost
    Open failed: Connection refused
    ********

    Ich weiß nicht mehr weiter…

  75. Scheint ein aktuelles Problem zu sein. Hier genau das gleiche Fehlerbild, wie bei den 3 Beitragenden (Luois, Christian und Tobias) vor mir.
    Neu aufgesetzter (raspian) raspberry mit Busware USB – Interface.
    Nachdem er zuvor 3 Jahre klaglos lief mit eibd.

    pi@raspberrypi:~ $ ps ax|grep knxd
    449 pts/0 S+ 0:00 grep –color=auto knxd

    pi@raspberrypi:~ $ knxtool vbusmonitor1 ip:localhost
    Open failed: Connection refused

    pi@raspberrypi:~ $ cat /etc/systemd/network/eth0.network
    [Match]
    # You can also use wildcards. Maybe you want enable dhcp
    # an all eth* NICs
    Name=eth0
    [Network]
    #DHCP=v4
    # static IP
    # 192.168.178.57 netmask 255.255.255.0
    Address=192.168.178.57/24
    Gateway=192.168.178.1
    DNS=192.168.178.1
    # Route for Multicast Address EIB/KNX
    [Route]
    Destination=224.0.23.12/32

    pi@raspberrypi:~ $ sudo systemctl status knxd.service
    * knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
    Active: inactive (dead) since Fri 2018-01-12 20:04:20 UTC; 5min ago
    Process: 298 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)
    Main PID: 298 (code=exited, status=0/SUCCESS)

    Jan 12 20:04:19 raspberrypi systemd[1]: Started KNX Daemon.

    pi@raspberrypi:~ $ cat /etc/default/knxd
    # Command line parameters for knxd. TPUART Backend
    # Serial device Raspberry
    KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyAMA0″
    # Serial device PC
    # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyS0″
    # Tunnel Backend
    # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b ipt:192.168.56.1″
    # USB Backend
    # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:”

    pi@raspberrypi:~ $ knxtool vbusmonitor1 ip:localhost
    Open failed: Connection refused

    1. Hi Frank,

      ich kenne jetzt das Busware USB Interface nicht im Detail. So wie ich das auf die schnelle sehe spricht man es per TPUART an. /dev/ttyAMA0 ist in der Regel die serielle Schnittstelle des Raspberry.

      Zieh doch mal den USB Adapter ab und starte als root dmesg, steck den Adapter an und poste mal die Ausgabe:

      dmesg -w

      Michael

  76. Dear Michael,

    first of all I must send a big THANK YOU to you for all the hard work that’s certainly in all these lines and scripts.
    I decided for KNX when we built our house 6 years ago and of course in the beginning I went for all the commercial solutions for controlling the KNX via smartphone etc.
    But deep inside of me there is someone who wants to understand the details behind the products out of stock. And one must realise that behind these products mainly there is no rocket science but expert know how in certain fields (like profound LINUX know how that for me still is kind of Bohemian villages as we use to say :-). Thanks guys like you this know how is via blogs like this open to the public and certainly I will donate to you once I got my project finished. Thank you soo much …

    So, what’s to my problem… I started to set up my Raspberry PI 3 as described in your blog. I followed all the instructions but in the end I am not able to connect to my KNX. I think it’s quite the same errors that occured by the bloggers just before this one.
    I configured the interface for USB connection since I have a BERKER USB interface installed. So I followed all the steps and configured the

    /etc/default/knxd

    respectively.

    When calling

    ps ax|grep knxd

    I am getting the following result:

    2582 pts/0 S+ 0:00 grep knxd

    which is different to the expected one in your descrition.

    When checking the bus connection with:

    knxtool vbusmonitor1 ip:localhost

    I am getting the following result:

    Open failed: Connection refused

    So unfortunately I doesn’t work.

    I would be very pleased if you could help.

    The /etc/default/knxd is configured as follows:

    # Command line parameters for knxd. TPUART Backend
    # Serial device Raspberry
    # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyAMA0″
    # Serial device PC
    # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyS0″
    # Tunnel Backend
    # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b ipt:192.168.56.1″
    # USB Backend
    KNXD_OPTIONS=”–eibaddr=0.0.100 –client-addrs=0.0.101:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:”

    I would be very pleased if you could help.

    Thank you so much in advance.

    Best

    Mathias

  77. Hi Micha,

    the device can be found:

    pi@raspberrypi:~ $ sudo su
    root@raspberrypi:/home/pi# su knxd -s /bin/bash
    knxd@raspberrypi:/home/pi$ findknxusb
    Possible addresses for KNX USB devices:
    device: 1:4:1:0:0 (Berker GmbH & Co. KG:KNX-USB Data Interface)
    knxd@raspberrypi:/home/pi$

    So obviously the problem is something else.

    Best
    Mathias

    1. Hi Mathias,

      try to start knxd at command line with verbose logging:

      Change to root and then to user knxd

      sudo su
      su knxd -s /bin/bash

      and start knxd with logging/tracing in foreground

      knxd -t 1023 --eibaddr=0.0.100 --client-addrs=0.0.101:8 -D -T -R -S -i --listen-local=/tmp/knx -t -1023 -b usb:

      and wait for error messages or knxd exits.
      Michael

      1. Hi Micha,

        unfortunately nothing happens when entering this.

        pi@raspberrypi:~ $ sudo su
        root@raspberrypi:/home/pi# cd
        root@raspberrypi:~# su knxd -s /bin/bash
        knxd@raspberrypi:/root$ knxd -t 1023 –eibaddr=0.0.100 –client-addrs=0.0.101:8 -D -T -R -S -i –listen-local=/tmp/knx -t -1023 -b usb:

        I have to manually stop the process with STRG+C.

        So I don’t receive any error mesages or exits.

        Regards

        Mathias

        1. Hi Mathias,

          the commit
          commit 356be34210c687874f4f64d42c1106582bb7dfb8
          Author: Matthias Urlichs
          Date: Wed Jan 3 13:17:34 2018 +0100

          * Fix handling of stdin/out/err and forking

          changed something importend in knxd handles output to console. However, debug/trace seams no longer printed to console. Please write the debug/trace output to a file:

          knxd -t 1023 --eibaddr=0.0.100 --client-addrs=0.0.101:8 --daemon=/tmp/knxd_trace.txt -D -T -R -S -i --listen-local=/tmp/knx -t 1023 -b usb:

          Michael

          1. Dear Micha,

            I have the feeling we are getting closer to the solution.

            When I enter the command you just sent in your message earlier it accepts the command without freezing. When I then enter

            knxtool vbusmonitor1 ip:localhost

            I am getting the bus traffic -> YEAH so first big step for me 🙂
            I dont know if that makes sense since I thoght the command is for writing a log file but anyway I have noticed that thiis is the case.

            If I enter

            knxtool groupswrite ip:localhost 1/1/70 1

            to send an “on” bit to that address

            it says

            Send request

            but unfortunately nothing happens.

            If I try it again, the same occurs. Trying this once more it results in

            Connection refused.

            If now trying

            knxtool vbusmonitor1 ip:localhost

            it also says Connection refsed.

            If I then enter your command line again:

            knxd -t 1023 –eibaddr=0.0.100 –client-addrs=0.0.101:8 –daemon=/tmp/knxd_trace.txt -D -T -R -S -i –listen-local=/tmp/knx -t 1023 -b usb:

            I am getting the bus traffic when I enter the vbusmonito command again.

            So I am a bit confused now. Does this make sense to you?

            If not, would it be possible to send me a private message to my email adress so that I could give you login details to login remotely and check what’s wrong?

            This would be great but pls only if possible.

            Thanks a lot

            Mathias

          2. Hi Mathias,

            “Connection refused” means that the knxd process has exited and is no longer listening to the network. You can check if the process is running by list all process (ps ax) and filter the list by grep:

            ps ax|grep knxd

            The output must shown 2 lines the whole knxd command line and the grep process. If not knxd does not runs.

            When knxd exits you can find the reasen why in the log file /tmp/knxd_trace.txt. We try first starting knxd again and when it exits look into the logfile and post the last lines with the error messages.

            Michael

          3. Hi Micha,

            It’s finally working now.
            Many thanks for your kind assistance.
            Regards
            Mathias

        2. Hi Mathias,

          i´ve tested Michaels last post. Unfortunately it doesn´t work.

          — Logs begin at Wed 2018-01-17 17:50:04 CET, end at Wed 2018-01-17 18:48:16 CET. —
          Jan 17 17:50:14 openHABianPi systemd[1]: knxd.service: Ignoring invalid environment assignment ‘knxd -t 1023 –eibaddr=0.0.100 –cl
          Jan 17 17:50:14 openHABianPi systemd[1]: Started KNX Daemon.
          Jan 17 17:50:14 openHABianPi systemd[1]: knxd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
          Jan 17 17:50:14 openHABianPi systemd[1]: knxd.service: Unit entered failed state.
          Jan 17 17:50:14 openHABianPi systemd[1]: knxd.service: Failed with result ‘exit-code’.

          But another question. Why do you use 0.0.100 instead of 1.1.128?

          Christian

          1. Hi Christian,

            “status=2/INVALIDARGUMENT”

            May be you running in an copy & paste issue? When you copy the command line from the browser to the terminal it can occur that a wrong "-" (Unicode) Character is used which is not the minus knxd at command line expects. Also "--" is often merged to a single "-". I think a wordpress issue.

            Please try to enter the command line by keyboard.

            Michael

          2. Hi Michael,

            so far i now know my problem caused of the missing knx socket.

            openhabian@openHABianPi:~ $ systemctl status knxd.socket
            Unit knxd.socket could not be found.

            Do you have an idea what went wrong while the installation?

            Christian

          3. Hi Christian,

            if you use my script the systemd knx.socket is not necessary because the script builds knxd without systemd support, so the socket is created by knxd itself not by systemd.

            Michael

  78. With this settings and an Bush Jäger 6123 it runs on an Raspberry:

    KNXD_OPTS=”-e 1.1.1 -E 1.1.1:40 -u /tmp/knx -D -T -R -S -b usb:1:4:1:0″

    I get an green activ and this Result:
    pi@raspberrypi:~ $ systemctl status knxd.service
    ● knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
    Active: active (running) since Fri 2018-01-19 08:19:59 CET; 20s ago
    Main PID: 588 (knxd)
    CGroup: /system.slice/knxd.service
    └─588 /usr/bin/knxd -e 1.1.1 -E 1.1.1:40 -u /tmp/knx -D -T -R -S -b usb:1:4:1:0

    Jan 19 08:19:59 raspberrypi systemd[1]: Starting KNX Daemon…
    Jan 19 08:19:59 raspberrypi systemd[1]: Started KNX Daemon.

    It look´s god but I did not recive any Messages from me Powernet-Bus.
    Only manual trigert Messages arrife in Fhem but dont have any reaction on my Bus

    knxtool vbusmonitor1 ip:localhost
    and
    grep knxd
    Only show an empty cursor and no error message.
    What is wrong except my bad English?

  79. hallo ich verstehs einfach nicht! nach reboot geht gar nicht ps ax|grep knxd zeigt eine Zeile. wenn ich dann knxd -t 1023 –eibaddr=0.0.100 –client-addrs=0.0.101:8 –daemon=/tmp/knxd_trace.txt -D -T -R -S -i –listen-local=/tmp/knx -t 1023 -b usb: eingebe läuft alles perfekt!! Wie zum teu… was muss ich da jetzt in die /etc/default/knxd eintragen?????? KNX schnittstelle ist ein ABB KNX USB Interface. Beim Manuellen starten kann ich auch per groupwrite senden und es funktioniert auch. Was mach ich da falsch?

  80. with manual start like knxd -t 1023 –eibaddr=1.1.2 –client-addrs=1.1.3:8 –daemon=/tmp/knxd_trace.txt -D -T -R -S -i –listen-local=/tmp/knx -t 1023 -b usb: all work perfect but no change of the /etc/default/knxd bring it to work after reboot ps ax|grep knxd shows only one line what do i wrong?

    1. Hi Christian,

      your /etc/default/knxd simply have to contains this one line

      KNXD_OPTIONS="-t 1023 --eibaddr=1.1.2 --client-addrs=1.1.3:8 --daemon=/tmp/knxd_trace.txt -D -T -R -S -i --listen-local=/tmp/knx -t 1023 -b usb:"

      There can be multiple reasons when knxd does not start after reboot:
      -Have you set a static IP Address?
      -Have you got an WLAN Interface?
      -Whats happend when you start knxd manually
      systemd start knxd
      -What does journalctl says
      journalctl -xu knxd.service
      -What are the last lines of your debug logfile /tmp/knxd_trace.txt

      Michael

  81. Status say:Loaded: loaded (/lib/systemd/system/knxd.service; enabled)
    Active: inactive (dead) since Mon 2018-01-22 12:04:08 CET; 3min 47s ago
    Process: 610 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)
    Main PID: 610 (code=exited, status=0/SUCCESS)

    Journal say: — Logs begin at Mon 2018-01-22 12:02:17 CET, end at Mon 2018-01-22 12:04:08 CET. —
    Jän 22 12:02:19 fhem-server systemd[1]: Starting KNX Daemon…
    — Subject: Unit knxd.service has begun with start-up
    — Defined-By: systemd

    — Unit knxd.service has begun starting up.
    Jän 22 12:02:19 fhem-server systemd[1]: Started KNX Daemon.
    — Subject: Unit knxd.service has finished start-up
    — Defined-By: systemd

    — Unit knxd.service has finished starting up.

    — The start-up result is done.
    Jän 22 12:04:08 fhem-server systemd[1]: Starting KNX Daemon…
    — Subject: Unit knxd.service has begun with start-up
    — Defined-By: systemd

    — Unit knxd.service has begun starting up.
    Jän 22 12:04:08 fhem-server systemd[1]: Started KNX Daemon.
    — Subject: Unit knxd.service has finished start-up
    — Defined-By: systemd

    — Unit knxd.service has finished starting up.

    — The start-up result is done.
    whats wrong?

  82. Hi Michael,

    I am facing the same issue as Christian.
    My version is: knxd 0.14.23

    I found the following:
    After reboot I see the status of knxd:

    ● knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled)
    Active: inactive (dead) since Tue 2018-01-23 10:38:31 UTC; 1s ago
    Process: 1718 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)
    Main PID: 1718 (code=exited, status=0/SUCCESS)

    To start it via the service it helps to do either:

    systemctl daemon-reload

    or

    systemctl umask knxd

    and

    systemctl start knxd

    after that the status shows:

    ● knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled)
    Active: active (running) since Tue 2018-01-23 10:39:40 UTC; 2s ago
    Main PID: 1740 (knxd)
    CGroup: /system.slice/knxd.service
    └─1740 /usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.128…

    Jan 23 10:39:40 raspberrypi systemd[1]: Started KNX Daemon.

    When I stop it again, I always have to umask or daemon-reload before it is correctly started via “systemctl start knxd”

    Maybe Christian can confirm this behaviour in his setup?
    Hope this gives some hint where to look at 🙂 google search didn’t help so far.

    Thanks and cheers,
    Matthias

    1. Hi Matthias,

      same issue as Christian? knxd does not start at system boot?

      I think the knxd team changed with commit 356be34210c687874f4f64d42c1106582bb7dfb8 the process start behaviour again.

      When using the -d switch (daemon mode) the Servicetype in /lib/systemd/system/knxd.service should switched back from Type=simple to Type=forking.

      But with the current version knxd cannot create a pid file in /run/knxd …. investigating….

      Michael

      Michael

      1. Hi Michael,

        knxd is started after reboot:

        1. with -d and Type=forking
        2. without -d and Type=simple

        in both cases it writes the pid to /run/knxd/knxd.pid

        You refer with current version of knxd to 0.14.23?

        Cheers,
        Matthias

  83. Hi Michael, Matthias and Christian,

    took me some hours to read through the whole post and try out everything I read and that seem to be related to my problem. Wish I had started at the bottom. Removing -d worked for me too. Thank you for that!
    Now that I have a running knxd I can go to the next step and try to connect openhab with knxd.

    1. I did some testing and hav another problem. Without -d knxd start manual or after reboot. It keeps runing when I don’t do anything (just vbusmonitor runing to see its alive).
      When I send groupswrite commands it crashes after 2-3 commands.

      And another thing (that is kind of off-topic for this place here): While knxd runs I can see my switches that I defined in Openhab2 change when I send groupswrite or if I press a physical knx button. But if I use the switch in Openhab nothing happens.

      Best Regards

      Marco

      1. Hi Marco,

        my current setup is running with -d parameter and type=forking.
        no issues after multiple groupwrites, knxd runs stable.

        my raspi is only running knxd, my openhab2 is running at my synology storage, I had also issues switching from openhab2 switches until I changed to the following knx.cfg

        ip=224.0.23.12
        busaddr=1.0.0
        ignorelocalevents=true
        type=ROUTER
        port=3671
        localIp=

        the final solution was to set busaddr to 1.0.0 in my case, running with another address e.g. 1.1.130 didn’t switch anything, I only saw that the knx binding was connected to the knxd and logged all messages on the bus in openhab.log after switching on the log for org.openhab.binding.knx

        Cheers,
        Matthias

        1. Hi Matthias

          Thanks for your advise. I was really hoping it resolves the remaining points. Unfortunately it did not work for me.
          I changed type to forking in knxd.service and add the -d in the etc/default/knxd. After reboot I get the following on status:
          knxd.service – KNX Daemon
          Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
          Active: failed (Result: timeout) since Thu 2018-01-25 00:10:22 CET; 1min 42s ago
          Process: 508 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)

          Jan 25 00:08:44 openHABianPi systemd[1]: Starting KNX Daemon…
          Jan 25 00:08:45 openHABianPi systemd[1]: knxd.service: PID file /run/knxd/knxd.pid not readable (yet?) after start: No such file or directory
          Jan 25 00:10:22 openHABianPi systemd[1]: knxd.service: Start operation timed out. Terminating.
          Jan 25 00:10:22 openHABianPi systemd[1]: Failed to start KNX Daemon.
          Jan 25 00:10:22 openHABianPi systemd[1]: knxd.service: Unit entered failed state.
          Jan 25 00:10:22 openHABianPi systemd[1]: knxd.service: Failed with result ‘timeout’.

          Regarding openhab I tried the 1.0.0 in the knx.conf (default is 0.0.0). I also tried 1.0.250. That is configured in my Gira Homeserver (that’s where the USB KNX adapter comes from – I want to switch to openhab to integrate other systems like ZWAVE). Did not help either.

          One more thing I need to mention: I run knxd and openhab on a RPI3 that is installed with openhabian image. That comes with a setup script for knxd too. As well as setup for static IP etc. If you guys think this might be part of the problem I could make a backup of my SD card try to install as directed by Michael (do I have to uninstall knxd first and how?)

          Marco

          1. Hi Marco,

            /run/knxd/knxd.pid not readable (yet?) after start: No such file or directory => Does the folder /run/knxd exists?

            Michael

          2. Hi Michael

            Yes the folder exists. Had to change from standard user openhabian to root to see it.

            [22:02:05] root@openHABianPi:/run# ls -al /run/knxd
            insgesamt 0
            drwxr–r– 2 knxd knxd 40 Jan 25 00:08 .
            drwxr-xr-x 27 root root 800 Jan 25 00:11 ..

            Maybe something wrong with permissions?

          3. Hi Marco,

            can you configure to place the pid file directly to /run:

            … -p /run/knxd.pid …

            Michael

          4. Hi,
            changing to /run/knxd.pid instead of /run/knxd/knxd.pid did not help. I also tried to change user and group in knxd.service to root. Still not working.

            I did reinstall knxd and realized that openhabian is using your script for installation 🙂 I used the offered fix with the longer timeout. That took care of the permanent crashing of knxd that I experienced before. It is stable now without -d and type=simple.

            Openhab2 is still not switching anything. It listens and sees changes but that’s it. With wireshark I can see networktraffic from 192.168.0.10 to 224.0.23.12 port 3671>3671. The pakets in wireshark look quiet similar wether sent by groupswrite or openhab but only groupswrite actually switches the light.

            I have tried using 1.0.0 as openhab-binding bus-address. No result. I tried 1.0.0. as –eibaddr in knxd. I tried different combinations of the 2 including using 1.0.0. for both (probably not a clever idea – but still same behaviour). Also tried eibaddr=1.0.0 client-addr=1.0.1:8 and giving openhab 1.0.1 (to be in the range of client addreses defiened).
            I’m out of ideas for the moment what to text next. I think I must be close as I can switch with groupswrite and openhab is sending commands to the correct IP and port.

            Marco

          5. Hi Michael

            The packets do not show on the busmonitor. I would have been surprised if they did (assuming the busmonitor shows activity on the bus in which case the light should have switched).
            However I tried other stuff and got it working. The major change is that I use tunnel mode instead of router. I tried this before and it did not work so it must be a combination of other settings and tunnel mode.

            These are my settings in case someone else with a similar problem reads this and might want to give it a try:

            knxd and Openhab2 both run on 192.168.0.10

            knx.cng (openhab)
            ip:192.168.0.10
            busaddr=0.0.2
            ignorelocalevents=true
            type=tunnel
            port=3671
            localIp=192.168.0.10

            Knxd options:
            KNXD_OPTIONS=”–eibaddr=0.0.1 –client-addrs=0.0.2:8 -D -T -R -S -i –listen-local=/tmp/knx -b usb:”

            knxd.service:
            ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS
            Type=simple
            PIDFile=/run/knxd.pid
            User=knxd
            Group=knxd

            Thanks again for all your support!

            Best Regards

            Marco

  84. Dear Michael,
    I’ve just started to set up OpenHabian on a Raspberry Pi 3. So far it all worked out perfectly. Then I installed the KNXD package where in the documentation it says it uses your script, so that in the end I assume that the result should be the same.
    After having tested and reinstalled everything for several times I am failing with getting the KNXD service running.

    When typing:

    sudo systemctl status knxd.service

    I am getting the following result:

    ● knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
    Active: failed (Result: resources) since Sat 2018-02-10 13:39:22 CET; 5min ago
    Process: 1323 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)

    Feb 10 13:39:22 openHABianPi systemd[1]: Starting KNX Daemon…
    Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: PID file /run/knxd/knxd.pid not readable (yet?) after start: No such file or directory
    Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: Daemon never wrote its PID file. Failing.
    Feb 10 13:39:22 openHABianPi systemd[1]: Failed to start KNX Daemon.
    Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: Unit entered failed state.
    Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: Failed with result ‘resources’.
    Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: Start request repeated too quickly.
    Feb 10 13:39:22 openHABianPi systemd[1]: Failed to start KNX Daemon.
    Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: Failed with result ‘resources’.

    I have also tested the -d issue explained before but also this won’t bring it working.

    When starting the knxd service manually it says:

    Excess arguments.

    The journalctl says:

    — Unit knxd.service has begun starting up.
    Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: PID file /run/knxd/knxd.pid not readable (yet?) after start: No such file or directory
    Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: Daemon never wrote its PID file. Failing.
    Feb 10 13:39:22 openHABianPi systemd[1]: Failed to start KNX Daemon.
    — Subject: Unit knxd.service has failed
    — Defined-By: systemd
    — Support: https:xxxxxxxxxxxxxxxxxxxxxx

    — Unit knxd.service has failed.

    — The result is failed.
    Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: Unit entered failed state.
    Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: Failed with result ‘resources’.
    Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: Start request repeated too quickly.
    Feb 10 13:39:22 openHABianPi systemd[1]: Failed to start KNX Daemon.
    — Subject: Unit knxd.service has failed
    — Defined-By: systemd
    — Support: https:/xxxxxxxxxxxxxxxxxx

    — Unit knxd.service has failed.

    — The result is failed.
    Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: Failed with result ‘resources’.

    I am really at the end now ? Can you help?

    Thanks
    Mathias

    (I’ve x ed the links in the post. Otherwise it won’t work.)

  85. Dear Michael,

    once more I want to ask for your advice. I’ve installed knxd several times with a clean openhabian image and also a clean Raspian image. I followed exactly every step of your instructions above and it’s always the same result. Once finished and configured as USB in knxd options and after reboot the knxd service will not start.

    When typing

    ps ax|grep knxd

    I am getting

    ‘4705 pts/0 S+ 0:00 grep –color=auto knxd’

    and not

    416 ? Ss 0:00 /usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.128 -d -D -T -R -S -i –listen-local=/tmp/knx tpuarts:/dev/ttyAMA0

    as you described above.

    So obviously the knxd service is not running.

    As mentioned I tried it several times exactly as described and it is every time the same.

    Can you help?

    Thanks in advance

    Mathias

    1. Hi Mathias,

      what does the log said

      journalctl -xu knxd.service

      does knxd starts when you start it at command line

      systemctl start knxd.service
      journalctl -xu knxd.service

      Michael

        1. Hi Øystein

          may be the interface isn’t up when knxd starts. Add the following line to the [Service] Section in /lib/systemd/system/knxd.service

          ExecStartPre=/lib/systemd/systemd-networkd-wait-online –timeout=60 –interface=wlan0

          Michael

          1. Hi Again Michael.

            Thanks for the reply. 🙂

            I used sudo nano, and entered the line as you described.
            Still no action after reboot.
            But then I could not start the program by the use of *systemctl start knxd.service* . It timed out.
            I noted the line out, and rebooted again with result :
            **
            pi@raspberrypi:~ $ sudo su
            root@raspberrypi:/home/pi# systemctl start knxd.service
            root@raspberrypi:/home/pi# ps ax|grep knxd
            789 ? Ssl 0:00 /usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:
            797 pts/0 S+ 0:00 grep knxd
            root@raspberrypi:/home/pi# knxtool vbusmonitor1 ip:localhost
            LPDU: BC 11 09 10 00 E1 00 81 2B :L_Data low from 1.1.9 to 2/0/0 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 01
            **
            Service section in file :
            *
            [Service]
            EnvironmentFile=/etc/default/knxd
            # Wait for all interfaces, systemd-networkd-wait-online.service must be enabled
            #ExecStartPre=/lib/systemd/systemd-networkd-wait-online –timeout=60
            # Wait for a specific interface
            #ExecStartPre=/lib/systemd/systemd-networkd-wait-online –timeout=60 –interface=eth0
            ExecStartPre=/lib/systemd/systemd-networkd-wait-online –timeout=60 –interface=wlan0
            ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS
            Type=forking
            PIDFile=/run/knxd/knxd.pid
            User=knxd
            Group=knxd
            #TimeoutStartSec=60
            **

            I have set the static IP by the use of a different method then in the tutorial. Can this be a issue ?

            /Øystein

          2. Hi.

            Thanks for great tutorial.

            I have stumbled into an issue.

            when trying to write something on the bus. I only stop the process.
            **
            root@raspberrypi:/# knxtool vbusmonitor1 ip:localhost
            LPDU: BC 11 10 10 05 E3 00 80 0C 55 6D :L_Data low from 1.1.16 to 2/0/5 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write 0C 55
            LPDU: BC 11 10 10 06 E3 00 80 0C 3D 06 :L_Data low from 1.1.16 to 2/0/6 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write 0C 3D
            LPDU: BC 11 10 10 04 E3 00 80 0D 69 51 :L_Data low from 1.1.16 to 2/0/4 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write 0D 69
            LPDU: BC 11 10 10 04 E3 00 80 0D 64 5C :L_Data low from 1.1.16 to 2/0/4 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write 0D 64
            LPDU: BC 11 10 10 05 E3 00 80 0C 56 6E :L_Data low from 1.1.16 to 2/0/5 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write 0C 56
            LPDU: BC 11 10 10 06 E3 00 80 0C 3D 06 :L_Data low from 1.1.16 to 2/0/6 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write 0C 3D
            LPDU: BC 11 10 10 05 E3 00 80 0C 5B 63 :L_Data low from 1.1.16 to 2/0/5 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write 0C 5B
            LPDU: BC 11 10 10 06 E3 00 80 0C 3D 06 :L_Data low from 1.1.16 to 2/0/6 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write 0C 3D
            LPDU: BC 11 10 10 04 E3 00 80 0D 5B 63 :L_Data low from 1.1.16 to 2/0/4 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write 0D 5B
            LPDU: BC 11 09 10 00 E1 00 80 2A :L_Data low from 1.1.9 to 2/0/0 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 00
            ^C
            root@raspberrypi:/# ps ax|grep knxd
            3301 ? Ssl 0:00 /usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:
            3472 pts/0 S+ 0:00 grep knxd
            root@raspberrypi:/# knxtool groupswrite ip:localhost 2/0/0 0
            Send request
            root@raspberrypi:/# knxtool groupswrite ip:localhost 2/0/0 1
            Open failed: Connection refused
            root@raspberrypi:/# ps ax|grep knxd
            3484 pts/0 S+ 0:00 grep knxd
            root@raspberrypi:/#
            **

            Then I have to manually start the process again.

          3. Hi Øystein,

            have you tried to run knxd in foreground in another terminal with trace enabled to see whats happend when knxd exits?

            Michael

  86. Dear Michael,
    I’m sorry if my question is a little off topic.

    I want to command a home automation system through the knx server using the raspberry pi3 to launch a scenario for exemple. Is this achievable using the knxd ?
    here the diagram : https://ibb.co/cTBO8H

    Also if yes do you know how I can do the same with other protocols ?

    Thanks in advance
    Yassine

    1. Hi Yassine,

      IMHO yes, establish a tunnel connection from your knxd to your IP Interface.

      What do you mean with “other protocols”?

      Michael

  87. Hi Michael,

    We have tested your application on a raspberry pi 3 and hager usb interface, We start the application with “sudo systemctl start knxd” we hit ctrl-C and “run knxtool vbusmonitor1 ip:localhost” we see telegrams for approx 1-2 minutes and then it stops see log below. We see that it is in “Active: activating (start) and after the time it goes to timeout.

    Is it timeout to the usb interface?

    We have used static IP

    Best regards

    knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
    Active: failed (Result: timeout) since Fri 2018-03-02 16:08:53 UTC; 22s ago
    Process: 21287 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)

    Mar 02 16:07:23 raspberrypi systemd[1]: Starting KNX Daemon…
    Mar 02 16:07:23 raspberrypi systemd[1]: knxd.service: PID file /run/knxd/knxd.pid not readable (yet?) after start: No such file or directory
    Mar 02 16:08:53 raspberrypi systemd[1]: knxd.service: Start operation timed out. Terminating.
    Mar 02 16:08:53 raspberrypi systemd[1]: Failed to start KNX Daemon.
    Mar 02 16:08:53 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
    Mar 02 16:08:53 raspberrypi systemd[1]: knxd.service: Failed with result ‘timeout’.

  88. Hi Michael,

    I hit Strg-C to get a promt so we can type the command vbusmonitor just to see if we get communication to knx.

    If we don’t hit Strg-C after about two minutes we get the same timeout and it refers to the log i send You (knxd.sevice). The log complains about the “pid file not readable” shall it use a pid file in our case?

    Best regards

    Jim

    1. Hi Jim,

      this seems to be a bug in knxd. When systemd is not used the command line options are parsed incorrectly. In special the pidfile.

      I’ll provide a fix and create a pull request to the knxd project.

      Michael

    2. Hi Jim,

      I create a pull request https://github.com/knxd/knxd/pull/326.

      Temporarly you can try to compile knxd from my fork which contains the fix. Edit install_knxd_systemd.sh.

      At line 153 replace
      git clone https://github.com/knxd/knxd knxd
      with
      git clone https://github.com/Race666/knxd.git

      and at line 158 replace

      git checkout stable
      with
      git checkout merge

      Save your /etc/default/knxd and start the script again. Let me know if it works as expected.

      Michael

      1. I dont know if it is significant but i rm -rf knxdbuild first, changed the end of line at 153 to “…Race666/knxd knxd” and then it ran.

          1. Hi bohtho, hi Jim

            SORRY

            yes you’re right. Remove the build directory

            rm -r knxdbuild

            This should work:

            At line 153 replace
            git clone https://github.com/knxd/knxd knxd
            with
            git clone https://github.com/Race666/knxd knxd

            and at line 158 replace

            git checkout stable
            with
            git checkout merge

            Please also check if patch is applied at your working directory. Open file knxd/src/server.knxd.cpp and check line 336. There must be
            std::string PidFile=main->value("pidfile","");

            Michael

          2. Doing what you say in the comment “Michael March 6, 2018 at 7:35 PM”, changed script with forked repository, confirmed, I still get the pid not readable, and knxd.service: Daemon never wrote its PID file. Failing.

          3. Hi bohtho,

            tried it from scratch (debian 9.3 only system tools, install script 0.7.14 with change of fork from race666/knxd) and pid is created.

            Have you tried to start knxd at command line. Maybe there is another error before the pid file is created?

            root@debdev:~/knxdbuild/knxd# knxd -V
            knxd 0.14.24-3:e0d31fe-emipatch
            root@debdev:~/knxdbuild/knxd# su knxd -s /bin/bash
            knxd@debdev:/root$ knxd -p /run/knxd/knxd.pid --eibaddr=1.1.128 --client-addrs=1.1.129:8 -D -T -R -S -i --listen-local=/tmp/knx -b dummy:
            PIDFILE /run/knxd/knxd.pid

            To see if command line is correct parsed I add in my script a line which patches knxd.cpp to print out the pid file name

            sed -i '/main->value("background",false);/a printf("PIDFILE: %s\\n",pidfile);\nprintf("LOGFILE %s\\n",logfile);\n' src/server/knxd.cpp

            add the line after “git checkout merge”

            On a second console, check if folder /run/knxd and the pid file exists

            ls -s /run/knxd

            Michael

  89. Hi Michael,

    We have tried to replace line 153 and 158, line 158 isn’t liked by the system.

    We run with no change att line 158 byt at 153 but we get the same error.

    Best regards

    Jim

  90. I think I finally got knxd up on my USB!

    But messages are still unreadable. Any idea what unparseable EMI data means ? Its a TAPKO USB HID cEMI KNX-RF stick.

    knxd -t 1023 –eibaddr=0.5.140 –client-addrs=0.5.1:20 -D -T -R -S -i –listen-local=/tmp/knx -t -1023 -b usb:
    Layer 4 [ 1:main 0.000] initialized
    Layer 4 [ 1:main 0.000] setting up
    Layer 3 [ 4:server/Server 0.000] registerLink: 4:server
    Layer 3 [ 9:A.tcp/inet 0.000] registerLink: 9:A.tcp
    Layer 3 [12:B.unix/local 0.000] registerLink: 12:B.unix
    Layer 1 [18:C.usb/usbL 0.001] Detect
    Layer 1 [18:C.usb/usbL 0.001] Using 2:2:1:0:0 (2:129)
    Layer 1 [18:C.usb/usbL 0.002] Detect
    Layer 1 [18:C.usb/usbL 0.002] Using 2:2:1:0:0 (2:129)
    Layer 3 [15:C.usb/Conn 0.002] registerLink: 15:C.usb
    Layer 4 [ 1:main 0.002] setup OK
    Layer 4 [ 1:main 0.002] trigger going up
    Layer 3 [15:C.usb/Conn 0.002] Start: cfg:C.usb
    Layer 5 [15:C.usb/Conn 0.002] down => >up
    Layer 5 [15:C.usb/Conn 0.002] Starting
    Layer 1 [18:C.usb/usbL 0.002] Open
    Layer 1 [18:C.usb/usbL 0.011] Claimed
    Layer 1 [18:C.usb/usbL 0.011] Opened
    Layer 0 [16:C.usb/USBdr 0.012] starting send_Local
    Layer 0 [18:C.usb/usbL 0.012] SendUSB(064): 01 13 09 00 08 00 01 0F 01 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    Layer 0 [18:C.usb/usbL 0.012] StartSend 55a768ec79a0
    Layer 4 [15:C.usb/Conn 0.012] >up
    Layer 3 [12:B.unix/local 0.012] Start: cfg:B.unix
    Layer 5 [12:B.unix/local 0.012] down => >up
    Layer 8 [12:B.unix/local 0.012] OpenLocalSocket /tmp/knx
    Layer 8 [12:B.unix/local 0.012] LocalSocket opened
    Layer 5 [12:B.unix/local 0.012] >up => up
    Layer 4 [12:B.unix/local 0.012] up
    Layer 5 [12:B.unix/local 0.012] Started
    Layer 4 [12:B.unix/local 0.013] up
    Layer 3 [ 9:A.tcp/inet 0.013] Start: cfg:A.tcp
    Layer 5 [ 9:A.tcp/inet 0.013] down => >up
    Layer 8 [ 9:A.tcp/inet 0.013] OpenInetSocket 6720
    Layer 8 [ 9:A.tcp/inet 0.013] InetSocket opened
    Layer 5 [ 9:A.tcp/inet 0.014] >up => up
    Layer 4 [ 9:A.tcp/inet 0.014] up
    Layer 5 [ 9:A.tcp/inet 0.014] Started
    Layer 4 [ 9:A.tcp/inet 0.014] up
    Layer 3 [ 4:server/Server 0.014] Start: cfg:server
    Layer 5 [ 4:server/Server 0.019] down => >up
    Layer 8 [ 4:server/Server 0.019] Open
    Layer 0 [ 4:server/Server 0.019] Open
    Layer 0 [ 4:server/Server 0.019] Opened
    Layer 8 [20:router/driver 0.019] OpenD
    Layer 8 [20:router/driver 0.019] OpenedD
    Layer 3 [19:router/ConnC 0.019] registerLink: 19:router_19
    Layer 3 [19:router/ConnC 0.019] Start: cfg:router
    Layer 5 [19:router/ConnC 0.019] down => >up
    Layer 5 [19:router/ConnC 0.019] Starting
    Layer 5 [19:router/ConnC 0.019] >up => up
    Layer 4 [19:router/ConnC 0.019] up
    Layer 5 [19:router/ConnC 0.019] Started
    Layer 4 [19:router/ConnC 0.019] up
    Layer 8 [ 4:server/Server 0.019] Opened
    Layer 5 [ 4:server/Server 0.019] >up => up
    Layer 4 [ 4:server/Server 0.019] up
    Layer 5 [ 4:server/Server 0.019] Started
    Layer 4 [ 4:server/Server 0.019] up
    Layer 4 [ 1:main 0.019] going up triggered
    Layer 4 [ 1:main 0.020] check start
    Layer 4 [15:C.usb/Conn 0.020] is >up
    Layer 4 [ 1:main 0.020] check end: want_up 1 some 1>1 all 0>0, going 1 up 4 down 0
    Layer 0 [16:C.usb/USBdr 0.020] send_Local done
    Layer 0 [16:C.usb/USBdr 0.999] starting send_Local
    Layer 0 [18:C.usb/usbL 0.999] SendUSB(064): 01 13 09 00 08 00 01 0F 01 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    Layer 0 [18:C.usb/usbL 0.999] StartSend 55a768ec79a0
    Layer 0 [16:C.usb/USBdr 1.030] send_Local done
    Layer 0 [18:C.usb/usbL 1.030] RecvUSB(064): 01 13 0B 00 08 00 03 0F 02 00 00 01 00 04 08 02 00 FD 00 03 FC BC 02 3C E4 05 0E 04 71 07 07 EB 00 A7 01 36 03 00 00 00 03 00 14 0A 63 00 00 00 03 00 03 B8 50 1B 89 00 00 00 03 00 6F 27 00 00
    Layer 2 [16:C.usb/USBdr 1.030] recv_Data(064): 01 13 0B 00 08 00 03 0F 02 00 00 01 00 04 08 02 00 FD 00 03 FC BC 02 3C E4 05 0E 04 71 07 07 EB 00 A7 01 36 03 00 00 00 03 00 14 0A 63 00 00 00 03 00 03 B8 50 1B 89 00 00 00 03 00 6F 27 00 00
    Layer 1 [16:C.usb/USBdr 1.030] Using EMI version 3
    Layer 2 [17:C.usb/Conv 1.030] send_Init 3
    Layer 0 [17:C.usb/Conv 1.030] starting send_Local
    Layer 0 [18:C.usb/usbL 1.030] SendUSB(064): 01 13 0A 00 08 00 02 0F 03 00 00 05 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    Layer 0 [18:C.usb/usbL 1.031] StartSend 55a768ec79a0
    Layer 0 [17:C.usb/Conv 1.035] send_Local done
    Layer 2 [22:C.usb/CEMI 1.035] OpenL2
    Layer 5 [15:C.usb/Conn 1.035] >up => up
    Layer 4 [15:C.usb/Conn 1.035] up
    Layer 5 [15:C.usb/Conn 1.035] Started
    Layer 4 [ 1:main 1.035] check start
    Layer 4 [ 1:main 1.035] check end: want_up 1 some 1>1 all 0>1, going 0 up 5 down 0
    Layer 4 [ 1:main 1.035] all drivers up
    Layer 4 [ 1:main 1.035] up
    Layer 0 [18:C.usb/usbL 5.861] RecvUSB(064): 01 13 2F 00 08 00 27 01 03 00 00 29 0A 02 08 03 00 FD 00 0C 5D D4 06 2C E7 05 FF 00 00 13 07 EB 03 EA 01 FF 00 FD C4 00 FD 00 0C 5D D4 00 00 00 03 00 03 B8 50 1B 89 00 00 00 03 00 6F 27 00 00
    Layer 0 [17:C.usb/Conv 5.861] RecvEMI(039): 29 0A 02 08 03 00 FD 00 0C 5D D4 06 2C E7 05 FF 00 00 13 07 EB 03 EA 01 FF 00 FD C4 00 FD 00 0C 5D D4 00 00 00 03 00
    Layer 7 [22:C.usb/CEMI 5.861] Length? invalid (2ce7)
    Layer 2 [22:C.usb/CEMI 5.861] unparseable EMI data(039): 29 0A 02 08 03 00 FD 00 0C 5D D4 06 2C E7 05 FF 00 00 13 07 EB 03 EA 01 FF 00 FD C4 00 FD 00 0C 5D D4 00 00 00 03 00
    Layer 0 [18:C.usb/usbL 41.843] RecvUSB(064): 01 13 24 00 08 00 1C 01 03 00 00 29 0A 02 08 02 00 FD 00 03 FC BC 05 3C E4 05 0B 04 1E 08 07 EB 01 80 01 34 00 19 00 00 FD 00 0C 5D D4 00 00 00 03 00 03 B8 50 1B 89 00 00 00 03 00 6F 27 00 00
    Layer 0 [17:C.usb/Conv 41.843] RecvEMI(028): 29 0A 02 08 02 00 FD 00 03 FC BC 05 3C E4 05 0B 04 1E 08 07 EB 01 80 01 34 00 19 00
    Layer 7 [22:C.usb/CEMI 41.843] Length? invalid (3ce4)
    Layer 2 [22:C.usb/CEMI 41.843] unparseable EMI data(028): 29 0A 02 08 02 00 FD 00 03 FC BC 05 3C E4 05 0B 04 1E 08 07 EB 01 80 01 34 00 19 00
    Layer 0 [18:C.usb/usbL 41.894] RecvUSB(064): 01 13 26 00 08 00 1E 01 03 00 00 29 0A 02 08 02 00 FD 00 03 FC BC 06 3C E4 05 0B 04 1E 0A 07 EB 01 80 01 FF 00 FD FE 00 00 00 0C 5D D4 00 00 00 03 00 03 B8 50 1B 89 00 00 00 03 00 6F 27 00 00
    Layer 0 [17:C.usb/Conv 41.894] RecvEMI(030): 29 0A 02 08 02 00 FD 00 03 FC BC 06 3C E4 05 0B 04 1E 0A 07 EB 01 80 01 FF 00 FD FE 00 00
    Layer 7 [22:C.usb/CEMI 41.894] Length? invalid (3ce4)
    Layer 2 [22:C.usb/CEMI 41.894] unparseable EMI data(030): 29 0A 02 08 02 00 FD 00 03 FC BC 06 3C E4 05 0B 04 1E 0A 07 EB 01 80 01 FF 00 FD FE 00 00
    Layer 0 [18:C.usb/usbL 50.844] RecvUSB(064): 01 13 23 00 08 00 1B 01 03 00 00 29 0A 02 08 02 00 FD 00 03 FC BC 02 3C E4 05 02 04 11 07 07 EB 00 A7 01 34 64 01 FE 00 00 00 0C 5D D4 00 00 00 03 00 03 B8 50 1B 89 00 00 00 03 00 6F 27 00 00
    Layer 0 [17:C.usb/Conv 50.844] RecvEMI(027): 29 0A 02 08 02 00 FD 00 03 FC BC 02 3C E4 05 02 04 11 07 07 EB 00 A7 01 34 64 01
    Layer 7 [22:C.usb/CEMI 50.844] Length? invalid (3ce4)

    1. Hi bohtho,

      I’ve seen you’ve already created a new issue at the knxd project site. My knowledge in cEMI protocol details is very “limited” 🙂

      Michael

  91. Hi Michael

    Now it works perfect. We can monitor and set and reset knx adresses.

    Next step is to get a app working and ETS tunnel via the raspberry.

    A lot of thanks and best regards

    Jim L

  92. Hi Michael,

    Your toturial of knxd has always worked for me, but get it no longer working.
    I have a Rasberry 2 with Rasbian Stretch installed there.
    Here I had Rasbian Jessie and that worked smoothly, only after half a year work was my sd card always corrupt.
    Should something be adapted in the script?
    I would like to see your reaction,

    Thanks.

      1. Hi Michael,

        The knx vbus monitor does not work anymore.
        If I look in my ETS program, then the rasberry is no longer in the found devices and that was previously the case.
        I use the rasberry as an Ip Gateway between a KNX Ip interface and a Gira Home Server.

          1. pi@RPI_KNX-Router:~ $ sudo su
            root@RPI_KNX-Router:/home/pi# ps ax|grep knxd
            548 pts/0 S+ 0:00 grep knxd
            root@RPI_KNX-Router:/home/pi# journalctl -xu knxd.service
            — Logs begin at Thu 2016-11-03 17:16:43 UTC, end at Fri 2018-03-30 10:04:41 UTC
            Mar 30 09:58:44 RPI_KNX-Router systemd[1]: Starting KNX Daemon…
            — Subject: Unit knxd.service has begun start-up
            — Defined-By: systemd
            — Support: …debian.org/support

            — Unit knxd.service has begun starting up.
            Mar 30 09:59:00 RPI_KNX-Router systemd[1]: knxd.service: PID file /run/knxd/knxd
            Mar 30 10:00:30 RPI_KNX-Router systemd[1]: knxd.service: Start operation tim
            Mar 30 10:00:32 RPI_KNX-Router systemd[1]: Failed to start KNX Daemon.
            — Subject: Unit knxd.service has failed
            — Defined-By: systemd
            — Support: …debian.org/support

            — Unit knxd.service has failed.

            — The result is failed.
            Mar 30 10:00:32 RPI_KNX-Router systemd[1]: knxd.service: Unit entered failed start
            Mar 30 10:00:32 RPI_KNX-Router systemd[1]: knxd.service: Failed with result ‘time out
            lines 1-19/19 (END)…skipping…
            — Logs begin at Thu 2016-11-03 17:16:43 UTC, end at Fri 2018-03-30 10:04:41 UTC. —
            Mar 30 09:58:44 RPI_KNX-Router systemd[1]: Starting KNX Daemon…
            — Subject: Unit knxd.service has begun start-up
            — Defined-By: systemd
            — Support: …debian.org/support

            — Unit knxd.service has begun starting up.
            Mar 30 09:59:00 RPI_KNX-Router systemd[1]: knxd.service: PID file /run/knxd/knxd.pid not readable (yet?) after start: No such file or directory
            Mar 30 10:00:30 RPI_KNX-Router systemd[1]: knxd.service: Start operation timed out. Terminating.
            Mar 30 10:00:32 RPI_KNX-Router systemd[1]: Failed to start KNX Daemon.
            — Subject: Unit knxd.service has failed
            — Defined-By: systemd
            — Support: …debian.org/support

            — Unit knxd.service has failed.

            — The result is failed.
            Mar 30 10:00:32 RPI_KNX-Router systemd[1]: knxd.service: Unit entered failed state.
            Mar 30 10:00:32 RPI_KNX-Router systemd[1]: knxd.service: Failed with result ‘timeout’.
            ~

          2. Hi Niels,

            when did you run the script? Whats the version of knxd?

            knxd --version

            “Mar 30 09:59:00 RPI_KNX-Router systemd[1]: knxd.service: PID file /run/knxd/knxd.pid not readable (yet?) after start: ”

            This issue is resolved with commit applied at 20.03.2018.

            I’ve have also switch to master branch (v0.7.15). Please delete the knxdbuild directory and rerun the script.

            Michael

  93. Hi Michael,

    Thank you for your good help.
    The script I used was the v0.7.14 in combination with Raspbian Stretch Lite
    The knxd script now starts up well, but it still does not work well in combination with the Gira Homeserver
    while I have not changed anything on the Gira Homeserver.
    For example, I can read the temparature of the thermostat of the living room in the Gira app,
    but can no longer operate lighting with the Homeserver.
    If I use knxd vbus monitor I can read the bus activity.
    What could this have to do with it?

    thanks,

    Niels

  94. I Michael,
    i have installed knxd on raspberry3 with raspbian stretch, but the service in not runnig:

    knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Sun 2018-04-08 12:18:18 CEST; 2min 20s ago
    Process: 385 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCC
    Main PID: 413 (code=exited, status=1/FAILURE)

    Apr 08 12:18:17 raspy3-knx systemd[1]: Starting KNX Daemon…
    Apr 08 12:18:18 raspy3-knx systemd[1]: knxd.service: PID file /run/knxd/knxd.pid not readable (yet?) after s
    Apr 08 12:18:18 raspy3-knx systemd[1]: Started KNX Daemon.
    Apr 08 12:18:18 raspy3-knx systemd[1]: knxd.service: Main process exited, code=exited, status=1/FAILURE
    Apr 08 12:18:18 raspy3-knx systemd[1]: knxd.service: Unit entered failed state.
    Apr 08 12:18:18 raspy3-knx systemd[1]: knxd.service: Failed with result ‘exit-code’.
    the pid file not exist in /run/knxd.
    the knxd version is “knxd 0.14.24-3:42b06c4” but into file that i have download with nano is write “# Version 0.7.15 30.03.2018”
    Stefano

    1. Hi Stefano,

      try to start knxd in foreground with traces enabled:
      Switch to user knxd

      sudo su knxd -s /bin/bash
      

      Then get your knxd options from /etc/default/knxd (for example –eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuart:/dev/ttyAMA0) , remove the -d switch, add the trace switches and start it

      knxd -t 1023 --eibaddr=1.1.128 --client-addrs=1.1.129:8 -D -T -R -S -i --listen-local=/tmp/knx -t 1023 -b tpuart:/dev/ttyAMA0
      

      Any failures?

      Michael

  95. Hi Michael,
    i have try to install knxd on raspbian jessie clean.
    With usb, the daemon is active and only first attempt, the konnex send the packet and switch the light, with the second attempt, the light not switched and the daemon (with “systemctl status knxd” is failed.
    if i restart knxd, first attempt is ok , the second attempt not switch the light.
    the command for switch the light is “groupswrite ip:127.0.0.1 2/0/2 1” , is correct? .
    the knxd version is “knxd 0.14.24-3:42b06c4-emipatch”, but i have download the 7.15 version.
    Thanks
    Stefano

    1. Hi Stefano,

      I think this is an known issue with knxd and USB devices. Have you tried what I have written in my previous comment:

      try to start knxd in foreground with traces enabled to see whats happend.
      Killall knxd processes and switch to user knxd

      sudo killall knxd
      sudo su knxd -s /bin/bash
      

      Then get your knxd options from /etc/default/knxd (for example usb –eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:) , remove the -d switch, add the trace switches -t 1023 and start it

      knxd -t 1023 --eibaddr=1.1.128 --client-addrs=1.1.129:8 -D -T -R -S -i --listen-local=/tmp/knx -t 1023 -b usb:
      

      Whats the error message before knxd exits? “Driver timed out trying to send” ?

      At the weekend I tried the calimero KNXnet server and I wrote a script to install it from scratch. It works fine for me with a TPUART Module, USB Devices are also supported. May be you want to try it. I try to support you to gets it running.

      Michael

      1. Hi Michael,
        i get the same result, first attempt is ok, second not ok.
        yes the error message is “Driver timed out trying to send”
        Why the knxd version is 7.14 and not 7.15?
        in Calimero is supported USB and router ip?
        thanks for your time and i try your script.
        i install raspbian jessie or stretch for your calimero script?
        Stefano

      2. Hi Michael,
        i saw a strange thing,
        at start raspbian, the knxd service with ip router is failed, if i press “systemctl start knxd” the service is running and i switch the light many times.
        if i restart raspbian the service is failed ecc…
        Stefano

          1. Hi Michael,
            the network interfaces is static and cable, when the desktop is on if i press on the shell ‘sudo systemctl start knxd’, the service on and i see active with ‘systemctl status knxd’.
            in the weekend i try the calimero and i report to you.
            Stefano

          2. Hi Stefano,

            ok, in the evening I’ll publish an updated version which configures calimero to use USB.

            Michael

          3. Hi Stefano,

            try

            sudo su -
            wget https://michlstechblog.info/blog/download/shell_scripts/calimero.sh
            bash calimero.sh usb
            

            Michael

  96. Hi Michael,
    i have try the calimero script, but for raspbian stretch the install stop with this message;

    Executing: /tmp/apt-key-gpghome.Nl67fjE9Aq/gpg.1.sh –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys EEA14886
    gpg: key C2518248EEA14886: “Launchpad VLC” not changed
    gpg: Total number processed: 1
    gpg: unchanged: 1
    Traceback (most recent call last):
    File “/usr/bin/apt-add-repository”, line 95, in
    sp = SoftwareProperties(options=options)
    File “/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py”, line 109, in __init__
    self.reload_sourceslist()
    File “/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py”, line 599, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)
    File “/usr/lib/python3/dist-packages/aptsources/distro.py”, line 89, in get_sources
    (self.id, self.codename))
    aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Raspbian/stretch

    Stefano

    1. Hi Stefano,

      ok, this is because, unlike to armbian and debian, Oracle Java is already included in raspbian.

      I must change the script to use this.

      Michael

  97. Hi michael,

    After hours of struggling, i can’t get running knxd on my raspberry.
    I used to have an older raspberry running wheezy (eibd which i installed using your other post michlstechblog.info/blog/raspberry-pi-eibd-with-a-knx-usb-interface), which ran for years, but now my old raspberry gave up and doesn’t boot at all anymore, so had to install all again on a raspberry 2+

    following details :
    jessie distribution on my raspi : Raspbian GNU/Linux 8 (jessie)
    tpuart interface : http://www.busware.de/tiki-index.php?page=ROT
    install script that i ran was : Version 0.7.15 30.03.2018

    My raspi has a static ip, can connect the internet and runs smoothly

    My main issue is that i can’t get my knxd up and running, as it always stops with the error : F00000000: [15:C.tpuarts] Link down, terminating
    Details see below.

    Is there any way to find out if my raspberry is really recognizing the tpuart module, or do you see any reason and solution for this failure

    Thx a lot in advance

    Kurt

    PS: if my question is completely out of topic, is there any other forum you could recommend me ?

    >>> knxd –version
    knxd 0.14.24-3:42b06c4-emipatch

    >>> knxd -t 0xfff -p /run/knxd/knxd.pid –eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyAMA0

    Layer 4 [ 1:main 0.000] initialized
    Layer 4 [ 1:main 0.001] setting up
    Layer 3 [ 4:server/Server 0.002] registerLink: 4:server
    Layer 3 [ 9:A.tcp/inet 0.002] registerLink: 9:A.tcp
    Layer 3 [12:B.unix/local 0.003] registerLink: 12:B.unix
    Layer 0 [18:C.tpuarts/log 0.003] Insert 17:LowF / 16:tpuart
    Layer 0 [18:C.tpuarts/log 0.003] Setup
    Layer 0 [20:C.tpuarts/log 0.004] Insert 19:TPU_ser / 17:LowF
    Layer 0 [18:C.tpuarts/log 0.004] Filter single not found
    Layer 0 [20:C.tpuarts/log 0.004] Setup
    Layer 0 [20:C.tpuarts/log 0.004] Setup OK: yes
    Layer 0 [18:C.tpuarts/log 0.004] Setup OK: yes
    Layer 3 [15:C.tpuarts/Conn 0.004] registerLink: 15:C.tpuarts
    Layer 4 [ 1:main 0.004] setup OK
    Layer 4 [ 1:main 0.004] trigger going up
    Layer 3 [12:B.unix/local 0.005] Start: cfg:B.unix
    Layer 5 [12:B.unix/local 0.005] down => >up
    Layer 8 [12:B.unix/local 0.005] OpenLocalSocket /tmp/knx
    Layer 8 [12:B.unix/local 0.005] LocalSocket opened
    Layer 5 [12:B.unix/local 0.005] >up => up
    Layer 4 [12:B.unix/local 0.005] up
    Layer 5 [12:B.unix/local 0.005] Started
    Layer 4 [12:B.unix/local 0.005] up
    Layer 3 [ 9:A.tcp/inet 0.006] Start: cfg:A.tcp
    Layer 5 [ 9:A.tcp/inet 0.006] down => >up
    Layer 8 [ 9:A.tcp/inet 0.006] OpenInetSocket 6720
    Layer 8 [ 9:A.tcp/inet 0.006] InetSocket opened
    Layer 5 [ 9:A.tcp/inet 0.006] >up => up
    Layer 4 [ 9:A.tcp/inet 0.006] up
    Layer 5 [ 9:A.tcp/inet 0.006] Started
    Layer 4 [ 9:A.tcp/inet 0.006] up
    Layer 3 [15:C.tpuarts/Conn 0.006] Start: cfg:C.tpuarts
    Layer 5 [15:C.tpuarts/Conn 0.006] down => >up
    Layer 5 [15:C.tpuarts/Conn 0.006] Starting
    Layer 0 [18:C.tpuarts/log 0.006] Start
    Layer 0 [20:C.tpuarts/log 0.006] Start
    Layer 0 [19:C.tpuarts/TPU_ser 0.007] Opened /dev/ttyAMA0 with baud 19200
    Layer 2 [19:C.tpuarts/TPU_ser 0.007] Opened
    Layer 2 [19:C.tpuarts/TPU_ser 0.007] Buffer Setup on fd 6
    Layer 0 [20:C.tpuarts/log 0.008] Started
    Layer 8 [17:C.tpuarts/LowF 0.008] state: new > start
    Layer 0 [17:C.tpuarts/LowF 0.008] SendReset 01
    Layer 0 [20:C.tpuarts/log 0.008] Send(001): 01
    Layer 4 [15:C.tpuarts/Conn 0.008] >up
    Layer 3 [ 4:server/Server 0.008] Start: cfg:server
    Layer 5 [ 4:server/Server 0.008] down => >up
    Layer 8 [ 4:server/Server 0.008] Open
    Layer 0 [ 4:server/Server 0.008] Open
    Layer 0 [ 4:server/Server 0.008] Opened
    Layer 8 [23:router/driver 0.009] OpenD
    Layer 8 [23:router/driver 0.010] OpenedD
    Layer 3 [22:router/ConnC 0.010] registerLink: 22:router_22
    Layer 3 [22:router/ConnC 0.010] Start: cfg:router
    Layer 5 [22:router/ConnC 0.010] down => >up
    Layer 5 [22:router/ConnC 0.010] Starting
    Layer 5 [22:router/ConnC 0.011] >up => up
    Layer 4 [22:router/ConnC 0.011] up
    Layer 5 [22:router/ConnC 0.011] Started
    Layer 4 [22:router/ConnC 0.011] up
    Layer 8 [ 4:server/Server 0.011] Opened
    Layer 5 [ 4:server/Server 0.011] >up => up
    Layer 4 [ 4:server/Server 0.011] up
    Layer 5 [ 4:server/Server 0.011] Started
    Layer 4 [ 4:server/Server 0.011] up
    Layer 4 [ 1:main 0.011] going up triggered
    Layer 4 [ 1:main 0.011] check start
    Layer 4 [15:C.tpuarts/Conn 0.012] is >up
    Layer 4 [ 1:main 0.012] check end: want_up 1 some 1>1 all 0>0, going 1 up 4 down 0
    p/knx -b tpuarts:/dev/ttyAMA0Layer 0 [17:C.tpuarts/LowF 0.483] SendReset 01d -D -T -R -S -i –listen-local=/tmp
    Layer 0 [20:C.tpuarts/log 0.483] Send(001): 01
    Layer 0 [17:C.tpuarts/LowF 0.984] SendReset 01
    Layer 0 [20:C.tpuarts/log 0.984] Send(001): 01
    Layer 8 [17:C.tpuarts/LowF 1.484] state: in_reset > error
    Layer 0 [20:C.tpuarts/log 2.485] Stop
    Layer 0 [20:C.tpuarts/log 2.486] Stopped
    Layer 8 [17:C.tpuarts/LowF 2.487] state: error > new
    Layer 0 [18:C.tpuarts/log 2.488] Stopped
    Layer 5 [15:C.tpuarts/Conn 2.488] >up => down
    Layer 4 [15:C.tpuarts/Conn 2.489] down/error
    Layer 4 [ 1:main 2.490] check start
    Layer 4 [15:C.tpuarts/Conn 2.490] is down
    Layer 4 [ 1:main 2.491] check end: want_up 1 some 1>1 all 0>0, going 0 up 4 down 1
    F00000000: [15:C.tpuarts] Link down, terminating
    Layer 4 [ 1:main 2.493] trigger Going down
    Layer 4 [22:router/ConnC 2.493] Stopping
    Layer 5 [22:router/ConnC 2.494] up => >down
    Layer 5 [22:router/ConnC 2.494] Stopping
    Layer 5 [22:router/ConnC 2.495] >down => down
    Layer 4 [22:router/ConnC 2.495] down
    Layer 4 [22:router/ConnC 2.496] down
    Layer 4 [12:B.unix/local 2.497] Stopping
    Layer 5 [12:B.unix/local 2.497] up => >down
    Layer 8 [12:B.unix/local 2.498] StopServer
    Layer 5 [12:B.unix/local 2.499] >down => down
    Layer 4 [12:B.unix/local 2.500] down
    Layer 4 [12:B.unix/local 2.501] down
    Layer 4 [ 9:A.tcp/inet 2.501] Stopping
    Layer 5 [ 9:A.tcp/inet 2.502] up => >down
    Layer 8 [ 9:A.tcp/inet 2.503] StopServer
    Layer 5 [ 9:A.tcp/inet 2.503] >down => down
    Layer 4 [ 9:A.tcp/inet 2.503] down
    Layer 4 [ 9:A.tcp/inet 2.504] down
    Layer 4 [15:C.tpuarts/Conn 2.504] Stopping
    Layer 5 [15:C.tpuarts/Conn 2.504] down/error => >down
    Layer 4 [15:C.tpuarts/Conn 2.505] down/error
    Layer 4 [ 4:server/Server 2.505] Stopping
    Layer 5 [ 4:server/Server 2.505] up => >down
    Layer 5 [22:router/ConnC 2.505] Stopping
    Layer 3 [22:router/ConnC 2.506] unregisterLink: router_22
    Layer 0 [ 4:server/Server 2.506] Close
    Layer 5 [ 4:server/Server 2.507] >down => down
    Layer 4 [ 4:server/Server 2.507] down
    Layer 4 [ 4:server/Server 2.508] down
    Layer 4 [ 1:main 2.508] check start
    Layer 8 [23:router/driver 2.509] CloseD
    Layer 4 [12:B.unix/local 2.509] is down
    Layer 4 [ 9:A.tcp/inet 2.509] is down
    Layer 4 [15:C.tpuarts/Conn 2.509] is down
    Layer 4 [ 4:server/Server 2.510] is down
    Layer 4 [ 1:main 2.510] check end: want_up 0 some 1>0 all 0>0, going 0 up 0 down 4
    Layer 4 [ 1:main 2.510] down
    Layer 4 [ 1:main 2.511] deleting
    Layer 8 [12:B.unix/local 2.511] StopServer
    Layer 8 [ 9:A.tcp/inet 2.511] StopServer
    Layer 0 [18:C.tpuarts/log 2.511] Closing
    Layer 2 [17:C.tpuarts/LowF 2.511] Close
    Layer 0 [20:C.tpuarts/log 2.512] Closing
    Layer 2 [19:C.tpuarts/TPU_ser 2.512] Close
    Layer 8 [ 4:server/Server 2.512] Close
    Layer 4 [ 1:main 2.513] deleted.

    >>> ls -l /dev/ttyAMA0
    crw-rw—- 1 root dialout 204, 64 mei 10 09:59 /dev/ttyAMA0

    >>> cat /etc/group|grep knx
    dialout:x:20:pi,knxd
    sudo:x:27:pi,knxd
    knxd:x:1002:pi,knxd

    >>> lsusb
    Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
    Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    Shouldn’t i see something regarding my tpuart ????

    1. Hi Kurt,

      is ttyAMA0 opened by any other process?

      sudo lsof | grep ttyAMA

      KNX Bus is connected? TPUART gets its supply voltage from KNX.

      Michael

      1. No it is not opened by any other proces, at least , lsof does not show any.
        Offcourse the bus is connected, the yellow LED on the tpuarts is lighten up (but i understand your question).

        Other remarks : the page github.com/knxd/knxd/wiki/Adding-a-busware-pigator-KNX-TPUART-(Raspberry) says to add the TPUART to /etc/udev/rules.d/70-knxd.rules, in your tutorial above, you’re talking about /etc/udev/rules.d/90-knxusb-devices.rules
        Currently i have them in both, but what should be the correct one ?

        The install pages explains to identify the TPUART via :

        sudo udevadm info -a /dev/ttyAMA0 | grep KERNELS.*uart

        In my situation, this does not show anything, but

        sudo udevadm info -a /dev/ttyAMA0 | grep KERNEL

        KERNEL==”ttyAMA0″
        KERNELS==”3f201000.serial”
        KERNELS==”soc”
        KERNELS==”platform”

        And also :

        sudo udevadm info -a /dev/ttyAMA0 | grep \{id\}
        ATTRS{id}==”00241011″

        So i tried to add :

        ACTION==”add”, SUBSYSTEM==”tty”, ATTRS{id}==”00241011″, KERNELS==”3f201000.serial”, SYMLINK+=”ttyKNX1″, OWNER=”knxd”

        to /etc/udev/rules.d/90-knxusb-devices.rules , this works and a /dev/ttyKNX1 available after booting.

        But finally, starting up knxd still shows me the same output and error F00000000: [15:C.tpuarts] Link down, terminating

        Any help / advice very appreciated.

        Thx

        Kurt

        1. extra question : do you have any idea what they mean with : After a reboot you will have a device /dev/ttyAMA0 which is owned by knxd, it has a new link /dev/ttyKNX1 which can be used for the knxd –layer2:tpuarts:/dev/ttyKNX1

          When i try this :

          knxd -t 0xfff -p /run/knxd/knxd.pid --eibaddr=1.1.128 --client-addrs=1.1.129:8 -d -D -T -R -S -i --listen-local=/tmp/knx -b --layer2:tpuarts:/dev/ttyKNX1

          This simply shows me this output :

          I don’t know of options for –layer2
          E00000055: [ 1:main] There is no KNX addr= in section ‘main’.
          F00000000: [ 1:main] Error setting up the KNX router.

          1. Hi Kurt,

            the syntax is wrong:

            you can set


            --layer2=tpuarts:/dev/ttyKNX1

            instead of

            -b tpuarts:/dev/ttyKNX1

            but I also recommend you to use /dev/ttyAMA0 the symlink /dev/ttyKNX1->/dev/ttyAMA0 is not necessary. Access for user knxd to the device is given by the dialout group.

            Anyway. Which raspberry type do you use and which dtb is loaded?

            dmesg | grep dtoverlay

            Michael

            P.S. If you have a 2nd SD Card you can try to install calimero server to shoot out that knxd is the root cause, but knxds tpuart support is stable.

          2. I tried both options, but (the –layer and also the -b) but both result in exactly the same output (which was expected)

            dmesg | grep dtoverlay

            does not show me any output, but I think you were looking after :

            Machine model: Raspberry Pi 2 Model B Rev 1.1

            I’ve plenty of SD cards (I’m experimenting with a raspberry you know), so will try your suggestion on calimero.

            Will come back as soon as i tried.

            Kurt

          3. Hi Kurt,

            “dmesg | grep dtoverlay

            does not show me any output, but I think you were looking after :

            Machine model: Raspberry Pi 2 Model B Rev 1.1” => On Raspberry 3 Models an dtb overlay is required to disable the Bluetooth Adapter. But for your Raspberry 2 this is ok.

            Michael

        2. update : just received my busware.de/tiki-index.php?page=POD and after installation and without touching anything, the script of michael did do the job activating the whole interface
          Magnificent job michael !

  98. Hi Michael,

    I just got it almost to work on my Raspberry 2 with Züblin USB interface.
    To get it work I added the following rule to /etc/udev/rules.d/90-knxusb-devices.rules:
    # Züblin KNX USB Interface
    SUBSYSTEM==”usb”, ATTR{idVendor}==”28c2″, ATTR{idProduct}==”0007″, ACTION==”add”, GROUP=”knxd”, MODE=”0664″

    My problem is, that it fails to start after reboot. But I can start it manually:

    root@knxpi:~# systemctl status knxd
    ● knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
    Active: failed (Result: resources) since Fri 2018-06-08 20:33:23 UTC; 3min 1s ago
    Process: 303 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)

    Jun 08 20:33:22 knxpi systemd[1]: Starting KNX Daemon…
    Jun 08 20:33:23 knxpi systemd[1]: knxd.service: PID file /run/knxd/knxd.pid not readable (yet?) after start: No such file or directory
    Jun 08 20:33:23 knxpi systemd[1]: knxd.service: Daemon never wrote its PID file. Failing.
    Jun 08 20:33:23 knxpi systemd[1]: Failed to start KNX Daemon.
    Jun 08 20:33:23 knxpi systemd[1]: knxd.service: Unit entered failed state.
    Jun 08 20:33:23 knxpi systemd[1]: knxd.service: Failed with result ‘resources’.
    root@knxpi:~# systemctl start knxd
    root@knxpi:~# systemctl status knxd
    ● knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
    Active: active (running) since Fri 2018-06-08 20:36:36 UTC; 2s ago
    Process: 471 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)
    Main PID: 473 (knxd)
    CGroup: /system.slice/knxd.service
    └─473 /usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp

    Jun 08 20:36:36 knxpi systemd[1]: Starting KNX Daemon…
    Jun 08 20:36:36 knxpi systemd[1]: knxd.service: PID file /run/knxd/knxd.pid not readable (yet?) after start: No such file or directory
    Jun 08 20:36:36 knxpi systemd[1]: Started KNX Daemon.

    Any ideas? I configured a static ip adress for eth0, so that should be not the problem.

    Conny

  99. Hi Michael,

    it works for me after I removed the comment character of the line:

    ExecStartPre=/lib/systemd/systemd-networkd-wait-online –timeout=60 –interface=eth0

    in /lib/systemd/system/knxd.service

    Conny

  100. Hey michael, is it necessary to use your way of configuring the network?
    i tried it your way but couldn’t access my rpi3 b+ via ssh anymore

      1. Hey Michael, i’ve followed everything. except the network configuration like you did.

        when i run “knxtool vbusmonitor1 ip:localhost” i get “Open failed: Connection refused”

        1. systemctl status knxd outputs :
          knxd.service – KNX Daemon
          Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
          Active: failed (Result: exit-code) since Wed 2018-07-04 18:06:16 UTC; 1h 18min ago
          Process: 407 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status
          Main PID: 450 (code=exited, status=1/FAILURE)

          Jul 04 18:06:16 raspberrypi systemd[1]: Starting KNX Daemon…
          Jul 04 18:06:16 raspberrypi systemd[1]: knxd.service: PID file /run/knxd/knxd.pid not readable (yet?)
          Jul 04 18:06:16 raspberrypi systemd[1]: Started KNX Daemon.
          Jul 04 18:06:16 raspberrypi systemd[1]: knxd.service: Main process exited, code=exited, status=1/FAIL
          Jul 04 18:06:16 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
          Jul 04 18:06:16 raspberrypi systemd[1]: knxd.service: Failed with result ‘exit-code’.

          1. Hi Bjorn,

            whats the content of your config file /etc/default/knxd ?
            Which device do you are using?

            Try to start knxd in foreground with trace enabled to get an detailed error description (adjust the device option -b to your environment):

            sudo su knxd -s /bin/bash
            knxd -t 1023 --eibaddr=1.1.128 --client-addrs=1.1.129:8 -D -T -R -S -i --listen-local=/tmp/knx -t 1023 -b tpuart:/dev/ttyAMA0
            

            Michael

  101. Hey michael,
    i don’t know why but i don’t see the “reply” button on your last reaction

    i’m using the Gira usb-interface

    here’s my output :
    knxd@raspberrypi:/home/pi$ knxd -t 1023 –eibaddr=1.1.128 –client-addrs=1.1.129:8 -D -T -R -S -i –listen-local=/tmp/knx -t 1023 -b usb:
    Layer 4 [ 1:main 0.000] initialized
    Layer 4 [ 1:main 0.000] setting up
    Layer 3 [ 4:server/Server 0.000] registerLink: 4:server
    Layer 3 [ 9:A.tcp/inet 0.000] registerLink: 9:A.tcp
    Layer 3 [12:B.unix/local 0.000] registerLink: 12:B.unix
    Layer 1 [18:C.usb/usbL 0.012] Detect
    Layer 1 [18:C.usb/usbL 0.012] Using 1:4:1:0:0 (2:129)
    Layer 1 [18:C.usb/usbL 0.022] Detect
    Layer 1 [18:C.usb/usbL 0.022] Using 1:4:1:0:0 (2:129)
    Layer 3 [15:C.usb/Conn 0.022] registerLink: 15:C.usb
    Layer 4 [ 1:main 0.022] setup OK
    Layer 4 [ 1:main 0.023] trigger going up
    Layer 3 [15:C.usb/Conn 0.023] Start: cfg:C.usb
    Layer 5 [15:C.usb/Conn 0.023] down => >up
    Layer 5 [15:C.usb/Conn 0.023] Starting
    Layer 1 [18:C.usb/usbL 0.023] Open
    Layer 1 [18:C.usb/usbL 0.079] Claimed
    Layer 1 [18:C.usb/usbL 0.079] Opened
    Layer 0 [16:C.usb/USBdr 0.079] starting send_Local
    Layer 0 [18:C.usb/usbL 0.079] SendUSB(064): 01 13 09 00 08 00 01 0F 01 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    Layer 0 [18:C.usb/usbL 0.079] StartSend 10e0808
    Layer 4 [15:C.usb/Conn 0.080] >up
    Layer 3 [12:B.unix/local 0.080] Start: cfg:B.unix
    Layer 5 [12:B.unix/local 0.080] down => >up
    Layer 8 [12:B.unix/local 0.080] OpenLocalSocket /tmp/knx
    Layer 8 [12:B.unix/local 0.080] LocalSocket opened
    Layer 5 [12:B.unix/local 0.080] >up => up
    Layer 4 [12:B.unix/local 0.080] up
    Layer 5 [12:B.unix/local 0.080] Started
    Layer 4 [12:B.unix/local 0.080] up
    Layer 3 [ 9:A.tcp/inet 0.080] Start: cfg:A.tcp
    Layer 5 [ 9:A.tcp/inet 0.080] down => >up
    Layer 8 [ 9:A.tcp/inet 0.080] OpenInetSocket 6720
    Layer 8 [ 9:A.tcp/inet 0.081] InetSocket opened
    Layer 5 [ 9:A.tcp/inet 0.081] >up => up
    Layer 4 [ 9:A.tcp/inet 0.081] up
    Layer 5 [ 9:A.tcp/inet 0.081] Started
    Layer 4 [ 9:A.tcp/inet 0.081] up
    Layer 3 [ 4:server/Server 0.081] Start: cfg:server
    Layer 5 [ 4:server/Server 0.081] down => >up
    Layer 8 [ 4:server/Server 0.081] Open
    Layer 0 [ 4:server/Server 0.081] Open
    Layer 0 [ 4:server/Server 0.081] Opened
    Layer 8 [20:router/driver 0.081] OpenD
    Layer 8 [20:router/driver 0.082] OpenedD
    Layer 3 [19:router/ConnC 0.082] registerLink: 19:router_19
    Layer 3 [19:router/ConnC 0.082] Start: cfg:router
    Layer 5 [19:router/ConnC 0.082] down => >up
    Layer 5 [19:router/ConnC 0.082] Starting
    Layer 5 [19:router/ConnC 0.082] >up => up
    Layer 4 [19:router/ConnC 0.082] up
    Layer 5 [19:router/ConnC 0.082] Started
    Layer 4 [19:router/ConnC 0.082] up
    Layer 8 [ 4:server/Server 0.082] Opened
    Layer 5 [ 4:server/Server 0.082] >up => up
    Layer 4 [ 4:server/Server 0.082] up
    Layer 5 [ 4:server/Server 0.082] Started
    Layer 4 [ 4:server/Server 0.082] up
    Layer 4 [ 1:main 0.082] going up triggered
    Layer 4 [ 1:main 0.083] check start
    Layer 4 [15:C.usb/Conn 0.083] is >up
    Layer 4 [ 1:main 0.083] check end: want_up 1 some 1>1 all 0>0, going 1 up 4 down 0
    Layer 0 [18:C.usb/usbL 0.083] RecvUSB(064): 01 13 0B 00 08 00 03 0F 02 00 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    Layer 2 [16:C.usb/USBdr 0.083] recv_Data(064): 01 13 0B 00 08 00 03 0F 02 00 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    Layer 1 [16:C.usb/USBdr 0.084] Using EMI version 1
    Layer 0 [16:C.usb/USBdr 0.084] version x01 recognized, delayed
    Layer 0 [16:C.usb/USBdr 0.084] send_Local done
    Layer 2 [17:C.usb/Conv 0.084] send_Init 1
    Layer 0 [17:C.usb/Conv 0.084] starting send_Local
    Layer 0 [18:C.usb/usbL 0.084] SendUSB(064): 01 13 0A 00 08 00 02 0F 03 00 00 05 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    Layer 0 [18:C.usb/usbL 0.085] StartSend 10e54e8
    Layer 0 [17:C.usb/Conv 0.085] send_Local done
    Layer 2 [22:C.usb/EMI1 0.085] OpenL2
    Layer 0 [22:C.usb/EMI1 0.085] starting send_Local
    Layer 0 [17:C.usb/Conv 0.085] Send-EMI(008): 46 01 01 16 00 00 00 00
    Layer 0 [18:C.usb/usbL 0.085] SendUSB(064): 01 13 10 00 08 00 08 01 01 00 00 46 01 01 16 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    Layer 0 [18:C.usb/usbL 0.086] StartSend 10e54a0
    Layer 0 [22:C.usb/EMI1 0.086] send_Local done
    Layer 0 [22:C.usb/EMI1 0.086] starting send_Local
    Layer 0 [17:C.usb/Conv 0.086] Send-EMI(005): 46 01 00 60 12
    Layer 0 [18:C.usb/usbL 0.086] SendUSB(064): 01 13 0D 00 08 00 05 01 01 00 00 46 01 00 60 12 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    Layer 0 [18:C.usb/usbL 0.087] StartSend 10e54a0
    Layer 0 [22:C.usb/EMI1 0.088] send_Local done
    Layer 5 [15:C.usb/Conn 0.088] >up => up
    Layer 4 [15:C.usb/Conn 0.088] up
    Layer 5 [15:C.usb/Conn 0.088] Started
    Layer 4 [ 1:main 0.088] check start
    Layer 4 [ 1:main 0.088] check end: want_up 1 some 1>1 all 0>1, going 0 up 5 down 0
    Layer 4 [ 1:main 0.088] all drivers up
    Layer 4 [ 1:main 0.088] up

    1. Hi Björn,

      but there is no error and it seems running 🙂 Have you tried to access the KNX bus?

      Let the console where knxd is started open and try to access the knx. For example start the busmonitor in another console or with ETS.

      Michael

        1. Hi Bjorn,

          open /lib/systemd/system/knxd.service and remove the comment/hash sign at the beginning of the line followed below. Adjust the interface parameter to your network interface (if it is not eth0 🙂 )

          ExecStartPre=/lib/systemd/systemd-networkd-wait-online –timeout=60 –interface=eth0

          save it and call

          sudo systemctl daemon-reload
          

          Michael

          in

          Conny

  102. Hi Michael,
    thanks for this great installation script! You saved a lot of time, for a lot of people!

    One thing, I don’t get resolved, is that I can use vbusmonitor on the machine itself and use the node-js scripts to access the bus (read and write), but from a remote machine, I don’t get any usable connection. trying to Telnet to the TCP Port will give a connection, so I don’t think its a firewall thing.
    Using ETS the Router is not found, neither by multicast, nor unicast.
    I’m using weinzierl kberry interface one a PI3, adjusted the knxd arguments to “ft12cemi” driver.
    Starting KNXD in foreground as described, I see a lot off traffic passing by as well.

    Could you help with any hint…
    Regards, Rolf

    1. Hi Rolf,

      ok, knxd is running but not accessible from other machines, am I right? Are the devices which should access knxd in the same IP Subnet? Usually multicast works only in the same subnet expect the router is configured to forward IGMP…. but an Unicast connection by specifying the IP Address should work.

      Michael

      1. Hi Michael,

        yes, this is how it looks like, to me.
        The systems are all on the same layer2 Network, so noting about gateways, multicast routing… Trying to keep it simple for the start.
        Hardware is PI3 with latest (Stretch) Raspbian.
        Using nmap I can see that the Ports get Opened on the machine, but cant’t connect with ets
        Starting knxd in foreground the log keeps repeating busmessages like this.
        Layer 6 [23:router/ConnC 2395.852] sendNext called, send_more set
        Layer 6 [ 9:A.tcp/inet 2395.852] is OK
        Layer 6 [23:router/ConnC 2395.852] is OK
        Layer 6 [12:B.unix/local 2395.852] is OK
        Layer 6 [ 4:server/Server 2395.852] is OK
        Layer 6 [15:C.ft12cemi/Conn 2395.852] is OK
        Layer 6 [ 1:main 2395.852] OK
        Layer 6 [ 2:main/L 2395.852] OK L
        Layer 0 [20:C.ft12cemi/log 2395.855] Recv(006): 3F 44 DD 30 58 16
        Layer 1 [17:C.ft12cemi/ft12wrap 2395.855] Processing(022): 68 10 10 68 F3 29 00 BC C0 11 14 7B 0B 05 00 80 3F 44 DD 30 58 16
        Layer 0 [20:C.ft12cemi/log 2395.855] Send(001): E5
        Layer 0 [18:C.ft12cemi/log 2395.855] Recv(015): 29 00 BC C0 11 14 7B 0B 05 00 80 3F 44 DD 30
        Layer 0 [22:C.ft12cemi/log 2395.855] Recv L_Data low from 1.1.20 to 15/3/11 hops: 04 T_DATA_XXX_REQ A_GroupValue_Write 3F 44 DD 30
        Layer 8 [15:C.ft12cemi/Conn 2395.855] found addr 1.1.20
        Layer 6 [23:router/ConnC 2395.855] sending, send_more clear
        Layer 1 [ 4:server/Server 2395.855] Send(015): 29 00 BC B0 11 14 7B 0B 05 00 80 3F 44 DD 30
        Layer 2 [25:router.pace_/router 2395.856] out 1/6: delay for 0.021 sec
        Layer 6 [ 9:A.tcp/inet 2395.856] is OK
        Layer 6 [23:router/ConnC 2395.856] still waiting
        Layer 6 [ 1:main 2395.856] wait L
        Layer 0 [ 4:server/Server 2395.856] Send(021): 06 10 05 30 00 15 29 00 BC B0 11 14 7B 0B 05 00 80 3F 44 DD 30
        Layer 0 [ 4:server/Server 2395.856] Dropped(021): 06 10 05 30 00 15 29 00 BC B0 11 14 7B 0B 05 00 80 3F 44 DD 30
        Layer 2 [25:router.pace_/router 2395.876] delay done
        Layer 6 [23:router/ConnC 2395.877] sendNext called, send_more set
        Layer 6 [ 9:A.tcp/inet 2395.877] is OK
        Layer 6 [23:router/ConnC 2395.877] is OK
        Layer 6 [12:B.unix/local 2395.877] is OK
        Layer 6 [ 4:server/Server 2395.877] is OK
        Layer 6 [15:C.ft12cemi/Conn 2395.877] is OK
        Layer 6 [ 1:main 2395.877] OK
        Layer 6 [ 2:main/L 2395.877] OK L

        1. Hi Rolf,

          when knxd is running check if the interface(s) is/are joined to the knxd multicast address (224.0.23.12):

          netstat -gn
          ...
          enp0s8          1      224.0.23.12
          ...
          

          Check if knxd listen on all interfaces (0.0.0.0)

          root@debdev:~# netstat -npl|grep knxd
          tcp        0      0 0.0.0.0:6720            0.0.0.0:*               LISTEN      847/knxd
          udp        0      0 0.0.0.0:3671            0.0.0.0:*                           847/knxd
          

          Check whats happend on LAN when accing knxd from another device/ETS.

          apt-get -y install tcpdump
          tcpdump port 3671 or port 6720 -w /tmp/trace.cap
          

          If the device has multiple interfaces also set the correct interface

          tcpdump -i enp0s8 port 3671 or port 6720 -w /tmp/trace.cap
          

          If it is ok for you, you can send me the trace.cap file and I will take a look into it.

          Michael

          1. Hi Michael,
            checking with netstat, I see
            root@knx-gateway:/home/pi# netstat -gn
            IPv6/IPv4 Group Memberships
            Interface RefCnt Group
            ————— —— ———————
            lo 1 224.0.0.1
            eth0 2 224.0.23.12

            and
            root@knx-gateway:/home/pi# netstat -npl|grep knxd
            tcp 0 0 0.0.0.0:6720 0.0.0.0:* LISTEN 1928/knxd
            udp 0 0 0.0.0.0:3671 0.0.0.0:* 1928/knxd
            unix 2 [ ACC ] STREAM LISTENING 17968 1928/knxd /tmp/knx

            but doing a tcpdump on eth0 port 3671 and trying to connect from remote, I dont get any packets captured!
            When trying with the unicast IP and Port 6720 I’ll see some incomming UDP Packets, but Port 6720 is TCP in knxd, so this won’t work neither
            Last combo is unicast IP with Port 3671 I’ll see some UDP again, but the client won’t get anything
            root@knx-gateway:/home/pi# tcpdump -i eth0 port 3671
            tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
            listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
            14:46:22.372312 IP 192.168.111.12.47784 > 192.168.111.45.3671: UDP, length 26
            14:46:25.374479 IP 192.168.111.12.47784 > 192.168.111.45.3671: UDP, length 26
            14:46:28.378662 IP 192.168.111.12.47784 > 192.168.111.45.3671: UDP, length 26

            This is totaly crazy…
            Thanks for analyzing and helping,
            Rolf

          2. Hi Rolf,

            “but doing a tcpdump on eth0 port 3671 and trying to connect from remote, I dont get any packets captured!” => This is really strange
            When connecting via routing you should see something like this:
            root@home:~# tcpdump host 224.0.23.12 -n
            tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
            listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
            22:17:29.235115 IP 192.168.1.200.3671 > 224.0.23.12.3671: UDP, length 19
            22:17:42.207087 IP 192.168.1.200.3671 > 224.0.23.12.3671: UDP, length 19
            22:17:48.204642 IP 192.168.1.200.3671 > 224.0.23.12.3671: UDP, length 19

            Have you set static route for 224.0.23.12 on the knxd host?

            root@home:~# route
            Kernel IP routing table
            Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
            ...
            224.0.23.12     *               255.255.255.255 UH    100    0        0 eth0
            

            Earlier versions of knxd have requiered such a route, but this shouldn’t be necessary. But it also doesn’t explain why you don’t see any mulitcast packets…

            Michael

          3. Hi Michael,

            doing a TCPdump as shown will give me Packet from the RPI itself, but no one from the remote machine
            root@knx-gateway:/home/pi# tcpdump host 224.0.23.12 -n
            tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
            listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
            16:48:24.843047 IP 192.168.111.45.3671 > 224.0.23.12.3671: UDP, length 21
            16:48:24.887008 IP 192.168.111.45.3671 > 224.0.23.12.3671: UDP, length 21
            16:48:24.962020 IP 192.168.111.45.3671 > 224.0.23.12.3671: UDP, length 21

            I’ve configured the network to use systemd as described by you, following every step. So I’ve had the route to the mcast address. For testing, I’ve removed this static route, but it behaves the same way.

            Rolf

          4. Hi Rolf,

            may be the issue resides on the node-js machine? Have you already startet a tcpdump there? Can you see the multicast packets from knxd there?

            Michael

          5. Hi Michael,
            one progress is made….
            from googeling around and having learned that the TCP Server is more or less useless (I don’t have an Idea what it could be used for…) I’ve thrown out the -i option.
            And now, at least the access over Unicast Address is working from remote. I’ve used a node-js script to retrive Bus Data, and can see the packets. I’ll try later with ETS again.
            Regards, Rolf

          6. Hi Michael,
            when doing a tcpdump on the node-js machine, I can see outgoing Packets towards the group address, but noting inbound.
            Last evening my colleague came by with his ETS5 notebook and he could connect with ETS5 over knxd installation to the bus.
            For the moment, this is all I need, and I’ve had that much stress with mulicasts and IGMP and PIM in the past, that I think a direct Unicast Tunnel is more my style 🙂
            So thanks for guiding me through the analysis. I still have no Idea, why switching off the TCP Server made it working, but now I got a cheap and powerful interface.
            Regards, Rolf

  103. Really weird!
    I have been using this for 2 years. Maybe 6 months since I used it towards ETS5 last time. Now I am trying to setup HASSIO so I need a connection, and suddenly I find out that ETS5 won’t accept a connection anymore, giving me this message: “The interface cannot be opened, because the connection type is not supported. Please contact the manufacturer of your interface”.
    Only thing I know I have done to my router is to now alow “Telnet” on the network. No other changes.

    Have you got any ideas whats up? Is there a newer version I should use for this?

  104. Hi
    I have installed knxd to your instructions. But it does not start for more then 2 seconds. I guess it has to do something with the hardware drivers becouse I have a USB2Serial adapter from Prolific that is connected via serial cable to a Tapko serial interface.

    I don’t understad if i should use uart/usb/ or something else.

    I have added in /etc/udev/rules.d/90-knxusb-devices.rules a ,line with
    /etc/udev/rules.d/90-knxusb-devices.rules SUBSYSTEM==”usb”, ATTR{idVendor}==”067b”, ATTR{idProduct}==”2303″, ACTION==”add”, SYMLINK+=”usbKNX0″, GROUP=”knxd”, MODE=”0664″

    root@raspberrypi:~# root@raspberrypi:~# lsusb -v
    -su: root@raspberrypi:~#: kommandot finns inte
    Bus 001 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
    Device Descriptor:
    bLength 18
    bDescriptorType 1
    bcdUSB 1.10
    bDeviceClass 0 (Defined at Interface level)
    bDeviceSubClass 0
    bDeviceProtocol 0
    bMaxPacketSize0 64
    idVendor 0x067b Prolific Technology, Inc.
    idProduct 0x2303 PL2303 Serial Port
    bcdDevice 4.00

    But it does not work.
    Error while starting knxd is;
    root@raspberrypi:~# knxd –eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuart:/dev/ttyUSB0
    root@raspberrypi:~# F00000105: [15:C.tpuart] Link down, terminating

    root@raspberrypi:~# lsusb -v
    Bus 001 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
    Device Descriptor:
    bLength 18
    bDescriptorType 1
    bcdUSB 1.10
    bDeviceClass 0 (Defined at Interface level)
    bDeviceSubClass 0
    bDeviceProtocol 0
    bMaxPacketSize0 64
    idVendor 0x067b Prolific Technology, Inc.
    idProduct 0x2303 PL2303 Serial Port
    bcdDevice 4.00
    iManufacturer 1 Prolific Technology Inc.
    iProduct 2 USB-Serial Controller D
    iSerial 0
    bNumConfigurations 1

  105. What driver should I uses with a USBtoserial adapter? I can use a terminal program to connect to /dev/ttyUSB0 and if I press the buttons in the house i get the knx message in the terminal window. But if i start knxd i havwe no qlue if i would use tpuart, usb, fb12 or anything else.

  106. Hi Michael,
    This sounds very weird. I’ve faced the same problem as Matthias and Christian, the inactive one. I’m using a Raspberry pi 3 running raspbian Stretch with a Hager th101 usb interface. When i try to remove the -d argument with Type=simple i get an error of invalid argument.
    This is the active configuration in /etc/default/knxd :
    KNXD_OPTIONS=’-e 1.1.128 -E 1.1.129:8 -D -T -R -S -i –listen-local=/tmp/knx -b usb:’
    This is the error i get :
    knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Wed 2019-01-09 16:19:00 UTC; 3s ago
    Process: 1836 ExecStart=/usr/local/bin/knxd -p /run/knxd.pid $KNXD_OPTIONS (code=exited, status=2)
    Process: 1833 ExecStartPre=/lib/systemd/systemd-networkd-wait-online –timeout=60 –interface=wlan0 (code=exit
    Main PID: 1836 (code=exited, status=2)

    Jan 09 16:19:00 raspberrypi systemd[1]: Starting KNX Daemon…
    Jan 09 16:19:00 raspberrypi systemd[1]: Started KNX Daemon.
    Jan 09 16:19:00 raspberrypi systemd[1]: knxd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
    Jan 09 16:19:00 raspberrypi systemd[1]: knxd.service: Unit entered failed state.
    Jan 09 16:19:00 raspberrypi systemd[1]: knxd.service: Failed with result ‘exit-code’.

    Thanks for your attention. I’m looking forward to your reply.

    1. Hi Omar,

      have you tried to start knxd at command line in foreground?

      sudo su knxd -s /bin/bash
      knxd -t 1023 --eibaddr=1.1.128 --client-addrs=1.1.129:8 -D -T -R -S -i --listen-local=/tmp/knx -t 1023 -b usb:
      

      status=2/INVALIDARGUMENT means your parameter set is invalid.

      Michael

      1. Hello again Michael,
        I have tried the foreground execution with the same params and its working well and fine. And that’s the crazy part. Do you thing of any solution?

  107. Hey Michael,
    I have the problem that I’m able to see packages on the Bus, ETS 5 tells me that my connection is ok when I click on test.
    The problem is i’m not able to program any of my devices.

    Thank you

  108. Hey Michael,
    i have a RPI 3 with a Merten USB adapter in use.
    my problem:
    i can see the packages on the by typing “knxtool vbusmonitor1 ip:localhost”
    Ets 5 tells me when I click on test that my connection is OK, but I’m not able to programm my hardware.
    Any ideas?

    Thank you

  109. Hi Michael.
    I`m new to the raspberry PI but has used the ETS3 for programming KNX systems for a while.
    I?m trying to follow you on this tutorial, but I`m struggeling.

    I hav a RPI 3 b with a Merten USB adaptor. (also a Gira if that makes it easyer)

    I can not get the sytem up and running.
    I have installes the newest “Raspbian Stretch with desktop and recommended software” from raspberrypi.org
    I have set a fixed IP on the wlan0 to 100.0.0.160
    I have run the script as you have described in this turorial, after the best of my knowlege……
    But i can not seem to get the knxd running.

    State :
    root@raspberrypi:/home/pi# findknxusb
    Possible addresses for KNX USB devices:
    device: 1:5:1:0:0 (Merten GmbH & Co. KG:KNX-USB Data Interface)

    When I try to check if the prosess is running, I only get :
    root@raspberrypi:/home/pi# ps ax|grep knxd
    1384 pts/0 S+ 0:00 grep knxd

    And I can not get any traffic from the bus :
    root@raspberrypi:/home/pi# knxtool vbusmonitor1 ip:localhost
    Open failed: Connection refused

    I would appreciate if you could advice some actions to me, to resolve my communication issue.

  110. I tested install_knxd_systemd.sh version 0.7.15
    I have raspberry pi 2 with raspbian/debian stretch that have new systemd based service system.
    I have also Siemens N148/21 interface to knx
    I can start knxd manually.
    There is 3 problems
    – knxd does not start automatically after reboot of raspberry
    – knxd does not start automatically if I kill knxd with kill command
    – I cannot do programming with ets4

    I have solved all of these problems.
    Automatic start do work if do not use install_knxd_systemd.sh at all
    Instead I follow these guides
    github.com/knxd/knxd
    smarthomeng.de/user/installation/komplettanleitung_knx.html
    wiki.fhem.de/wiki/Knxd

    After following these guides
    I get totally different looking file
    /lib/systemd/system/knd.service
    —-
    [Unit]
    Description=KNX Daemon
    After=network.target knxd.socket
    Requires=knxd.socket

    [Service]
    EnvironmentFile=/etc/knxd.conf
    ExecStart=/usr/bin/knxd $KNXD_OPTS
    User=knxd
    Group=knxd
    Type=notify

    Restart=on-failure
    RestartSec=10

    [Install]
    WantedBy=multi-user.target network-online.target
    Also=knxd.socket
    —-
    This service file allows to to use
    /etc/knxd.conf
    /etc/knxd.ini

    ets programming started to to work after changed knxd.conf to point to knxd.ini and use knxd.ini like FrankEisi describes
    in this issue
    github.com/knxd/knxd/issues/314

  111. Using KNX – USB Interface, I installed knxd on my Raspian in RP3 that doesn’t send bindings. Good “knxtool groupswrite ip: localhost 4/0/1 1” telegrams..!
    Visit to more:-

  112. Hi Michael.
    Following you instruction, I already connect to KNX via RPi, sending command from ETS5, but I can not download program, right after press download application, the individual address of Rpi on ETS back to 0.0.0 with msg ” Another diagnostic action is currently running on the selected connection” and download progress is terminated.
    One more thing, Can I change port 3671 to another number like 50000 ? If could be, could you tell me how to do. Thank you

    1. Hi Michael,
      I downloaded program from ETS to device, it is because ABB USB S.1.1 need to be install catalog into ETS. It works well. Appreciate your effort! if you have any comment about changing 3671 port, please give an idea!

        1. Hi Michael
          I tried to type command as your advice but I just received respond as below , even I tried other command start with “knxd”. Do I miss something ? Sorry I am new to Linux system.

          E00000084: [ 1:main] There is no KNX addr= in section ‘main’.
          F00000109: [ 1:main] Error setting up the KNX router.

  113. I am totally new with RPI and Linux.
    After that
    # ls -l /usr/local/bin
    I have not those two lines below.
    …..
    -rwxr-xr-x 1 root staff 839016 Jun 13 22:14 knxd
    -rwxr-xr-x 1 root staff 7584 Jun 13 22:14 findknxusb

    only this
    pi@raspberrypi:~ $ sudo su –
    root@raspberrypi:~# ls -l /usr/local/bin
    razem 0

    Whats wrong?

  114. In file included from usb.h:24,
    from usb.cpp:23:
    /usr/include/libusb-1.0/libusb.h:1300:18: note: declared here
    void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
    ^~~~~~~~~~~~~~~~
    make[3]: *** [Makefile:501: usb.o] Error 1
    make[3]: Leaving directory ‘/root/knxdbuild/knxd/src/usb’
    make[2]: *** [Makefile:394: all-recursive] Error 1
    make[2]: Leaving directory ‘/root/knxdbuild/knxd/src’
    make[1]: *** [Makefile:442: all-recursive] Error 1
    make[1]: Leaving directory ‘/root/knxdbuild/knxd’
    make: *** [Makefile:378: all] Error 2

    Hi Michael ,Thank you very much for your script, but I have encountered some problems with pi4, can you help me see it, thanks!

      1. Hi,Marcin I have solved the problem,the error is “/root/kxdbuild/fmt/fmt/format.h:1825:20: error: expected unqualified-id before numeric constant
        const unsigned CHAR_WIDTH = 1;”

        My solution is Edit this file and change all CHAR_WIDTH to CHAR_WIDTH_A,I have compiled successfully.

        1. Hi,

          if you use debain buster it is no longer necessary to build knxd from scratch. Since debian 10 knxd is shipped with debian:

          root@debdev:~# apt-cache search knx
          knxd - daemon to access the KNX bus
          knxd-dev - development files for knxd
          knxd-tools - tools to use knxd
          

          I also adjusted the script, so compiling should work.

          Michael

          1. Hi Michael
            Thank you for your script
            I have tested it on Raspberry 3B+, 4B and compiled it perfectly.
            However, I have encountered a new problem. I read the previous comments. I changed some settings, but it didn’t work. Can you help me with it?

            ************************
            ● knxd.service – KNX Daemon
            Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
            Active: failed (Result: exit-code) since Tue 2019-08-13 05:37:21 BST; 13min ago
            Process: 1319 ExecStartPre=/lib/systemd/systemd-networkd-wait-online –timeout=60 (code=exited, status=0/SUCCESS)
            Process: 1320 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=1/FAILURE)
            Main PID: 1320 (code=exited, status=1/FAILURE)

            Aug 13 05:36:48 raspberrypi systemd[1]: Starting KNX Daemon…
            Aug 13 05:36:48 raspberrypi systemd-networkd-wait-online[1319]: ignoring: lo
            Aug 13 05:36:48 raspberrypi systemd[1]: Started KNX Daemon.
            Aug 13 05:37:11 raspberrypi knxd[1320]: E00000059: [22:C.usb] EMI_common: send while waiting (1993721864)
            Aug 13 05:37:21 raspberrypi knxd[1320]: E00000055: [15:C.usb] Driver timed out trying to send (C.usb)
            Aug 13 05:37:21 raspberrypi knxd[1320]: F00000105: [15:C.usb] Link down, terminating
            Aug 13 05:37:21 raspberrypi systemd[1]: knxd.service: Main process exited, code=exited, status=1/FAILURE
            Aug 13 05:37:21 raspberrypi systemd[1]: knxd.service: Failed with result ‘exit-code’.
            ************************

            Best Regrads
            Song

          2. Hi Song,

            try to start it on the console with tracing (-t 1023) enabled (adjust the paramter –eibaddr –client-addrs -b … for your environment)

            sudo su
            systemctl stop knxd.service
            # Switch to user knxd
            su knxd -s /bin/bash
            # Start in Foreground (without -d option) with logging
            knxd -t 1023 --eibaddr=1.1.128 --client-addrs=1.1.129:8 -D -T -R -S -i --listen-local=/tmp/knx -t 1023 -b usb:
            
            

            and see whats happened. To you use a USB interface? Have you applied the path at the beginning of the script?
            Michael

          3. Yes,of course.
            run cmd “knxd -t 1023 –eibaddr=1.1.128 –client-addrs=1.1.129:8 -D -T -R -S -i –listen-local=/tmp/knx -t 1023 -b usb:”
            some error info
            ******************
            E00000055: [15:C.usb] Driver timed out trying to send (C.usb)
            Layer 5 [15:C.usb/Conn 23.556] up => down/error
            Layer 4 [15:C.usb/Conn 23.556] up/error
            Layer 4 [ 1:main 23.556] check start
            Layer 5 [15:C.usb/Conn 23.556] Stopping
            Layer 2 [22:C.usb/EMI1 23.556] CloseL2
            Layer 0 [22:C.usb/EMI1 23.556] starting send_Local
            Layer 0 [17:C.usb/Conv 23.556] Send-EMI(005): 46 01 00 60 C0
            Layer 0 [18:C.usb/usbL 23.556] SendUSB(064): 01 13 0D 00 08 00 05 01 01 00 00 46 01 00 60 C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
            Layer 0 [18:C.usb/usbL 23.556] StartSend 359848
            Layer 4 [15:C.usb/Conn 23.556] is up/error
            Layer 4 [ 1:main 23.556] check end: want_up 1 some 1>1 all 1>0, going 1 up 4 down 0
            Layer 0 [22:C.usb/EMI1 23.558] send_Local done
            Layer 1 [18:C.usb/usbL 23.558] Close
            Layer 5 [15:C.usb/Conn 23.559] up/error => down/error
            Layer 4 [15:C.usb/Conn 23.559] down/error
            Layer 1 [18:C.usb/usbL 23.559] Release
            Layer 5 [15:C.usb/Conn 23.565] down/error => down
            Layer 4 [15:C.usb/Conn 23.565] down/error
            Layer 4 [ 1:main 23.565] check start
            Layer 4 [15:C.usb/Conn 23.565] is down
            Layer 4 [ 1:main 23.565] check end: want_up 1 some 1>1 all 0>0, going 0 up 4 down 1
            F00000105: [15:C.usb] Link down, terminating
            Layer 4 [ 1:main 23.565] trigger Going down
            Layer 4 [ 9:A.tcp/inet 23.565] Stopping
            Layer 5 [ 9:A.tcp/inet 23.565] up => >down
            Layer 8 [ 9:A.tcp/inet 23.565] StopServer
            Layer 5 [ 9:A.tcp/inet 23.565] >down => down
            Layer 4 [ 9:A.tcp/inet 23.565] down
            Layer 4 [ 9:A.tcp/inet 23.565] down
            Layer 4 [23:tunnel/ConnC 23.565] Stopping
            Layer 5 [23:tunnel/ConnC 23.565] up => >down
            Layer 5 [23:tunnel/ConnC 23.565] Stopping
            Layer 8 [24:tunnel/1.1.129 23.566] Stop Conn 1
            Layer 3 [ 1:main 23.566] Release 1.1.129
            Layer 5 [23:tunnel/ConnC 23.566] >down => down
            Layer 4 [23:tunnel/ConnC 23.566] down
            Layer 4 [23:tunnel/ConnC 23.566] down
            Layer 4 [ 4:server/Server 23.566] Stopping
            Layer 5 [ 4:server/Server 23.566] up => >down
            Layer 8 [24:tunnel/1.1.129 23.566] Stop Conn 1
            Layer 5 [19:router/ConnC 23.566] Stopping
            Layer 5 [19:router/ConnC 23.566] up => down
            Layer 5 [19:router/ConnC 23.566] Stopping
            Layer 4 [19:router/ConnC 23.566] down
            Layer 3 [19:router/ConnC 23.567] unregisterLink: router_19
            Layer 0 [ 4:server/Server 23.567] Close
            Layer 5 [ 4:server/Server 23.567] >down => down
            Layer 4 [ 4:server/Server 23.567] down
            Layer 4 [ 4:server/Server 23.567] down
            Layer 4 [12:B.unix/local 23.567] Stopping
            Layer 5 [12:B.unix/local 23.567] up => >down
            Layer 8 [12:B.unix/local 23.567] StopServer
            Layer 5 [12:B.unix/local 23.568] >down => down
            Layer 4 [12:B.unix/local 23.568] down
            Layer 4 [12:B.unix/local 23.568] down
            Layer 4 [15:C.usb/Conn 23.568] Stopping
            Layer 5 [15:C.usb/Conn 23.568] down/error => >down
            Layer 4 [15:C.usb/Conn 23.568] down/error
            Layer 4 [ 1:main 23.568] check start
            Layer 8 [20:router/driver 23.568] CloseD
            Layer 4 [ 9:A.tcp/inet 23.568] is down
            Layer 4 [ 4:server/Server 23.568] is down
            Layer 4 [12:B.unix/local 23.568] is down
            Layer 4 [15:C.usb/Conn 23.568] is down
            Layer 4 [ 1:main 23.568] check end: want_up 0 some 1>0 all 0>0, going 0 up 0 down 4
            Layer 4 [ 1:main 23.569] down
            Layer 4 [ 1:main 23.569] deleting
            Layer 8 [ 9:A.tcp/inet 23.569] StopServer
            Layer 8 [12:B.unix/local 23.569] StopServer
            Layer 1 [18:C.usb/usbL 23.569] Close
            Layer 1 [18:C.usb/usbL 23.569] Release
            Layer 4 [ 1:main 23.569] deleted.
            *****************************

            i think my probem like this one,
            the time title is “Michael January 17, 2018 at 8:32 AM”

            when i use the cmd “knxd -t 1023 –eibaddr=1.1.2 –client-addrs=1.1.3:8 –daemon=/tmp/knxd_trace.txt -D -T -R -S -i –listen-local=/tmp/knx -t 1023 -b usb:”

            it will be work,until raspberry shutdown.

          4. by the way,What is the password of the user knxd, can this be told?
            Also, can I change the name of the connection on ETS (knxd)?

            Best Regrads
            Song

          5. Hi,Michael
            I tried by reading the previous comments and kept trying.
            I think I have solved some of my problems.
            My kxnd.service is working fine.

            this is My knxd config(/etc/default)
            ********************
            # Command line parameters for knxd. TPUART Backend
            # Serial device Raspberry
            # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyAMA0″
            # Serial device PC
            # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyS0″
            # Tunnel Backend
            # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b ipt:192.168.8.232″
            # USB Backend
            KNXD_OPTIONS=”–eibaddr=15.15.128 –client-addrs=15.15.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:”
            ****************************

            knxd.service(/lib/systemd/system)
            ***********************
            [Unit]
            Description=KNX Daemon
            After=network.target

            [Service]
            EnvironmentFile=/etc/default/knxd
            # Wait for all interfaces, systemd-networkd-wait-online.service must be enabled
            # ExecStartPre=/lib/systemd/systemd-networkd-wait-online –timeout=60
            # Wait for a specific interface
            # ExecStartPre=/lib/systemd/systemd-networkd-wait-online –timeout=60 –interface=eth0
            ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS
            Type=forking
            PIDFile=/run/knxd/knxd.pid
            User=knxd
            Group=knxd
            #TimeoutStartSec=60

            [Install]
            WantedBy=multi-user.target network-online.target
            ************************

            I think my configuration may solve the same problem that many people have with me.

            But now I have a new problem, I can only monitor the data on ETS5, can not download the device. There are also a lot of data that don’t know where to come from (phy addr: 15.15.254), which may be my own problem.

            Best Regards
            Song

          6. Hi Song,

            in my opinion knxd has several problems with ETS5 and (since 0.14) with USB devices. Also the implementation of new featues stucks (last commit in March) and there is no working on any open issue 🙁

            in the meanwhile I use the calimero server instead and happy with it. Calimero is actively developed.

            Michael

          7. I just confirmed that the extra information was sent by knxd. Because when I stop knxd, I don’t have this information. If I open knxd.service again, it will appear.

            Best Regards
            Song

          8. Hi,Michael
            I tried another day yesterday.
            I use the ipt is ok,usb do not work.
            Yesterday I tested it by changing the script and found that it still doesn’t work.
            Then I went to install Calimero,the Error is “oracle-jdk-8” can not found this package.

            finnaly, I manually installed knxd,then i modified some arguments,It’s running very well until now.

            this is my knxd config
            *******************
            -e 0.0.1 -E 0.0.2:8 -DTS -u/tmp/eib -b usb:
            *******************

          9. Hi Michael

            I bought some 5WG1117-2AB12,Does your circuit diagram also apply to this module?

            Best Regards
            songzh

          10. Hi,Michael

            After I connected the Raspberry Pi to the TPUART, I found that I could only transfer messages on the KNX Bus, but I could not download the program via ETS.
            I am using calimero.

            Best Regrads
            Songzh

      1. Hi Michael,
        I have the same error during installation. Could You help us? I have the newest version from webpage
        Rasbpian Buster
        Version:July 2019
        Release date:2019-07-10
        Kernel version:4.19

  115. Dear Michael,

    I have following issue:

    Hit:1 archive.raspberrypi. org/debian buster InRelease
    Hit:2 raspbian.raspberrypi. org/raspbian buster InRelease
    Ign:3 dl.bintray. com/openhab/apt-repo2 stable InRelease
    Get:4 dl.bintray. com/openhab/apt-repo2 stable Release [6,051 B]
    Ign:5 dl.bintray. com/openhab/apt-repo2 stable Release.gpg
    Reading package lists… Done
    E: The repository ‘ dl.bintray. com/openhab/apt-repo2 stable Release’ is no longer signed.
    N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    FAILED

    Can you help me with signing the repository?

    1. Song i think that You need to swap the serial ports like me. Firt You need to enable_uart1 and than swab serial0 with serial1.

      But Michael…installation is done. I have telegrams for a while and aftert that there is:
      Read failed” connection reset by peer.
      KNXD service and Daemon is stopped.
      What to do?

  116. Ahoi Michael,

    thank you very much for your work!
    I have problems with this “new” knxd version. This should run on an b+ v1.2 with a fesh buster. installs fine so far, but “ps ax|grep knxd” gives me:
    495 pts/0 S+ 0:00 grep –color=auto knxd

    So I tried “sudo su knxd -s /bin/bash
    knxd -t 1023 –eibaddr=1.1.128 –client-addrs=1.1.129:8 -D -T -R -S -i –listen-local=/tmp/knx -t 1023 -b tpuart:/dev/ttyAMA0″

    And the result is al follows:
    Layer 4 [ 1:main 0.000] initialized
    Layer 4 [ 1:main 0.002] setting up
    Layer 3 [ 4:server/Server 0.005] registerLink: 4:server
    Layer 3 [ 9:A.tcp/inet 0.008] registerLink: 9:A.tcp
    Layer 3 [12:B.unix/local 0.010] registerLink: 12:B.unix
    Layer 0 [18:C.tpuart/log 0.012] Insert 17:LowF / 16:tpuart
    Layer 0 [18:C.tpuart/log 0.013] Setup
    Layer 0 [20:C.tpuart/log 0.013] Insert 19:TPU_ser / 17:LowF
    Layer 0 [18:C.tpuart/log 0.013] Filter single not found
    Layer 0 [20:C.tpuart/log 0.015] Setup
    Layer 0 [20:C.tpuart/log 0.015] Setup OK: yes
    Layer 0 [18:C.tpuart/log 0.015] Setup OK: yes
    Layer 3 [15:C.tpuart/Conn 0.015] registerLink: 15:C.tpuart
    Layer 4 [ 1:main 0.016] setup OK
    Layer 4 [ 1:main 0.016] trigger going up
    Layer 3 [15:C.tpuart/Conn 0.017] Start: cfg:C.tpuart
    Layer 5 [15:C.tpuart/Conn 0.017] down => >up
    Layer 5 [15:C.tpuart/Conn 0.017] Starting
    Layer 0 [18:C.tpuart/log 0.018] Start
    Layer 0 [20:C.tpuart/log 0.019] Start
    Layer 0 [19:C.tpuart/TPU_ser 0.021] Opened /dev/ttyAMA0 with baud 19200
    Layer 2 [19:C.tpuart/TPU_ser 0.022] Opened
    Layer 2 [19:C.tpuart/TPU_ser 0.022] Buffer Setup on fd 4
    Layer 0 [20:C.tpuart/log 0.023] Started
    Layer 8 [17:C.tpuart/LowF 0.023] state: new > start
    Layer 0 [17:C.tpuart/LowF 0.024] SendReset 01
    Layer 0 [20:C.tpuart/log 0.024] Send(001): 01
    Layer 4 [15:C.tpuart/Conn 0.024] >up
    Layer 3 [12:B.unix/local 0.025] Start: cfg:B.unix
    Layer 5 [12:B.unix/local 0.026] down => >up
    Layer 8 [12:B.unix/local 0.026] OpenLocalSocket /tmp/knx
    Layer 8 [12:B.unix/local 0.027] LocalSocket opened
    Layer 5 [12:B.unix/local 0.028] >up => up
    Layer 4 [12:B.unix/local 0.028] up
    Layer 5 [12:B.unix/local 0.028] Started
    Layer 4 [12:B.unix/local 0.028] up
    Layer 3 [ 4:server/Server 0.029] Start: cfg:server
    Layer 5 [ 4:server/Server 0.030] down => >up
    Layer 8 [ 4:server/Server 0.030] Open
    Layer 0 [ 4:server/Server 0.030] Open
    Layer 0 [ 4:server/Server 0.031] Opened
    Layer 8 [22:router/driver 0.032] OpenD
    Layer 8 [22:router/driver 0.035] OpenedD
    Layer 3 [21:router/ConnC 0.037] registerLink: 21:router_21
    Layer 3 [21:router/ConnC 0.038] Start: cfg:router
    Layer 5 [21:router/ConnC 0.038] down => >up
    Layer 5 [21:router/ConnC 0.039] Starting
    Layer 5 [21:router/ConnC 0.039] >up => up
    Layer 4 [21:router/ConnC 0.039] up
    Layer 5 [21:router/ConnC 0.040] Started
    Layer 4 [21:router/ConnC 0.040] up
    Layer 8 [ 4:server/Server 0.041] Opened
    Layer 5 [ 4:server/Server 0.041] >up => up
    Layer 4 [ 4:server/Server 0.041] up
    Layer 5 [ 4:server/Server 0.041] Started
    Layer 4 [ 4:server/Server 0.042] up
    Layer 3 [ 9:A.tcp/inet 0.042] Start: cfg:A.tcp
    Layer 5 [ 9:A.tcp/inet 0.042] down => >up
    Layer 8 [ 9:A.tcp/inet 0.043] OpenInetSocket 6720
    Layer 8 [ 9:A.tcp/inet 0.043] InetSocket opened
    Layer 5 [ 9:A.tcp/inet 0.044] >up => up
    Layer 4 [ 9:A.tcp/inet 0.044] up
    Layer 5 [ 9:A.tcp/inet 0.045] Started
    Layer 4 [ 9:A.tcp/inet 0.045] up
    Layer 4 [ 1:main 0.045] going up triggered
    Layer 4 [ 1:main 0.045] check start
    Layer 4 [15:C.tpuart/Conn 0.047] is >up
    Layer 4 [ 1:main 0.047] check end: want_up 1 some 1>1 all 0>0, going 1 up 4 down 0
    Layer 0 [17:C.tpuart/LowF 0.463] SendReset 01
    Layer 0 [20:C.tpuart/log 0.463] Send(001): 01
    Layer 0 [17:C.tpuart/LowF 0.963] SendReset 01
    Layer 0 [20:C.tpuart/log 0.964] Send(001): 01
    Layer 8 [17:C.tpuart/LowF 1.464] state: in_reset > error
    Layer 0 [20:C.tpuart/log 2.465] Stop
    Layer 0 [20:C.tpuart/log 2.466] Stopped
    Layer 8 [17:C.tpuart/LowF 2.466] state: error > new
    Layer 0 [18:C.tpuart/log 2.466] Stopped
    Layer 5 [15:C.tpuart/Conn 2.466] >up => down
    Layer 4 [15:C.tpuart/Conn 2.466] down/error
    Layer 4 [ 1:main 2.467] check start
    Layer 4 [15:C.tpuart/Conn 2.468] is down
    Layer 4 [ 1:main 2.468] check end: want_up 1 some 1>1 all 0>0, going 0 up 4 down 1
    F00000105: [15:C.tpuart] Link down, terminating
    Layer 4 [ 1:main 2.468] trigger Going down
    Layer 4 [21:router/ConnC 2.469] Stopping
    Layer 5 [21:router/ConnC 2.469] up => >down
    Layer 5 [21:router/ConnC 2.469] Stopping
    Layer 5 [21:router/ConnC 2.470] >down => down
    Layer 4 [21:router/ConnC 2.470] down
    Layer 4 [21:router/ConnC 2.471] down
    Layer 4 [15:C.tpuart/Conn 2.471] Stopping
    Layer 5 [15:C.tpuart/Conn 2.472] down/error => >down
    Layer 4 [15:C.tpuart/Conn 2.472] down/error
    Layer 4 [12:B.unix/local 2.472] Stopping
    Layer 5 [12:B.unix/local 2.472] up => >down
    Layer 8 [12:B.unix/local 2.473] StopServer
    Layer 5 [12:B.unix/local 2.474] >down => down
    Layer 4 [12:B.unix/local 2.474] down
    Layer 4 [12:B.unix/local 2.475] down
    Layer 4 [ 4:server/Server 2.476] Stopping
    Layer 5 [ 4:server/Server 2.476] up => >down
    Layer 5 [21:router/ConnC 2.476] Stopping
    Layer 3 [21:router/ConnC 2.476] unregisterLink: router_21
    Layer 0 [ 4:server/Server 2.477] Close
    Layer 5 [ 4:server/Server 2.480] >down => down
    Layer 4 [ 4:server/Server 2.480] down
    Layer 4 [ 4:server/Server 2.481] down
    Layer 4 [ 9:A.tcp/inet 2.481] Stopping
    Layer 5 [ 9:A.tcp/inet 2.481] up => >down
    Layer 8 [ 9:A.tcp/inet 2.481] StopServer
    Layer 5 [ 9:A.tcp/inet 2.483] >down => down
    Layer 4 [ 9:A.tcp/inet 2.483] down
    Layer 4 [ 9:A.tcp/inet 2.483] down
    Layer 4 [ 1:main 2.484] check start
    Layer 8 [22:router/driver 2.484] CloseD
    Layer 4 [15:C.tpuart/Conn 2.485] is down
    Layer 4 [12:B.unix/local 2.485] is down
    Layer 4 [ 4:server/Server 2.485] is down
    Layer 4 [ 9:A.tcp/inet 2.485] is down
    Layer 4 [ 1:main 2.485] check end: want_up 0 some 1>0 all 0>0, going 0 up 0 down 4
    Layer 4 [ 1:main 2.486] down
    Layer 4 [ 1:main 2.487] deleting
    Layer 0 [18:C.tpuart/log 2.488] Closing
    Layer 2 [17:C.tpuart/LowF 2.488] Close
    Layer 0 [20:C.tpuart/log 2.488] Closing
    Layer 2 [19:C.tpuart/TPU_ser 2.488] Close
    Layer 8 [12:B.unix/local 2.489] StopServer
    Layer 8 [ 4:server/Server 2.489] Close
    Layer 8 [ 9:A.tcp/inet 2.489] StopServer
    Layer 4 [ 1:main 2.490] deleted.
    knxd@raspberrypi:/home/pi$

    I don’t know where to start looking… My /etc/default/knxd looks like this:
    # Command line parameters for knxd. TPUART Backend
    # Serial device Raspberry
    KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx $
    # Serial device PC
    # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/kn$
    # Tunnel Backend
    # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/kn$
    # USB Backend
    # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/kn$

    anything i can do?

    Best regards,
    Martin

    1. Hi Martin,

      you try to connect with a TPUART Module? Its seems the module does not respond:

      Layer 0 [17:C.tpuart/LowF 0.463] SendReset 01
      Layer 0 [20:C.tpuart/log 0.463] Send(001): 01
      Layer 0 [17:C.tpuart/LowF 0.963] SendReset 01
      Layer 0 [20:C.tpuart/log 0.964] Send(001): 01
      Layer 8 [17:C.tpuart/LowF 1.464] state: in_reset > error
      Layer 0 [20:C.tpuart/log 2.465] Stop
      Layer 0 [20:C.tpuart/log 2.466] Stopped
      Layer 8 [17:C.tpuart/LowF 2.466] state: error > new

      Michael

  117. Hi!
    first of all: thanks for your work! Everything installed like a chram and the knxd service starts at boot:

    “`
    root@raspberrypi:~# systemctl status knxd.service
    ● knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
    Active: active (running) since Wed 2019-11-06 11:02:09 GMT; 7min ago
    Process: 375 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)
    Main PID: 378 (knxd)
    Tasks: 1 (limit: 2200)
    Memory: 2.9M
    CGroup: /system.slice/knxd.service
    └─378 /usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyS0
    “`

    Also i´m able to monitor the bus via “knxtool vbusmonitor1 ip:localhost”:

    “`
    pi@raspberrypi:~ $ knxtool vbusmonitor1 ip:localhost
    L_Busmon: BC 11 04 19 16 E1 00 80 38 :L_Data low from 1.1.4 to 3/1/22 hops: 06 T_Data_Group A_GroupValue_Write (small) 00
    L_Busmon: 9C 11 04 19 16 E1 00 80 18 :L_Data (repeated) low from 1.1.4 to 3/1/22 hops: 06 T_Data_Group A_GroupValue_Write (small) 00
    L_Busmon: 9C 11 04 19 16 E1 00 80 18 :L_Data (repeated) low from 1.1.4 to 3/1/22 hops: 06 T_Data_Group A_GroupValue_Write (small) 00
    L_Busmon: 9C 11 04 19 16 E1 00 80 18 :L_Data (repeated) low from 1.1.4 to 3/1/22 hops: 06 T_Data_Group A_GroupValue_Write (small) 00

    “`

    The service is stable as long as i’m only monitoring. But as soon as i send a command to the bus with “sudo knxtool groupswrite ip:localhost 2/0/7 1” it is still transmitted, but the service crashes shortly afterwards. Then the bus monitor displays the sent command, but crashes shortly afterwards:

    “`
    pi@raspberrypi:~ $ knxtool vbusmonitor1 ip:localhost
    L_Busmon: BC 11 83 09 01 E1 00 81 B9 :L_Data low from 1.1.131 to 1/1/1 hops: 06 T_Data_Group A_GroupValue_Write (small) 01
    Read failed: Connection reset by peer
    “`

    “`
    root@raspberrypi:~# systemctl status knxd.service
    ● knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Wed 2019-11-06 11:09:36 GMT; 1s ago
    Process: 375 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)
    Main PID: 378 (code=exited, status=1/FAILURE)
    “`

    When I try to start knxd again the log looks like this:

    “`
    knxd@raspberrypi:/root$ knxd -t 1023 –eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyS0
    Layer 4 [ 1:main 0.000] initialized
    Layer 4 [ 1:main 0.000] setting up
    Layer 3 [ 4:server/Server 0.001] registerLink: 4:server
    Layer 3 [ 9:A.tcp/inet 0.001] registerLink: 9:A.tcp
    knxd@raspberrypi:/root$ Layer 3 [12:B.unix/local 0.001] registerLink: 12:B.unix
    Layer 0 [18:C.tpuarts/log 0.001] Insert 17:LowF / 16:tpuart
    Layer 0 [18:C.tpuarts/log 0.001] Setup
    Layer 0 [20:C.tpuarts/log 0.001] Insert 19:TPU_ser / 17:LowF
    Layer 0 [18:C.tpuarts/log 0.001] Filter single not found
    Layer 0 [20:C.tpuarts/log 0.001] Setup
    Layer 0 [20:C.tpuarts/log 0.001] Setup OK: yes
    Layer 0 [18:C.tpuarts/log 0.002] Setup OK: yes
    Layer 3 [15:C.tpuarts/Conn 0.002] registerLink: 15:C.tpuarts
    Layer 4 [ 1:main 0.002] setup OK
    Layer 4 [ 1:main 0.002] trigger going up
    Layer 3 [15:C.tpuarts/Conn 0.002] Start: cfg:C.tpuarts
    Layer 5 [15:C.tpuarts/Conn 0.002] down => >up
    Layer 5 [15:C.tpuarts/Conn 0.002] Starting
    Layer 0 [18:C.tpuarts/log 0.002] Start
    Layer 0 [20:C.tpuarts/log 0.002] Start
    Layer 0 [19:C.tpuarts/TPU_ser 0.002] Opened /dev/ttyS0 with baud 19200
    E00000026: [19:C.tpuarts] tcsetattr /dev/ttyS0 failed: Invalid argument
    Layer 0 [20:C.tpuarts/log 0.003] Stopped
    Layer 0 [18:C.tpuarts/log 0.003] Stopped
    Layer 5 [15:C.tpuarts/Conn 0.003] >up => down
    Layer 4 [15:C.tpuarts/Conn 0.003] down/error
    Layer 4 [15:C.tpuarts/Conn 0.003] down/error
    Layer 3 [12:B.unix/local 0.003] Start: cfg:B.unix
    Layer 5 [12:B.unix/local 0.003] down => >up
    Layer 8 [12:B.unix/local 0.003] OpenLocalSocket /tmp/knx
    Layer 8 [12:B.unix/local 0.003] LocalSocket opened
    Layer 5 [12:B.unix/local 0.003] >up => up
    Layer 4 [12:B.unix/local 0.003] up
    Layer 5 [12:B.unix/local 0.003] Started
    Layer 4 [12:B.unix/local 0.003] up
    Layer 3 [ 4:server/Server 0.003] Start: cfg:server
    Layer 5 [ 4:server/Server 0.003] down => >up
    Layer 8 [ 4:server/Server 0.003] Open
    Layer 0 [ 4:server/Server 0.004] Open
    Layer 0 [ 4:server/Server 0.004] Opened
    Layer 8 [23:router/driver 0.004] OpenD
    Layer 8 [23:router/driver 0.005] OpenedD
    Layer 3 [22:router/ConnC 0.005] registerLink: 22:router_22
    Layer 3 [22:router/ConnC 0.005] Start: cfg:router
    Layer 5 [22:router/ConnC 0.005] down => >up
    Layer 5 [22:router/ConnC 0.005] Starting
    Layer 5 [22:router/ConnC 0.005] >up => up
    Layer 4 [22:router/ConnC 0.005] up
    Layer 5 [22:router/ConnC 0.005] Started
    Layer 4 [22:router/ConnC 0.005] up
    Layer 8 [ 4:server/Server 0.005] Opened
    Layer 5 [ 4:server/Server 0.005] >up => up
    Layer 4 [ 4:server/Server 0.005] up
    Layer 5 [ 4:server/Server 0.005] Started
    Layer 4 [ 4:server/Server 0.005] up
    Layer 3 [ 9:A.tcp/inet 0.005] Start: cfg:A.tcp
    Layer 5 [ 9:A.tcp/inet 0.005] down => >up
    Layer 8 [ 9:A.tcp/inet 0.005] OpenInetSocket 6720
    Layer 8 [ 9:A.tcp/inet 0.005] InetSocket opened
    Layer 5 [ 9:A.tcp/inet 0.005] >up => up
    Layer 4 [ 9:A.tcp/inet 0.005] up
    Layer 5 [ 9:A.tcp/inet 0.005] Started
    Layer 4 [ 9:A.tcp/inet 0.005] up
    Layer 4 [ 1:main 0.005] going up triggered
    Layer 4 [ 1:main 0.005] check start
    Layer 4 [15:C.tpuarts/Conn 0.005] is down
    Layer 4 [ 1:main 0.005] check end: want_up 1 some 1>1 all 0>0, going 0 up 4 down 1
    F00000105: [15:C.tpuarts] Link down, terminating
    Layer 4 [ 1:main 0.005] trigger Going down
    Layer 4 [22:router/ConnC 0.005] Stopping
    Layer 5 [22:router/ConnC 0.006] up => >down
    Layer 5 [22:router/ConnC 0.006] Stopping
    Layer 5 [22:router/ConnC 0.006] >down => down
    Layer 4 [22:router/ConnC 0.006] down
    Layer 4 [22:router/ConnC 0.006] down
    Layer 4 [15:C.tpuarts/Conn 0.006] Stopping
    Layer 5 [15:C.tpuarts/Conn 0.006] down/error => >down
    Layer 4 [15:C.tpuarts/Conn 0.006] down/error
    Layer 4 [12:B.unix/local 0.006] Stopping
    Layer 5 [12:B.unix/local 0.006] up => >down
    Layer 8 [12:B.unix/local 0.006] StopServer
    Layer 5 [12:B.unix/local 0.006] >down => down
    Layer 4 [12:B.unix/local 0.006] down
    Layer 4 [12:B.unix/local 0.006] down
    Layer 4 [ 4:server/Server 0.006] Stopping
    Layer 5 [ 4:server/Server 0.006] up => >down
    Layer 5 [22:router/ConnC 0.006] Stopping
    Layer 3 [22:router/ConnC 0.006] unregisterLink: router_22
    Layer 0 [ 4:server/Server 0.006] Close
    Layer 5 [ 4:server/Server 0.006] >down => down
    Layer 4 [ 4:server/Server 0.006] down
    Layer 4 [ 4:server/Server 0.007] down
    Layer 4 [ 9:A.tcp/inet 0.007] Stopping
    Layer 5 [ 9:A.tcp/inet 0.007] up => >down
    Layer 8 [ 9:A.tcp/inet 0.007] StopServer
    Layer 5 [ 9:A.tcp/inet 0.007] >down => down
    Layer 4 [ 9:A.tcp/inet 0.007] down
    Layer 4 [ 9:A.tcp/inet 0.007] down
    Layer 4 [ 1:main 0.007] check start
    Layer 8 [23:router/driver 0.007] CloseD
    Layer 4 [15:C.tpuarts/Conn 0.007] is down
    Layer 4 [12:B.unix/local 0.007] is down
    Layer 4 [ 4:server/Server 0.007] is down
    Layer 4 [ 9:A.tcp/inet 0.007] is down
    Layer 4 [ 1:main 0.007] check end: want_up 0 some 1>0 all 0>0, going 0 up 0 down 4
    Layer 4 [ 1:main 0.007] down
    Layer 4 [ 1:main 0.007] deleting
    Layer 0 [18:C.tpuarts/log 0.007] Closing
    Layer 2 [17:C.tpuarts/LowF 0.007] Close
    Layer 0 [20:C.tpuarts/log 0.007] Closing
    Layer 2 [19:C.tpuarts/TPU_ser 0.007] Close
    Layer 8 [12:B.unix/local 0.007] StopServer
    Layer 8 [ 4:server/Server 0.007] Close
    Layer 8 [ 9:A.tcp/inet 0.007] StopServer
    Layer 4 [ 1:main 0.007] deleted.
    “`

    I can´t figure out why this happens “E00000026: [19:C.tpuarts] tcsetattr /dev/ttyS0 failed: Invalid argument”…
    After rebooting knxd works as long as described above…

    Any ideas?

    1. Btw. i´m connection to my bus through TPUART Module “Siemens up 117/12”.

      I logged the Daemon and after sending command which causes the crash it logs:

      root@raspberrypi:/tmp# tail -f knx.log
      E00000055: [15:C.tpuarts] Driver timed out trying to send (C.tpuarts)
      F00000105: [15:C.tpuarts] Link down, terminating

  118. okay finally got it working… But the things i wrote helped myself so maybe the´ll help others too 🙂

    I tried to communicate with my Siemens UP 117/12 through via GPIO 14/15 which on the Model B,B+ and Pi2 is mapped to UART0. However on the Pi3 these pins are mapped to UART1 (ttyS01) since UART0 (ttyAMA0) is now used for the Bluetooth module. In a forum post i found out that the serial port ttyS0 of raspi3 can not work with parity “EVEN” which seems to be required by TPUART2 protocol which is used by knxd? However after setting the serial port to ttyAMA0, everything works fine.

    In your “install_knxd_systemd.sh” i found helpful links to switch the serial port!

    github dot com/knxd/knxd/issues/297

    1. to complete it (encountered the same problem, Raspi 3B+): in order to switch from ttS01 to ttyAMA0 on the GPIO14/15 pins and have full serial, you need to ADD in your config.txt IN THE LAST LINE:
      sudo nano /boot/config.txt
      enable_uart=1
      dtoverlay=pi3-disable-bt

      close and save, reboot.

      check using: ls -l /dev
      serial0 should now linked to ttyAMA0

  119. Hello,

    thanks for this great guide, I managed to get knxb working with RP3 B+ and ABB STOTZ-KONTAKT usb interface. The only problem I’m experiencing is that the knxd service doesnt run at startup. If I manually start the service using:
    sudo systemctl start knxd.service
    it works. When I run the ‘knxtool vbusmonitor1 ip:localhost’, and send requests using ‘sudo knxtool groupswrite ip:localhost 1/1/1 1’ (for example), it works.

    Do you have any idea why the service doesnt start at boot? What info can I post to help you figure whats the problem?

    Thanks alot, Tin

      1. Thanks for your reply, but that did not do the trick.
        I found a command that lists all running daemons, modified it so it returns only those who contain ‘knx’. When I run the command right after booting, the daemon is not running. When I start the service, daemon is listed.

        pi@raspberrypi:~ $ ps -eo ‘tty,pid,comm’ | grep ^? | grep ‘knx’
        pi@raspberrypi:~ $ sudo systemctl start knxd.service
        pi@raspberrypi:~ $ ps -eo ‘tty,pid,comm’ | grep ^? | grep ‘knx’
        ? 852 knxd

        Any other ideas?

      2. After a while of trying to find a solution here, I looked elsewhere and found a way to start a command at boot using this guide (I used method #2) and knxd service starts and everything works 😀 thanks alot again

  120. Hi Michael,
    I am struggling with a connection problem, I would kindly ask for support.
    Raspi-Type: Pi 3B+
    Installation: Ubuntu Mate 18.04 bionic armv64
    Knx con: Siemens TPuart and adum chip (copy from your blog)
    knxd install: with your skript
    Changes: routing of serial ->disabled bluetooth, stop hciuart, mask serial service, disable serial console –> serial0 is linked to ttyAMA0 with groups root and dialout;
    Test script for serial communication can access serial0 and ttyAMA0 with root and knxd user.
    knxd config unchanged.

    Problem 1: vbusmonitior: classy -Open failed: Connection refused (with sudo and knxd user)
    Problem 2:knxd service does not start/ends with error.
    Manual start with knxd user (sudo su knxd -s /bin/bash), and knxd -t 1023 –eibaddr=1.1.128 –client-addrs=1.1.129:8 -D -T -R -S -i –listen-local=/tmp/knx -t 1023 -b tpuart:/dev/ttyAMA0 delivers:

    knxd@Raspi3BPlusKNX:/home/knxserv$ knxd -t 1023 –eibaddr=1.1.128 –client-addrs=1.1.129:8 -D -T -R -S -i –listen-local=/tmp/knx -t 1023 -b tpuart:/dev/ttyAMA0
    Layer 4 [ 1:main 0.000] initialized
    Layer 4 [ 1:main 0.000] setting up
    Layer 3 [ 4:server/Server 0.000] registerLink: 4:server
    Layer 3 [ 9:A.tcp/inet 0.000] registerLink: 9:A.tcp
    Layer 3 [12:B.unix/local 0.000] registerLink: 12:B.unix
    Layer 0 [18:C.tpuart/log 0.000] Insert 17:LowF / 16:tpuart
    Layer 0 [18:C.tpuart/log 0.000] Setup
    Layer 0 [20:C.tpuart/log 0.000] Insert 19:TPU_ser / 17:LowF
    Layer 0 [18:C.tpuart/log 0.000] Filter single not found
    Layer 0 [20:C.tpuart/log 0.000] Setup
    Layer 0 [20:C.tpuart/log 0.000] Setup OK: yes
    Layer 0 [18:C.tpuart/log 0.000] Setup OK: yes
    Layer 3 [15:C.tpuart/Conn 0.000] registerLink: 15:C.tpuart
    Layer 4 [ 1:main 0.000] setup OK
    Layer 4 [ 1:main 0.000] trigger going up
    Layer 3 [15:C.tpuart/Conn 0.000] Start: cfg:C.tpuart
    Layer 5 [15:C.tpuart/Conn 0.000] down => >up
    Layer 5 [15:C.tpuart/Conn 0.000] Starting
    Layer 0 [18:C.tpuart/log 0.000] Start
    Layer 0 [20:C.tpuart/log 0.000] Start
    Layer 0 [19:C.tpuart/TPU_ser 0.000] Opened /dev/ttyAMA0 with baud 19200
    Layer 2 [19:C.tpuart/TPU_ser 0.000] Opened
    Layer 2 [19:C.tpuart/TPU_ser 0.000] Buffer Setup on fd 4
    Layer 0 [20:C.tpuart/log 0.000] Started
    Layer 8 [17:C.tpuart/LowF 0.001] state: new > start
    Layer 0 [17:C.tpuart/LowF 0.001] SendReset 01
    Layer 0 [20:C.tpuart/log 0.001] Send(001): 01
    Layer 4 [15:C.tpuart/Conn 0.001] >up
    Layer 3 [12:B.unix/local 0.001] Start: cfg:B.unix
    Layer 5 [12:B.unix/local 0.001] down => >up
    Layer 8 [12:B.unix/local 0.001] OpenLocalSocket /tmp/knx
    Layer 8 [12:B.unix/local 0.001] LocalSocket opened
    Layer 5 [12:B.unix/local 0.001] >up => up
    Layer 4 [12:B.unix/local 0.001] up
    Layer 5 [12:B.unix/local 0.001] Started
    Layer 4 [12:B.unix/local 0.001] up
    Layer 3 [ 4:server/Server 0.001] Start: cfg:server
    Layer 5 [ 4:server/Server 0.001] down => >up
    Layer 8 [ 4:server/Server 0.001] Open
    Layer 0 [ 4:server/Server 0.001] Open
    Layer 0 [ 4:server/Server 0.001] Opened
    Layer 8 [22:router/driver 0.001] OpenD
    Layer 8 [22:router/driver 0.001] OpenedD
    Layer 3 [21:router/ConnC 0.002] registerLink: 21:router_21
    Layer 3 [21:router/ConnC 0.002] Start: cfg:router
    Layer 5 [21:router/ConnC 0.002] down => >up
    Layer 5 [21:router/ConnC 0.002] Starting
    Layer 5 [21:router/ConnC 0.002] >up => up
    Layer 4 [21:router/ConnC 0.002] up
    Layer 5 [21:router/ConnC 0.002] Started
    Layer 4 [21:router/ConnC 0.002] up
    Layer 8 [ 4:server/Server 0.002] Opened
    Layer 5 [ 4:server/Server 0.002] >up => up
    Layer 4 [ 4:server/Server 0.002] up
    Layer 5 [ 4:server/Server 0.002] Started
    Layer 4 [ 4:server/Server 0.002] up
    Layer 3 [ 9:A.tcp/inet 0.002] Start: cfg:A.tcp
    Layer 5 [ 9:A.tcp/inet 0.002] down => >up
    Layer 8 [ 9:A.tcp/inet 0.002] OpenInetSocket 6720
    Layer 8 [ 9:A.tcp/inet 0.002] InetSocket opened
    Layer 5 [ 9:A.tcp/inet 0.002] >up => up
    Layer 4 [ 9:A.tcp/inet 0.002] up
    Layer 5 [ 9:A.tcp/inet 0.002] Started
    Layer 4 [ 9:A.tcp/inet 0.002] up
    Layer 4 [ 1:main 0.002] going up triggered
    Layer 4 [ 1:main 0.002] check start
    Layer 4 [15:C.tpuart/Conn 0.002] is >up
    Layer 4 [ 1:main 0.002] check end: want_up 1 some 1>1 all 0>0, going 1 up 4 down 0
    Layer 0 [20:C.tpuart/log 0.228] Recv(002): 47 47
    Layer 8 [17:C.tpuart/LowF 0.228] State: 47
    Layer 8 [17:C.tpuart/LowF 0.228] State: 47
    Layer 0 [17:C.tpuart/LowF 0.494] SendReset 01
    Layer 0 [20:C.tpuart/log 0.495] Send(001): 01
    Layer 0 [20:C.tpuart/log 0.721] Recv(002): 47 47
    Layer 8 [17:C.tpuart/LowF 0.722] State: 47
    Layer 8 [17:C.tpuart/LowF 0.722] State: 47
    Layer 0 [17:C.tpuart/LowF 0.995] SendReset 01
    Layer 0 [20:C.tpuart/log 0.995] Send(001): 01
    Layer 0 [20:C.tpuart/log 1.222] Recv(002): 47 47
    Layer 8 [17:C.tpuart/LowF 1.222] State: 47
    Layer 8 [17:C.tpuart/LowF 1.222] State: 47
    Layer 8 [17:C.tpuart/LowF 1.495] state: in_reset > error
    Layer 0 [20:C.tpuart/log 2.496] Stop
    Layer 0 [20:C.tpuart/log 2.496] Stopped
    Layer 8 [17:C.tpuart/LowF 2.496] state: error > new
    Layer 0 [18:C.tpuart/log 2.497] Stopped
    Layer 5 [15:C.tpuart/Conn 2.497] >up => down
    Layer 4 [15:C.tpuart/Conn 2.497] down/error
    Layer 4 [ 1:main 2.497] check start
    Layer 4 [15:C.tpuart/Conn 2.497] is down
    Layer 4 [ 1:main 2.497] check end: want_up 1 some 1>1 all 0>0, going 0 up 4 down 1
    F00000105: [15:C.tpuart] Link down, terminating
    Layer 4 [ 1:main 2.497] trigger Going down
    Layer 4 [21:router/ConnC 2.497] Stopping
    Layer 5 [21:router/ConnC 2.497] up => >down
    Layer 5 [21:router/ConnC 2.497] Stopping
    Layer 5 [21:router/ConnC 2.497] >down => down
    Layer 4 [21:router/ConnC 2.497] down
    Layer 4 [21:router/ConnC 2.497] down
    Layer 4 [15:C.tpuart/Conn 2.497] Stopping
    Layer 5 [15:C.tpuart/Conn 2.497] down/error => >down
    Layer 4 [15:C.tpuart/Conn 2.497] down/error
    Layer 4 [12:B.unix/local 2.497] Stopping
    Layer 5 [12:B.unix/local 2.497] up => >down
    Layer 8 [12:B.unix/local 2.498] StopServer
    Layer 5 [12:B.unix/local 2.498] >down => down
    Layer 4 [12:B.unix/local 2.498] down
    Layer 4 [12:B.unix/local 2.498] down
    Layer 4 [ 4:server/Server 2.498] Stopping
    Layer 5 [ 4:server/Server 2.498] up => >down
    Layer 5 [21:router/ConnC 2.498] Stopping
    Layer 3 [21:router/ConnC 2.498] unregisterLink: router_21
    Layer 0 [ 4:server/Server 2.498] Close
    Layer 5 [ 4:server/Server 2.498] >down => down
    Layer 4 [ 4:server/Server 2.498] down
    Layer 4 [ 4:server/Server 2.498] down
    Layer 4 [ 9:A.tcp/inet 2.498] Stopping
    Layer 5 [ 9:A.tcp/inet 2.498] up => >down
    Layer 8 [ 9:A.tcp/inet 2.498] StopServer
    Layer 5 [ 9:A.tcp/inet 2.498] >down => down
    Layer 4 [ 9:A.tcp/inet 2.498] down
    Layer 4 [ 9:A.tcp/inet 2.498] down
    Layer 4 [ 1:main 2.498] check start
    Layer 8 [22:router/driver 2.499] CloseD
    Layer 4 [15:C.tpuart/Conn 2.499] is down
    Layer 4 [12:B.unix/local 2.499] is down
    Layer 4 [ 4:server/Server 2.499] is down
    Layer 4 [ 9:A.tcp/inet 2.499] is down
    Layer 4 [ 1:main 2.499] check end: want_up 0 some 1>0 all 0>0, going 0 up 0 down 4
    Layer 4 [ 1:main 2.499] down
    Layer 4 [ 1:main 2.499] deleting
    Layer 0 [18:C.tpuart/log 2.499] Closing
    Layer 2 [17:C.tpuart/LowF 2.499] Close
    Layer 0 [20:C.tpuart/log 2.499] Closing
    Layer 2 [19:C.tpuart/TPU_ser 2.499] Close
    Layer 8 [12:B.unix/local 2.499] StopServer
    Layer 8 [ 4:server/Server 2.499] Close
    Layer 8 [ 9:A.tcp/inet 2.499] StopServer
    Layer 4 [ 1:main 2.499] deleted.
    knxd@Raspi3BPlusKNX:/home/knxserv$

    ps ax|grep knxd: delievers nothing

    knxd@Raspi3BPlusKNX:/home/knxserv$ systemctl status knxd.service
    ● knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Fri 2019-12-06 20:19:45 CET; 47min ago
    Main PID: 1698 (code=exited, status=1/FAILURE)

    Dez 06 20:19:45 Raspi3BPlusKNX knxd[1696]: Layer 4 [ 4:server/Server 2.495] Stopping
    Dez 06 20:19:45 Raspi3BPlusKNX knxd[1696]: Layer 5 [ 4:server/Server 2.495] up => >down
    Dez 06 20:19:45 Raspi3BPlusKNX knxd[1696]: Layer 5 [20:router/ConnC 2.495] Stopping
    Dez 06 20:19:45 Raspi3BPlusKNX knxd[1696]: Layer 3 [20:router/ConnC 2.495] unregisterLink: router_20
    Dez 06 20:19:45 Raspi3BPlusKNX knxd[1696]: Layer 0 [ 4:server/Server 2.495] Close
    Dez 06 20:19:45 Raspi3BPlusKNX knxd[1696]: Layer 5 [ 4:server/Server 2.495] >down => down
    Dez 06 20:19:45 Raspi3BPlusKNX knxd[1696]: Layer 4 [ 4:server/Server 2.495] down
    Dez 06 20:19:45 Raspi3BPlusKNX knxd[1696]: Layer 8 [21:router/driver 2.496] CloseD
    Dez 06 20:19:45 Raspi3BPlusKNX knxd[1696]: Layer 4 [ 4:server/Server 2.496] is down
    Dez 06 20:19:45 Raspi3BPlusKNX knxd[1696]: Layer 8 [ 4:server/Server 2.496] Close

    Sadly I still have no glue where the problem is, even after studying of all comments and trying everything. 😐
    Thanks in advance!

    1. Have you managed to resolve your issue?

      I have a similar problem as you, on a reset e.g. “Send(001): 01” I get different replies every time I start kndx manually e.g. “Recv(002): E0 00”. But apparently not the correct one. According to the maintainer of knxd the reply should be 0x03.

      I was running knxd succesfully before on a Raspberry Pi 2 with “-b usb:” using a MDT SCN-USBR.01 USB interface. Now I’m trying to get rid of that USB interface in my electrical cabinet by using “-b tpuart:/dev/ttyAMA0” and a Siemens Bustranceiver Module BTM UP117 5WG1117-2AB11 and an ADUM1201 in between for galvanic isolation.

      Troubleshooted all the components and am quite sure that they are doing their job. I’m wondering why I am receiving these erroneous replies on the SendReset…

  121. Hi Michl,

    I followed your instructions and got my KNX router up running.
    Thanks for your great work!!!

    I’m facing a little problem. If the disconnect the Raspi from the KNX-USB device and reconnect it afterwards no knxd is restarted. Seems that the USB interface is still in use:

    knxd@node-red:/root$ knxd -t 1023 –eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:
    Layer 4 [ 1:main 0.000] initialized
    Layer 4 [ 1:main 0.000] setting up
    Layer 3 [ 4:server/Server 0.000] registerLink: 4:server
    Layer 3 [ 9:A.tcp/inet 0.000] registerLink: 9:A.tcp
    Layer 3 [12:B.unix/local 0.000] registerLink: 12:B.unix
    knxd@node-red:/root$ Layer 1 [18:C.usb/usbL 0.009] Detect
    Layer 1 [18:C.usb/usbL 0.010] Using 1:7:1:0:0 (2:129)
    Layer 1 [18:C.usb/usbL 0.018] Detect
    Layer 1 [18:C.usb/usbL 0.018] Using 1:7:1:0:0 (2:129)
    Layer 3 [15:C.usb/Conn 0.018] registerLink: 15:C.usb
    Layer 4 [ 1:main 0.018] setup OK
    Layer 4 [ 1:main 0.018] trigger going up
    Layer 3 [15:C.usb/Conn 0.018] Start: cfg:C.usb
    Layer 5 [15:C.usb/Conn 0.018] down => >up
    Layer 5 [15:C.usb/Conn 0.018] Starting
    Layer 1 [18:C.usb/usbL 0.018] Open
    E00000029: [18:C.usb] USBLowLevelDriver: setup config: LIBUSB_ERROR_BUSY
    Layer 1 [18:C.usb/usbL 0.018] Close
    Layer 1 [18:C.usb/usbL 0.018] Release
    Layer 5 [15:C.usb/Conn 0.018] >up => down
    Layer 4 [15:C.usb/Conn 0.018] down/error
    Layer 4 [15:C.usb/Conn 0.018] down/error
    Layer 3 [12:B.unix/local 0.018] Start: cfg:B.unix
    Layer 5 [12:B.unix/local 0.018] down => >up
    Layer 8 [12:B.unix/local 0.018] OpenLocalSocket /tmp/knx
    E00000016: [12:B.unix] OpenLocalSocket /tmp/knx: bind: Address already in use
    Layer 8 [12:B.unix/local 0.019] StopServer
    Layer 5 [12:B.unix/local 0.019] >up => down
    Layer 4 [12:B.unix/local 0.019] down/error
    Layer 4 [12:B.unix/local 0.019] down/error
    Layer 3 [ 9:A.tcp/inet 0.019] Start: cfg:A.tcp
    Layer 5 [ 9:A.tcp/inet 0.019] down => >up
    Layer 8 [ 9:A.tcp/inet 0.019] OpenInetSocket 6720
    E00000013: [ 9:A.tcp] OpenInetSocket 6720: bind: Address already in use
    Layer 8 [ 9:A.tcp/inet 0.019] StopServer
    Layer 5 [ 9:A.tcp/inet 0.019] >up => down
    Layer 4 [ 9:A.tcp/inet 0.019] down/error
    Layer 4 [ 9:A.tcp/inet 0.019] down/error
    Layer 3 [ 4:server/Server 0.019] Start: cfg:server
    Layer 5 [ 4:server/Server 0.019] down => >up
    Layer 8 [ 4:server/Server 0.019] Open
    Layer 0 [ 4:server/Server 0.019] Open
    Layer 0 [ 4:server/Server 0.019] Opened
    Layer 8 [21:router/driver 0.019] OpenD
    Layer 8 [21:router/driver 0.019] OpenedD
    Layer 3 [20:router/ConnC 0.019] registerLink: 20:router_20
    Layer 3 [20:router/ConnC 0.019] Start: cfg:router
    Layer 5 [20:router/ConnC 0.019] down => >up
    Layer 5 [20:router/ConnC 0.019] Starting
    Layer 5 [20:router/ConnC 0.019] >up => up
    Layer 4 [20:router/ConnC 0.019] up
    Layer 5 [20:router/ConnC 0.020] Started
    Layer 4 [20:router/ConnC 0.020] up
    Layer 8 [ 4:server/Server 0.020] Opened
    Layer 5 [ 4:server/Server 0.020] >up => up
    Layer 4 [ 4:server/Server 0.020] up
    Layer 5 [ 4:server/Server 0.020] Started
    Layer 4 [ 4:server/Server 0.020] up
    Layer 4 [ 1:main 0.020] going up triggered
    Layer 4 [ 1:main 0.020] check start
    Layer 4 [ 9:A.tcp/inet 0.020] is down
    Layer 4 [12:B.unix/local 0.020] is down
    Layer 4 [15:C.usb/Conn 0.020] is down
    Layer 4 [ 1:main 0.020] check end: want_up 1 some 1>1 all 0>0, going 0 up 2 down 3
    F00000105: [ 9:A.tcp] Link down, terminating
    F00000105: [12:B.unix] Link down, terminating
    F00000105: [15:C.usb] Link down, terminating
    Layer 4 [ 1:main 0.020] trigger Going down
    Layer 4 [20:router/ConnC 0.020] Stopping
    Layer 5 [20:router/ConnC 0.020] up => >down
    Layer 5 [20:router/ConnC 0.020] Stopping
    Layer 5 [20:router/ConnC 0.020] >down => down
    Layer 4 [20:router/ConnC 0.020] down
    Layer 4 [20:router/ConnC 0.020] down
    Layer 4 [ 9:A.tcp/inet 0.020] Stopping
    Layer 5 [ 9:A.tcp/inet 0.020] down/error => >down
    Layer 4 [ 9:A.tcp/inet 0.020] down/error
    Layer 4 [12:B.unix/local 0.020] Stopping
    Layer 5 [12:B.unix/local 0.020] down/error => >down
    Layer 4 [12:B.unix/local 0.020] down/error
    Layer 4 [ 4:server/Server 0.020] Stopping
    Layer 5 [ 4:server/Server 0.020] up => >down
    Layer 5 [20:router/ConnC 0.020] Stopping
    Layer 3 [20:router/ConnC 0.020] unregisterLink: router_20
    Layer 0 [ 4:server/Server 0.020] Close
    Layer 5 [ 4:server/Server 0.020] >down => down
    Layer 4 [ 4:server/Server 0.020] down
    Layer 4 [ 4:server/Server 0.020] down
    Layer 4 [15:C.usb/Conn 0.020] Stopping
    Layer 5 [15:C.usb/Conn 0.020] down/error => >down
    Layer 4 [15:C.usb/Conn 0.020] down/error
    Layer 4 [ 1:main 0.020] check start
    Layer 8 [21:router/driver 0.020] CloseD
    Layer 4 [ 9:A.tcp/inet 0.020] is down
    Layer 4 [12:B.unix/local 0.020] is down
    Layer 4 [ 4:server/Server 0.020] is down
    Layer 4 [15:C.usb/Conn 0.020] is down
    Layer 4 [ 1:main 0.020] check end: want_up 0 some 1>0 all 0>0, going 0 up 0 down 4
    Layer 4 [ 1:main 0.020] down
    Layer 4 [ 1:main 0.020] deleting
    Layer 8 [ 9:A.tcp/inet 0.020] StopServer
    Layer 8 [12:B.unix/local 0.020] StopServer
    Layer 8 [ 4:server/Server 0.020] Close
    Layer 1 [18:C.usb/usbL 0.020] Close
    Layer 1 [18:C.usb/usbL 0.020] Release
    Layer 4 [ 1:main 0.020] deleted.

    Could you please help me?

    Thanks,
    Manfred

    1. Hi Manfred,

      in my opinion knxd is still running in background because the socket and portUDP/6720 are also in use:

      E00000016: [12:B.unix] OpenLocalSocket /tmp/knx: bind: Address already in use
      E00000013: [ 9:A.tcp] OpenInetSocket 6720: bind: Address already in use

      check if knxd is running

      ps ax|grep knxd
      

      if yes stop and start knxd

      systemctl stop knxd
      systemctl start knxd
      

      Note: knxd is not designed for supporting USB hotplug actions 🙂 It assumes the device is always present and is not removed.

      Michael

  122. Hi Michael
    I have upgraded to Rasp Pi4 and I found issue in installation. I found the reason so I would like to share here, just want to help newbies like me. if someone is installing Michael ‘s knxd , but fail and see notification as below :
    “The following packages have unmet dependencies:
    vlc-bin : Depends: libvlc-bin (= 3.0.8-0+deb10u1+rpt1) but 3.0.8-0+deb10u1+rpt7 is to be installed”
    After google, I found something concern to upgrading , we just update, type
    sudo apt full-upgrade
    sudo apt dist-upgrade
    Waiting around 30 minutes, upgrading finished, go back Micheal ‘s instruction as normal, knxd is installed completely
    I am just a newbie. Please advice if someone has better solution
    Thank you
    Thanks Michael

    1. Hi Kevin,

      ok, but this is an debian/raspbian related issue not knxd. As I can see you use debian 10. In debian 10 knxd can be installed via apt package manager. Its not necessary to run my script anymore 🙂

      Michael

  123. Hi, I think I got most of it to work, does this look normal:

    pi@raspberrypi:~ $ knxtool vbusmonitor1 ip:localhost
    L_Busmon: BC 11 08 09 06 E1 00 80 34 :L_Data low from 1.1.8 to 1/1/6 hops: 06 T_Data_Group A_GroupValue_Write (small) 00
    L_Busmon: BC 11 08 09 06 E1 00 81 35 :L_Data low from 1.1.8 to 1/1/6 hops: 06 T_Data_Group A_GroupValue_Write (small) 01
    L_Busmon: BC 11 09 0A 02 E1 00 81 33 :L_Data low from 1.1.9 to 1/2/2 hops: 06 T_Data_Group A_GroupValue_Write (small) 01

    and

    pi@raspberrypi:~ $ sudo tcpdump host 224.0.23.12 -n
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
    19:09:36.065074 IP 192.168.1.30.3671 > 224.0.23.12.3671: UDP, length 17
    19:10:02.553033 IP 192.168.1.30.3671 > 224.0.23.12.3671: UDP, length 17

    So everything should be ok?

    But android softwares doesnt see anything. I started to suspect broadcast, so added laptop with wireshark on same zyxel wlan box:
    used ‘kip’ as and filttering word and it doesnt see anything. Is there way to see what my raspberry actually sends, before I buy new switch ?

    1. Hi Jukka,

      everythink looks ok. You sniffing on device eth0 and the packets on these interface leave the raspberry via multicast. You have to know that multicast (224.x.x.x) packets are only be visible in the same IP Subnet(otherwiese you need a managed switch where you can configure multicast routing). In your case, assuming a 255.255.255.0 subnetmask, all devices in range 192.168.1.0/24.

      Try sniffing with your laptop again and filter (capture) for

      port 3671

      Michael

  124. Hello,
    i have a problem with knxd and i can’t find an answer to my doubts.
    I have an RPI 3 B on which I have installed OpenHabianPI.
    Through openhabian-config I installed the knxd service and it seems to be successful.
    But if I use the command “systemctl status knxd” I read this:

    * knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Sat 2020-03-07 18:49:51 CET; 27min ago
    Process: 509 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)
    Main PID: 512 (code=exited, status=1/FAILURE)

    mar 07 18:49:49 openHABianPi systemd[1]: Starting KNX Daemon…
    mar 07 18:49:49 openHABianPi systemd[1]: knxd.service: PID file /run/knxd/knxd.pid not readable (yet?) after start: No such file
    mar 07 18:49:49 openHABianPi systemd[1]: Started KNX Daemon.
    mar 07 18:49:51 openHABianPi systemd[1]: knxd.service: Main process exited, code=exited, status=1/FAILURE
    mar 07 18:49:51 openHABianPi systemd[1]: knxd.service: Unit entered failed state.
    mar 07 18:49:51 openHABianPi systemd[1]: knxd.service: Failed with result ‘exit-code’.

    I state that I am quite inexperienced with linux and the first experience with raspberry, however I have already verified that the file knxd.cpp does not exist and the / knxd folder has all permissions for the root user and read-only for everyone else.

    I have to solve this before I proceed with the configuration of things and Items in openhab.

    Thank you so much for your kindness

    1. Hi Silvio,

      I don’t know how OPenHabianPi configures knxd. Does a /etc/default/knxd file exists? If yes whats the content.

      I think the problem is that knxd could not create the pid file /run/knxd/knxd.pid. Does the folder /run/knxd exists?

      Michael

      1. Hi micheal,
        the /etc/default/ knxd file exists and I modified it by commenting the first line and removing the # from the last as described in your blog.

        Instead the knxd.pid file does not exist (only the /run/knxd folder exists but it is empty)

        Silvio

        P.S. In my message I wrote knxd.cpp by mistake but I meant to write knxd.pid

          1. Hi Michael,
            this is the content of /etc/default/knxd:

            # Command line parameters for knxd. TPUART Backend
            # Serial device Raspberry
            # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –$
            # Serial device PC
            # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –$
            # Tunnel Backend
            # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –$
            # USB Backend
            KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –li$

            Silvio

          2. Hi Silvio,


            KNXD_OPTIONS=”-eibaddr=1.1.128 -client-addrs=1.1.129:8 -d -D -T -R -S -i -li$

            sure? This wouldn't work.

            Michael

          3. Hi Michael,

            The parameters entered in the line I’m not sure are correct, because I didn’t understand what they mean.
            I would be grateful if you could help me find the correct parameters.

            Silvio

          4. Hi Silvio,

            how should knxd establish a connection to the knx bus? TPUART device? Tunnel to an existing gateway?

            Michael

          5. Hi micheal,
            I have never specified it but I would like to use a USB-KNX Zennio interface whose ID I have entered in the indicated file.

            But it doesn’t seem to work, also because the “systemctl status knxd” command gives me that message.

            Silvio

          6. I apologize if I make you waste time for my problems and I thank you for the assistance you give me.

            I noticed that the text of the keti knxd file I sent is incorrect (perhaps due to a problem with the copy and paste done from the terminal).

            Here is the correct one:

            # Command line parameters for knxd. TPUART Backend
            # Serial device Raspberry
            # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyAMA0″
            # Serial device PC
            # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyS0″
            # Tunnel Backend
            # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b ipt:192.168.56.1″
            # USB Backend
            KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:”

            Silvio

          7. Hi Silvio,

            try to run knxd in foreground with trace enabled

            sudo su knxd -s /bin/bash
            knxd -t 1023 --eibaddr=1.1.128 --client-addrs=1.1.129:8 -p /run/knxd/knxd.pid  -D -T -R -S -i --listen-local=/tmp/knx -t 1023 -b usb:
            

            and see whats happen

            Michael

          8. Hi Michael,
            this is the result[10:53:11] knxd@openHABianPi:/home/openhabian$ knxd -t 1023 –eibaddr=1.1.128 –client-addrs=1.1.129:8 -p /run/knxd/knxd.pid -D -T -R -S -i –listen-local=/tmp/knx -t 1023 -b usb:
            Layer 4 [ 1:main 0.000] initialized
            Layer 4 [ 1:main 0.000] setting up
            Layer 3 [ 4:server/Server 0.000] registerLink: 4:server
            Layer 3 [ 9:A.tcp/inet 0.000] registerLink: 9:A.tcp
            Layer 3 [12:B.unix/local 0.000] registerLink: 12:B.unix
            Layer 1 [18:C.usb/usbL 0.013] Detect
            libusb: error [_get_usbfs_fd] libusb couldn’t open USB device /dev/bus/usb/001/004: Permission denied
            libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
            Layer 1 [18:C.usb/usbL 0.013] No matching endpoint found.
            Layer 1 [18:C.usb/usbL 0.013] Close
            Layer 1 [18:C.usb/usbL 0.013] Release
            Layer 1 [18:C.usb/usbL 0.014] Close
            Layer 1 [18:C.usb/usbL 0.014] Release
            E00000064: [15:C.usb] C.usb: setup C.usb: failed
            Layer 4 [ 1:main 0.014] setup BROKEN
            F00000109: [ 1:main] Error setting up the KNX router.

          9. Hi Silvio

            libusb: error [_get_usbfs_fd] libusb couldn’t open USB device /dev/bus/usb/001/004: Permission denied

            The udev rules are correct?

            Regards Michael

          10. Hi micheal,
            I have to admit I don’t know what it means.
            By installing openhabianpi I thought the configuration would be (almost) automatic.
            IF you want to show me how to proceed, I would be grateful to you.
            Thank you

          11. Hi Silvio,

            udevd sets write permissions to the user knxd for the devices defined in

            /etc/udev/rules.d/90-knxusb-devices.rules

            You have to ensure the USB Vender and Device ID is defnied there for your USB device.

            To list the USB devices use

            lsusb
            

            Michael

            Michael

          12. Hi michael,
            result of lsusb

            Bus 001 Device 004: ID 28c2:0002
            Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
            Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
            Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

            In the meantime I looked for information on the rules of access to the files and I noticed that the /dev/bus/usb/001/004 file also had limited permissions (so I seem to have understood)

            [12:40:50] openhabian@openHABianPi:/dev/bus/usb/001$ ls -l
            totale 0
            crw-rw-r– 1 root root 189, 0 mar 11 10:49 001
            crw-rw-r– 1 root root 189, 1 mar 11 10:49 002
            crw-rw-r– 1 root root 189, 2 mar 11 10:49 003
            crwxrwxrwx 1 root root 189, 3 mar 11 10:49 004

            After the “chroot 777 004” command I tried to give again the command
            and this is now the result (stopped with CTRL + X)

            Layer 4 [ 1:main 0.000] initialized
            Layer 4 [ 1:main 0.000] setting up
            Layer 3 [ 4:server/Server 0.000] registerLink: 4:server
            Layer 3 [ 9:A.tcp/inet 0.000] registerLink: 9:A.tcp
            Layer 3 [12:B.unix/local 0.000] registerLink: 12:B.unix
            Layer 1 [18:C.usb/usbL 0.013] Detect
            Layer 1 [18:C.usb/usbL 0.014] Using 1:4:1:0:0 (1:130)
            Layer 1 [18:C.usb/usbL 0.025] Detect
            Layer 1 [18:C.usb/usbL 0.025] Using 1:4:1:0:0 (1:130)
            Layer 3 [15:C.usb/Conn 0.025] registerLink: 15:C.usb
            Layer 4 [ 1:main 0.025] setup OK
            Layer 4 [ 1:main 0.025] trigger going up
            Layer 3 [15:C.usb/Conn 0.025] Start: cfg:C.usb
            Layer 5 [15:C.usb/Conn 0.025] down => >up
            Layer 5 [15:C.usb/Conn 0.025] Starting
            Layer 1 [18:C.usb/usbL 0.025] Open
            Layer 1 [18:C.usb/usbL 0.034] Claimed
            Layer 1 [18:C.usb/usbL 0.034] Opened
            Layer 0 [16:C.usb/USBdr 0.034] starting send_Local
            Layer 0 [18:C.usb/usbL 0.034] SendUSB(064): 01 13 09 00 08 00 01 0F 01 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
            Layer 0 [18:C.usb/usbL 0.035] StartSend 20a0c60
            Layer 4 [15:C.usb/Conn 0.035] >up
            Layer 3 [12:B.unix/local 0.035] Start: cfg:B.unix
            Layer 5 [12:B.unix/local 0.035] down => >up
            Layer 8 [12:B.unix/local 0.035] OpenLocalSocket /tmp/knx
            Layer 8 [12:B.unix/local 0.035] LocalSocket opened
            Layer 5 [12:B.unix/local 0.035] >up => up
            Layer 4 [12:B.unix/local 0.036] up
            Layer 5 [12:B.unix/local 0.036] Started
            Layer 4 [12:B.unix/local 0.036] up
            Layer 3 [ 9:A.tcp/inet 0.036] Start: cfg:A.tcp
            Layer 5 [ 9:A.tcp/inet 0.036] down => >up
            Layer 8 [ 9:A.tcp/inet 0.036] OpenInetSocket 6720
            Layer 8 [ 9:A.tcp/inet 0.036] InetSocket opened
            Layer 5 [ 9:A.tcp/inet 0.036] >up => up
            Layer 4 [ 9:A.tcp/inet 0.036] up
            Layer 5 [ 9:A.tcp/inet 0.036] Started
            Layer 4 [ 9:A.tcp/inet 0.036] up
            Layer 3 [ 4:server/Server 0.036] Start: cfg:server
            Layer 5 [ 4:server/Server 0.036] down => >up
            Layer 8 [ 4:server/Server 0.036] Open
            Layer 0 [ 4:server/Server 0.041] Open
            Layer 0 [ 4:server/Server 0.041] Opened
            Layer 8 [20:router/driver 0.042] OpenD
            Layer 8 [20:router/driver 0.043] OpenedD
            Layer 3 [19:router/ConnC 0.043] registerLink: 19:router_19
            Layer 3 [19:router/ConnC 0.043] Start: cfg:router
            Layer 5 [19:router/ConnC 0.043] down => >up
            Layer 5 [19:router/ConnC 0.043] Starting
            Layer 5 [19:router/ConnC 0.043] >up => up
            Layer 4 [19:router/ConnC 0.043] up
            Layer 5 [19:router/ConnC 0.043] Started
            Layer 4 [19:router/ConnC 0.043] up
            Layer 8 [ 4:server/Server 0.043] Opened
            Layer 5 [ 4:server/Server 0.043] >up => up
            Layer 4 [ 4:server/Server 0.043] up
            Layer 5 [ 4:server/Server 0.043] Started
            Layer 4 [ 4:server/Server 0.043] up
            Layer 4 [ 1:main 0.043] going up triggered
            Layer 4 [ 1:main 0.043] check start
            Layer 4 [15:C.usb/Conn 0.044] is >up
            Layer 4 [ 1:main 0.044] check end: want_up 1 some 1>1 all 0>0, going 1 up 4 down 0
            Layer 0 [18:C.usb/usbL 0.044] RecvUSB(064): 01 13 13 00 08 00 0B 01 03 00 00 29 00 BC E0 22 C9 0B 39 01 00 80 BC BE AD 7C D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 2 [16:C.usb/USBdr 0.044] recv_Data(064): 01 13 13 00 08 00 0B 01 03 00 00 29 00 BC E0 22 C9 0B 39 01 00 80 BC BE AD 7C D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 2 [16:C.usb/USBdr 0.044] not recognized
            Layer 0 [16:C.usb/USBdr 0.044] send_Local done
            Layer 0 [18:C.usb/usbL 0.045] RecvUSB(064): 01 13 09 00 08 00 01 01 03 00 00 F0 1B 38 5A 0D FD 5F 6B E5 8B 05 D5 DF 8B 5F 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 2 [16:C.usb/USBdr 0.045] recv_Data(064): 01 13 09 00 08 00 01 01 03 00 00 F0 1B 38 5A 0D FD 5F 6B E5 8B 05 D5 DF 8B 5F 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 2 [16:C.usb/USBdr 0.045] not recognized
            Layer 0 [18:C.usb/usbL 0.046] RecvUSB(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 C9 0B 33 03 00 80 05 E6 AD 7C D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 2 [16:C.usb/USBdr 0.046] recv_Data(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 C9 0B 33 03 00 80 05 E6 AD 7C D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 2 [16:C.usb/USBdr 0.046] not recognized
            Layer 0 [18:C.usb/usbL 0.049] RecvUSB(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 C9 0B 0B 03 00 80 07 58 8B 5F 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 2 [16:C.usb/USBdr 0.049] recv_Data(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 C9 0B 0B 03 00 80 07 58 8B 5F 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 2 [16:C.usb/USBdr 0.049] not recognized
            Layer 0 [18:C.usb/usbL 0.053] RecvUSB(064): 01 13 13 00 08 00 0B 01 03 00 00 29 00 BC E0 22 CB 03 07 01 00 80 05 E6 AD 7C D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 2 [16:C.usb/USBdr 0.053] recv_Data(064): 01 13 13 00 08 00 0B 01 03 00 00 29 00 BC E0 22 CB 03 07 01 00 80 05 E6 AD 7C D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 2 [16:C.usb/USBdr 0.053] not recognized
            Layer 0 [18:C.usb/usbL 0.057] RecvUSB(064): 01 13 17 00 08 00 0F 01 03 00 00 29 00 BC E0 12 0B 04 04 05 00 80 C3 DF 00 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 2 [16:C.usb/USBdr 0.057] recv_Data(064): 01 13 17 00 08 00 0F 01 03 00 00 29 00 BC E0 12 0B 04 04 05 00 80 C3 DF 00 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 2 [16:C.usb/USBdr 0.057] not recognized
            Layer 0 [18:C.usb/usbL 0.061] RecvUSB(064): 01 13 17 00 08 00 0F 01 03 00 00 29 00 BC E0 12 0B 04 0E 05 00 80 44 C2 80 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 2 [16:C.usb/USBdr 0.061] recv_Data(064): 01 13 17 00 08 00 0F 01 03 00 00 29 00 BC E0 12 0B 04 0E 05 00 80 44 C2 80 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 2 [16:C.usb/USBdr 0.061] not recognized
            Layer 0 [18:C.usb/usbL 0.065] RecvUSB(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 CB 13 0B 03 00 80 06 AE 00 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 2 [16:C.usb/USBdr 0.065] recv_Data(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 CB 13 0B 03 00 80 06 AE 00 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 2 [16:C.usb/USBdr 0.065] not recognized
            Layer 0 [18:C.usb/usbL 0.069] RecvUSB(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 CB 0B 15 03 00 80 07 3A 80 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 2 [16:C.usb/USBdr 0.069] recv_Data(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 CB 0B 15 03 00 80 07 3A 80 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 2 [16:C.usb/USBdr 0.069] not recognized
            Layer 0 [18:C.usb/usbL 0.073] RecvUSB(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 CB 03 01 03 00 80 04 D8 00 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 2 [16:C.usb/USBdr 0.073] recv_Data(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 CB 03 01 03 00 80 04 D8 00 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 2 [16:C.usb/USBdr 0.073] not recognized
            Layer 0 [18:C.usb/usbL 0.077] RecvUSB(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 CB 0B 29 03 00 80 07 BC 80 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 2 [16:C.usb/USBdr 0.077] recv_Data(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 CB 0B 29 03 00 80 07 BC 80 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 2 [16:C.usb/USBdr 0.077] not recognized
            Layer 0 [18:C.usb/usbL 0.081] RecvUSB(064): 01 13 13 00 08 00 0B 01 03 00 00 29 00 BC E0 22 CB 0B 2F 01 00 80 04 D8 00 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 2 [16:C.usb/USBdr 0.081] recv_Data(064): 01 13 13 00 08 00 0B 01 03 00 00 29 00 BC E0 22 CB 0B 2F 01 00 80 04 D8 00 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 2 [16:C.usb/USBdr 0.081] not recognized
            Layer 0 [18:C.usb/usbL 0.313] RecvUSB(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 C9 0B 33 03 00 80 05 F0 80 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 2 [16:C.usb/USBdr 0.313] recv_Data(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 C9 0B 33 03 00 80 05 F0 80 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 2 [16:C.usb/USBdr 0.313] not recognized
            Layer 0 [18:C.usb/usbL 0.621] RecvUSB(064): 01 13 16 00 08 00 0E 01 03 00 00 29 00 BC E0 22 C9 00 01 04 00 80 6C 29 19 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 2 [16:C.usb/USBdr 0.621] recv_Data(064): 01 13 16 00 08 00 0E 01 03 00 00 29 00 BC E0 22 C9 00 01 04 00 80 6C 29 19 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 2 [16:C.usb/USBdr 0.621] not recognized
            Layer 0 [18:C.usb/usbL 0.765] RecvUSB(064): 01 13 16 00 08 00 0E 01 03 00 00 29 00 BC E0 22 C9 00 02 04 00 80 0B 03 14 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 2 [16:C.usb/USBdr 0.765] recv_Data(064): 01 13 16 00 08 00 0E 01 03 00 00 29 00 BC E0 22 C9 00 02 04 00 80 0B 03 14 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 2 [16:C.usb/USBdr 0.765] not recognized
            Layer 0 [18:C.usb/usbL 0.885] RecvUSB(064): 01 13 13 00 08 00 0B 01 03 00 00 29 00 BC E0 22 C9 0B 11 01 00 80 6C 29 19 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 2 [16:C.usb/USBdr 0.885] recv_Data(064): 01 13 13 00 08 00 0B 01 03 00 00 29 00 BC E0 22 C9 0B 11 01 00 80 6C 29 19 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 2 [16:C.usb/USBdr 0.885] not recognized
            Layer 0 [16:C.usb/USBdr 0.985] starting send_Local
            Layer 0 [18:C.usb/usbL 0.985] SendUSB(064): 01 13 09 00 08 00 01 0F 01 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
            Layer 0 [18:C.usb/usbL 0.986] StartSend 209ccc8
            Layer 0 [16:C.usb/USBdr 0.986] send_Local done
            Layer 0 [18:C.usb/usbL 0.989] RecvUSB(064): 01 13 0B 00 08 00 03 0F 02 00 00 01 00 04 E0 22 C9 00 02 04 00 80 0B 03 14 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 2 [16:C.usb/USBdr 0.989] recv_Data(064): 01 13 0B 00 08 00 03 0F 02 00 00 01 00 04 E0 22 C9 00 02 04 00 80 0B 03 14 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 1 [16:C.usb/USBdr 0.989] Using EMI version 3
            Layer 2 [17:C.usb/Conv 0.989] send_Init 3
            Layer 0 [17:C.usb/Conv 0.989] starting send_Local
            Layer 0 [18:C.usb/usbL 0.989] SendUSB(064): 01 13 0A 00 08 00 02 0F 03 00 00 05 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
            Layer 0 [18:C.usb/usbL 0.989] StartSend 209cd10
            Layer 0 [17:C.usb/Conv 0.990] send_Local done
            Layer 2 [22:C.usb/CEMI 0.990] OpenL2
            Layer 5 [15:C.usb/Conn 0.990] >up => up
            Layer 4 [15:C.usb/Conn 0.990] up
            Layer 5 [15:C.usb/Conn 0.990] Started
            Layer 4 [ 1:main 0.990] check start
            Layer 4 [ 1:main 0.990] check end: want_up 1 some 1>1 all 0>1, going 0 up 5 down 0
            Layer 4 [ 1:main 0.990] all drivers up
            Layer 4 [ 1:main 0.990] up
            Layer 0 [18:C.usb/usbL 3.489] RecvUSB(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 C9 0B 0B 03 00 80 07 44 19 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 0 [17:C.usb/Conv 3.489] RecvEMI(013): 29 00 BC E0 22 C9 0B 0B 03 00 80 07 44
            Layer 8 [ 1:main 3.489] unknown addr 2.2.201
            Layer 6 [19:router/ConnC 3.489] sending, send_more clear
            Layer 1 [ 4:server/Server 3.489] Send(013): 29 00 BC D0 22 C9 0B 0B 03 00 80 07 44
            Layer 2 [21:router.pace_/router 3.489] out 1/4: delay for 0.019 sec
            Layer 6 [19:router/ConnC 3.490] still waiting
            Layer 6 [ 1:main 3.490] wait L
            Layer 0 [ 4:server/Server 3.490] Send(019): 06 10 05 30 00 13 29 00 BC D0 22 C9 0B 0B 03 00 80 07 44
            Layer 0 [ 4:server/Server 3.490] Dropped(019): 06 10 05 30 00 13 29 00 BC D0 22 C9 0B 0B 03 00 80 07 44
            Layer 2 [21:router.pace_/router 3.508] delay done
            Layer 6 [19:router/ConnC 3.508] sendNext called, send_more set
            Layer 6 [19:router/ConnC 3.509] is OK
            Layer 6 [ 9:A.tcp/inet 3.509] is OK
            Layer 6 [12:B.unix/local 3.509] is OK
            Layer 6 [ 4:server/Server 3.509] is OK
            Layer 6 [15:C.usb/Conn 3.509] is OK
            Layer 6 [ 1:main 3.509] OK
            Layer 6 [ 2:main/L 3.509] OK L
            Layer 0 [18:C.usb/usbL 3.713] RecvUSB(064): 01 13 13 00 08 00 0B 01 03 00 00 29 00 BC E0 22 C9 0B 39 01 00 80 0B 03 14 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 0 [17:C.usb/Conv 3.713] RecvEMI(011): 29 00 BC E0 22 C9 0B 39 01 00 80
            Layer 8 [15:C.usb/Conn 3.713] found addr 2.2.201
            Layer 6 [19:router/ConnC 3.713] sending, send_more clear
            Layer 1 [ 4:server/Server 3.713] Send(011): 29 00 BC D0 22 C9 0B 39 01 00 80
            Layer 2 [21:router.pace_/router 3.713] out 1/2: delay for 0.017 sec
            Layer 6 [19:router/ConnC 3.713] still waiting
            Layer 6 [ 1:main 3.713] wait L
            Layer 0 [ 4:server/Server 3.714] Send(017): 06 10 05 30 00 11 29 00 BC D0 22 C9 0B 39 01 00 80
            Layer 0 [ 4:server/Server 3.714] Dropped(017): 06 10 05 30 00 11 29 00 BC D0 22 C9 0B 39 01 00 80
            Layer 2 [21:router.pace_/router 3.730] delay done
            Layer 6 [19:router/ConnC 3.730] sendNext called, send_more set
            Layer 6 [19:router/ConnC 3.730] is OK
            Layer 6 [ 9:A.tcp/inet 3.730] is OK
            Layer 6 [12:B.unix/local 3.731] is OK
            Layer 6 [ 4:server/Server 3.731] is OK
            Layer 6 [15:C.usb/Conn 3.731] is OK
            Layer 6 [ 1:main 3.731] OK
            Layer 6 [ 2:main/L 3.731] OK L
            Layer 0 [18:C.usb/usbL 3.869] RecvUSB(064): 01 13 13 00 08 00 0B 01 03 00 00 29 00 BC E0 22 CB 03 07 01 00 80 07 44 19 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 0 [17:C.usb/Conv 3.869] RecvEMI(011): 29 00 BC E0 22 CB 03 07 01 00 80
            Layer 8 [ 1:main 3.869] unknown addr 2.2.203
            Layer 6 [19:router/ConnC 3.869] sending, send_more clear
            Layer 1 [ 4:server/Server 3.870] Send(011): 29 00 BC D0 22 CB 03 07 01 00 80
            Layer 2 [21:router.pace_/router 3.870] out 1/2: delay for 0.017 sec
            Layer 6 [19:router/ConnC 3.870] still waiting
            Layer 6 [ 1:main 3.870] wait L
            Layer 0 [ 4:server/Server 3.871] Send(017): 06 10 05 30 00 11 29 00 BC D0 22 CB 03 07 01 00 80
            Layer 0 [ 4:server/Server 3.871] Dropped(017): 06 10 05 30 00 11 29 00 BC D0 22 CB 03 07 01 00 80
            Layer 2 [21:router.pace_/router 3.886] delay done
            Layer 6 [19:router/ConnC 3.887] sendNext called, send_more set
            Layer 6 [19:router/ConnC 3.887] is OK
            Layer 6 [ 9:A.tcp/inet 3.887] is OK
            Layer 6 [12:B.unix/local 3.887] is OK
            Layer 6 [ 4:server/Server 3.887] is OK
            Layer 6 [15:C.usb/Conn 3.887] is OK
            Layer 6 [ 1:main 3.887] OK
            Layer 6 [ 2:main/L 3.888] OK L
            Layer 0 [18:C.usb/usbL 4.869] RecvUSB(064): 01 13 13 00 08 00 0B 01 03 00 00 29 00 BC E0 22 CB 13 11 01 00 80 0B 03 14 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 0 [17:C.usb/Conv 4.869] RecvEMI(011): 29 00 BC E0 22 CB 13 11 01 00 80
            Layer 8 [15:C.usb/Conn 4.869] found addr 2.2.203
            Layer 6 [19:router/ConnC 4.869] sending, send_more clear
            Layer 1 [ 4:server/Server 4.869] Send(011): 29 00 BC D0 22 CB 13 11 01 00 80
            Layer 2 [21:router.pace_/router 4.869] out 1/2: delay for 0.017 sec
            Layer 6 [19:router/ConnC 4.869] still waiting
            Layer 6 [ 1:main 4.869] wait L
            Layer 0 [ 4:server/Server 4.870] Send(017): 06 10 05 30 00 11 29 00 BC D0 22 CB 13 11 01 00 80
            Layer 0 [ 4:server/Server 4.870] Dropped(017): 06 10 05 30 00 11 29 00 BC D0 22 CB 13 11 01 00 80
            Layer 2 [21:router.pace_/router 4.886] delay done
            Layer 6 [19:router/ConnC 4.886] sendNext called, send_more set
            Layer 6 [19:router/ConnC 4.886] is OK
            Layer 6 [ 9:A.tcp/inet 4.887] is OK
            Layer 6 [12:B.unix/local 4.887] is OK
            Layer 6 [ 4:server/Server 4.887] is OK
            Layer 6 [15:C.usb/Conn 4.887] is OK
            Layer 6 [ 1:main 4.887] OK
            Layer 6 [ 2:main/L 4.888] OK L
            Layer 0 [18:C.usb/usbL 5.877] RecvUSB(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 CB 13 0B 03 00 80 06 CC 19 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 0 [17:C.usb/Conv 5.877] RecvEMI(013): 29 00 BC E0 22 CB 13 0B 03 00 80 06 CC
            Layer 8 [15:C.usb/Conn 5.877] found addr 2.2.203
            Layer 6 [19:router/ConnC 5.877] sending, send_more clear
            Layer 1 [ 4:server/Server 5.878] Send(013): 29 00 BC D0 22 CB 13 0B 03 00 80 06 CC
            Layer 2 [21:router.pace_/router 5.878] out 1/4: delay for 0.019 sec
            Layer 6 [19:router/ConnC 5.878] still waiting
            Layer 6 [ 1:main 5.878] wait L
            Layer 0 [ 4:server/Server 5.878] Send(019): 06 10 05 30 00 13 29 00 BC D0 22 CB 13 0B 03 00 80 06 CC
            Layer 0 [ 4:server/Server 5.879] Dropped(019): 06 10 05 30 00 13 29 00 BC D0 22 CB 13 0B 03 00 80 06 CC
            Layer 2 [21:router.pace_/router 5.897] delay done
            Layer 6 [19:router/ConnC 5.897] sendNext called, send_more set
            Layer 6 [19:router/ConnC 5.897] is OK
            Layer 6 [ 9:A.tcp/inet 5.897] is OK
            Layer 6 [12:B.unix/local 5.897] is OK
            Layer 6 [ 4:server/Server 5.897] is OK
            Layer 6 [15:C.usb/Conn 5.897] is OK
            Layer 6 [ 1:main 5.897] OK
            Layer 6 [ 2:main/L 5.897] OK L
            Layer 0 [18:C.usb/usbL 5.909] RecvUSB(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 CB 0B 15 03 00 80 07 30 14 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 0 [17:C.usb/Conv 5.909] RecvEMI(013): 29 00 BC E0 22 CB 0B 15 03 00 80 07 30
            Layer 8 [15:C.usb/Conn 5.909] found addr 2.2.203
            Layer 6 [19:router/ConnC 5.909] sending, send_more clear
            Layer 1 [ 4:server/Server 5.909] Send(013): 29 00 BC D0 22 CB 0B 15 03 00 80 07 30
            Layer 2 [21:router.pace_/router 5.909] out 1/4: delay for 0.019 sec
            Layer 6 [19:router/ConnC 5.909] still waiting
            Layer 6 [ 1:main 5.909] wait L
            Layer 0 [ 4:server/Server 5.909] Send(019): 06 10 05 30 00 13 29 00 BC D0 22 CB 0B 15 03 00 80 07 30
            Layer 0 [ 4:server/Server 5.910] Dropped(019): 06 10 05 30 00 13 29 00 BC D0 22 CB 0B 15 03 00 80 07 30
            Layer 2 [21:router.pace_/router 5.928] delay done
            Layer 6 [19:router/ConnC 5.928] sendNext called, send_more set
            Layer 6 [19:router/ConnC 5.928] is OK
            Layer 6 [ 9:A.tcp/inet 5.928] is OK
            Layer 6 [12:B.unix/local 5.929] is OK
            Layer 6 [ 4:server/Server 5.929] is OK
            Layer 6 [15:C.usb/Conn 5.929] is OK
            Layer 6 [ 1:main 5.929] OK
            Layer 6 [ 2:main/L 5.929] OK L
            Layer 0 [18:C.usb/usbL 5.933] RecvUSB(064): 01 13 17 00 08 00 0F 01 03 00 00 29 00 BC E0 12 0B 04 04 05 00 80 C4 9D 00 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 0 [17:C.usb/Conv 5.933] RecvEMI(015): 29 00 BC E0 12 0B 04 04 05 00 80 C4 9D 00 00
            Layer 8 [ 1:main 5.933] unknown addr 1.2.11
            Layer 6 [19:router/ConnC 5.933] sending, send_more clear
            Layer 1 [ 4:server/Server 5.934] Send(015): 29 00 BC D0 12 0B 04 04 05 00 80 C4 9D 00 00
            Layer 2 [21:router.pace_/router 5.934] out 1/6: delay for 0.021 sec
            Layer 6 [19:router/ConnC 5.934] still waiting
            Layer 6 [ 1:main 5.934] wait L
            Layer 0 [ 4:server/Server 5.934] Send(021): 06 10 05 30 00 15 29 00 BC D0 12 0B 04 04 05 00 80 C4 9D 00 00
            Layer 0 [ 4:server/Server 5.935] Dropped(021): 06 10 05 30 00 15 29 00 BC D0 12 0B 04 04 05 00 80 C4 9D 00 00
            Layer 2 [21:router.pace_/router 5.954] delay done
            Layer 6 [19:router/ConnC 5.955] sendNext called, send_more set
            Layer 6 [19:router/ConnC 5.955] is OK
            Layer 6 [ 9:A.tcp/inet 5.955] is OK
            Layer 6 [12:B.unix/local 5.955] is OK
            Layer 6 [ 4:server/Server 5.955] is OK
            Layer 6 [15:C.usb/Conn 5.955] is OK
            Layer 6 [ 1:main 5.955] OK
            Layer 6 [ 2:main/L 5.955] OK L
            Layer 0 [18:C.usb/usbL 5.957] RecvUSB(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 CB 03 01 03 00 80 04 E2 14 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 0 [17:C.usb/Conv 5.957] RecvEMI(013): 29 00 BC E0 22 CB 03 01 03 00 80 04 E2
            Layer 8 [15:C.usb/Conn 5.957] found addr 2.2.203
            Layer 6 [19:router/ConnC 5.957] sending, send_more clear
            Layer 1 [ 4:server/Server 5.958] Send(013): 29 00 BC D0 22 CB 03 01 03 00 80 04 E2
            Layer 2 [21:router.pace_/router 5.958] out 1/4: delay for 0.019 sec
            Layer 6 [19:router/ConnC 5.958] still waiting
            Layer 6 [ 1:main 5.958] wait L
            Layer 0 [ 4:server/Server 5.958] Send(019): 06 10 05 30 00 13 29 00 BC D0 22 CB 03 01 03 00 80 04 E2
            Layer 0 [ 4:server/Server 5.959] Dropped(019): 06 10 05 30 00 13 29 00 BC D0 22 CB 03 01 03 00 80 04 E2
            Layer 2 [21:router.pace_/router 5.976] delay done
            Layer 6 [19:router/ConnC 5.977] sendNext called, send_more set
            Layer 6 [19:router/ConnC 5.977] is OK
            Layer 6 [ 9:A.tcp/inet 5.977] is OK
            Layer 6 [12:B.unix/local 5.977] is OK
            Layer 6 [ 4:server/Server 5.977] is OK
            Layer 6 [15:C.usb/Conn 5.977] is OK
            Layer 6 [ 1:main 5.977] OK
            Layer 6 [ 2:main/L 5.977] OK L
            Layer 0 [18:C.usb/usbL 5.985] RecvUSB(064): 01 13 17 00 08 00 0F 01 03 00 00 29 00 BC E0 12 0B 04 0E 05 00 80 43 D0 00 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 0 [17:C.usb/Conv 5.985] RecvEMI(015): 29 00 BC E0 12 0B 04 0E 05 00 80 43 D0 00 00
            Layer 8 [15:C.usb/Conn 5.985] found addr 1.2.11
            Layer 6 [19:router/ConnC 5.985] sending, send_more clear
            Layer 1 [ 4:server/Server 5.985] Send(015): 29 00 BC D0 12 0B 04 0E 05 00 80 43 D0 00 00
            Layer 2 [21:router.pace_/router 5.985] out 1/6: delay for 0.021 sec
            Layer 6 [19:router/ConnC 5.985] still waiting
            Layer 6 [ 1:main 5.985] wait L
            Layer 0 [ 4:server/Server 5.985] Send(021): 06 10 05 30 00 15 29 00 BC D0 12 0B 04 0E 05 00 80 43 D0 00 00
            Layer 0 [ 4:server/Server 5.986] Dropped(021): 06 10 05 30 00 15 29 00 BC D0 12 0B 04 0E 05 00 80 43 D0 00 00
            Layer 0 [18:C.usb/usbL 6.005] RecvUSB(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 CB 0B 29 03 00 80 07 D0 14 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 0 [17:C.usb/Conv 6.005] RecvEMI(013): 29 00 BC E0 22 CB 0B 29 03 00 80 07 D0
            Layer 8 [15:C.usb/Conn 6.005] found addr 2.2.203
            Layer 6 [ 1:main 6.005] wait L
            Layer 2 [21:router.pace_/router 6.006] delay done
            Layer 6 [19:router/ConnC 6.006] sendNext called, send_more set
            Layer 6 [19:router/ConnC 6.006] is OK
            Layer 6 [ 9:A.tcp/inet 6.006] is OK
            Layer 6 [12:B.unix/local 6.007] is OK
            Layer 6 [ 4:server/Server 6.007] is OK
            Layer 6 [15:C.usb/Conn 6.007] is OK
            Layer 6 [ 1:main 6.007] OK
            Layer 6 [ 2:main/L 6.007] OK L
            Layer 6 [19:router/ConnC 6.008] sending, send_more clear
            Layer 1 [ 4:server/Server 6.008] Send(013): 29 00 BC D0 22 CB 0B 29 03 00 80 07 D0
            Layer 2 [21:router.pace_/router 6.008] out 1/4: delay for 0.019 sec
            Layer 6 [19:router/ConnC 6.008] still waiting
            Layer 6 [ 1:main 6.008] wait L
            Layer 0 [ 4:server/Server 6.009] Send(019): 06 10 05 30 00 13 29 00 BC D0 22 CB 0B 29 03 00 80 07 D0
            Layer 0 [ 4:server/Server 6.009] Dropped(019): 06 10 05 30 00 13 29 00 BC D0 22 CB 0B 29 03 00 80 07 D0
            Layer 2 [21:router.pace_/router 6.027] delay done
            Layer 6 [19:router/ConnC 6.027] sendNext called, send_more set
            Layer 6 [19:router/ConnC 6.027] is OK
            Layer 6 [ 9:A.tcp/inet 6.027] is OK
            Layer 6 [12:B.unix/local 6.027] is OK
            Layer 6 [ 4:server/Server 6.027] is OK
            Layer 6 [15:C.usb/Conn 6.027] is OK
            Layer 6 [ 1:main 6.028] OK
            Layer 6 [ 2:main/L 6.028] OK L
            Layer 0 [18:C.usb/usbL 6.869] RecvUSB(064): 01 13 13 00 08 00 0B 01 03 00 00 29 00 BC E0 22 CB 0B 2F 01 00 80 43 D0 00 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 0 [17:C.usb/Conv 6.869] RecvEMI(011): 29 00 BC E0 22 CB 0B 2F 01 00 80
            Layer 8 [15:C.usb/Conn 6.869] found addr 2.2.203
            Layer 6 [19:router/ConnC 6.869] sending, send_more clear
            Layer 1 [ 4:server/Server 6.870] Send(011): 29 00 BC D0 22 CB 0B 2F 01 00 80
            Layer 2 [21:router.pace_/router 6.870] out 1/2: delay for 0.017 sec
            Layer 6 [19:router/ConnC 6.870] still waiting
            Layer 6 [ 1:main 6.870] wait L
            Layer 0 [ 4:server/Server 6.870] Send(017): 06 10 05 30 00 11 29 00 BC D0 22 CB 0B 2F 01 00 80
            Layer 0 [ 4:server/Server 6.871] Dropped(017): 06 10 05 30 00 11 29 00 BC D0 22 CB 0B 2F 01 00 80
            Layer 2 [21:router.pace_/router 6.887] delay done
            Layer 6 [19:router/ConnC 6.887] sendNext called, send_more set
            Layer 6 [19:router/ConnC 6.887] is OK
            Layer 6 [ 9:A.tcp/inet 6.887] is OK
            Layer 6 [12:B.unix/local 6.887] is OK
            Layer 6 [ 4:server/Server 6.887] is OK
            Layer 6 [15:C.usb/Conn 6.887] is OK
            Layer 6 [ 1:main 6.887] OK
            Layer 6 [ 2:main/L 6.887] OK L
            Layer 0 [18:C.usb/usbL 8.869] RecvUSB(064): 01 13 13 00 08 00 0B 01 03 00 00 29 00 BC E0 22 CB 0B 1B 01 00 80 07 D0 14 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 0 [17:C.usb/Conv 8.869] RecvEMI(011): 29 00 BC E0 22 CB 0B 1B 01 00 80
            Layer 8 [15:C.usb/Conn 8.869] found addr 2.2.203
            Layer 6 [19:router/ConnC 8.869] sending, send_more clear
            Layer 1 [ 4:server/Server 8.869] Send(011): 29 00 BC D0 22 CB 0B 1B 01 00 80
            Layer 2 [21:router.pace_/router 8.869] out 1/2: delay for 0.017 sec
            Layer 6 [19:router/ConnC 8.869] still waiting
            Layer 6 [ 1:main 8.869] wait L
            Layer 0 [ 4:server/Server 8.870] Send(017): 06 10 05 30 00 11 29 00 BC D0 22 CB 0B 1B 01 00 80
            Layer 0 [ 4:server/Server 8.870] Dropped(017): 06 10 05 30 00 11 29 00 BC D0 22 CB 0B 1B 01 00 80
            Layer 2 [21:router.pace_/router 8.886] delay done
            Layer 6 [19:router/ConnC 8.886] sendNext called, send_more set
            Layer 6 [19:router/ConnC 8.886] is OK
            Layer 6 [ 9:A.tcp/inet 8.887] is OK
            Layer 6 [12:B.unix/local 8.887] is OK
            Layer 6 [ 4:server/Server 8.887] is OK
            Layer 6 [15:C.usb/Conn 8.887] is OK
            Layer 6 [ 1:main 8.887] OK
            Layer 6 [ 2:main/L 8.888] OK L
            Layer 0 [18:C.usb/usbL 10.361] RecvUSB(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 C9 0B 33 03 00 80 05 F0 00 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 0 [17:C.usb/Conv 10.361] RecvEMI(013): 29 00 BC E0 22 C9 0B 33 03 00 80 05 F0
            Layer 8 [15:C.usb/Conn 10.361] found addr 2.2.201
            Layer 6 [19:router/ConnC 10.361] sending, send_more clear
            Layer 1 [ 4:server/Server 10.362] Send(013): 29 00 BC D0 22 C9 0B 33 03 00 80 05 F0
            Layer 2 [21:router.pace_/router 10.362] out 1/4: delay for 0.019 sec
            Layer 6 [19:router/ConnC 10.362] still waiting
            Layer 6 [ 1:main 10.363] wait L
            Layer 0 [ 4:server/Server 10.363] Send(019): 06 10 05 30 00 13 29 00 BC D0 22 C9 0B 33 03 00 80 05 F0
            Layer 0 [ 4:server/Server 10.363] Dropped(019): 06 10 05 30 00 13 29 00 BC D0 22 C9 0B 33 03 00 80 05 F0
            Layer 2 [21:router.pace_/router 10.381] delay done
            Layer 6 [19:router/ConnC 10.381] sendNext called, send_more set
            Layer 6 [19:router/ConnC 10.381] is OK
            Layer 6 [ 9:A.tcp/inet 10.381] is OK
            Layer 6 [12:B.unix/local 10.381] is OK
            Layer 6 [ 4:server/Server 10.381] is OK
            Layer 6 [15:C.usb/Conn 10.381] is OK
            Layer 6 [ 1:main 10.381] OK
            Layer 6 [ 2:main/L 10.382] OK L
            Layer 0 [18:C.usb/usbL 10.489] RecvUSB(064): 01 13 13 00 08 00 0B 01 03 00 00 29 00 BC E0 22 C9 0B 11 01 00 80 07 D0 14 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 0 [17:C.usb/Conv 10.489] RecvEMI(011): 29 00 BC E0 22 C9 0B 11 01 00 80
            Layer 8 [15:C.usb/Conn 10.489] found addr 2.2.201
            Layer 6 [19:router/ConnC 10.489] sending, send_more clear
            Layer 1 [ 4:server/Server 10.490] Send(011): 29 00 BC D0 22 C9 0B 11 01 00 80
            Layer 2 [21:router.pace_/router 10.490] out 1/2: delay for 0.017 sec
            Layer 6 [19:router/ConnC 10.490] still waiting
            Layer 6 [ 1:main 10.490] wait L
            Layer 0 [ 4:server/Server 10.490] Send(017): 06 10 05 30 00 11 29 00 BC D0 22 C9 0B 11 01 00 80
            Layer 0 [ 4:server/Server 10.491] Dropped(017): 06 10 05 30 00 11 29 00 BC D0 22 C9 0B 11 01 00 80
            Layer 2 [21:router.pace_/router 10.506] delay done
            Layer 6 [19:router/ConnC 10.507] sendNext called, send_more set
            Layer 6 [19:router/ConnC 10.507] is OK
            Layer 6 [ 9:A.tcp/inet 10.507] is OK
            Layer 6 [12:B.unix/local 10.507] is OK
            Layer 6 [ 4:server/Server 10.507] is OK
            Layer 6 [15:C.usb/Conn 10.507] is OK
            Layer 6 [ 1:main 10.507] OK
            Layer 6 [ 2:main/L 10.507] OK L
            Layer 0 [18:C.usb/usbL 13.305] RecvUSB(064): 01 13 13 00 08 00 0B 01 03 00 00 29 00 BC E0 22 C9 0B 39 01 00 80 05 F0 00 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 0 [17:C.usb/Conv 13.305] RecvEMI(011): 29 00 BC E0 22 C9 0B 39 01 00 80
            Layer 8 [15:C.usb/Conn 13.305] found addr 2.2.201
            Layer 6 [19:router/ConnC 13.305] sending, send_more clear
            Layer 1 [ 4:server/Server 13.305] Send(011): 29 00 BC D0 22 C9 0B 39 01 00 80
            Layer 2 [21:router.pace_/router 13.305] out 1/2: delay for 0.017 sec
            Layer 6 [19:router/ConnC 13.305] still waiting
            Layer 6 [ 1:main 13.305] wait L
            Layer 0 [ 4:server/Server 13.305] Send(017): 06 10 05 30 00 11 29 00 BC D0 22 C9 0B 39 01 00 80
            Layer 0 [ 4:server/Server 13.306] Dropped(017): 06 10 05 30 00 11 29 00 BC D0 22 C9 0B 39 01 00 80
            Layer 2 [21:router.pace_/router 13.322] delay done
            Layer 6 [19:router/ConnC 13.322] sendNext called, send_more set
            Layer 6 [19:router/ConnC 13.322] is OK
            Layer 6 [ 9:A.tcp/inet 13.322] is OK
            Layer 6 [12:B.unix/local 13.322] is OK
            Layer 6 [ 4:server/Server 13.322] is OK
            Layer 6 [15:C.usb/Conn 13.322] is OK
            Layer 6 [ 1:main 13.322] OK
            Layer 6 [ 2:main/L 13.323] OK L
            Layer 0 [18:C.usb/usbL 13.485] RecvUSB(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 C9 0B 0B 03 00 80 07 44 14 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 0 [17:C.usb/Conv 13.485] RecvEMI(013): 29 00 BC E0 22 C9 0B 0B 03 00 80 07 44
            Layer 8 [15:C.usb/Conn 13.485] found addr 2.2.201
            Layer 6 [19:router/ConnC 13.485] sending, send_more clear
            Layer 1 [ 4:server/Server 13.485] Send(013): 29 00 BC D0 22 C9 0B 0B 03 00 80 07 44
            Layer 2 [21:router.pace_/router 13.485] out 1/4: delay for 0.019 sec
            Layer 6 [19:router/ConnC 13.485] still waiting
            Layer 6 [ 1:main 13.485] wait L
            Layer 0 [ 4:server/Server 13.486] Send(019): 06 10 05 30 00 13 29 00 BC D0 22 C9 0B 0B 03 00 80 07 44
            Layer 0 [ 4:server/Server 13.486] Dropped(019): 06 10 05 30 00 13 29 00 BC D0 22 C9 0B 0B 03 00 80 07 44
            Layer 2 [21:router.pace_/router 13.504] delay done
            Layer 6 [19:router/ConnC 13.504] sendNext called, send_more set
            Layer 6 [19:router/ConnC 13.504] is OK
            Layer 6 [ 9:A.tcp/inet 13.504] is OK
            Layer 6 [12:B.unix/local 13.504] is OK
            Layer 6 [ 4:server/Server 13.504] is OK
            Layer 6 [15:C.usb/Conn 13.504] is OK
            Layer 6 [ 1:main 13.505] OK
            Layer 6 [ 2:main/L 13.505] OK L
            Layer 0 [18:C.usb/usbL 13.869] RecvUSB(064): 01 13 13 00 08 00 0B 01 03 00 00 29 00 BC E0 22 CB 03 07 01 00 80 05 F0 00 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 0 [17:C.usb/Conv 13.869] RecvEMI(011): 29 00 BC E0 22 CB 03 07 01 00 80
            Layer 8 [15:C.usb/Conn 13.869] found addr 2.2.203
            Layer 6 [19:router/ConnC 13.869] sending, send_more clear
            Layer 1 [ 4:server/Server 13.869] Send(011): 29 00 BC D0 22 CB 03 07 01 00 80
            Layer 2 [21:router.pace_/router 13.869] out 1/2: delay for 0.017 sec
            Layer 6 [19:router/ConnC 13.869] still waiting
            Layer 6 [ 1:main 13.869] wait L
            Layer 0 [ 4:server/Server 13.869] Send(017): 06 10 05 30 00 11 29 00 BC D0 22 CB 03 07 01 00 80
            Layer 0 [ 4:server/Server 13.870] Dropped(017): 06 10 05 30 00 11 29 00 BC D0 22 CB 03 07 01 00 80
            Layer 2 [21:router.pace_/router 13.886] delay done
            Layer 6 [19:router/ConnC 13.886] sendNext called, send_more set
            Layer 6 [19:router/ConnC 13.886] is OK
            Layer 6 [ 9:A.tcp/inet 13.886] is OK
            Layer 6 [12:B.unix/local 13.886] is OK
            Layer 6 [ 4:server/Server 13.886] is OK
            Layer 6 [15:C.usb/Conn 13.886] is OK
            Layer 6 [ 1:main 13.886] OK
            Layer 6 [ 2:main/L 13.887] OK L
            Layer 0 [18:C.usb/usbL 15.873] RecvUSB(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 CB 13 0B 03 00 80 06 CC 14 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 0 [17:C.usb/Conv 15.873] RecvEMI(013): 29 00 BC E0 22 CB 13 0B 03 00 80 06 CC
            Layer 8 [15:C.usb/Conn 15.873] found addr 2.2.203
            Layer 6 [19:router/ConnC 15.873] sending, send_more clear
            Layer 1 [ 4:server/Server 15.873] Send(013): 29 00 BC D0 22 CB 13 0B 03 00 80 06 CC
            Layer 2 [21:router.pace_/router 15.873] out 1/4: delay for 0.019 sec
            Layer 6 [19:router/ConnC 15.873] still waiting
            Layer 6 [ 1:main 15.873] wait L
            Layer 0 [ 4:server/Server 15.873] Send(019): 06 10 05 30 00 13 29 00 BC D0 22 CB 13 0B 03 00 80 06 CC
            Layer 0 [ 4:server/Server 15.874] Dropped(019): 06 10 05 30 00 13 29 00 BC D0 22 CB 13 0B 03 00 80 06 CC
            Layer 2 [21:router.pace_/router 15.892] delay done
            Layer 6 [19:router/ConnC 15.892] sendNext called, send_more set
            Layer 6 [19:router/ConnC 15.892] is OK
            Layer 6 [ 9:A.tcp/inet 15.893] is OK
            Layer 6 [12:B.unix/local 15.893] is OK
            Layer 6 [ 4:server/Server 15.893] is OK
            Layer 6 [15:C.usb/Conn 15.893] is OK
            Layer 6 [ 1:main 15.893] OK
            Layer 6 [ 2:main/L 15.893] OK L
            Layer 0 [18:C.usb/usbL 15.909] RecvUSB(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 CB 0B 15 03 00 80 07 30 00 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 0 [17:C.usb/Conv 15.909] RecvEMI(013): 29 00 BC E0 22 CB 0B 15 03 00 80 07 30
            Layer 8 [15:C.usb/Conn 15.909] found addr 2.2.203
            Layer 6 [19:router/ConnC 15.910] sending, send_more clear
            Layer 1 [ 4:server/Server 15.910] Send(013): 29 00 BC D0 22 CB 0B 15 03 00 80 07 30
            Layer 2 [21:router.pace_/router 15.910] out 1/4: delay for 0.019 sec
            Layer 6 [19:router/ConnC 15.910] still waiting
            Layer 6 [ 1:main 15.910] wait L
            Layer 0 [ 4:server/Server 15.911] Send(019): 06 10 05 30 00 13 29 00 BC D0 22 CB 0B 15 03 00 80 07 30
            Layer 0 [ 4:server/Server 15.911] Dropped(019): 06 10 05 30 00 13 29 00 BC D0 22 CB 0B 15 03 00 80 07 30
            Layer 2 [21:router.pace_/router 15.929] delay done
            Layer 6 [19:router/ConnC 15.929] sendNext called, send_more set
            Layer 6 [19:router/ConnC 15.929] is OK
            Layer 6 [ 9:A.tcp/inet 15.929] is OK
            Layer 6 [12:B.unix/local 15.929] is OK
            Layer 6 [ 4:server/Server 15.929] is OK
            Layer 6 [15:C.usb/Conn 15.929] is OK
            Layer 6 [ 1:main 15.929] OK
            Layer 6 [ 2:main/L 15.930] OK L
            Layer 0 [18:C.usb/usbL 15.933] RecvUSB(064): 01 13 17 00 08 00 0F 01 03 00 00 29 00 BC E0 12 0B 04 04 05 00 80 C4 74 00 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 0 [17:C.usb/Conv 15.933] RecvEMI(015): 29 00 BC E0 12 0B 04 04 05 00 80 C4 74 00 00
            Layer 8 [15:C.usb/Conn 15.933] found addr 1.2.11
            Layer 6 [19:router/ConnC 15.933] sending, send_more clear
            Layer 1 [ 4:server/Server 15.933] Send(015): 29 00 BC D0 12 0B 04 04 05 00 80 C4 74 00 00
            Layer 2 [21:router.pace_/router 15.934] out 1/6: delay for 0.021 sec
            Layer 6 [19:router/ConnC 15.934] still waiting
            Layer 6 [ 1:main 15.934] wait L
            Layer 0 [ 4:server/Server 15.934] Send(021): 06 10 05 30 00 15 29 00 BC D0 12 0B 04 04 05 00 80 C4 74 00 00
            Layer 0 [ 4:server/Server 15.935] Dropped(021): 06 10 05 30 00 15 29 00 BC D0 12 0B 04 04 05 00 80 C4 74 00 00
            Layer 2 [21:router.pace_/router 15.954] delay done
            Layer 6 [19:router/ConnC 15.954] sendNext called, send_more set
            Layer 6 [19:router/ConnC 15.955] is OK
            Layer 6 [ 9:A.tcp/inet 15.955] is OK
            Layer 6 [12:B.unix/local 15.955] is OK
            Layer 6 [ 4:server/Server 15.955] is OK
            Layer 6 [15:C.usb/Conn 15.955] is OK
            Layer 6 [ 1:main 15.955] OK
            Layer 6 [ 2:main/L 15.955] OK L
            Layer 0 [18:C.usb/usbL 15.957] RecvUSB(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 CB 03 01 03 00 80 04 EC 00 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 0 [17:C.usb/Conv 15.957] RecvEMI(013): 29 00 BC E0 22 CB 03 01 03 00 80 04 EC
            Layer 8 [15:C.usb/Conn 15.957] found addr 2.2.203
            Layer 6 [19:router/ConnC 15.957] sending, send_more clear
            Layer 1 [ 4:server/Server 15.957] Send(013): 29 00 BC D0 22 CB 03 01 03 00 80 04 EC
            Layer 2 [21:router.pace_/router 15.958] out 1/4: delay for 0.019 sec
            Layer 6 [19:router/ConnC 15.958] still waiting
            Layer 6 [ 1:main 15.958] wait L
            Layer 0 [ 4:server/Server 15.958] Send(019): 06 10 05 30 00 13 29 00 BC D0 22 CB 03 01 03 00 80 04 EC
            Layer 0 [ 4:server/Server 15.959] Dropped(019): 06 10 05 30 00 13 29 00 BC D0 22 CB 03 01 03 00 80 04 EC
            Layer 2 [21:router.pace_/router 15.976] delay done
            Layer 6 [19:router/ConnC 15.976] sendNext called, send_more set
            Layer 6 [19:router/ConnC 15.977] is OK
            Layer 6 [ 9:A.tcp/inet 15.977] is OK
            Layer 6 [12:B.unix/local 15.977] is OK
            Layer 6 [ 4:server/Server 15.977] is OK
            Layer 6 [15:C.usb/Conn 15.977] is OK
            Layer 6 [ 1:main 15.977] OK
            Layer 6 [ 2:main/L 15.977] OK L
            Layer 0 [18:C.usb/usbL 15.981] RecvUSB(064): 01 13 17 00 08 00 0F 01 03 00 00 29 00 BC E0 12 0B 04 0E 05 00 80 44 2E 00 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 0 [17:C.usb/Conv 15.981] RecvEMI(015): 29 00 BC E0 12 0B 04 0E 05 00 80 44 2E 00 00
            Layer 8 [15:C.usb/Conn 15.981] found addr 1.2.11
            Layer 6 [19:router/ConnC 15.981] sending, send_more clear
            Layer 1 [ 4:server/Server 15.981] Send(015): 29 00 BC D0 12 0B 04 0E 05 00 80 44 2E 00 00
            Layer 2 [21:router.pace_/router 15.982] out 1/6: delay for 0.021 sec
            Layer 6 [19:router/ConnC 15.982] still waiting
            Layer 6 [ 1:main 15.982] wait L
            Layer 0 [ 4:server/Server 15.982] Send(021): 06 10 05 30 00 15 29 00 BC D0 12 0B 04 0E 05 00 80 44 2E 00 00
            Layer 0 [ 4:server/Server 15.983] Dropped(021): 06 10 05 30 00 15 29 00 BC D0 12 0B 04 0E 05 00 80 44 2E 00 00
            Layer 2 [21:router.pace_/router 16.002] delay done
            Layer 6 [19:router/ConnC 16.002] sendNext called, send_more set
            Layer 6 [19:router/ConnC 16.002] is OK
            Layer 6 [ 9:A.tcp/inet 16.003] is OK
            Layer 6 [12:B.unix/local 16.003] is OK
            Layer 6 [ 4:server/Server 16.003] is OK
            Layer 6 [15:C.usb/Conn 16.003] is OK
            Layer 6 [ 1:main 16.003] OK
            Layer 6 [ 2:main/L 16.003] OK L
            Layer 0 [18:C.usb/usbL 16.005] RecvUSB(064): 01 13 15 00 08 00 0D 01 03 00 00 29 00 BC E0 22 CB 0B 29 03 00 80 07 D0 00 00 6A 86 74 5D 4D FA 37 FF 99 97 F7 EF 2F D7 8B 1D 5C 29 FD 2B 03 B9 4F 68 F7 D5 7B BD 05 48 D8 69 C6 B6 FF FC 16 79
            Layer 0 [17:C.usb/Conv 16.005] RecvEMI(013): 29 00 BC E0 22 CB 0B 29 03 00 80 07 D0
            Layer 8 [15:C.usb/Conn 16.005] found addr 2.2.203
            Layer 6 [19:router/ConnC 16.005] sending, send_more clear
            Layer 1 [ 4:server/Server 16.005] Send(013): 29 00 BC D0 22 CB 0B 29 03 00 80 07 D0
            Layer 2 [21:router.pace_/router 16.006] out 1/4: delay for 0.019 sec
            Layer 6 [19:router/ConnC 16.006] still waiting
            Layer 6 [ 1:main 16.006] wait L
            Layer 0 [ 4:server/Server 16.006] Send(019): 06 10 05 30 00 13 29 00 BC D0 22 CB 0B 29 03 00 80 07 D0
            Layer 0 [ 4:server/Server 16.007] Dropped(019): 06 10 05 30 00 13 29 00 BC D0 22 CB 0B 29 03 00 80 07 D0
            Layer 2 [21:router.pace_/router 16.024] delay done
            Layer 6 [19:router/ConnC 16.024] sendNext called, send_more set
            Layer 6 [19:router/ConnC 16.025] is OK
            Layer 6 [ 9:A.tcp/inet 16.025] is OK
            Layer 6 [12:B.unix/local 16.025] is OK
            Layer 6 [ 4:server/Server 16.025] is OK
            Layer 6 [15:C.usb/Conn 16.025] is OK
            Layer 6 [ 1:main 16.025] OK
            Layer 6 [ 2:main/L 16.026] OK L
            Layer 0 [18:C.usb/usbL 16.865] RecvUSB(064): 01 13 13 00 08 00 0B 01 03 00 00 29 00 BC E0 22 CB 0B 2F 01 00 80 44 2E 00 00 D9 C4 AC 99 78 6E AF A6 60 74 39 5B 59 AD B1 5E 94 BB D1 FC 71 B5 DD 5B E3 9E 35 F0 9E F0 49 D2 AE 20 C8 FB F9 B7
            Layer 0 [17:C.usb/Conv 16.865] RecvEMI(011): 29 00 BC E0 22 CB 0B 2F 01 00 80
            Layer 8 [15:C.usb/Conn 16.865] found addr 2.2.203
            Layer 6 [19:router/ConnC 16.865] sending, send_more clear
            Layer 1 [ 4:server/Server 16.866] Send(011): 29 00 BC D0 22 CB 0B 2F 01 00 80
            Layer 2 [21:router.pace_/router 16.866] out 1/2: delay for 0.017 sec
            Layer 6 [19:router/ConnC 16.866] still waiting
            Layer 6 [ 1:main 16.866] wait L
            Layer 0 [ 4:server/Server 16.867] Send(017): 06 10 05 30 00 11 29 00 BC D0 22 CB 0B 2F 01 00 80
            Layer 0 [ 4:server/Server 16.867] Dropped(017): 06 10 05 30 00 11 29 00 BC D0 22 CB 0B 2F 01 00 80
            Layer 2 [21:router.pace_/router 16.882] delay done
            Layer 6 [19:router/ConnC 16.883] sendNext called, send_more set
            Layer 6 [19:router/ConnC 16.883] is OK
            Layer 6 [ 9:A.tcp/inet 16.883] is OK
            Layer 6 [12:B.unix/local 16.883] is OK
            Layer 6 [ 4:server/Server 16.883] is OK
            Layer 6 [15:C.usb/Conn 16.883] is OK
            Layer 6 [ 1:main 16.883] OK
            Layer 6 [ 2:main/L 16.884] OK L
            ^CLayer 4 [ 1:main 17.693] trigger Going down
            Layer 4 [19:router/ConnC 17.693] Stopping
            Layer 5 [19:router/ConnC 17.693] up => >down
            Layer 5 [19:router/ConnC 17.693] Stopping
            Layer 5 [19:router/ConnC 17.693] >down => down
            Layer 4 [19:router/ConnC 17.693] down
            Layer 4 [19:router/ConnC 17.693] down
            Layer 4 [ 9:A.tcp/inet 17.693] Stopping
            Layer 5 [ 9:A.tcp/inet 17.693] up => >down
            Layer 8 [ 9:A.tcp/inet 17.693] StopServer
            Layer 5 [ 9:A.tcp/inet 17.693] >down => down
            Layer 4 [ 9:A.tcp/inet 17.693] down
            Layer 4 [ 9:A.tcp/inet 17.693] down
            Layer 4 [12:B.unix/local 17.694] Stopping
            Layer 5 [12:B.unix/local 17.694] up => >down
            Layer 8 [12:B.unix/local 17.694] StopServer
            Layer 5 [12:B.unix/local 17.694] >down => down
            Layer 4 [12:B.unix/local 17.694] down
            Layer 4 [12:B.unix/local 17.694] down
            Layer 4 [ 4:server/Server 17.694] Stopping
            Layer 5 [ 4:server/Server 17.694] up => >down
            Layer 5 [19:router/ConnC 17.694] Stopping
            Layer 3 [19:router/ConnC 17.694] unregisterLink: router_19
            Layer 0 [ 4:server/Server 17.694] Close
            Layer 5 [ 4:server/Server 17.695] >down => down
            Layer 4 [ 4:server/Server 17.695] down
            Layer 4 [ 4:server/Server 17.695] down
            Layer 4 [15:C.usb/Conn 17.695] Stopping
            Layer 5 [15:C.usb/Conn 17.695] up => >down
            Layer 5 [15:C.usb/Conn 17.695] Stopping
            Layer 2 [22:C.usb/CEMI 17.695] CloseL2
            Layer 5 [15:C.usb/Conn 17.695] >down => down
            Layer 4 [15:C.usb/Conn 17.695] down
            Layer 4 [15:C.usb/Conn 17.695] down
            Layer 4 [ 1:main 17.695] check start
            Layer 8 [20:router/driver 17.695] CloseD
            Layer 4 [ 9:A.tcp/inet 17.695] is down
            Layer 4 [12:B.unix/local 17.696] is down
            Layer 4 [ 4:server/Server 17.696] is down
            Layer 4 [15:C.usb/Conn 17.696] is down
            Layer 4 [ 1:main 17.696] check end: want_up 0 some 1>0 all 0>0, going 0 up 0 down 4
            Layer 4 [ 1:main 17.696] down
            Layer 4 [ 1:main 17.696] deleting
            Layer 8 [ 9:A.tcp/inet 17.696] StopServer
            Layer 8 [12:B.unix/local 17.696] StopServer
            Layer 8 [ 4:server/Server 17.696] Close
            Layer 1 [18:C.usb/usbL 17.696] Close
            Layer 1 [18:C.usb/usbL 17.697] Release
            Layer 4 [ 1:main 17.705] deleted.

          13. Hi Silvio,

            seems knxd is talking with your USB device.

            Keep in mind the permissions set my chmod in the /sys tree are lost during the next reboot. You have to insert a device rule for 28c2:0002 in /etc/udev/rules.d/90-knxusb-devices.rules.

            Michael

          14. Hi Michael,
            I checked now and found that in the etc/udev/rules.d/90-knxusb-devices.rules file there are no data of my USB interface even if I am convinced I have entered them, having learned also the commands of the nano editor 🙁
            Anyway now I have fixed that file too, thanks to you.

            But I still get that message from before

            [13:33:47] openhabian@openHABianPi:~$ systemctl status knxd
            * knxd.service – KNX Daemon
            Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
            Active: failed (Result: resources) since Wed 2020-03-11 10:50:07 CET; 2h 43min ago
            Process: 574 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)

            mar 11 10:50:07 openHABianPi systemd[1]: Starting KNX Daemon…
            mar 11 10:50:07 openHABianPi systemd[1]: knxd.service: PID file /run/knxd/knxd.pid not readable (yet?) after start: No such
            mar 11 10:50:07 openHABianPi systemd[1]: knxd.service: Daemon never wrote its PID file. Failing.
            mar 11 10:50:07 openHABianPi systemd[1]: Failed to start KNX Daemon.
            mar 11 10:50:07 openHABianPi systemd[1]: knxd.service: Unit entered failed state.
            mar 11 10:50:07 openHABianPi systemd[1]: knxd.service: Failed with result ‘resources’.

            Do you think that a solution to this should be found, or is it not so important?

          15. Hi Silvio,

            check if the permissions on the device are set correctly by udevd

            ls -l /dev/bus/usb/001/004
            

            if the owner and group is knxd try to start knxd again from command line

            sudo su knxd -s /bin/bash
            knxd -t 1023 --eibaddr=1.1.128 --client-addrs=1.1.129:8 -p /run/knxd/knxd.pid  -D -T -R -S -i --listen-local=/tmp/knx -t 1023 -b usb:
            

            Michael

          16. [16:30:02] openhabian@openHABianPi:/run/knxd$ ls -l /dev/bus/usb/001/004
            crwxrwxrwx 1 root root 189, 3 mar 11 13:28 /dev/bus/usb/001/004

            [16:31:19] knxd@openHABianPi:/run/knxd$ knxd -t 1023 –eibaddr=1.1.128 –client-addrs=1.1.129:8 -p /run/knxd/knxd.pid -D -T -R -S -i –listen-local=/tmp/knx -t 1023 -b usb:
            Layer 4 [ 1:main 0.000] initialized
            Layer 4 [ 1:main 0.000] setting up
            Layer 3 [ 4:server/Server 0.000] registerLink: 4:server
            Layer 3 [ 9:A.tcp/inet 0.000] registerLink: 9:A.tcp
            Layer 3 [12:B.unix/local 0.001] registerLink: 12:B.unix
            Layer 1 [18:C.usb/usbL 0.013] Detect
            Layer 1 [18:C.usb/usbL 0.013] Using 1:4:1:0:0 (1:130)

          17. Hi Silvio,

            there are still set full permissions for root.
            Have you not rebooted the system?

            Michael

    1. Hi Silvio,

      open /etc/default/knxd and add
      -t 1023
      in front of –eibaddr=1.1.128 and in front of -b like the start at command line. Then trigger a reboot

      sudo reboot

      then check permissions on /dev/bus/usb/001/004 and the state of knxd.

      Michael

      1. Hi Michael,

        /etc/default/knxd now is:

        # Command line parameters for knxd. TPUART Backend
        # Serial device Raspberry
        # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyAMA0″
        # Serial device PC
        # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b tpuarts:/dev/ttyS0″
        # Tunnel Backend
        # KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b ipt:192.168.56.1″
        # USB Backend
        KNXD_OPTIONS=”-t 1023 –eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -t 1023 -b usb:”
        …after reboot

        [17:24:26] openhabian@openHABianPi:~$ ls -l /dev/bus/usb/001/004
        crw-rw-r– 1 root root 189, 3 mar 11 17:23 /dev/bus/usb/001/004

        Silvio

      2. [17:24:40] openhabian@openHABianPi:~$ systemctl status knxd
        * knxd.service – KNX Daemon
        Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
        Active: failed (Result: resources) since Wed 2020-03-11 17:24:06 CET; 3min 46s ago
        Process: 545 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)

        mar 11 17:24:06 openHABianPi systemd[1]: Starting KNX Daemon…
        mar 11 17:24:06 openHABianPi systemd[1]: knxd.service: PID file /run/knxd/knxd.pid not readable (yet?) after start: No such file
        mar 11 17:24:06 openHABianPi systemd[1]: knxd.service: Daemon never wrote its PID file. Failing.
        mar 11 17:24:06 openHABianPi systemd[1]: Failed to start KNX Daemon.
        mar 11 17:24:06 openHABianPi systemd[1]: knxd.service: Unit entered failed state.
        mar 11 17:24:06 openHABianPi systemd[1]: knxd.service: Failed with result ‘resources’.

          1. Hi Michael,

            this is what I see:

            [08:13:23] openhabian@openHABianPi:~$ journalctl -xu knxd.service
            — Logs begin at Thu 2016-11-03 18:16:42 CET, end at Thu 2020-03-12 08:13:19 CET. —
            mar 03 12:19:11 openHABianPi systemd[1]: Starting KNX Daemon…
            — Subject: L’unità knxd.service inizia la fase di avvio
            — Defined-By: systemd
            — Support: HERE LINK TO DEBIAN SUPPORT WEBSITE

            — L’unità knxd.service ha iniziato la fase di avvio.
            mar 03 12:19:11 openHABianPi systemd[1]: knxd.service: PID file /run/knxd/knxd.pid not readable (yet?) after start: No such file
            mar 03 12:19:11 openHABianPi systemd[1]: knxd.service: Daemon never wrote its PID file. Failing.
            mar 03 12:19:11 openHABianPi systemd[1]: Failed to start KNX Daemon.
            — Subject: L’unità knxd.service è fallita
            — Defined-By: systemd
            — Support: HERE LINK TO DEBIAN SUPPORT WEBSITE

            — L’unità knxd.service è fallita.

            — Il risultato è failed.
            mar 03 12:19:11 openHABianPi systemd[1]: knxd.service: Unit entered failed state.
            mar 03 12:19:11 openHABianPi systemd[1]: knxd.service: Failed with result ‘resources’.
            — Reboot —
            mar 03 13:05:28 openHABianPi systemd[1]: Starting KNX Daemon…
            — Subject: L’unità knxd.service inizia la fase di avvio
            — Defined-By: systemd

            silvio.
            ps
            I don’t understand how to insert the text in a box like you do (I replaced the link to be able to send this message)

          2. Hi Silvio,

            due to spam protection you cannot insert a link in a comment.

            But these are old entries:

            mar 03 12:19:11 openHABianPi systemd[1]: knxd.service: Unit entered failed state.
            mar 03 12:19:11 openHABianPi systemd[1]: knxd.service: Failed with result ‘resources’.

            Scroll down (by pressing space key) to the end of the output and post the last start attempt.

            Michael

          3. Hi Michael,

            there are the last lines:

            — L’unità knxd.service ha iniziato la fase di avvio.
            mar 03 13:40:35 openHABianPi systemd[1]: knxd.service: PID file /run/knxd/knxd.pid not readable (yet?) after start: No such file
            mar 03 13:40:35 openHABianPi systemd[1]: Started KNX Daemon.
            — Subject: L’unità knxd.service termina la fase di avvio
            — Defined-By: systemd
            — Support: xxxxxx
            — L’unità knxd.service ha terminato la fase di avvio.

            — La fase di avvio è done.
            mar 03 13:40:35 openHABianPi systemd[1]: knxd.service: Main process exited, code=exited, status=1/FAILURE
            mar 03 13:40:35 openHABianPi systemd[1]: knxd.service: Unit entered failed state.
            mar 03 13:40:35 openHABianPi systemd[1]: knxd.service: Failed with result ‘exit-code’.
            — Reboot —
            mar 03 13:47:44 openHABianPi systemd[1]: Starting KNX Daemon…
            — Subject: L’unità knxd.service inizia la fase di avvio
            — Defined-By: systemd
            — Support: xxxxxx

            — L’unità knxd.service ha iniziato la fase di avvio.
            mar 03 13:47:44 openHABianPi systemd[1]: knxd.service: PID file /run/knxd/knxd.pid not readable (yet?) after start: No such file
            mar 03 13:47:44 openHABianPi systemd[1]: Started KNX Daemon.
            — Subject: L’unità knxd.service termina la fase di avvio
            — Defined-By: systemd
            …skipping…

            — Il risultato è failed.
            mar 11 17:16:08 openHABianPi systemd[1]: knxd.service: Unit entered failed state.
            mar 11 17:16:08 openHABianPi systemd[1]: knxd.service: Failed with result ‘resources’.
            — Reboot —
            mar 11 17:24:06 openHABianPi systemd[1]: Starting KNX Daemon…
            — Subject: L’unità knxd.service inizia la fase di avvio
            — Defined-By: systemd
            — Support: xxxxx

            — L’unità knxd.service ha iniziato la fase di avvio.
            mar 11 17:24:06 openHABianPi systemd[1]: knxd.service: PID file /run/knxd/knxd.pid not readable (yet?) after start: No such file
            mar 11 17:24:06 openHABianPi systemd[1]: knxd.service: Daemon never wrote its PID file. Failing.
            mar 11 17:24:06 openHABianPi systemd[1]: Failed to start KNX Daemon.
            — Subject: L’unità knxd.service è fallita
            — Defined-By: systemd
            — Support: xxxxx

            — L’unità knxd.service è fallita.

            — Il risultato è failed.
            mar 11 17:24:06 openHABianPi systemd[1]: knxd.service: Unit entered failed state.
            mar 11 17:24:06 openHABianPi systemd[1]: knxd.service: Failed with result ‘resources’.

          4. mar 11 17:24:06 was the last try to start knxd with systemd

            systemctl start knxd
            

            ?

            Michael

          5. Ok, troubleshooting via comments is quite difficult. Is it possible to access your system via ssh from the internet? Then we can share a terminal session with tmux.

            Michael

          6. Of course no problem, but I don’t know how.
            Consider that my internet access is behind the CGNAT ;-(
            But if you explain to me what can be done I will gladly try.

            silvio

  125. Hi Michael,

    The script stopped as follows;

    Cloning into ‘knxd’…
    remote: Enumerating objects: 38, done.
    remote: Counting objects: 100% (38/38), done.
    remote: Compressing objects: 100% (28/28), done.
    remote: Total 13091 (delta 13), reused 22 (delta 10), pack-reused 13053
    Receiving objects: 100% (13091/13091), 3.50 MiB | 3.50 MiB/s, done.
    Resolving deltas: 100% (10048/10048), done.
    Already on ‘master’
    Your branch is up to date with ‘origin/master’.
    patching file src/libserver/emi_common.cpp
    Hunk #1 FAILED at 60.
    1 out of 1 hunk FAILED — saving rejects to file src/libserver/emi_common.cpp.rej
    patching file tools/version.sh
    Hunk #1 FAILED at 5.
    1 out of 1 hunk FAILED — saving rejects to file tools/version.sh.rej

    Is this ok? It seems there is a problem.

    — Pi Model 3B V1.2 — On latest version of raspian image 2020-02-13-raspbian-buster-full.zip – Running as root.

      1. Dear Michael;
        Thanks for a quick response. The script completed successfully selecting “no” to the patch.

        Just to describe my situation in more detail. I have tested with my laptop and when I connect with ETS I can successfully monitor and read telegrams from the bus. So the topology is working with ETS. Now I am trying to read/control using Raspberry Pi. I have read many other posts that point to the fact that some USB devices are not working, but I have not been able to understand if this is still a case or it has been solved. If not I would like to take part in trying to solve it.

        My topology:
        1- Weinzierl KNX USB Interface 312 – http://www.weinzierl.de/index.php/en/all-knx/knx-devices-en/knx-usb-interface-312-en (I also have 332 I can also try with that)
        2- Raspberry Pi Model 3B V1.2 (I also have other raspberry (1,2,3,4, Zero) models and can also try them)
        3- Raspian Buster Full version – 2020-02-13, kernel 4.19.
        4- Sandisk Ultra 16GB Class 10 A1.
        4- Raspberry Connected to the USB interface with a classic USB Printer cable. (Type A to type B). Same cable I use to connect to laptop and ETS.
        5- I have HAGER products in the KNX system.

        Now, after your suggestion I decided to do a clean start.

        1- Flashed with a clean Raspian Buster.
        2- Boot up and connected with SSH.
        3- Raspi-Config
        a) Changed default pi password
        b) Changed hostname
        c) Changed boot to console
        d) Enabled SSH
        e) Enabled Serial
        f) Expand Filesystem
        4- Reboot
        —- From this point on everything has been run with root.
        5- apt-get update && apt-get upgrade
        6- rpi-update
        7- Reboot
        8- Static IP configuration as per your instructions above.
        9- Network configurations as per your instructions above.
        10- Reboot
        11- ping -c 2 http://www.heise.de —SUCCESS
        12- ./install_knxd_systemd.sh — (Would you like to apply patch NO) — SUCCESS
        13- /etc/default/knxd
        KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:”
        14- Reboot

        Everything seems to running OK.

        root@hostknx:~# lsusb
        Bus 001 Device 004: ID 0e77:0104
        Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
        Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
        Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
        root@hostknx:~# findknxusb
        Possible addresses for KNX USB devices:
        device: 1:4:1:0:0 (Weinzierl Engineering GmbH:KNX-USB Interface)
        root@hostknx:~# ls -l /usr/local/bin
        total 18988
        -rwxr-xr-x 1 root root 25860 Apr 12 19:57 findknxusb
        -rwxr-xr-x 1 root root 19325292 Apr 12 19:57 knxd
        -rwxr-xr-x 1 root root 84732 Apr 12 19:57 knxtool
        root@hostknx:~# ls -l /etc/systemd/system/multi-user.target.wants/knxd.service
        lrwxrwxrwx 1 root root 32 Apr 12 19:57 /etc/systemd/system/multi-user.target.wants/knxd.service -> /lib/systemd/system/knxd.service
        root@hostknx:~# ps ax|grep knxd
        391 ? Ssl 0:00 /usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:
        484 pts/0 S+ 0:00 grep knxd

        PROBLEM: I am not able to observe any packets on the bus. I tried all the busmonitor commands. (I trigger some lights from my mobile app, in the same test I see packets in ETS)

        knxtool busmonitor1 ip:localhost —-> No packets received
        knxtool busmonitor2 ip:localhost —-> No packets received
        knxtool busmonitor3 ip:localhost —-> No packets received
        knxtool vbusmonitor1 ip:localhost —-> No packets received
        knxtool vbusmonitor2 ip:localhost —-> No packets received
        knxtool vbusmonitor3 ip:localhost —-> No packets received

        TEST: I tried to test with running manually. USING 3 Terminals.

        TERMINAL 1:
        systemctl stop knxd.service
        killall knxd
        su knxd -s /bin/sh
        knxd -t 1023 –eibaddr=1.1.128 –client-addrs=1.1.129:8 -D -T -R -S -i –listen-local=/tmp/knx -t 1023 -b usb:
        …..
        Layer 0 [22:C.usb/usbL 0.029] StartSend 5e9190
        Layer 0 [21:C.usb/Conv 0.030] send_Local done
        Layer 2 [27:C.usb/CEMI 0.030] OpenL2
        Layer 5 [19:C.usb/Conn 0.030] >up => up
        Layer 4 [19:C.usb/Conn 0.030] link state changed: up
        Layer 5 [19:C.usb/Conn 0.030] Started
        Layer 4 [ 1:main 0.030] check start
        Layer 4 [ 1:main 0.030] check end: want_up 1 some 1>1 all 0>1, going 0 up 5 down 0
        Layer 4 [ 1:main 0.030] all drivers up
        Layer 4 [ 1:main 0.030] up

        —>> after running command knxtool vbusmonitor1 ip:localhost from TERMINAL 2

        Layer 8 [11:A.tcp/inet 121.280] New Connection
        Layer 8 [28:A.tcp/CConn 121.280] ClientConnection Init
        Layer 3 [28:A.tcp/CConn 121.280] Allocate 1.1.129
        Layer 0 [28:A.tcp/CConn 121.281] ReadMessage(002): 00 13
        Layer 7 [30:A.tcp/BusMon 121.281] Open A_Busmonitor
        Layer 0 [28:A.tcp/CConn 121.281] Send(002): 00 13
        Layer 3 [ 1:main 121.281] registerVBusmonitor

        —>>after running command knxtool groupswrite ip:localhost 0/0/2 1 from TERMINAL 3
        Layer 8 [11:A.tcp/inet 351.042] New Connection
        Layer 8 [31:A.tcp/CConn 351.042] ClientConnection Init
        Layer 3 [31:A.tcp/CConn 351.042] Allocate 1.1.130
        Layer 0 [31:A.tcp/CConn 351.043] ReadMessage(005): 00 22 00 02 FF
        Layer 7 [32:A.tcp@1.1.130/Group 351.043] OpenGroup
        Layer 4 [34:A.tcp/TGr 351.043] OpenGroup 0/0/2 WO
        Layer 0 [31:A.tcp/CConn 351.043] Send(002): 00 22
        Layer 7 [32:A.tcp@1.1.130/Group 351.043] OpenGroup complete
        Layer 3 [33:A.tcp/ConnS 351.043] registerLink: 33:A.tcp_33
        Layer 3 [33:A.tcp/ConnS 351.043] Start: cfg:A.tcp
        Layer 5 [33:A.tcp/ConnS 351.043] down => >up
        Layer 5 [33:A.tcp/ConnS 351.043] Starting
        Layer 5 [33:A.tcp/ConnS 351.043] >up => up
        Layer 4 [33:A.tcp/ConnS 351.043] link state changed: up
        Layer 5 [33:A.tcp/ConnS 351.043] Started
        Layer 4 [33:A.tcp/ConnS 351.043] link state changed: up
        Layer 4 [ 1:main 351.043] check start
        Layer 4 [ 1:main 351.043] check end: want_up 1 some 1>1 all 0>1, going 0 up 5 down 0
        Layer 0 [31:A.tcp/CConn 351.044] ReadMessage(004): 00 25 00 81
        Layer 7 [31:A.tcp/CConn 351.044] recv Group(002): 00 81
        Layer 4 [34:A.tcp/TGr 351.044] Recv Group T_Data_Group A_GroupValue_Write (small) 01
        Layer 8 [33:A.tcp/ConnS 351.044] found addr 1.1.130
        Layer 0 [28:A.tcp/CConn 351.044] Send(126): 00 14 4C 5F 42 75 73 6D 6F 6E 3A 20 42 43 20 31 31 20 38 32 20 30 30 20 30 32 20 45 31 20 30 30 20 38 31 20 42 32 20 3A 4C 5F 44 61 74 61 20 6C 6F 77 20 66 72 6F 6D 20 31 2E 31 2E 31 33 30 20 74 6F 20 30 2F 30 2F 32 20 68 6F 70 73 3A 20 30 36 20 54 5F 44 61 74 61 5F 47 72 6F 75 70 20 41 5F 47 72 6F 75 70 56 61 6C 75 65 5F 57 72 69 74 65 20 28 73 6D 61 6C 6C 29 20 30 31 20 00
        Layer 6 [24:router/ConnC 351.044] sending, send_more clear
        Layer 1 [ 4:server/Server 351.044] Send(011): 29 00 BC D0 11 82 00 02 01 00 81
        Layer 2 [26:router.pace_/router 351.044] out 1/2: delay for 0.017 sec
        Layer 6 [19:C.usb/Conn 351.044] sending, send_more clear
        Layer 0 [21:C.usb/Conv 351.044] Send-EMI(011): 11 00 BC D0 11 82 00 02 01 00 81
        Layer 0 [22:C.usb/usbL 351.045] SendUSB(064): 01 13 13 00 08 00 0B 01 03 00 00 11 00 BC D0 11 82 00 02 01 00 81 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
        Layer 0 [22:C.usb/usbL 351.045] StartSend 5e5e60
        Layer 6 [24:router/ConnC 351.045] still waiting
        Layer 6 [ 1:main 351.045] wait L
        Layer 8 [31:A.tcp/CConn 351.045] ClientConnection 1.1.130 closing
        Layer 3 [ 1:main 351.045] Release 1.1.130
        Layer 3 [33:A.tcp/ConnS 351.045] unregisterLink: A.tcp_33
        Layer 8 [31:A.tcp/CConn 351.045] Exiting
        Layer 7 [31:A.tcp/CConn 351.045] CloseGroup
        Layer 4 [34:A.tcp/TGr 351.045] CloseGroup
        Layer 4 [ 1:main 351.046] check start
        Layer 4 [ 1:main 351.046] check end: want_up 1 some 1>1 all 1>1, going 0 up 5 down 0
        Layer 0 [ 4:server/Server 351.046] Send(017): 06 10 05 30 00 11 29 00 BC D0 11 82 00 02 01 00 81
        Layer 0 [ 4:server/Server 351.046] Dropped(017): 06 10 05 30 00 11 29 00 BC D0 11 82 00 02 01 00 81
        Layer 2 [26:router.pace_/router 351.061] delay done
        Layer 6 [24:router/ConnC 351.061] sendNext called, send_more set
        Layer 6 [24:router/ConnC 351.061] is OK
        Layer 6 [19:C.usb/Conn 351.061] still waiting
        Layer 1 [27:C.usb/CEMI 353.046] No confirm, repeating
        Layer 0 [21:C.usb/Conv 353.046] Send-EMI(011): 11 00 BC D0 11 82 00 02 01 00 81
        Layer 0 [22:C.usb/usbL 353.046] SendUSB(064): 01 13 13 00 08 00 0B 01 03 00 00 11 00 BC D0 11 82 00 02 01 00 81 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
        Layer 0 [22:C.usb/usbL 353.046] StartSend 5e8040
        Layer 1 [27:C.usb/CEMI 355.048] No confirm, repeating
        Layer 0 [21:C.usb/Conv 355.048] Send-EMI(011): 11 00 BC D0 11 82 00 02 01 00 81
        Layer 0 [22:C.usb/usbL 355.048] SendUSB(064): 01 13 13 00 08 00 0B 01 03 00 00 11 00 BC D0 11 82 00 02 01 00 81 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
        Layer 0 [22:C.usb/usbL 355.048] StartSend 5d25b0
        Layer 2 [27:C.usb/CEMI 356.045] CloseL2
        Layer 1 [22:C.usb/usbL 356.045] Close G
        Layer 1 [22:C.usb/usbL 356.045] Close G
        Layer 6 [19:C.usb/Conn 356.045] sendNext called, send_more set
        Layer 6 [24:router/ConnC 356.045] is OK
        Layer 6 [19:C.usb/Conn 356.045] is OK
        Layer 6 [15:B.unix/local 356.045] is OK
        Layer 6 [ 4:server/Server 356.045] is OK
        Layer 6 [11:A.tcp/inet 356.045] is OK
        Layer 6 [ 1:main 356.045] OK
        Layer 6 [ 2:main/L 356.045] OK L
        Layer 5 [19:C.usb/Conn 356.045] up => error
        Layer 4 [19:C.usb/Conn 356.045] link state changed: error
        Layer 1 [22:C.usb/usbL 356.045] Release
        Layer 4 [ 1:main 356.049] check start
        Layer 4 [ 1:main 356.049] check end: want_up 1 some 1>1 all 1>0, going 0 up 4 down 1
        F00000105: [19:C.usb] Link down, terminating
        Layer 4 [ 1:main 356.049] trigger Going down
        Layer 4 [24:router/ConnC 356.049] R Stopping
        Layer 5 [24:router/ConnC 356.050] up => >down
        Layer 5 [24:router/ConnC 356.050] L Stopping
        Layer 5 [24:router/ConnC 356.050] >down => down
        Layer 4 [24:router/ConnC 356.050] link state changed: down
        Layer 4 [24:router/ConnC 356.050] link state changed: down
        Layer 4 [19:C.usb/Conn 356.050] R Stopping
        Layer 5 [19:C.usb/Conn 356.050] error => >down
        Layer 4 [19:C.usb/Conn 356.050] link state changed: error
        Layer 4 [15:B.unix/local 356.050] R Stopping
        Layer 5 [15:B.unix/local 356.050] up => >down
        Layer 8 [15:B.unix/local 356.050] StopServer
        Layer 5 [15:B.unix/local 356.050] >down => down
        Layer 4 [15:B.unix/local 356.050] link state changed: down
        Layer 4 [15:B.unix/local 356.050] link state changed: down
        Layer 4 [ 4:server/Server 356.050] R Stopping
        Layer 5 [ 4:server/Server 356.050] up => >down
        Layer 5 [24:router/ConnC 356.050] L Stopping
        Layer 3 [24:router/ConnC 356.050] unregisterLink: router_24
        Layer 0 [ 4:server/Server 356.051] Close D
        Layer 5 [ 4:server/Server 356.051] >down => down
        Layer 4 [ 4:server/Server 356.051] link state changed: down
        Layer 4 [ 4:server/Server 356.051] link state changed: down
        Layer 4 [11:A.tcp/inet 356.051] R Stopping
        Layer 5 [11:A.tcp/inet 356.051] up => >down
        Layer 8 [11:A.tcp/inet 356.051] StopServer
        Layer 8 [28:A.tcp/CConn 356.051] ClientConnection 1.1.129 closing
        Layer 3 [ 1:main 356.051] Release 1.1.129
        Layer 3 [ 1:main 356.051] deregisterVBusmonitor
        Layer 8 [28:A.tcp/CConn 356.051] Exiting
        Layer 7 [30:A.tcp/TBusMon 356.051] Close A_Busmonitor
        Layer 5 [11:A.tcp/inet 356.052] >down => down
        Layer 4 [11:A.tcp/inet 356.052] link state changed: down
        Layer 4 [11:A.tcp/inet 356.052] link state changed: down
        Layer 4 [ 1:main 356.052] check start
        Layer 8 [25:router/driver 356.052] CloseD
        Layer 4 [15:B.unix/local 356.052] is down
        Layer 4 [ 4:server/Server 356.052] is down
        Layer 4 [11:A.tcp/inet 356.052] is down
        Layer 4 [ 1:main 356.052] check end: want_up 0 some 1>0 all 0>0, going 0 up 0 down 4
        Layer 4 [ 1:main 356.052] down
        Layer 4 [ 1:main 356.052] deleting
        Layer 1 [22:C.usb/usbL 356.052] Close G
        Layer 8 [15:B.unix/local 356.052] StopServer
        Layer 8 [ 4:server/Server 356.052] Close E
        Layer 4 [ 1:main 356.052] deleted.

        TERMINAL 2:
        knxd@hostknx:/root$ knxtool vbusmonitor1 ip:localhost — NOTHING OBSERVED

        —>> after running command knxtool groupswrite ip:localhost 0/0/2 1 from TERMINAL 4
        knxd@hostknx:/root$ knxtool vbusmonitor1 ip:localhost
        L_Busmon: BC 11 82 00 02 E1 00 81 B2 :L_Data low from 1.1.130 to 0/0/2 hops: 06 T_Data_Group A_GroupValue_Write (small) 01
        Read failed: Connection reset by peer

        TERMINAL 3:
        root@hostknx:~# knxtool groupswrite ip:localhost 0/0/2 1
        Send request

        Could you guide me on how I could test/debug?

        1. Hi Henrik,

          Layer 6 [ 1:main 356.045] OK
          Layer 6 [ 2:main/L 356.045] OK L
          Layer 5 [19:C.usb/Conn 356.045] up => error
          Layer 4 [19:C.usb/Conn 356.045] link state changed: error
          Layer 1 [22:C.usb/usbL 356.045] Release

          unfortunately in this case, I thing, I cannot help. This is a “known” problem with knxd and especially the weinzierl devices. The knxd maintainer have the opinion that KNXD USB devices are broken by design and do support. See this issues:

          Issue 1

          Issue 2

          On which device you plan to run knxd? I no longer use knxd. I switched to calimero. I have feedback rom other users that calimero works stable also with USB devices. Maybe you give it a try. Only thing to consider is: calimero is developed in java means it requires more resources (RAM) then knxd (developed in C++). You can found the latest install script at my github account here . The calimero maintainer himself helps to keep this up to date.

          Calimero works reliable in my home 🙂 . Up since Jan 10:

          root@knxnet:~# ps -eo pid,lstart,cmd |grep cal
          921 Fri Jan 10 09:19:01 2020 /usr/bin/java -cp /etc/calimero:/opt/calimero-server/* tuwien.auto.calimero.server.Launcher --no-stdin /etc/calimero/server-config.xml
          root@knxnet:~# uptime -p
          up 13 weeks, 4 days, 22 hours, 50 minutes

          Michael

          1. Thanks Michael,
            It s a pity that Weinzierl is not addressing this. But anyway i will try with calimero then.
            I will first try with the Pi 3, I will then let you know.
            After that I have a 4GB Raspberry Pi 4, i will try with that. I also have a Tinker S might give that a try too.

            I will let you know how it goes.
            Thanks,
            Henrik

          2. As promised my test on RPi3 with Calimero.

            It seems the script completed successfully and the process in running. But I am not able to get any result. I am either configuring it wrong or I am not using the correct commands.

            Do you know anybody that has made this work with a USB device? Are the commands to be used different with USB devices? Can you give examples.

            Thanks,
            Henrik

            root@hostknx:~# lsusb
            Bus 001 Device 004: ID 0e77:0104
            Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
            Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
            Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

            root@hostknx:~# uname -a
            Linux hostknx 4.19.97-v7+ #1294 SMP Thu Jan 30 13:15:58 GMT 2020 armv7l GNU/Linux
            root@hostknx:~# pinout | grep Model
            | Pi Model 3B V1.2 |
            root@hostknx:~# ps ax|grep tuwien.auto.calimero.server.Launcher
            378 ? Ssl 0:08 /usr/bin/java -cp /etc/calimero:/opt/calimero-server/* tuwien.auto.calimero.server.Launcher –no-stdin /etc/calimero/server-config.xml
            698 pts/0 S+ 0:00 grep tuwien.auto.calimero.server.Launcher
            root@hostknx:~# journalctl -xu knx
            — Logs begin at Wed 2020-04-15 23:04:58 BST, end at Wed 2020-04-15 23:22:16 BST. —
            Apr 15 23:05:02 hostknx systemd[1]: Started Calimero KNX Daemon.
            — Subject: A start job for unit knx.service has finished successfully
            — Defined-By: systemd
            — Support: ——-

            — A start job for unit knx.service has finished successfully.

            — The job identifier is 119.
            Apr 15 23:05:06 hostknx java[378]: [main] INFO calimero.server.knx-server – Calimero KNXnet/IP server (v2.4) ‘Calimero KNXnet/IP Server’
            Apr 15 23:05:07 hostknx java[378]: [main] INFO calimero.server.knx-server – KNXnet/IP discovery network interfaces: listen on [all], send on [all]
            Apr 15 23:05:07 hostknx java[378]: [main] INFO calimero.server.knx-server – Service container ‘usb-1.1.0’:
            Apr 15 23:05:07 hostknx java[378]: listen on eth0, KNXnet/IP routing multicast group 224.0.23.12
            Apr 15 23:05:07 hostknx java[378]: usb connection: TP1 medium, device 1.1.0
            Apr 15 23:05:07 hostknx java[378]: [main] INFO calimero.server.knx-server – setup usb subnet ”
            Apr 15 23:05:07 hostknx java[378]: [main] INFO calimero.usb – Found 1 KNX USB devices:
            Apr 15 23:05:07 hostknx java[378]: |–Bus 001 Device 004: ID 0e77:0104
            Apr 15 23:05:07 hostknx java[378]: | KNX-USB Interface (Weinzierl Engineering GmbH)
            Apr 15 23:05:07 hostknx java[378]: | S/N: 00C501023BB2
            Apr 15 23:05:07 hostknx java[378]: [main] INFO calimero.usb.0e77:0104 – Bus 001 Device 004: ID 0e77:0104
            Apr 15 23:05:07 hostknx java[378]: KNX-USB Interface (Weinzierl Engineering GmbH)
            Apr 15 23:05:07 hostknx java[378]: S/N: 00C501023BB2
            Apr 15 23:05:08 hostknx java[378]: [main] INFO calimero.link.0e77:0104 – Device Descriptor (Mask Version) 07B0 – System B

            root@hostknx:~# knxtools discover
            23:22:42:417 INFO calimero.knxnetip.Discoverer – search on eth0 /192.168.1.201:3671
            23:22:42:439 INFO calimero.knxnetip.Discoverer – search on lo /127.0.0.1:3671
            23:22:45:693 INFO calimero.knxnetip.Discoverer – search stopped after 3 seconds with 0 responses

            root@hostknx:~# knxtools groupmon -m knxip 192.168.1.201
            23:23:05:953 INFO calimero.knxnetip.KNXnet/IP Tunneling 192.168.1.201:3671 – establish connection from /192.168.1.201:35991 to /192.168.1.201:3671
            23:23:15:978 ERROR calimero.knxnetip.KNXnet/IP Tunneling 192.168.1.201:3671 – establishing connection failed, timeout connecting to control endpoint /192.168.1.201:3671
            23:23:15:980 ERROR calimero.tools.ProcComm – completed with error
            tuwien.auto.calimero.KNXTimeoutException: timeout connecting to control endpoint /192.168.1.201:3671
            at tuwien.auto.calimero.knxnetip.ClientConnection.connect(ClientConnection.java:199)
            at tuwien.auto.calimero.knxnetip.KNXnetIPTunnel.(KNXnetIPTunnel.java:158)
            at tuwien.auto.calimero.link.KNXNetworkLinkIP.newConnection(KNXNetworkLinkIP.java:309)
            at tuwien.auto.calimero.link.KNXNetworkLinkIP.(KNXNetworkLinkIP.java:201)
            at tuwien.auto.calimero.link.KNXNetworkLinkIP.newTunnelingLink(KNXNetworkLinkIP.java:132)
            at tuwien.auto.calimero.tools.ProcComm.createLink(ProcComm.java:487)
            at tuwien.auto.calimero.tools.ProcComm.start(ProcComm.java:323)
            at tuwien.auto.calimero.tools.ProcComm.run(ProcComm.java:274)
            at tuwien.auto.calimero.tools.ProcComm.main(ProcComm.java:260)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.base/java.lang.reflect.Method.invoke(Method.java:566)
            at tuwien.auto.calimero.tools.Main.main(Main.java:117)

          3. Hi Henrik,

            seems working well (the daemon).

            have you tried to connect with ETS?

            After the groupmon command is calimero still running?

            Regards Michael

          4. have you tried to connect with ETS?
            –> Yes, I can see the packets in ETS. I Un-Plug the USB cable from the RPi then plug to my Laptop running ETS5, I run the same test, I see telegrams in Group Mon and Bus Mon. So the Wienzierl is working as expected. ETS recognizes the KNX-USB interface with Medium TP, Individual adress 15.15.255 and APDU 55.

            After the groupmon command is calimero still running?
            –> Yes calimero keeps running after groupmon command. It does not crash like knxd was doing. So in that sense it one step better. But I can not see packets on the bus.

          5. Success.

            I finally made it working.
            To see the telegrams on the bus I used:
            knxtools groupmon -m knxip 224.0.23.12

            To switch on and off a light I used:
            knxtools write 0/0/1 switch on -m knxip 224.0.23.12
            knxtools write 0/0/1 switch off -m knxip 224.0.23.12

            Thanks for all the help and guidance.

  126. Hi Michael,

    I found you blog looking for a solution for my problem …
    I’m currently trying to get my USb interface (MDT SCN-USBR02) working with knxd and ETS.
    I installed knxd on a new Raspbian 10, raspberry 3.

    So far knxd is running and I can read messages on the bus.
    However I’m not able to write via groupswrite or to program via ETS.

    Status so far:

    sudo systemctl status knxd.service brings:

    knxd.service – KNX Daemon
    Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
    Active: active (running) since Tue 2020-05-05 21:09:22 BST; 51s ago
    Main PID: 547 (knxd)
    Tasks: 2 (limit: 2200)
    Memory: 3.0M
    CGroup: /system.slice/knxd.service
    +-547 /usr/bin/knxd -e 12.0.200 -E 12.0.201:8 -f9 -t1023 -DTRS -c -b usb:

    May 05 21:10:13 raspberrypi knxd[547]: Layer 6 [22:router/ConnC 51.196] sending, send_more clear
    May 05 21:10:13 raspberrypi knxd[547]: Layer 1 [12:server/Server 51.196] Send(013): 29 00 BC D0 C0 08 19 06 03 00 80 0C 42
    May 05 21:10:13 raspberrypi knxd[547]: Layer 2 [24:router.pace_/router 51.196] out 1/4: delay for 0.019 sec
    May 05 21:10:13 raspberrypi knxd[547]: Layer 6 [22:router/ConnC 51.196] still waiting
    May 05 21:10:13 raspberrypi knxd[547]: Layer 0 [12:server/Server 51.196] Send(019): 06 10 05 30 00 13 29 00 BC D0 C0 08 19 06 03 00 8
    May 05 21:10:13 raspberrypi knxd[547]: Layer 0 [12:server/Server 51.196] Dropped(019): 06 10 05 30 00 13 29 00 BC D0 C0 08 19 06 03 0
    May 05 21:10:13 raspberrypi knxd[547]: Layer 2 [24:router.pace_/router 51.215] delay done
    May 05 21:10:13 raspberrypi knxd[547]: Layer 6 [22:router/ConnC 51.215] sendNext called, send_more set
    May 05 21:10:13 raspberrypi knxd[547]: Layer 6 [22:router/ConnC 51.215] is OK
    May 05 21:10:13 raspberrypi knxd[547]: Layer 6 [12:server/Server 51.215] is OK

    ****************************************

    Entry in /etc/knxd.conf

    KNXD_OPTS=”-e 12.0.200 -E 12.0.201:8 -f9 -t1023 -DTRS -c -b usb:”

    (btw, I tried a couple of different configuration options … without success so far)

    ****************************************

    lsusb

    Bus 001 Device 004: ID 16d0:0491 MCS
    Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
    Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    ****************************************

    Entry in /etc/udev/rules.d/90-knxusb-devices.rules

    # MDT SCN-USBR02
    SUBSYSTEM==”usb”,ATTR{idVendor}==”16d0″,ATTR{idProduct}==”0491″,ACTION==”add”,GROUP=”knxd”,MODE=”0664″

    ****************************************

    knxtool vbusmonitor1 local:
    gives continous bus traffic, all looks fine

    ****************************************

    sudo knxtool groupswrite ip:localhost 1/1/19 1
    however does not work but creates an error message like this:

    May 06 10:15:35 raspberrypi knxd[546]: Layer 6 [12:server/Server 246.254] is OK
    May 06 10:15:38 raspberrypi knxd[546]: E00000059: [25:B.usb] EMI_common: send while waiting (1869819757)
    May 06 10:15:38 raspberrypi knxd[546]: Layer 6 [22:router/ConnC 248.806] sending, send_more clear
    May 06 10:15:38 raspberrypi knxd[546]: Layer 1 [12:server/Server 248.806] Send(011): 29 00 BC D0 C0 C9 09 13 01 00 81
    May 06 10:15:38 raspberrypi knxd[546]: Layer 2 [24:router.pace_/router 248.806] out 1/2: delay for 0.017 sec
    May 06 10:15:38 raspberrypi knxd[546]: Layer 6 [12:server/Server 248.807] is OK
    May 06 10:15:38 raspberrypi knxd[546]: Layer 0 [12:server/Server 248.807] Send(017): 06 10 05 30 00 11 29 00 BC D0 C0 C9 09 13 01 00 81
    May 06 10:15:38 raspberrypi knxd[546]: Layer 0 [12:server/Server 248.807] Dropped(017): 06 10 05 30 00 11 29 00 BC D0 C0 C9 09 13 01 00 81
    May 06 10:15:38 raspberrypi knxd[546]: Layer 2 [24:router.pace_/router 248.823] delay done
    May 06 10:15:38 raspberrypi knxd[546]: Layer 6 [22:router/ConnC 248.824] sendNext called, send_more set
    May 06 10:15:38 raspberrypi knxd[546]: Layer 6 [12:server/Server 248.824] is OK
    May 06 10:15:48 raspberrypi knxd[546]: E00000055: [17:B.usb] Driver timed out trying to send (B.usb)
    May 06 10:15:48 raspberrypi knxd[546]: F00000105: [17:B.usb] Link down, terminating
    May 06 10:15:48 raspberrypi knxd[546]: Layer 4 [12:server/Server 258.811] Stopping
    May 06 10:15:48 raspberrypi knxd[546]: Layer 5 [12:server/Server 258.811] up => >down
    May 06 10:15:48 raspberrypi knxd[546]: Layer 5 [22:router/ConnC 258.811] Stopping
    May 06 10:15:48 raspberrypi knxd[546]: Layer 5 [22:router/ConnC 258.811] up => down
    May 06 10:15:48 raspberrypi knxd[546]: Layer 5 [22:router/ConnC 258.811] Stopping
    May 06 10:15:48 raspberrypi knxd[546]: Layer 4 [22:router/ConnC 258.811] down
    May 06 10:15:48 raspberrypi knxd[546]: Layer 3 [22:router/ConnC 258.811] unregisterLink: router_22
    May 06 10:15:48 raspberrypi knxd[546]: Layer 0 [12:server/Server 258.811] Close
    May 06 10:15:48 raspberrypi knxd[546]: Layer 5 [12:server/Server 258.811] >down => down
    May 06 10:15:48 raspberrypi knxd[546]: Layer 4 [12:server/Server 258.811] down
    May 06 10:15:48 raspberrypi knxd[546]: Layer 8 [23:router/driver 258.811] CloseD
    May 06 10:15:48 raspberrypi knxd[546]: Layer 4 [12:server/Server 258.811] is down
    May 06 10:15:48 raspberrypi knxd[546]: Layer 8 [12:server/Server 258.811] Close
    May 06 10:15:48 raspberrypi systemd[1]: knxd.service: Main process exited, code=exited, status=1/FAILURE
    May 06 10:15:48 raspberrypi systemd[1]: knxd.service: Failed with result ‘exit-code’.

    ****************************************

    In ETS similar behavior.
    I can read via bus or group monitor with reasonable values. Looks all fine.
    However, when I try to read device info or to make a line scan or to program a device, there are error messages.

    On the raspberry I get then
    “Read failed: Connection reset by peer”
    and the messages above.

    Any idea what else I could try?
    Many thanks in advance!!

    BR,
    Timo

  127. Hello,
    this may be a stupid question, but what’s the problem with building a .deb file and installing *that* instead of using /usr/local?

    Why does your install script explicitly do “–disable-systemd”?
    Why don’t you just ask people to install libfmt-dev?
    Why didn’t you report the missing USB vendor+product IDs to knxd’s issue tracker?

    NB, the current Debian branch contains an “install-debian.sh” script which automates this. I’m open to improvements, including Raspberry Pi -specific modifications.

    NB2, wearing my Debian maintainer hat: please do not place non-package files in /lib. That’s what /etc is for.

    1. Hello Matthias,

      there are no stupid questions 🙂

      The philosophy was to keep the script as independent as possible so that it could be “easily” transfered to other distributions (OpenRC, SysV). So you install the requiered packages on your distribution, and copy & paste the main parts of the script and compile it on every system.

      Therefore
      -no systemd
      -install to /usr/local
      -No debian buildscript

      I agree with you that on debian systems the install-debian.sh script is the prefered way. I also give interested user the hint that knxd is already included in debian and that its no longer needed to compile it yourself.

      “Why don’t you just ask people to install libfmt-dev?” => When I compiled knxd the last time the build environment of knxd has ignored the installed libfmt-dev version gets is own version libfmt-dev during build. Therefore I removed it from the script (see comment in the header of the script).

      Why didn’t you report the missing USB vendor+product IDs to knxd’s issue tracker?” => Ok, next time i will do this. But I often got no feedback from a visitors of my site if knxd is running after some changes like adding the USB IDs.

      “B2, wearing my Debian maintainer hat: please do not place non-package files in /lib. That’s what /etc is for.” => Yes i have to change it to /etc/systemd/system

      Michael

  128. hi everyone
    i want to ask about kberry 838
    i want to used it with raspberry pi to replace the IP router
    it is possible to do that
    any advice to help me
    thanks have a good day

  129. Hi Michael,

    I had the kberry 838 running on an Openhabian install, together with your script and very little config work. Unfortunately it no longer works, have spend days troubleshooting. With updates to KNXD and raspbian the same configs are not working for me any more. I have also tried to install the debian branch of KNXD and that doesn’t work with the module either.

    The KBerry 838 a 45 euro module (the cheapest on the market), together with a raspberry pi and KNXD you could have a full router for 80 euros. Would you consider creating a dedicated raspberry pi image for this? That way users could download it, flash it to their microsd and have a fully working router.

    Thanks!
    lukas

    1. Hi Lukas,

      maybe there are some changes in knxd which breaks this device. In the past knxd works with a kberry 838? I don’t think this is a config issue. With which parameter do you start knxd?
      Michael

  130. You can search for “Lukas” on this page and see my past posts. I had it on a Rpi3 with Openhabian, using your knxd install scripts that were bundled as part of openhabian, using the following config:
    KNXD_OPTIONS=”–eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b ft12cemi:/dev/ttyAMA0″

    three years ago I wiped the SD card 5 times and rebuilt it from scratch several times. Now it no longer works. Since it’s pulling from the master branch, and the OS has also been updated, I can’t get the Kberry 838 to work any more. What I can confirm is that it definitely was working.

    1. Hi lukas,

      I think you have two options: Test it with an older version of knxd => Checkout an older (~ 3years back) commit and try to build and test it. If it works with an older version open an issue at the knxd github home.

      Or tryout calimero server (I use this one). Currently my script configure calimero to use tpuart or usb. You simply have alter it to ft12 in /etc/calimero/server-config.xml.

      Michael

  131. I have spent a lot of time unpacking knxd, I don’t have the energy to try to get it working on another project right now.

    I get the sense that what the community wants is just a cheap KNX router. Rather than spend a lot of time building a set of scripts and supporting them for a lot of different KNX interfaces, why not just provide one bulletproof solution that requires no hand-holding? The Kberry 838 is a great module for this since it’s cheap and sits perfectly on top of a RPI2/3/4.

    I’ve already tried to compile knxd 0.12 but had some issues. I’ll try again… I’ll report back if I can get it working again….

    1. Hi Lukas,

      give calimero a try. It does the same as knxd, has more functions (knxd runs fine with a TPUART interface, but has issues with USB devices, no tunnel support, no new features) and the developer bmalinowsky responds quickly to any questions. The only “little” disadvantage is it uses java and therefore needs a little more resources then knxd, This i a topic on really small devices with less RAM but even a Raspberry Pi 1 has enough resources for that.

      Michael

  132. Hi Michael

    I use a rassberry 2b with a HAT card and I can read bus messages both in putty and in ets5. I resently bought another actiator and installed ets5 and when I put the new hardware in program mode it does not show up in ets5. I Cant see any telegrams from the actiator with the buss monitor eather. I’m totaly new to knx programming and I don’t know what to expect. Do I have an error in my knxd settings? Is it an error in my hardware?
    KNXD_OPTS=”-e 1.1.1 -E 1.1.5:5 -b ft12cemi:/dev/ttyAMA0 -DTRS” is my line. Is it wrong for beeing able to se discover protocoll?

  133. Everything works perfectly, thanks for the manual ^^

    But the question is, why do we need knxtools? and not just connect arduino directly to rs232 line from 5WG1117-2AB11

    I mean isn’t that siemens module afterall brains of this thing that handles all knx error detection and stuff.

    I try to read that rs line and couldnt get anything smart out
    if knxtoos show msg as “BC 11 01 09 02 E1 00 81 38” I got correct amount of bytes(9) but they didnt make any sense because there was like byte 11111111 (FF) and I couldnt see how its formed.

    was it error in transmission (everytime same data) or is that somehow ‘crypted’

  134. message I get from serial is kind of this ( I think it was same button press)
    I bushed button right after serialport.readline and it does change everytime if I press different buton)

    >>> serialport = serial.Serial(“/dev/ttyS0”, 9600, timeout=1)
    >>> response = serialport.readlines(None)
    >>> print response
    [‘\xfb\xf9\xfc\xf8\xfc\xfa\xf0\xf8\xf2’]

    1. Replying to myself… KNX bus serial is 9600… but to communicate with siemens BTU serial should be 19200 … it took like 2 weeks to get this 😀

  135. hello
    Iam new to this field,
    Iam using a NCN 5130 Transciever chip evaluation board to the beaglebone black via UART. i made the connections properly but iam not sure about the configurations that have to be made in the knxd for debian.
    I installed the knxd debian succesfully and its running status is active.
    But i dont know how configurations to be made in order work this daemon with my module.
    Any Hints!!

  136. This is my knxd.conf

    KNXD_OPTS=”-e 0.0.1 -E 0.0.2:8 -u /tmp/eib -b ip”

    when i changed the above config to
    KNXD_OPTS=”-e 0.0.1 -E 0.0.2:8 -u /tmp/eib -b tpuarts:/dev/ttyO1″

    knxd stops working

    I dont know what all parameters to be edited in order to get it working
    /dev/ttyO1 is my serial port UART

  137. Hi,
    i tried to installed knxd with this shell script in my Ubuntu 20.
    After getting this:
    `0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
    knxd:x:1001:1001::/home/knxd:/bin/false
    knxd repository found
    Bereits aktuell.
    error: Pfadspezifikation ‘master’ stimmt mit keinen git-bekannten Dateien überein`

    I changed the line 127 in the script to this:
    `git checkout main`
    Now i get no error

  138. Hi Michael,

    I’m currently running knxd with a MDT SCN-USBR.01 USB interface flawlessly (/usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.255 –client-addrs=1.1.250:5 -d -D -T -R -S -i -u /tmp/knx -B single -b usb:)

    Trying to tidy up the electrical cabinet, I moved the Raspberry Pi in a RaspiBox for DIN mounting, using a Siemens Bustranceiver Module BTM UP117 5WG1117-2AB11 and an ADUM1201 as per your tutorial, but knxd is not starting up properly (/usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.255 –client-addrs=1.1.250:5 -d -D -T -R -S -i -u /tmp/knx -B single -b tpuarts:/dev/ttyAMA0)

    To rule out hardware / cabling issues or mistakes, I tested everything with minicom. All serial-getty services are also properly disabled. When knxd sends a ‘SendReset 01′, the BTM sends back a ’47 47’ which apparently the knxd is not expecting and hence aborts?!

    Do you know what is going wrong here? And how can I prevent this?

    1. Hi Nickv,

      https://www.hqs.sbt.siemens.com/cps_product_data/gamma-b2b/TPUART2_technical-data.pdf (see page 32)

      I tried the following, intercepttyc can monitor tty traffic. Download build and start intercepttyc with your serial device (in my case /dev/ttyS3):

      git clone https://github.com/geoffmeyers/interceptty
      cd interceptty
      ./configure
      make
      stty -F /dev/ttyS3 19200 -crtscts
      ./interceptty /dev/ttyS3
      

      Then start a second console and send a reset to the TPUART module

      echo -no '\001' > /dev/ttyS3
      

      and got back “47”

      ./interceptty /dev/ttyS3 -T
      [16:20 10.32451] 0x47 (G)
      [16:20 10.35231] 0xbc (¦)
                       0x11 ([DC1])
      ...
      

      I think your TPUART module works correctly. You can check the TPUART module without knxd:
      Enable the busmonitor mode then you must see some incoming knx packets in hex.
      Open a console and start intercepttyc as described above. Then on a second console send the busmonitor start command:

      echo -no '\005' > /dev/ttyS3
      

      On the intercepttyc console should arrive some knx traffic:

      [16:23 15.302021]>      0xbc (¦)
                       >      0x11 ([DC1])
                       >      0x23 (#)
                       >      0x11 ([DC1])
                       >      0x09 ([TAB])
                       >      0xe3 (¦)
                       >      0x00 ([NUL])
                       >      0x80 (¦)
                       >      0x0c ([FF])
                       >      0xb0 (¦)
                       >      0xb6 (¦)
      [16:23 43.969535]>      0xbc (¦)
                       >      0x11 ([DC1])
                       >      0x24 ($)
                       >      0x11 ([DC1])
                       >      0x04 ([EOT])
                       >      0xe3 (¦)
                       >      0x00 ([NUL])
                       >      0x80 (¦)
                       >      0x0c ([FF])
                       >      0x26 (&)
                       >      0x2a (*)
      

      Michael

  139. Hey Michael,

    today i tried to install knxd on a actual Debian installation. Everything worked well, except, the forward of “signals” from my gira home server to the ip-gateway via the knxd. I have now since 6yeas an raspberry pi with eibd working and want to update to the Debian installation. I think the problem is relationated with the forward of the multicast traffic to the knx bus.

  140. Hi Michael

    Don’t know if you can help, but I am trying to install knxd in Home Assistant OS inside a PI 4.

    Same PI for Home Assistant OS and knxd interface.

    Already have install_knxd_systemd.sh inside PI (using ssh putty), but I cannot run: bash install_knxd_systemd.sh
    Command returns: install_knxd_systemd.sh: line 84: apt-get: command not found

    Home Assistant OS does not have apt-get installed.

    Is there any other way to run de script?
    Can this be installed without script (step-by-step instructions)?

    I really dont want to buy a IP interface, since I have all HW needed.

    Thanks

  141. Hi Michael

    Don’t know if you can help, but I am trying to install knxd in Home Assistant OS inside a PI 4.

    Same PI for Home Assistant OS and knxd interface.

    Already have install_knxd_systemd.sh inside PI (using ssh putty), but I cannot run: bash install_knxd_systemd.sh
    Command returns: install_knxd_systemd.sh: line 84: apt-get: command not found

    Home Assistant OS does not have apt-get installed.

    Is there any other way to run de script?
    Can this be installed without script (step-by-step instructions)?

    I really dont want to buy a IP interface, since I have all HW needed.

    Thanks

  142. It is really strange …
    Some months ago I tried knxd on a Raspberry Pi4 running Raspberry Pi OS Lite (buster) – it runs perfectly! But I have never been able to run it on Raspberry Pi OS with desktop (on both versions it does not work: Raspberry Pi OS with desktop and recommended software + Raspberry Pi OS with desktop). I want to replace my old “Merten Wall Panel” with a Pi4 + Touchscreen and for this I need the desktop.
    The journalctl says:

    Okt 04 22:45:20 pi400 systemd[1]: Starting KNX Daemon…
    Okt 04 22:45:20 pi400 systemd[1]: knxd.service: Can’t open PID file /run/knxd/knxd.pid (yet?) after start: No such file or directory
    Okt 04 22:47:05 pi400 systemd[1]: knxd.service: Start operation timed out. Terminating.
    Okt 04 22:47:05 pi400 systemd[1]: knxd.service: Failed with result ‘timeout’.
    Okt 04 22:47:05 pi400 systemd[1]: Failed to start KNX Daemon.

    Do you have a hint for running t on buster? As I said: Lite version is great but not the version with an x-windows …

    I also mentioned that after the fisrst reboot hciuart.service had problems but after the next reboot hciuart was running fine ..

    Any ideas?

    Cheers

    Ralf

  143. Hi everyone,

    I’m glad to find such informations on setting up knxd. The installation step of it worked fine for me, and I’m able to monitor KNX informations on my bus. Unfortunately I cannot connect to KNXD with ETS (version 5), nor my Openhab installation can connect to it.

    Let me expose my configuration, which has :
    – One respberry pi 4 running Openhab which has the address 192.168.0.76.
    – One orange Pi plus 2e running KNXD which has the address 192.168.0.203.
    – One KNX IP Gateway ABB IPS2/1 which has the address 192.168.0.201.

    Openhab works fine, talking directly to the KNX IP Gateway. I want to setup a KNXD server in order to be able to work with an ETS client on a Windows PC, without being forced to shutdown Openhab.

    KNXD is properly installed on my Orange Pi. The daemon is started :
    # ps -eaf | grep knxd
    knxd 1917 1 0 16:07 ? 00:00:00 /usr/bin/knxd -e 0.0.1 -E 0.0.2:8 -u /tmp/eib -b ipt:192.168.0.201

    I can monitor the informations sent on the KNX bus :
    # knxtool vbusmonitor1 ip:localhost
    L_Busmon: BC 10 3B 20 01 E3 00 80 01 20 0B :L_Data low from 1.0.59 to 4/0/1 hops: 06 T_Data_Group A_GroupValue_Write 01 20
    L_Busmon: BC 10 3B 23 01 E3 00 80 00 6C 45 :L_Data low from 1.0.59 to 4/3/1 hops: 06 T_Data_Group A_GroupValue_Write 00 6C

    Something I don’t understand is how Openhab, or ETS can connect to KNXD. Running netstat on my KNXD server shows this (for the processes that concern my problem) :
    # netstat -pln
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1586/sshd: /usr/sbi
    tcp6 0 0 :::6720 :::* LISTEN 1/init
    tcp6 0 0 :::22 :::* LISTEN 1586/sshd: /usr/sbi
    udp 0 0 192.168.0.203:58121 0.0.0.0:* 1917/knxd
    Active UNIX domain sockets (only servers)
    Proto RefCnt Flags Type State I-Node PID/Program name Path
    unix 2 [ ACC ] STREAM LISTENING 15600 1/init /run/knx
    unix 2 [ ACC ] STREAM LISTENING 15619 1917/knxd /tmp/eib

    It seems that something listens to port 6720 for all local adresses on IPV6 (or I don’t understand what tcp6 means). However, I disabled IPV6 on my KNXD server :
    ~# ifconfig
    eth0: flags=4163 mtu 1500
    inet 192.168.0.203 netmask 255.255.255.0 broadcast 192.168.0.255
    ether 02:34:56:78:12:34 txqueuelen 1000 (Ethernet)
    RX packets 19245 bytes 1989701 (1.9 MB)
    RX errors 0 dropped 4573 overruns 0 frame 0
    TX packets 5034 bytes 334949 (334.9 KB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    device interrupt 48

    When I explicitly set up in ETS, a new connection, with the address of my Orange Pi KNXD server and the port 6720, the interface remains not found.

    I know this has been discussed earlier in this blog but I did not managed to solve my problem with all this amount of information and a little help would be appreciated.

    Thanks in advance, if someone could put me on the right way.

    Have a nice day.

  144. When:

    pi@knxrpi:~ $ /usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.128 –client-addrs=1.1.129:8 -d -D -T -R -S -i –listen-local=/tmp/knx -b usb:

    is runned AFTER whole bootup it works. Because all network connections is established.. Like WIFI.

    So there is a future option to modify the install script to do not add daemon service. but create rc file which can be started after is wifi established ?

    Like simple SH skript with ping to the gateway… and if receive then run the KNXD command?

    I like to have all ma RPI at wifi and DHCP (in fact with the same IP, because router have static tables)

    And also my device for rules

    # Meanwell KNX/USB
    SUBSYSTEM==”usb”, ATTR{idVendor}==”28c2″, ATTR{idProduct}==”0013″, ACTION==”add”, GROUP=”knxd”, MODE=”0664″

  145. Hi Michael
    i’m new in linux and raspberry
    I follow all steps indicate to install KNXD but teh service start and stop
    You suggest to check manual command. I think i have some problem with TTYAma0
    Could You help me?

    root@raspi4:/boot# knxd -t 1023 –eibaddr=1.1.128 –client-addrs=1.1.129:8 -D -T -R -S -i –listen-local=/tmp/knx -t 1023 -b tpuarts:/dev/ttyAMA0
    Layer 4 [ 1:main 0.000] initialized
    Layer 4 [ 1:main 0.000] setting up
    Layer 3 [ 4:server/Server 0.000] registerLink: 4:server
    Layer 3 [11:A.tcp/inet 0.000] registerLink: 11:A.tcp
    Layer 3 [15:B.unix/local 0.000] registerLink: 15:B.unix
    Layer 0 [22:C.tpuarts/log 0.000] Insert 21:LowF / 20:tpuart
    Layer 0 [22:C.tpuarts/log 0.000] Setup
    Layer 0 [24:C.tpuarts/log 0.001] Insert 23:TPU_ser / 21:LowF
    Layer 0 [22:C.tpuarts/log 0.001] Filter single not found
    Layer 0 [24:C.tpuarts/log 0.001] Setup
    Layer 0 [24:C.tpuarts/log 0.001] Setup OK: yes
    Layer 0 [22:C.tpuarts/log 0.001] Setup OK: yes
    Layer 3 [19:C.tpuarts/Conn 0.001] registerLink: 19:C.tpuarts
    Layer 4 [ 1:main 0.001] setup OK
    Layer 4 [ 1:main 0.001] trigger going up
    Layer 3 [19:C.tpuarts/Conn 0.001] Start: cfg:C.tpuarts
    Layer 5 [19:C.tpuarts/Conn 0.001] down => >up
    Layer 5 [19:C.tpuarts/Conn 0.001] Starting
    Layer 0 [22:C.tpuarts/log 0.001] Start
    Layer 0 [24:C.tpuarts/log 0.001] Start
    Layer 0 [23:C.tpuarts/TPU_ser 0.001] Opened /dev/ttyAMA0 with baud 19200
    Layer 2 [23:C.tpuarts/TPU_ser 0.002] Opened
    Layer 2 [23:C.tpuarts/TPU_ser 0.002] Buffer Setup on fd 4
    Layer 0 [24:C.tpuarts/log 0.002] Started
    Layer 8 [21:C.tpuarts/LowF 0.002] state: new > start
    Layer 0 [21:C.tpuarts/LowF 0.002] SendReset 01
    Layer 0 [24:C.tpuarts/log 0.002] Send(001): 01
    Layer 4 [19:C.tpuarts/Conn 0.002] link state changed: >up
    Layer 3 [15:B.unix/local 0.002] Start: cfg:B.unix
    Layer 5 [15:B.unix/local 0.002] down => >up
    Layer 8 [15:B.unix/local 0.002] OpenLocalSocket /tmp/knx
    Layer 8 [15:B.unix/local 0.002] LocalSocket opened
    Layer 5 [15:B.unix/local 0.003] >up => up
    Layer 4 [15:B.unix/local 0.003] link state changed: up
    Layer 5 [15:B.unix/local 0.003] Started
    Layer 4 [15:B.unix/local 0.003] link state changed: up
    Layer 3 [ 4:server/Server 0.003] Start: cfg:server
    Layer 5 [ 4:server/Server 0.003] down => >up
    Layer 8 [ 4:server/Server 0.003] Open
    Layer 0 [ 4:server/Server 0.003] Open
    Layer 0 [ 4:server/Server 0.003] Opened
    Layer 8 [27:router/driver 0.003] OpenD
    Layer 8 [27:router/driver 0.004] OpenedD
    Layer 3 [26:router/ConnC 0.004] registerLink: 26:router_26
    Layer 3 [26:router/ConnC 0.004] Start: cfg:router
    Layer 5 [26:router/ConnC 0.004] down => >up
    Layer 5 [26:router/ConnC 0.004] Starting
    Layer 5 [26:router/ConnC 0.004] >up => up
    Layer 4 [26:router/ConnC 0.004] link state changed: up
    Layer 5 [26:router/ConnC 0.004] Started
    Layer 4 [26:router/ConnC 0.004] link state changed: up
    Layer 8 [ 4:server/Server 0.004] Opened
    Layer 5 [ 4:server/Server 0.004] >up => up
    Layer 4 [ 4:server/Server 0.004] link state changed: up
    Layer 5 [ 4:server/Server 0.004] Started
    Layer 4 [ 4:server/Server 0.004] link state changed: up
    Layer 3 [11:A.tcp/inet 0.004] Start: cfg:A.tcp
    Layer 5 [11:A.tcp/inet 0.004] down => >up
    Layer 8 [11:A.tcp/inet 0.004] OpenInetSocket 6720
    Layer 8 [11:A.tcp/inet 0.005] InetSocket opened
    Layer 5 [11:A.tcp/inet 0.005] >up => up
    Layer 4 [11:A.tcp/inet 0.005] link state changed: up
    Layer 5 [11:A.tcp/inet 0.005] Started
    Layer 4 [11:A.tcp/inet 0.005] link state changed: up
    Layer 4 [ 1:main 0.005] going up triggered
    Layer 4 [ 1:main 0.005] check start
    Layer 4 [19:C.tpuarts/Conn 0.005] state is >up
    Layer 4 [ 1:main 0.005] check end: want_up 1 some 1>1 all 0>0, going 1 up 4 down 0
    Layer 0 [21:C.tpuarts/LowF 0.487] SendReset 01
    Layer 0 [24:C.tpuarts/log 0.487] Send(001): 01
    Layer 0 [21:C.tpuarts/LowF 0.988] SendReset 01
    Layer 0 [24:C.tpuarts/log 0.988] Send(001): 01
    Layer 8 [21:C.tpuarts/LowF 1.488] state: in_reset > error
    Layer 0 [24:C.tpuarts/log 2.489] Stop
    Layer 0 [24:C.tpuarts/log 2.490] Errored
    Layer 8 [21:C.tpuarts/LowF 2.490] state: error > new
    Layer 0 [22:C.tpuarts/log 2.490] Errored
    Layer 5 [19:C.tpuarts/Conn 2.490] >up => error
    Layer 4 [19:C.tpuarts/Conn 2.490] link state changed: error
    Layer 4 [ 1:main 2.490] check start
    Layer 4 [ 1:main 2.490] check end: want_up 1 some 1>1 all 0>0, going 0 up 4 down 1
    F00000105: [19:C.tpuarts] Link down, terminating
    Layer 4 [ 1:main 2.490] trigger Going down
    Layer 4 [26:router/ConnC 2.490] R Stopping
    Layer 5 [26:router/ConnC 2.490] up => >down
    Layer 5 [26:router/ConnC 2.490] L Stopping
    Layer 5 [26:router/ConnC 2.490] >down => down
    Layer 4 [26:router/ConnC 2.490] link state changed: down
    Layer 4 [26:router/ConnC 2.490] link state changed: down
    Layer 4 [19:C.tpuarts/Conn 2.490] R Stopping
    Layer 5 [19:C.tpuarts/Conn 2.490] error => >down
    Layer 4 [19:C.tpuarts/Conn 2.490] link state changed: error
    Layer 4 [15:B.unix/local 2.490] R Stopping
    Layer 5 [15:B.unix/local 2.490] up => >down
    Layer 8 [15:B.unix/local 2.491] StopServer
    Layer 5 [15:B.unix/local 2.491] >down => down
    Layer 4 [15:B.unix/local 2.491] link state changed: down
    Layer 4 [15:B.unix/local 2.491] link state changed: down
    Layer 4 [ 4:server/Server 2.491] R Stopping
    Layer 5 [ 4:server/Server 2.491] up => >down
    Layer 5 [26:router/ConnC 2.491] L Stopping
    Layer 3 [26:router/ConnC 2.491] unregisterLink: router_26
    Layer 0 [ 4:server/Server 2.491] Close D
    Layer 5 [ 4:server/Server 2.491] >down => down
    Layer 4 [ 4:server/Server 2.491] link state changed: down
    Layer 4 [ 4:server/Server 2.491] link state changed: down
    Layer 4 [11:A.tcp/inet 2.491] R Stopping
    Layer 5 [11:A.tcp/inet 2.491] up => >down
    Layer 8 [11:A.tcp/inet 2.492] StopServer
    Layer 5 [11:A.tcp/inet 2.492] >down => down
    Layer 4 [11:A.tcp/inet 2.492] link state changed: down
    Layer 4 [11:A.tcp/inet 2.492] link state changed: down
    Layer 4 [ 1:main 2.492] check start
    Layer 8 [27:router/driver 2.492] CloseD
    Layer 4 [15:B.unix/local 2.492] is down
    Layer 4 [ 4:server/Server 2.492] is down
    Layer 4 [11:A.tcp/inet 2.492] is down
    Layer 4 [ 1:main 2.492] check end: want_up 0 some 1>0 all 0>0, going 0 up 0 down 4
    Layer 4 [ 1:main 2.492] down
    Layer 4 [ 1:main 2.492] deleting
    Layer 0 [22:C.tpuarts/log 2.492] Closing
    Layer 2 [21:C.tpuarts/LowF 2.492] Close C
    Layer 0 [24:C.tpuarts/log 2.492] Closing
    Layer 2 [23:C.tpuarts/TPU_ser 2.492] Close F
    Layer 8 [15:B.unix/local 2.492] StopServer
    Layer 8 [ 4:server/Server 2.492] Close E
    Layer 8 [11:A.tcp/inet 2.492] StopServer
    Layer 4 [ 1:main 2.492] deleted.

  146. Hallo Michal hatte damals das tut von 2014 verwendet ging auch alles bzw läuft immer noch auf einen pi2 und der mdt USB Schnittstelle.
    Würde jetzt gerne auf einen pi4 umziehen mit der USB Schnittstelle im ersten Schritt schreibst du erstelle eine Datei muss ich dort meine Daten eintragen also Router bei dir ist es dir 192.168.100.1 bei mir aber 192.168.2.1 muss ich dann anpassen oder geht aus dem Text nicht hervor oder ich hab es nicht richtig verstanden. Danke für die Info

  147. Hello,
    I got the error “Layer 4 19:C.tpuart/Conn link state changed: error” and wasn’t able to find anything about this error.
    I’m using an Weinzierl kBerry and a very old Raspberry PI (from 2011-2012).

    After a lot of reasearch I replaced the Serial Port driver (?) from tpuarts:/dev/ttyAMA0 with
    t12cemi:/dev/ttyAMA0
    and everything worked fine

Leave a Reply