Raspberry Pi: eibd with a KNX USB Interface

Hi,

a reader of my post asks me if it possible to connect the eibd bus with a KNX USB Interface instead of the TPUART board.  These interfaces are available by several vendors(Siemens, Gira, Merten etc.).

I have no KNX USB Interface for testing and therefore Bastian Herzog did that part and supports me to improve the script. Very special thanks to him. Together we have get this started.

As descripted in the previous post setup your Raspberry Pi with raspbian:

Install Raspbian as operating system for the Raspberry Pi. All developing tools to compile the eibd daemon are already included. For the current version you need a SD card with at least 4GB. The installation of rapbian is described here in detail. Its simple:-)

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. Edit the following files with your favorite editor. For me its vi :-).

pi@raspberry~: $ sudo vi /etc/network/interfaces

comment the following line

# iface eth0 inet dhcp

insert your static TCP/IP parameter.

allow-hotplug eth0
iface eth0 inet static
address 192.168.2.150
netmask 255.255.255.0
gateway 192.168.2.1

On Debian Jessie also add the route to the eibnet mulicast address (in debian wheezy this is set by the init script) and set the interface eth0 from “allow-hotplug” to “auto” so it will not be handled by systemd, to activate the old style debian network config.

auto eth0
iface eth0 inet static
address 192.168.2.150
netmask 255.255.255.0
gateway 192.168.2.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

adjust address, subnetmask and gateway. Open /etc/resolv.conf to set a DNS Server. In home environments this is usually the DSL Router.

pi@raspberry~: $ sudo vi /etc/resolv.conf


nameserver 192.168.2.1

Reboot your device and login again. I preferred a remote login over ssh from my workstation.
I wrote a script install_eibd_usb.sh which compiles and installs the eibd daemon. You can download it below. The script needs an active internet connection. Check the connection.

pi@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 eibd. The script must be run as root because some files are copied and modified in locations where only root have the appropriate permissions. The access to /dev/ttyAMA0 is not mandatory it is only for the TPUART backend.

What the script does:

  • Check for root permissions
  • Download and compile pthsem
  • Download bcusdk, but compile eibd only
  • installing eibd binaries to /usr/local/bin
  • create a init script /etc/init.d/eibd
  • Add a user and group eibd with group membership dialout (to access serial device /dev/ttyAMA0)
  • Add user pi to eibd 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 eibd. 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.

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.

Start a root shell, get the script.

pi@raspberry~: $ sudo su
root@raspberry~: #
root@raspberry~: # wget http://michlstechblog.info/blog/download/shell_scripts/install_eibd_usb.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-tpuart enable TPUART kernel driver backend (deprecated)
–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_eibd_usb.sh
root@raspberry~: # ./install_eibd_usb.sh && update-rc.d eibd defaults

After the script has finished. eibd, findknxusb, vbusmonitor2, groupwrite and some other stuff should be installed at /usr/local/bin, the init script eibd in /etc/init.d and the startup links in /etc/rc3.d must exists. At the end of the script a warning message “insserv: warning: script ‘mathkernel’ missing LSB tags and overrides” is shown. This can be ignored.

root@raspberry~: # ls -l /usr/local/bin
.....
-rwxr-xr-x 1 root staff 471140 Feb 18 22:14 eibd
-rwxr-xr-x 1 root staff  10788 Feb 18 22:14 vbusmonitor2
.....
root@raspberry~: # ls -l /etc/init.d/eibd
-rwxr--r-- 1 root root 2142 Feb Feb 18 22:14 /etc/init.d/eibd

root@raspberry~: # ls -l /etc/rc3.d/*eibd
lrwxrwxrwx 1 root root 14 Feb 18 22:14 /etc/rc3.d/S18eibd -> ../init.d/eibd

Reboot your device

root@raspberry~: # reboot

The eibd options and features are defined at variable EIBD_OPTIONS in file /etc/init.d/eibd. Currently are defined:

  • EIB Busaddress of the daemon 1.1.128
  • EIBnet/IP server
  • EIBnet/IP Routing
  • EIBnet/IP Tunneling
  • Answer discovery and description requests
  • Listen on UNIX domain socket /tmp/eib
  • Listen on TCP port, default 6720
  • the USB device is automatically recognized by findknxusb

This gets a detail list of command line parameter

root@raspberry~: # eibd -?

After the reboot and if your Raspberry KNX USB Interface is connected the eibd should running. For example:

root@raspberry~: # ps ax|grep eibd
2996 ?        Ss     0:00 /usr/local/bin/eibd -d -D -T -R -S -i -u --eibaddr=1.1.128 usb:1:6:1:0:0

If the process is running. Check if you see EIB packets on wire.

pi@raspberry~: # 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

Update 27.12.2014: Added a second script which also includes the bcusdk-usb-cemi and the read-within-callback patch.

Update 2 13.02.2015:A user reports that the USB devices (ID 0e77:0104) from Weinzierl or Lingg&Lanke has the problem that telegrams can be send to but no pakets are received from the KNX bus. This is a known issue and already discussed at the bcusdk mailing list.
Solution: Determine the current USB address of the KNX USB interface by query the eibd process. Login as root.

pi@raspberry~: $ sudo su -
root@raspberry~: # ps ax|grep eibd
2901 ?        Ss     0:00 /usr/local/bin/eibd -d -D -T -R -S -i -u --eibaddr=1.1.128 usb:1:4:1:0:0

Stop eibd

root@raspberry~: # /etc/init.d/eibd stop

Query the size

root@raspberry~: # bcuaddrtab usb:1:4:1:0:0

If not a size of 0 is reported, means that telegrams are filtered, clear the address table size to receive everything from the bus. Specify only the first two digits of the USB Bus address!

root@raspberry~: # bcuaddrtab -w 0 usb:1:4

reboot your the PI. From now on you should receive all telegrams from the bus.
See also the post “EIB/KNX IP Gateway and Router with TPUART buscoppling unit

Update 19.06.2016: I’ve added the first release of a script to compile and install knxd. knxd is a fork of eibd. Any comments are welcome. Configfile is /etc/default/knxd, Socket /tmp/knx. See this EIB/KNX Router with knxd

Michael

Shell script to compile and install eibd with usb interface as backend on debian wheezy
9.6 KiB
6486 Downloads
Details...
Shell script to compile and install eibd for usb interface as backend on raspberry pi
10.4 KiB
2761 Downloads
Details...
Shell script to compile and install eibd for usb interface as backend on raspberry pi for Debian 8 Jessie (systemd based)
9.9 KiB
3124 Downloads
Details...
Shell script to compile and install eibd with usb interface as backend on Debian 8 Jessie
8.9 KiB
2163 Downloads
Details...

234 thoughts on “Raspberry Pi: eibd with a KNX USB Interface”

  1. Awesome post! I’ll test it tomorrow. Have been having trouble with the USB changing adrress on restart – hope your script identifies this automatic at each boot.

    Thanks!
    Martin

  2. Hi Michael Albert

    I am building home automation and security system using the raspberry pi. I already installed the OpenRemote software platform successfully. I also have a small KNX system ready to test a simple system. But what I have not succeed is to establish working connection from raspberry pi to KNX-bus. I have installed your script install_eibd_usb.sh completely. I use Weinzierl KNX USB 330 stick. Raspberry can detect it:
    Bus 001 Device 006: ID 0e77:0104
    Device Descriptor:
    bLength 18
    bDescriptorType 1
    bcdUSB 1.10
    bDeviceClass 0 (Defined at Interface level)
    bDeviceSubClass 0
    bDeviceProtocol 0
    bMaxPacketSize0 8
    idVendor 0x0e77
    idProduct 0x0104
    bcdDevice 2.01
    iManufacturer 1 Weinzierl Engineering GmbH
    iProduct 2 KNX-USB Stick 330
    iSerial 0
    bNumConfigurations 1

    But when I try to scan KNX-bus with vbusmonitor1 ip:localhost command nothing happens. The command eibd enters a response:
    url expected

    My question is, what is missing from my configuration still?

    Pentti

    1. (Some Mails later)

      HI Pentti,

      you have to tried starting the eibd daemon without parameters. You should use the init script

      /etc/init.d/eibd start

      eibd is starting at system boot. Nothing have to be start manually.

      Michael

  3. Hi Michael,
    thanks for this blog. But now I hav a question: Is it possible/necessary to install the cEMI patch after all?
    I’m using a Raspberry PI B+ and a MDT USB interface and the eibd daemon will not start.
    Thx,
    Steffen

  4. Hi Michael,
    thanks for your quick reply. I had to correct a small error in your script.
    Wrong was the line “usermod -a -G eibd eibdutoreconf -fi”.
    But now everything is running perfectly and I’m happy.
    Thanks and regards,
    Steffen

  5. This looks exactly like what I was looking for. Moved into a flat with Busch Jäger Powernet in place. My landlord gave me the Busch Jäger USB Interface for testing purposes … so I think this evening I will have some fun with your tutorial.
    Thanks!

  6. Could you help me configure openhab eibd with usb, I can not find . I tried several settings: (openhab.cfg)
    knx:ip=localhost or #knx:ip=
    knx:type=ROUTER or knx:type=TUNNEL or #knx:type=
    knx:port=3671 or knx:port=6720 or #knx:port=

    But I can not find the right setting.

    Your tutorial is best for eibd , félicitaion

    1. Hi LudoD,

      in my opinion(I never have configured openhab yet) these lines should work:
      knx:ip=localhost
      knx:type=ROUTER
      knx:port=6720

      localhost means that eibd runs at the same host as openhab.

      Michael

  7. Hi Michael,

    I am using a raspberry pi and an ABB STOTZ-KONTAKT KNX-USB Interface (MDRC):
    lsusb:
    Bus 001 Device 004: ID 147b:5120

    I used the script install_eibd_usb_with_cemi_patches.sh which successful
    installed eibd. After a reboot eibd starts and works ok but it uses nearly 100%
    of the CPU.
    When I switch on the trace I can see some errors:
    Layer 10(00A0B020,54F2178D) LoopProcess
    Layer 10(00A0B020,54F2178D) LoopEnd
    Layer 10(00A0B020,54F2178D) LoopBegin
    Layer 10(00A0B020,54F2178D) LoopWait
    Layer 10(00A0B020,54F2178D) LoopProcess
    Layer 0(00A2BF98,54F2178D) RecvError 2
    Layer 0(00A2BF98,54F2178D) StartRecv
    Layer 10(00A0B020,54F2178D) LoopEnd
    Layer 10(00A0B020,54F2178D) LoopBegin
    Layer 10(00A0B020,54F2178D) LoopWait
    Layer 10(00A0B020,54F217AB) LoopProcess
    Layer 10(00A0B020,54F217AB) LoopEnd
    Layer 10(00A0B020,54F217AB) LoopBegin
    Layer 10(00A0B020,54F217AB) LoopWait
    Layer 10(00A0B020,54F217AB) LoopProcess
    Layer 0(00A2BF98,54F217AB) RecvError 2

    Should I use the other script without cemi support or is it a
    problem of my usb interface?
    Can you help me please?
    Thank you!

    Klaus

  8. Hi all,

    I used to try your tutorial but some things are trouble for me :

    – I used to try with Berker Datenschnittstelle 75010008. I need to put bcu1s:/dev/ttyAMA0 in /etc/init.d/eibd config file? bcu1s or bcu1?

    – My Berker Datenschnittstelle 75010008 has address 1.1.1. Where I put this addrress?

    – How I configure ets4 to use the raspberry has a IP/gateway?

    Thanks for your help.

    1. Hi Laurent,

      I’m not sure but as far as I know the Berker Datenschnittstelle wouldn’t work because older RS232 Interfaces uses all Datawires (DTR,DSR,CTS,RTS) for communicating but the Raspberry offers just RxD and TxD.

      A BCU1 isn’t really good supported by eibd and if you want to use you have to modify the install script and enable BCU protocol before compiling eibd.

      Michael

      1. Hi Michael,

        Thanks for your answer.

        I understand that my bcu is not the best.

        I would like to know how I write the command line in eibd file if my raspberry has local ip adresse 192.168.1.17

        Thanks for your help.

        1. Hi Laurent,

          if the eibd runs on the raspberry the IP address is irrelevant. At the command line just the KNX address is to specify not the IP address. eibd binds to all interface and therefore all IP addresses (0.0.0.0).

          Michael

  9. Hi Michael,

    Thanks for your answer.

    Do you think it’s possible I can send you all I can do and see with my installation.

    Because, when I’m send a command with Terminal or Putty (If I’m in Windows) I can see the command in bus monitor of ETS4 but nothing append.

    I’m going to make some snapshots and comments for you if you can help me to make all working.

    It’s only for fun but I’m excited to make all working.

    Thank you so much for your help and your availability.

  10. Hi,

    Thanks dor your answer.

    If you want, I can send you some screenshots and comment about my installation?

    Because when I send a command from Raspberry, I can see it in bus monitor of ets4 and when I send a command from ets4, I can see it on Raspberry.

    It’s only for fun but I would like to make all working.

    Thanks for your availability.

  11. Hi Michael,

    I solved IT with bcuaddrtab -w 0 usb:1:4
    Now I get the Traffic from the bus.
    The next problem is, if I try to send a signal to the bus from the ETS5, nothing happens. But programming of KNX devices works!
    If I try groupwrite to I.e 1/1/0 I can see in vbusmonitor and groupsocketlisten that the source address is 0.0.0.
    same I can see if I try to send from the ETS.
    I assume that this is the problem, that the signal is not valid?

      1. Hallo Michael bei mir wird die physikalische adresse von der eibd Schnittstelle auch als 0.0.0 angezeigt in der ETS5 kann man das irgendwie ändern ? Benutze ein MDT USB Interface.

  12. Hi Michael,
    I have installed the product database. On the ETS interface page I have tried to set the physical address, but it comes to an error: Trying to read non-existing or protected resource (memory or property) (Telegram: $FC $00 $0B $ $01 $35 $10 $00).

    So I set the address of the USB interface with my ETS3 (connect to USB). But connecting it again to the ETS 5 it has again 0.0.0
    I have no idea how to set the address…

  13. Hi to all and thank you Michael for your wonderful article!

    I’m a little in trouble..
    I’ve tried many times to execute the script, and I started also from a clean Raspbian image, but I get always the same result:
    eibd dos not start at boot and if I try to start manually:
    pi@raspberrypi ~ $ /etc/init.d/eibd start
    [….] Starting eibd daemon: eibdstart-stop-daemon: unable to set gid to 1004 (Operation not permitted)
    failed!

    but on other hand:
    pi@raspberrypi ~ $ sudo /etc/init.d/eibd start
    [ ok ] Starting eibd daemon: eibd.

    and then all works ok..

    I give you some information on my system:

    pi@raspberrypi ~ $ cat /etc/passwd

    eibd:x:1001:1004::/home/eibd:/bin/false

    pi@raspberrypi ~ $ cat /etc/group

    eibd:x:1004:pi,eibd

    pi@raspberrypi ~ $ ls -l /usr/local/bin/eibd
    -rwxr-xr-x 1 root staff 450139 Apr 24 01:02 /usr/local/bin/eibd

    pi@raspberrypi ~ $ ls -l /etc/init.d/eibd
    -rwxr-xr-x 1 root root 2236 Apr 24 01:02 /etc/init.d/eibd

    pi@raspberrypi ~ $ ls -l /etc/rc3.d/*eibd
    lrwxrwxrwx 1 root root 14 Apr 24 01:02 /etc/rc3.d/S02eibd -> ../init.d/eibd

    I’m quite experienced with eibd because I play with smarthome.py and eibd from some time, but I’m not so skilled to take me out from this situation… 🙁
    Can you give me any help?

    Thank you so much, bye!
    Stefano

    1. Hi Stefano,

      later, if the system is up you can start eibd (but on other hand)? Or are these commands executed on another system?

      The group exists on the faulty pi?

      Michael

  14. Hi Michael,
    all commands I wrote are typed on the same Rasp, with a fresh new Raspbian installation.
    So I can start eibd only with sudo.
    Without sudo I got the error you see..

    You can also see the content of /etc/passwd and /etc/group.
    I wrote you the permission on eibd related files to better explane my situation (and it seems correct to me).
    Just another think: it’s a Raspberry Pi 2, but I don’t think this could be a problem..
    Thank you!

    1. Hi Stefano,

      Oh, I overlooked the sudo prefix :-). Ok. You can only start init script with user root respectively with sudo, therefore the error message is correct when you try to start /etc/init.d/eibd with user pi.

      Are there some error message at system startup regarding to eibd? Is the error message the as when you tried to start manually?

      Maybe the system startup is altered in some way in the current raspbian image…

      Michael

  15. Hi Michael,
    at boot the only interesting message about eibd is:
    [ ok ] Starting eibd daemon: eibd

    But if I use ps to check if eibd is running:
    pi@raspberrypi ~ $ ps aux|grep eibd
    pi 2265 0.0 0.1 3556 1824 pts/0 S+ 22:17 0:00 grep –color=auto eibd

    Ebid is not running.

    in fact:
    pi@raspberrypi ~ $ groupswrite ip:localhost 0/0/1 1
    Open failed: Connection refused

    after starting eibd manually width sudo prefix I get:
    pi@raspberrypi ~ $ groupswrite ip:localhost 0/0/1 0
    Send request

    So starting manually with sudo eibd works well.

    I also install bootlogd to get daemon log messages written down into a file so I can see only thath:
    pi@raspberrypi ~ $ cat /var/log/boot|grep eibd
    Fri Apr 24 22:49:48 2015: [….] Starting eibd daemon: eibd^[[?25l^[[?1c^[7^[[1G[^[[32m ok ^[[39;49m^[8^[[?25h^[[?0c.

    I really can’t figure out what is wrong.

    Thank you.

  16. Ok Michael, I found my mistake!

    I addedd -d/var/log/eibd.log so I can have a look to what was going on and I read:
    initilization of the EIBnet/IP server failed
    Googling on it I discovered that the problem is related to network status at the time eibd starts.

    To be honest I did not modified /etc/network/interfaces and in fact, after I removed dhcp for eth0 eibd starts correctly at boot!

    I would prefer if it would be possible to leave dhcp on for eth0, and get eibd start the same. (in smarthome.pi image works so).

    Do you think it would be possible?
    I can past /etc/init.d/eibd file from smarthome.pi if you would like to take a look.

    I tried also to add $network into # Required-Start section, and also to increase Sxx number of link into /etc/rc3.d, but both changes did not solve the problem.

    Thank you in advance, bye.

    1. Hi Stefano,

      good to hear 🙂 I assumed that you have set a static IP Adresse before you beginning (as decripted in my post) the installation of eibd .

      Michael

  17. Hi,
    I tried to install everything with your script “install_eibd_usb_with_cemi_patches.sh”
    on raspberry pi B+ raspbian wheezy
    – installation was successfull
    – after reboot, eibd has startet sucessfully:
    ps ax | grep eibd
    2267 ? Ss 0:00 /usr/local/bin/eibd -d -D -T -R -S -i -u –eibaddr=1.1.128 usb:1:4:1:0:0
    – but running vbusmonitor, no signal could be recieved.
    – after running command “groupswrite ip:localhost 1/1/7 0”, nothing happen until I cancel operation with CTRL + C
    – If I start with /usr/local/bin/eibd -d -D -T -R -S -i -u –eibaddr=1.1.128 usb:1:4:1:0:0 -d/var/log/eibd.log
    I get message: initialisation of the eibd unix protocol failed

    Can anyone help? Thanks in advance!

    1. Hi Oliver,

      “I get message: initialisation of the eibd unix protocol failed” => Have you started eibd as root once or is eibd already startet? This error occurs when eibd can’t create or overwrite the it’s SOCKET /tmp/eib when either the user “eibd” has no permission or eibd is already running and has open the file/socket.
      Try:
      sudo killall eibd
      sudo rm /tmp/eib
      sudo /etc/init.d/eibd start

      “– If I start with /usr/local/bin/eibd -d -D -T -R -S -i -u –eibaddr=1.1.128 usb:1:4:1:0:0 -d/var/log/eibd.log” => Start and stop eibd only with the init script:
      /etc/init.d/eibd start
      /etc/init.d/eibd stop

      Which USB interface do you use? Have also tried the steps at the end of the post (UPDATE 2) to clear the address table?

      Michael

  18. Hi,
    I am using Gira USB interface
    I did run your commands:
    pi@raspberrypi ~ $ sudo killall eibd
    pi@raspberrypi ~ $ sudo rm /tmp/eib
    pi@raspberrypi ~ $ sudo /etc/init.d/eibd start
    [ ok ] Starting eibd daemon: eibd.
    pi@raspberrypi ~ $ groupswrite ip:localhost 0/0/1 1

    ^C
    pi@raspberrypi ~ $ findknxusb
    Possible addresses for KNX USB devices:
    device: 1:4:1:0:0 (Gira Giersiepen GmbH & Co. KG:KNX-USB Data Interface)
    pi@raspberrypi ~ $ sudo su –
    root@raspberrypi:~# ps ax | grep eibd
    20929 ? Ss 0:00 /usr/local/bin/eibd -d -D -T -R -S -i -u –eibaddr=1.1.128 usb:1:4:1:0:0
    22493 pts/0 S+ 0:00 grep eibd
    root@raspberrypi:~# /etc/init.d/eibd stop
    [ ok ] Stopping eibd daemon: eibd.
    root@raspberrypi:~# bcuaddrtab usb:1:4:1:0:0
    Size: 0
    Segmentation fault
    root@raspberrypi:~# bcuaddrtab w 0 usb:1:4
    unexpected parameter
    root@raspberrypi:~# bcuaddrtab -w 0 usb:1:4
    Size 0 written
    Segmentation fault
    root@raspberrypi:~# sudo reboot

    Broadcast message from root@raspberrypi (pts/0) (Wed Jul 15 16:32:42 2015):
    The system is going down for reboot NOW!
    root@raspberrypi:~#
    groupswrite ip:localhost 0/0/1 1
    ^C

    Regards,
    Oliver

      1. eibd is successfully killed
        pi@raspberrypi ~ $ sudo killall eibd
        pi@raspberrypi ~ $ sudo rm /tmp/eib
        pi@raspberrypi ~ $ ps ax|grep eibd
        14785 pts/0 S+ 0:00 grep –color=auto eibd
        pi@raspberrypi ~ $ sudo /etc/init.d/eibd start
        [ ok ] Starting eibd daemon: eibd.
        pi@raspberrypi ~ $ sudo groupswrite ip:localhost 1/0/0 1
        ^C

          1. Hi,
            I did re-install everything. But it fails again.
            Then I tried:
            sudo groupswrite local:/tmp/eib 1/6/0 1
            instead of:
            sudo groupswrite ip:localhost 1/0/0 1
            It works fine now!!! Don’t know why….

          2. Hi Oliver,

            seems like a very strange behavior. A local socket connection is possible but a TCP/IP connection hang….interesting. Which distribution do you use? Raspbian?

            Can you send me the output the following commands:
            sudo iptables -vL
            sudo netstat -pln
            sudo ps axl | grep eibd
            ls -l /tmp

            and can you please execute, with strace in front, groupswrite ip:localhost 1/0/0 1 again and send me the output file strace_grpwrite.txt by e-mail?
            strace groupswrite ip:localhost > /tmp/strace_grpwrite.txt

            Is a connection with ETS possible?

            Michael

          3. Hi, i have a plain installed raspian jessie on an raspberry b+.
            After updating to the newest Version i have installed the install_eibd_usb.sh script, restarted the box and the behavior is like this:
            root@raspberrypi:/# findknxusb
            Segmentation fault
            root@raspberrypi:/# bcuaddrtab usb:1
            Segmentation fault
            root@raspberrypi:/# lsusb
            Bus 001 Device 004: ID 135e:0022

            could you please help me?

            thank you
            Alex

          4. Hi Alex,

            did you run install_eibd_usb.sh before or after upgrading to the new version?

            What means new version in detail? apt-get update && apt-get upgrade?

            On debian Jessie you should use install_eibd_usb_systemd.sh or install_eibd_usb_with_cemi_patches_systemd.sh. But this should not be the problem.

            Have you tried to run the script again to compile it again? Maybe this is problem with some changed libraries.

            Michael

          5. Hi,

            I have a problem with this installation. When I use command:
            ps ax|grep eibd

            the answer is:
            28318 pts/0 S+ 0:00 grep eibd

            There is no information about connected USB which I see by command lsusb and the ID’s are appropriate(I have Siemens usb). What I must do to install this application on my system(Raspbian jessy)?

            Please help

    1. Hi Knxrasp

      I think this is possible:

      ip: connects with the EIBnet/IP Routing protocol over an EIBnet/IP gateway. The
      gateway must be so configured, that it routes the necessary addresses

      ipt: connects with the EIBnet/IP Tunneling protocol over an EIBnet/IP gateway.
      The gateway must be so configured, that it routes the necessary addresses

      iptn: connects with the EIBnet/IP Tunneling protocol over an EIBnet/IP gateway
      using the NAT mode

      Your options should looks the following line. Replace 10.254.1.4 with the IP Address of your KNX Router.
      Adjust the EIBD_OPTIONS variable in /etc/init.d/eibd

      export EIBD_OPTIONS=”-d -D -T -R -S -i -u –eibaddr=1.1.128 ip:10.254.1.4″

      Michael

  19. Hi Michael,

    thanks a thousand times for the effort of making that great tutorial and the patience in answering questions. 😉

    From what I gather the result of both Raspberry eibd projects (this one and the one with KNX connection using an UART) will be an device, based on an Raspberry Pi, that can basically replace an KNX IP Router (not only an interface) and should also be able to simultaneously allow programming the KNX using ETS5 and having e.g. a GIRA Homeserver running and an IPAD and …

    Is that the correct impression or what is missing in your home made solution that one can only get get with a commercially available KNX IP router?

    -Udo

  20. …and maybe as a followup question. Do you think there will be any issues when trying your project with the more recent Rasberry Pi 2, Model B: http://www.raspberrypi.org/products/raspberry-pi-2-model-b/

    Because I found this set here: http://www.pollin.de/shop/dt/ODc1NzkyOTk-/Bausaetze_Module/Entwicklerboards/Raspberry_Pi_2_Hutschienen_Set.html which is sadly not available with the older version anymore.

    … and I guess in combination with an used USB interface one can get via ebay this would make an affordable IP router (still under the assumption that the eibd solution you present can really replace one fully) that has more horsepower for other stuff running on the RasPi and will fit nicely into an distribution cabinet (aka Schaltschrank) together with the rest of the KNX equipment.

    1. Hi Udo,

      i never used a (buyable) KNX IP Router 🙂 to access KNX from the network. In my opinion eibd can fully replace a KNX IP Router.

      eibd should also work on a Raspberry Pi 2 B.

      Michael

      1. I purchased The RasPi 2 together with an Gira USB Interface, installed Raspbian and on it then eibd using your script (I started with the first one and then — without cleanup — with the second one, containing the patch).

        I set the IP to 192.168.1.200 (but because the syntax of /etc/network/interfaces changed I configured my DHCP server to always give a lease with that IP.

        Now I am running into the same problems — eibd is not running after a reboot and it’s not running for long if I start it manually.

        I tried to start it without -d to capture a trace log on the console:

        pi@raspberrypi ~ $ findknxusb
        Possible addresses for KNX USB devices:
        device: 1:4:1:0:0 (Gira Giersiepen GmbH & Co. KG:KNX-USB Data Interface)
        pi@raspberrypi ~ $ /usr/local/bin/eibd  -D -T -R -S -i -t 10 -u --eibaddr=1.1.128 usb:1:4:1:0:0
        Layer 1(016C7F98,55D35161) Detect
        Layer 1(016C7F98,55D35161) Using 1:4:1:0:0 (2:129)
        Layer 1(016C7F98,55D35161) Open
        Layer 1(016C7F98,55D35161) Claimed
        Layer 1(016C7F98,55D35161) Opened
        Layer 1(016C7F98,55D35161) Send(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 1(016C7F98,55D35161) Recv(064): 01 13 0B 00 08 00 03 0F 02 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 1(016C7F98,55D35166) Send(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 1(016C7F98,55D35166) Recv(064): 01 13 0B 00 08 00 03 0F 02 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 1(016C7F98,55D3516B) Send(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 1(016C7F98,55D3516B) Recv(064): 01 13 0B 00 08 00 03 0F 02 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 1(016C7F98,55D35170) Send(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 1(016C7F98,55D35170) Recv(064): 01 13 0B 00 08 00 03 0F 02 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 1(016C7F98,55D35175) Send(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 1(016C7F98,55D35175) Recv(064): 01 13 0B 00 08 00 03 0F 02 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 1(016C7F98,55D35175) Unsupported EMI 00 00
        Layer 1(016C7F98,55D35175) Close
        Segmentation fault
        

        So, the problem seems to be: “Unsupported EMI 00 00” — what ever this means.

        I do only have the RasPi2 and attaced to it the USB Interface, but as of now no KNX line is connected. Is this required for eibd to run or am I missing something else?

  21. Hello,

    I’m encountering issue to start the eibd daemon at the startup:
    I use your script, it runs well if I run it using the command line: “sudo /etc/init.d/eibd start” BUT I always have to remove the eib socket before using “sudo rm /tmp/eib”.

    It seems that this one is always created at each startup using “root” user.

    So by reading your article “EIB/KNX: Upstart startup script for eibd” , I understand that eibd should have been started as root before my startup script… Do you think it is the case? How can I check it? or disable it?

    Thanks for your help!
    Thomas.

    1. Hi Thomas,

      which startup script do you use? The SysV (/etc/init.d/eibd) or the upstart Script.

      If you use the SysV Script the socket is created correctly with user/group eibd:

      root@debdev:~# ls -l /tmp/eib
      srwxr-xr-x 1 eibd eibd 0 Aug 20 16:48 /tmp/eib

      If you start eibd (at command line, not with the init script) as root you have to delete /tmp/eib manually before starting the init script.

      Michael

      1. Hi Michael,

        Thanks for your answer.
        In fact everything works the first time:
        1) The KNX line is powered
        2) The Raspberry board is powered

        If I reboot the Raspberry board, it seems that a socket still opened and I have to delete /tmp/eib manually.

        But If I switched off the KNX line, then reboot the Raspberry board, everything is OK.

        Maybe eibd is not properly stopped during the reboot of the Raspberry board? what do you think?

        BR,
        Thomas.

        1. Hi Thomas

          in raspbian wheezy /tmp is cleanup at every (re)boot by the mountall-bootclean.sh script and therefore the /tmp/eib could not survive a reboot.

          Do you use the /etc/init.d/eibd and not the upstart script?

          Can you stop eibd:
          sudo su
          /etc/init.d/eibd stop

          delete the socket:
          rm /tmp/eib

          and temporary disable the eibd init script at boot time:
          update-rc.d eibd disable

          and reboot the raspberry:

          reboot

          After reboot no socket file must exist, otherwise eibd is started somewhere else while booting.

          Michael

          1. Hi Michael,

            I confirm that I use the the /etc/init.d/eibd startup script.

            I’ve also tried your procedure (on a fresh install) to disable the startup script and effectively, no socket is created during the boot.
            I’ve re-enabled the startup script but nothing… no socket created…
            The only thing i did not follow is the part concerning the setup of the IP address to static. For information, I used the WIFI connection and I leave the configuration by default.
            Do you think that using the DHCP instead of a static IP Address can be an issue?

            (I will reset my installation to only use ethernet connections to see if it solves the issue)

            Thanks for you great help!
            Thomas.

          2. Hi Thomas,

            is eibd running after the reboot? I think not. Whats happen when you start eibd manually? Is the socket created with correct permissions?

            Use static IP Addresses. Some people reports issues like yours when using IP Addresses dynamically assigned by DHCP.

            Michael

  22. Hello Thomas Awesome script working Well on a my Raspberry pi and Merten Usb.

    I Wonder if you tried it with Affordable GVS VideoStar USB Interface.

    And if it working

  23. Hi, Michael,

    for starters, great post!
    I am an newbe in this matter but,
    I have exactly the same problem as Oliver had in july.

    I have provided you with the information you requested for in your response to Oliver.
    can you help me along to get me started.

    for the hardware part,
    I have a Hager Interface USB tebis EIB/KNX, DIN-rail
    an use a strawberry pi b2

    for the software:
    I used this image to install raspbian:
    2015-05-05-raspbian-wheezy.img

    next i have set the ip static.
    and I installed a tightvncserver.

    additional question/info:
    when i use the socket /etc/eib, he sends the request but nothing realy happens.
    when i use groupswrite to the groupsaddress for the light with value 1, i thought the light should be lighten up, isn’ t?

    vbusmonitor1 does shows this command when i connect to the socket.

    you have asked for next information:

    1) sudo iptables -vL
    Chain INPUT (policy ACCEPT 1117 packets, 88378 bytes)
    pkts bytes target prot opt in out source destination

    Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
    pkts bytes target prot opt in out source destination

    Chain OUTPUT (policy ACCEPT 966 packets, 129K bytes)
    pkts bytes target prot opt in out source destination
    2) sudo 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:6720 0.0.0.0:* LISTEN 3851/eibd
    tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2066/sshd
    udp 0 0 0.0.0.0:68 0.0.0.0:* 2044/dhcpcd
    udp 0 0 0.0.0.0:3671 0.0.0.0:* 3851/eibd
    udp 0 0 192.168.x.x:3672 0.0.0.0:* 3851/eibd
    udp 0 0 192.168.x.x:123 0.0.0.0:* 1967/ntpd
    udp 0 0 0.0.0.0:123 0.0.0.0:* 1967/ntpd
    udp 0 0 0.0.0.0:5353 0.0.0.0:* 2089/avahi-daemon:
    udp 0 0 0.0.0.0:36187 0.0.0.0:* 2089/avahi-daemon:
    Active UNIX domain sockets (only servers)
    Proto RefCnt Flags Type State I-Node PID/Program name Path
    unix 2 [ ACC ] STREAM LISTENING 804 2044/dhcpcd /var/run/dhcpcd.sock
    unix 2 [ ACC ] STREAM LISTENING 806 2044/dhcpcd /var/run/dhcpcd.unpriv.sock
    unix 2 [ ACC ] STREAM LISTENING 7000 2032/dbus-daemon /var/run/dbus/system_bus_socket
    unix 2 [ ACC ] STREAM LISTENING 9416 3851/eibd /tmp/eib
    unix 2 [ ACC ] SEQPACKET LISTENING 394 175/udevd /run/udev/control
    unix 2 [ ACC ] STREAM LISTENING 5114 2089/avahi-daemon: /var/run/avahi-daemon/socket

    3) sudo ps axl | grep eibd
    1 1001 3851 1 20 0 3180 1528 poll_s Ss ? 0:00 /usr/local/bin/eibd -d -D -T -R -S -i -u –eibaddr=1.1.128 ipt:192.x.x.x
    0 0 10189 5129 20 0 4056 1744 pipe_w S+ pts/0 0:00 grep eibd
    4) ls -l /tmp
    srwxr-xr-x 1 eibd eibd 0 sep 26 21:42 eib

    // see next question for this files 🙂
    -rw-r–r– 1 root root 13 sep 26 21:53 groupswriteSocket.txt
    -rw-r–r– 1 pi pi 34 sep 26 21:48 strace_grpwrite.txt

    and can you please execute, with strace in front, groupswrite ip:localhost 1/0/0 1 again and send me the output file strace_grpwrite.txt by e-mail?
    strace groupswrite ip:localhost > /tmp/strace_grpwrite.txt
    execve(“/usr/local/bin/groupswrite”, [“groupswrite”, “ip:localhost”, “1/1/4”, “1”], [/* 17 vars */]) = 0
    brk(0) = 0x1268000
    uname({sys=”Linux”, node=”raspberrypi”, …}) = 0
    access(“/etc/ld.so.nohwcap”, F_OK) = -1 ENOENT (No such file or directory)
    mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f45000
    access(“/etc/ld.so.preload”, R_OK) = 0
    open(“/etc/ld.so.preload”, O_RDONLY) = 3
    fstat64(3, {st_mode=S_IFREG|0644, st_size=44, …}) = 0
    mmap2(NULL, 44, PROT_READ|PROT_WRITE, MAP_PRIVATE, 3, 0) = 0x76f44000
    close(3) = 0
    open(“/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so”, O_RDONLY) = 3
    read(3, “\177ELF\1\1\1\3(\1\270\4004″…, 512) = 512
    lseek(3, 7276, SEEK_SET) = 7276
    read(3, “”…, 1080) = 1080
    lseek(3, 7001, SEEK_SET) = 7001
    read(3, “A.aeabi\1$056\6\6\10\1\t\1\n\2\22\4\24\1\25″…, 47) = 47
    fstat64(3, {st_mode=S_IFREG|0755, st_size=10170, …}) = 0
    mmap2(NULL, 39740, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x76f18000
    mprotect(0x76f1a000, 28672, PROT_NONE) = 0
    mmap2(0x76f21000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0x76f21000
    close(3) = 0
    munmap(0x76f44000, 44) = 0
    open(“/etc/ld.so.cache”, O_RDONLY) = 3
    fstat64(3, {st_mode=S_IFREG|0644, st_size=58133, …}) = 0
    mmap2(NULL, 58133, PROT_READ, MAP_PRIVATE, 3, 0) = 0x76f09000
    close(3) = 0
    access(“/etc/ld.so.nohwcap”, F_OK) = -1 ENOENT (No such file or directory)
    open(“/lib/arm-linux-gnueabihf/libc.so.6”, O_RDONLY) = 3
    read(3, “\177ELF\1\1\1\3(\1\210y\1004″…, 512) = 512
    lseek(3, 1198880, SEEK_SET) = 1198880
    read(3, “”…, 1360) = 1360
    lseek(3, 1198444, SEEK_SET) = 1198444
    read(3, “A.aeabi\1$056\6\6\10\1\t\1\n\2\22\4\24\1\25″…, 47) = 47
    fstat64(3, {st_mode=S_IFREG|0755, st_size=1200240, …}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f44000
    mmap2(NULL, 1242400, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x76dd9000
    mprotect(0x76efc000, 28672, PROT_NONE) = 0
    mmap2(0x76f03000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x122) = 0x76f03000
    mmap2(0x76f06000, 9504, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x76f06000
    close(3) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f43000
    set_tls(0x76f434c0, 0x76f43b98, 0x76f48048, 0x76f434c0, 0x76f48048) = 0
    mprotect(0x76f03000, 8192, PROT_READ) = 0
    mprotect(0x76f47000, 4096, PROT_READ) = 0
    munmap(0x76f09000, 58133) = 0
    brk(0) = 0x1268000
    brk(0x1289000) = 0x1289000
    getpid() = 11657
    open(“/etc/resolv.conf”, O_RDONLY) = 3
    fstat64(3, {st_mode=S_IFREG|0644, st_size=66, …}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f42000
    read(3, “# Generated by resolvconf\nsearch”…, 4096) = 66
    read(3, “”, 4096) = 0
    close(3) = 0
    munmap(0x76f42000, 4096) = 0
    socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
    connect(3, {sa_family=AF_FILE, path=”/var/run/nscd/socket”}, 110) = -1 ENOENT (No such file or directory)
    close(3) = 0
    socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
    connect(3, {sa_family=AF_FILE, path=”/var/run/nscd/socket”}, 110) = -1 ENOENT (No such file or directory)
    close(3) = 0
    open(“/etc/nsswitch.conf”, O_RDONLY) = 3
    fstat64(3, {st_mode=S_IFREG|0644, st_size=513, …}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f42000
    read(3, “# /etc/nsswitch.conf\n#\n# Example”…, 4096) = 513
    read(3, “”, 4096) = 0
    close(3) = 0
    munmap(0x76f42000, 4096) = 0
    open(“/etc/ld.so.cache”, O_RDONLY) = 3
    fstat64(3, {st_mode=S_IFREG|0644, st_size=58133, …}) = 0
    mmap2(NULL, 58133, PROT_READ, MAP_PRIVATE, 3, 0) = 0x76f09000
    close(3) = 0
    access(“/etc/ld.so.nohwcap”, F_OK) = -1 ENOENT (No such file or directory)
    open(“/lib/arm-linux-gnueabihf/libnss_files.so.2”, O_RDONLY) = 3
    read(3, “\177ELF\1\1\1\3(\1\324\31004″…, 512) = 512
    lseek(3, 41532, SEEK_SET) = 41532
    read(3, “”…, 1160) = 1160
    lseek(3, 41192, SEEK_SET) = 41192
    read(3, “A0aeabi\1&056\6\6\10\1\t\1\n\2\22\4\24\1\25″…, 49) = 49
    fstat64(3, {st_mode=S_IFREG|0644, st_size=42692, …}) = 0
    mmap2(NULL, 74492, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x76dc6000
    mprotect(0x76dd0000, 28672, PROT_NONE) = 0
    mmap2(0x76dd7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9) = 0x76dd7000
    close(3) = 0
    mprotect(0x76dd7000, 4096, PROT_READ) = 0
    munmap(0x76f09000, 58133) = 0
    open(“/etc/host.conf”, O_RDONLY) = 3
    fstat64(3, {st_mode=S_IFREG|0644, st_size=9, …}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f42000
    read(3, “multi on\n”, 4096) = 9
    read(3, “”, 4096) = 0
    close(3) = 0
    munmap(0x76f42000, 4096) = 0
    open(“/etc/hosts”, O_RDONLY|O_CLOEXEC) = 3
    fcntl64(3, F_GETFD) = 0x1 (flags FD_CLOEXEC)
    fstat64(3, {st_mode=S_IFREG|0644, st_size=178, …}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f42000
    read(3, “127.0.0.1\tlocalhost\n::1\t\tlocalho”…, 4096) = 178
    read(3, “”, 4096) = 0
    close(3) = 0
    munmap(0x76f42000, 4096) = 0
    socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
    connect(3, {sa_family=AF_INET, sin_port=htons(6720), sin_addr=inet_addr(“127.0.0.1”)}, 16) = ? ERESTARTSYS (To be restarted)
    — SIGWINCH (Window changed) @ 0 (0) —
    connect(3, {sa_family=AF_INET, sin_port=htons(6720), sin_addr=inet_addr(“127.0.0.1”)}, 16execve(“/usr/local/bin/groupswrite”, [“groupswrite”, “ip:localhost”, “1/1/4”, “1”], [/* 17 vars */]) = 0
    brk(0) = 0x1268000
    uname({sys=”Linux”, node=”raspberrypi”, …}) = 0
    access(“/etc/ld.so.nohwcap”, F_OK) = -1 ENOENT (No such file or directory)
    mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f45000
    access(“/etc/ld.so.preload”, R_OK) = 0
    open(“/etc/ld.so.preload”, O_RDONLY) = 3
    fstat64(3, {st_mode=S_IFREG|0644, st_size=44, …}) = 0
    mmap2(NULL, 44, PROT_READ|PROT_WRITE, MAP_PRIVATE, 3, 0) = 0x76f44000
    close(3) = 0
    open(“/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so”, O_RDONLY) = 3
    read(3, “\177ELF\1\1\1\3(\1\270\4004″…, 512) = 512
    lseek(3, 7276, SEEK_SET) = 7276
    read(3, “”…, 1080) = 1080
    lseek(3, 7001, SEEK_SET) = 7001
    read(3, “A.aeabi\1$056\6\6\10\1\t\1\n\2\22\4\24\1\25″…, 47) = 47
    fstat64(3, {st_mode=S_IFREG|0755, st_size=10170, …}) = 0
    mmap2(NULL, 39740, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x76f18000
    mprotect(0x76f1a000, 28672, PROT_NONE) = 0
    mmap2(0x76f21000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0x76f21000
    close(3) = 0
    munmap(0x76f44000, 44) = 0
    open(“/etc/ld.so.cache”, O_RDONLY) = 3
    fstat64(3, {st_mode=S_IFREG|0644, st_size=58133, …}) = 0
    mmap2(NULL, 58133, PROT_READ, MAP_PRIVATE, 3, 0) = 0x76f09000
    close(3) = 0
    access(“/etc/ld.so.nohwcap”, F_OK) = -1 ENOENT (No such file or directory)
    open(“/lib/arm-linux-gnueabihf/libc.so.6”, O_RDONLY) = 3
    read(3, “\177ELF\1\1\1\3(\1\210y\1004″…, 512) = 512
    lseek(3, 1198880, SEEK_SET) = 1198880
    read(3, “”…, 1360) = 1360
    lseek(3, 1198444, SEEK_SET) = 1198444
    read(3, “A.aeabi\1$056\6\6\10\1\t\1\n\2\22\4\24\1\25″…, 47) = 47
    fstat64(3, {st_mode=S_IFREG|0755, st_size=1200240, …}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f44000
    mmap2(NULL, 1242400, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x76dd9000
    mprotect(0x76efc000, 28672, PROT_NONE) = 0
    mmap2(0x76f03000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x122) = 0x76f03000
    mmap2(0x76f06000, 9504, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x76f06000
    close(3) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f43000
    set_tls(0x76f434c0, 0x76f43b98, 0x76f48048, 0x76f434c0, 0x76f48048) = 0
    mprotect(0x76f03000, 8192, PROT_READ) = 0
    mprotect(0x76f47000, 4096, PROT_READ) = 0
    munmap(0x76f09000, 58133) = 0
    brk(0) = 0x1268000
    brk(0x1289000) = 0x1289000
    getpid() = 11657
    open(“/etc/resolv.conf”, O_RDONLY) = 3
    fstat64(3, {st_mode=S_IFREG|0644, st_size=66, …}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f42000
    read(3, “# Generated by resolvconf\nsearch”…, 4096) = 66
    read(3, “”, 4096) = 0
    close(3) = 0
    munmap(0x76f42000, 4096) = 0
    socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
    connect(3, {sa_family=AF_FILE, path=”/var/run/nscd/socket”}, 110) = -1 ENOENT (No such file or directory)
    close(3) = 0
    socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
    connect(3, {sa_family=AF_FILE, path=”/var/run/nscd/socket”}, 110) = -1 ENOENT (No such file or directory)
    close(3) = 0
    open(“/etc/nsswitch.conf”, O_RDONLY) = 3
    fstat64(3, {st_mode=S_IFREG|0644, st_size=513, …}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANO) = -1 ETIMEDOUT (Connection timed out)
    close(3) = 0
    fstat64(1, {st_mode=S_IFREG|0644, st_size=0, …}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f42000
    write(1, “Open failed: Connection timed ou”…, 34) = 34
    exit_group(1) = ?
    root@raspberrypi:/home/pi# execve(“/usr/local/bin/groupswrite”, [“groupswrite”, “ip:localhost”, “1/1/4”, “1”], [/* 17 vars */]) = 0
    bash: syntaxfout nabij onverwacht symbool ‘”/usr/local/bin/groupswrite”,’
    root@raspberrypi:/home/pi# brk(0) = 0x1268000
    bash: syntaxfout nabij onverwacht symbool ‘0’
    root@raspberrypi:/home/pi# uname({sys=”Linux”, node=”raspberrypi”, …}) = 0
    bash: syntaxfout nabij onverwacht symbool ‘{sys=”Linux”,’
    root@raspberrypi:/home/pi# access(“/etc/ld.so.nohwcap”, F_OK) = -1 ENOENT (No such file or directory)
    bash: syntaxfout nabij onverwacht symbool ‘”/etc/ld.so.nohwcap”,’
    root@raspberrypi:/home/pi# mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f45000
    bash: syntaxfout nabij onverwacht symbool ‘NULL,’
    root@raspberrypi:/home/pi# access(“/etc/ld.so.preload”, R_OK) = 0
    bash: syntaxfout nabij onverwacht symbool ‘”/etc/ld.so.preload”,’
    root@raspberrypi:/home/pi# open(“/etc/ld.so.preload”, O_RDONLY) = 3
    bash: syntaxfout nabij onverwacht symbool ‘”/etc/ld.so.preload”,’
    root@raspberrypi:/home/pi# fstat64(3, {st_mode=S_IFREG|0644, st_size=44, …}) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# mmap2(NULL, 44, PROT_READ|PROT_WRITE, MAP_PRIVATE, 3, 0) = 0x76f44000
    bash: syntaxfout nabij onverwacht symbool ‘NULL,’
    root@raspberrypi:/home/pi# close(3) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3’
    root@raspberrypi:/home/pi# open(“/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so”, O_RDONLY) = 3
    bash: syntaxfout nabij onverwacht symbool ‘”/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so”,’
    root@raspberrypi:/home/pi# read(3, “\177ELF\1\1\1\3(\1\270\4004″…, 512) = 512
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# lseek(3, 7276, SEEK_SET) = 7276
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# read(3, “”…, 1080) = 1080
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# lseek(3, 7001, SEEK_SET) = 7001
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# read(3, “A.aeabi\1$056\6\6\10\1\t\1\n\2\22\4\24\1\25″…, 47) = 47
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# fstat64(3, {st_mode=S_IFREG|0755, st_size=10170, …}) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# mmap2(NULL, 39740, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x76f18000
    bash: syntaxfout nabij onverwacht symbool ‘NULL,’
    root@raspberrypi:/home/pi# mprotect(0x76f1a000, 28672, PROT_NONE) = 0
    bash: syntaxfout nabij onverwacht symbool ‘0x76f1a000,’
    root@raspberrypi:/home/pi# mmap2(0x76f21000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0x76f21000
    bash: syntaxfout nabij onverwacht symbool ‘0x76f21000,’
    root@raspberrypi:/home/pi# close(3) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3’
    root@raspberrypi:/home/pi# munmap(0x76f44000, 44) = 0
    bash: syntaxfout nabij onverwacht symbool ‘0x76f44000,’
    root@raspberrypi:/home/pi# open(“/etc/ld.so.cache”, O_RDONLY) = 3
    bash: syntaxfout nabij onverwacht symbool ‘”/etc/ld.so.cache”,’
    root@raspberrypi:/home/pi# fstat64(3, {st_mode=S_IFREG|0644, st_size=58133, …}) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# mmap2(NULL, 58133, PROT_READ, MAP_PRIVATE, 3, 0) = 0x76f09000
    bash: syntaxfout nabij onverwacht symbool ‘NULL,’
    root@raspberrypi:/home/pi# close(3) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3’
    root@raspberrypi:/home/pi# access(“/etc/ld.so.nohwcap”, F_OK) = -1 ENOENT (No such file or directory)
    bash: syntaxfout nabij onverwacht symbool ‘”/etc/ld.so.nohwcap”,’
    root@raspberrypi:/home/pi# open(“/lib/arm-linux-gnueabihf/libc.so.6″, O_RDONLY) = 3
    bash: syntaxfout nabij onverwacht symbool ‘”/lib/arm-linux-gnueabihf/libc.so.6”,’
    root@raspberrypi:/home/pi# read(3, “\177ELF\1\1\1\3(\1\210y\1004″…, 512) = 512
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# lseek(3, 1198880, SEEK_SET) = 1198880
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# read(3, “”…, 1360) = 1360
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# lseek(3, 1198444, SEEK_SET) = 1198444
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# read(3, “A.aeabi\1$056\6\6\10\1\t\1\n\2\22\4\24\1\25″…, 47) = 47
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# fstat64(3, {st_mode=S_IFREG|0755, st_size=1200240, …}) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f44000
    bash: syntaxfout nabij onverwacht symbool ‘NULL,’
    root@raspberrypi:/home/pi# mmap2(NULL, 1242400, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x76dd9000
    bash: syntaxfout nabij onverwacht symbool ‘NULL,’
    root@raspberrypi:/home/pi# mprotect(0x76efc000, 28672, PROT_NONE) = 0
    bash: syntaxfout nabij onverwacht symbool ‘0x76efc000,’
    root@raspberrypi:/home/pi# mmap2(0x76f03000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x122) = 0x76f03000
    bash: syntaxfout nabij onverwacht symbool ‘0x76f03000,’
    root@raspberrypi:/home/pi# mmap2(0x76f06000, 9504, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x76f06000
    bash: syntaxfout nabij onverwacht symbool ‘0x76f06000,’
    root@raspberrypi:/home/pi# close(3) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3’
    root@raspberrypi:/home/pi# mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f43000
    bash: syntaxfout nabij onverwacht symbool ‘NULL,’
    root@raspberrypi:/home/pi# set_tls(0x76f434c0, 0x76f43b98, 0x76f48048, 0x76f434c0, 0x76f48048) = 0
    bash: syntaxfout nabij onverwacht symbool ‘0x76f434c0,’
    root@raspberrypi:/home/pi# mprotect(0x76f03000, 8192, PROT_READ) = 0
    bash: syntaxfout nabij onverwacht symbool ‘0x76f03000,’
    root@raspberrypi:/home/pi# mprotect(0x76f47000, 4096, PROT_READ) = 0
    bash: syntaxfout nabij onverwacht symbool ‘0x76f47000,’
    root@raspberrypi:/home/pi# munmap(0x76f09000, 58133) = 0
    bash: syntaxfout nabij onverwacht symbool ‘0x76f09000,’
    root@raspberrypi:/home/pi# brk(0) = 0x1268000
    bash: syntaxfout nabij onverwacht symbool ‘0’
    root@raspberrypi:/home/pi# brk(0x1289000) = 0x1289000
    bash: syntaxfout nabij onverwacht symbool ‘0x1289000’
    root@raspberrypi:/home/pi# getpid() = 11657
    bash: syntaxfout nabij onverwacht symbool ‘=’
    root@raspberrypi:/home/pi# open(“/etc/resolv.conf”, O_RDONLY) = 3
    bash: syntaxfout nabij onverwacht symbool ‘”/etc/resolv.conf”,’
    root@raspberrypi:/home/pi# fstat64(3, {st_mode=S_IFREG|0644, st_size=66, …}) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f42000
    bash: syntaxfout nabij onverwacht symbool ‘NULL,’
    root@raspberrypi:/home/pi# read(3, “# Generated by resolvconf\nsearch”…, 4096) = 66
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# read(3, “”, 4096) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# close(3) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3’
    root@raspberrypi:/home/pi# munmap(0x76f42000, 4096) = 0
    bash: syntaxfout nabij onverwacht symbool ‘0x76f42000,’
    root@raspberrypi:/home/pi# socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
    bash: syntaxfout nabij onverwacht symbool ‘PF_FILE,’
    root@raspberrypi:/home/pi# connect(3, {sa_family=AF_FILE, path=”/var/run/nscd/socket”}, 110) = -1 ENOENT (No such file or directory)
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# close(3) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3’
    root@raspberrypi:/home/pi# socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
    bash: syntaxfout nabij onverwacht symbool ‘PF_FILE,’
    root@raspberrypi:/home/pi# connect(3, {sa_family=AF_FILE, path=”/var/run/nscd/socket”}, 110) = -1 ENOENT (No such file or directory)
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# close(3) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3’
    root@raspberrypi:/home/pi# open(“/etc/nsswitch.conf”, O_RDONLY) = 3
    bash: syntaxfout nabij onverwacht symbool ‘”/etc/nsswitch.conf”,’
    root@raspberrypi:/home/pi# fstat64(3, {st_mode=S_IFREG|0644, st_size=513, …}) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f42000
    bash: syntaxfout nabij onverwacht symbool ‘NULL,’
    root@raspberrypi:/home/pi# read(3, “# /etc/nsswitch.conf\n#\n# Example”…, 4096) = 513
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# read(3, “”, 4096) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# close(3) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3’
    root@raspberrypi:/home/pi# munmap(0x76f42000, 4096) = 0
    bash: syntaxfout nabij onverwacht symbool ‘0x76f42000,’
    root@raspberrypi:/home/pi# open(“/etc/ld.so.cache”, O_RDONLY) = 3
    bash: syntaxfout nabij onverwacht symbool ‘”/etc/ld.so.cache”,’
    root@raspberrypi:/home/pi# fstat64(3, {st_mode=S_IFREG|0644, st_size=58133, …}) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# mmap2(NULL, 58133, PROT_READ, MAP_PRIVATE, 3, 0) = 0x76f09000
    bash: syntaxfout nabij onverwacht symbool ‘NULL,’
    root@raspberrypi:/home/pi# close(3) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3’
    root@raspberrypi:/home/pi# access(“/etc/ld.so.nohwcap”, F_OK) = -1 ENOENT (No such file or directory)
    bash: syntaxfout nabij onverwacht symbool ‘”/etc/ld.so.nohwcap”,’
    root@raspberrypi:/home/pi# open(“/lib/arm-linux-gnueabihf/libnss_files.so.2″, O_RDONLY) = 3
    bash: syntaxfout nabij onverwacht symbool ‘”/lib/arm-linux-gnueabihf/libnss_files.so.2”,’
    root@raspberrypi:/home/pi# read(3, “\177ELF\1\1\1\3(\1\324\31004″…, 512) = 512
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# lseek(3, 41532, SEEK_SET) = 41532
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# read(3, “”…, 1160) = 1160
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# lseek(3, 41192, SEEK_SET) = 41192
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# read(3, “A0aeabi\1&056\6\6\10\1\t\1\n\2\22\4\24\1\25″…, 49) = 49
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# fstat64(3, {st_mode=S_IFREG|0644, st_size=42692, …}) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# mmap2(NULL, 74492, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x76dc6000
    bash: syntaxfout nabij onverwacht symbool ‘NULL,’
    root@raspberrypi:/home/pi# mprotect(0x76dd0000, 28672, PROT_NONE) = 0
    bash: syntaxfout nabij onverwacht symbool ‘0x76dd0000,’
    root@raspberrypi:/home/pi# mmap2(0x76dd7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9) = 0x76dd7000
    bash: syntaxfout nabij onverwacht symbool ‘0x76dd7000,’
    root@raspberrypi:/home/pi# close(3) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3’
    root@raspberrypi:/home/pi# mprotect(0x76dd7000, 4096, PROT_READ) = 0
    bash: syntaxfout nabij onverwacht symbool ‘0x76dd7000,’
    root@raspberrypi:/home/pi# munmap(0x76f09000, 58133) = 0
    bash: syntaxfout nabij onverwacht symbool ‘0x76f09000,’
    root@raspberrypi:/home/pi# open(“/etc/host.conf”, O_RDONLY) = 3
    bash: syntaxfout nabij onverwacht symbool ‘”/etc/host.conf”,’
    root@raspberrypi:/home/pi# fstat64(3, {st_mode=S_IFREG|0644, st_size=9, …}) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f42000
    bash: syntaxfout nabij onverwacht symbool ‘NULL,’
    root@raspberrypi:/home/pi# read(3, “multi on\n”, 4096) = 9
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# read(3, “”, 4096) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# close(3) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3’
    root@raspberrypi:/home/pi# munmap(0x76f42000, 4096) = 0
    bash: syntaxfout nabij onverwacht symbool ‘0x76f42000,’
    root@raspberrypi:/home/pi# open(“/etc/hosts”, O_RDONLY|O_CLOEXEC) = 3
    bash: syntaxfout nabij onverwacht symbool ‘”/etc/hosts”,’
    root@raspberrypi:/home/pi# fcntl64(3, F_GETFD) = 0x1 (flags FD_CLOEXEC)
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# fstat64(3, {st_mode=S_IFREG|0644, st_size=178, …}) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f42000
    bash: syntaxfout nabij onverwacht symbool ‘NULL,’
    root@raspberrypi:/home/pi# read(3, “127.0.0.1\tlocalhost\n::1\t\tlocalho”…, 4096) = 178
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# read(3, “”, 4096) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# close(3) = 0
    bash: syntaxfout nabij onverwacht symbool ‘3’
    root@raspberrypi:/home/pi# munmap(0x76f42000, 4096) = 0
    bash: syntaxfout nabij onverwacht symbool ‘0x76f42000,’
    root@raspberrypi:/home/pi# socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
    bash: syntaxfout nabij onverwacht symbool ‘PF_INET,’
    root@raspberrypi:/home/pi# connect(3, {sa_family=AF_INET, sin_port=htons(6720), sin_addr=inet_addr(“127.0.0.1”)}, 16) = ? ERESTARTSYS (To be restarted)
    bash: syntaxfout nabij onverwacht symbool ‘3,’
    root@raspberrypi:/home/pi# — SIGWINCH (Window changed) @ 0 (0) —
    bash: syntaxfout nabij onverwacht symbool ‘(‘
    root@raspberrypi:/home/pi# connect(3, {sa_family=AF_INET, sin_port=htons(6720), sin_addr=inet_addr(“127.0.0.1”)}, 16
    bash: syntaxfout nabij onverwacht symbool ‘3,’

    Is a connection with ETS possible?
    i do not have ETS installed.

  24. i get the following error message when i try to run the script.

    make[1]: Leaving directory ‘/root/eibdbuild/bussdk/bcusdk-0.0.5’
    useradd: user ‘eibd’ already exists
    sed: can’t read /etc/inittab: No such file or directory
    I found that this error is related to the change from ‘init‘ to ‘systemd‘ in Raspbian ‘jessie’. Do you know a way around this error?

  25. Hi Michael,

    i fixed it by uninstalling systemd. i followed this procedure: h t t p : without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation

          1. Thx for your quick reply. I reinstalled Jessie and tried the script. It looks good but it ends with the following line.

            Please reboot your device…
            update-rc.d: error: initscript does not exist: /etc/init.d/eibd

            I ran de script twice because i had some problems with the input locals.

            I see the eibd process running:
            root@raspberrypi:/home/pi# ps ax|grep eibd
            508 ? Ss 0:00 /usr/local/bin/eibd -p /run/eibd/eibd.pid -d -D -T -R -S -i -u –eibaddr=1.1.128 usb:1:4:1:0:0
            14618 pts/0 S+ 0:00 grep eibd

            but is see no data coming over the bus when i run vbusmonitor1 ip:localhost

          2. Hi Dvdb,

            calling update-rc.d is not needed on systemd based systems. The equivalent is systemctl and this is called by the script. It is mentioned in the post but I have to change the command block.

            Michael

          3. correction, i see data coming over the bus when running vbusmonitor1. see i thinks it works. great job guys!

          4. Hey michael,

            Sometimes eidb is not starting. I have to reboot de raspberry i few times to fix this. Do you have any idea how to fix this?

          5. Hi Dvdb,

            if the start at boot time failed. Have you tried to start the daemon manually? :

            systemctl start eibd.service

            May be the recognition of the USB address is not working properly.

            Michael

          6. Hi Dvdb,

            I think the USB Device isn’t ready yet when eibd starts. Can you replace the file /usr/local/bin/eibd-findusb.sh with this version:

            #!/bin/bash
            export USBID=””
            while [ “$USBID” == “” ]; do
            export USBID=$(/usr/local/bin/findknxusb | grep device: | cut -d’ ‘ -f2)
            sleep 1
            done
            sed -e”s/usb:.*\$/usb:$USBID\”/” /etc/default/eibd > /tmp/eibd.env
            cp /tmp/eibd.env /etc/default/eibd

            This should wait until the USB device is accessible.

            Michael

    1. Hi Danut,

      groupwrite is what you looking for:

      example write 1 to Group 1/0/1 over TCP/IP
      groupwrite ip:127.0.0.1 1/0/1 1

      or via domain socket
      groupwrite local:/tmp/eib 1/0/1 1

      Michael

      1. Hi Michael,
        When I try these commands I receive “send request” but nothing happen.
        The monitor works fain.
        What I want to do is to turn on the lights from my room (I have a knx installation in my house).
        The way that I would like to use this, is from my raspberry through knx usb interface to my actuator, similar way to sending telegrams from ets through knx usb interface.
        Looking for your response,

        Danut

  26. Hi Michael

    THX for the work an the howTos – just a question,? I try to install knxd on a clean Rpi2 jessie (and then installing homebridge). Will this (knxd) work with your script and the howto on the blog? Should the command:

    root@raspberry~: # ./install_eibd_usb.sh && update-rc.d eibd defaults
    for jessie be only:
    root@raspberry~: # ./install_eibd_usb.sh ?

    THX neo

    1. Hi neonightmare,

      no, my script uses the bcusdk sources. knxd is a fork of the bcusdk eibserver. eibd is in “competition” to knxd. Only one can run at the same time. You have to comment out each eibd part in my script and replace it with the build commands for knxd, but I’m not sure if this make sence 😉 because this is the main part .

      Michael

    2. Hi, thx for the explanations. I got it (bcusdk-source) to work now with your script: install_eibd_usb_with_cemi_patches_systemd.sh on Rpi2-jessie!
      Thx a lot!

  27. Hi Michael,
    I followed your instructions and downloaded “Shell script to compile and install eibd for usb interface as backend on raspberry pi for Debian 8 Jessie (systemd based)” for my Raspberry Pi 2, I’m able to change permissions, but when I run:

    root@raspberry~: # ./install_eibd_usb_with_cemi_patched_systemd.sh

    i obtain:

    bash: ./install_eibd_usb_with_cemi_patched_systemd.sh: bin/bash^M: bad interpreter: no such file or directory

    How can I fix this problem?

    Thank you,
    Federico

    1. Hi,

      it seems the file is in DOS format (CR LF and the end of each line). Convert it to UNIX file format.

      apt-get install dos2unix
      dos2unix install_eibd_usb_with_cemi_patched_systemd.sh

      Michael

      1. Hi,
        thanks you, I run the script without CR.
        At the end of the script I find “eibd” and “vbusmonitor1” in /usr/local/bin but there aren’t “eibd” in /etc/init.d and the startup links in /etc/rc3.d.

        Is there a way to get files?

        Federico

  28. Hi Michael,
    I followed your instructions and downloaded “Shell script to compile and install eibd for usb, but when I run:

    root@raspberry~: # ./install_eibd_usb.sh

    i obtain:

    bash: ./install_eibd_usb.sh: No such file or directory

    How can I fix this problem?

    Thx,
    Mark

    1. Hi Mark,

      which script did you downloaded? Try

      ls -l

      to see all files in the current folder and if install_eibd_usb.sh exists in this folder. If not try wget again.

      Note: At the end of the post there are different versions of the script. For debian jessie use

      wget http://michlstechblog.info/blog/download/electronic/install_eibd_usb_with_cemi_patches_systemd.sh
      chmod +x install_eibd_usb_with_cemi_patches_systemd.sh
      ./install_eibd_usb_with_cemi_patches_systemd.sh

      Michael

      1. Michael,
        on ls – l I get a list of the files:


        -rw-r-r–r– 14 root root 10028 Nov 16 20:09 install_eibd_usb.sh

        My OS is debian wheezy

        Should I try debian jessie?

        Mark

        1. Hi Mark,

          no, you do not have to update :-). The Execute Bit is not set. Start the script either by:

          bash install_eibd_usb.sh

          or set the execution bit
          chmod +x install_eibd_usb.sh
          ./install_eibd_usb.sh

          But the error message in your provious post shows other error. When the execute bit is missing an error permission denied occurs.

          Michael

          1. Hi Michael,

            After executing

            chmod +x install_eibd_usb.sh

            the Execute Bit was still not set

            so I tryed

            bash install_eibd_usb.sh

            then I get the respons

            bash: ./install_eibd_usb.sh: No such file or directory

            Mark

  29. Hi all

    I have the same Problem as Mark has. When I installed EIBD by using your script two months ago everything worked fine. Bud now I wanted to install it on a diffrent SD Card and the script doesn’t work.

    Hope you can fix that… 🙂

    Cheers.
    Tom.

  30. Hi Michael,
    First of all i want to thank for the Article!

    I tried all your steps, but when i use the comand: PS ax|grep eibd, the terminal throws the following answer:
    2220 pts/0 s+ 0:00 grep– color=Auto eibd

    When i try the vbusmonitor i get the answer:

    Open failed: connection refused

    Do you have any idea to solve this problem?
    Greets,

    Sebastian

    1. Update:
      I succeeded in starting the vbusmonitor1. Then i found out, that no usb Device is recognized.

      Findknxusb finds no device. Any ideas?

      Thanks!

      And sorry for my little english.

      Cheers,
      Sebastian

      1. I am thinking that i have found the problem.
        I am using the eib box usb schnittstelle from “Walther Werke”.for ets3 i am using the b+b driver. Is it possible that my usb schnittstelle is Not supported?

        1. Hi Sebastian,

          usually it works with the most USB devices. Maybe the USB Vendor and Device ID is not listed in /etc/udev/rules.d/90-knxusb-devices.rules and therefore the permission on the device are not set as expected.

          Use

          lsusb -n

          to determine the ID’s of your device and if no entry in /etc/udev/rules.d/90-knxusb-devices.rules is found, open the file copy a line and alter the Vendor and device id to your ones.

          Let me know if I have to add it to the script.

          But as root the device should recognized by findknxusb without an entry in /etc/udev/rules.d/90-knxusb-devices.rules.

          Michael

          1. Hi Michael,
            Thanks for your answer.

            I looked for the ID of my usb device. They are identical with the ID of b+b. Is there any other possibility why it does Not work? “Lusb” shows the USB device.

  31. Hi Michael,
    still have the problem that I have to start the eibd manually.
    The file /usr/local/bin/eibd-findusb.sh is already changed like you proposed. I’m on jessie systemd raspberrypi 4.1.13-v7 with latest install script.

    thx
    Mike

  32. Hi Michael,
    First i want to thank you for script!
    But i will be very appriciate for you help.
    Iam new to KNx and to Raspberry Pi2 with Jessie. But i have Siemens OCI700 usb converter and Siemens Synco. Synco address from ETS is 15.15.255 and Siemens OCI is 0.0.0.0:3671
    i installed first script install_eibd_usb.sh and changes in /etc/init.d/eibd address for 15.15.255 but still as i understand raspberry didnt see my USB converter:(
    and i see
    root@raspberry:/home/pi#ps ax|grep eibd
    1099 pts/0 S+ 0:0 grep eidb

      1. i tried command and it returns me
        findknxusb Segmentation fault raspberry
        But i hope it is because of the wrong packedge!:)
        I will try the correct one and i will write then about results!!!
        Thank you very much:))!!!

      2. Sorry Michael for destirbing you again.
        But i did everything you told me and was happy that everything work but start working only findknxusb command . But then i try to do
        /home/pi#ps ax|grep eibd
        i get again
        1363 pts/0 S+ 0:0 grep eibd
        but on command findknxusb i get my device usb:1:5:1:0:0
        I just want to know is this a problem with the ETS setting of my synco or it is problems in raspberry pi?
        Best regards Valeria

  33. Hi Michael,
    If it is not hard can you please clear for me some things.
    I have only USB KNX with my Siemens OCI700 usb converter
    So as i understand i cant use command such as vbusmonitor1 ip:localhost
    So i didnt understand what should i do to get data from Synco controller by eib without IP just with usb converter?
    so i did first
    1.
    findknxusb
    Possible addresses for KNX USB devices:
    device: 1:4:1:0:0 (SIEMENS:OCI700 Service Interface)
    2. /etc/init.d/eibd start
    [ ok ] Starting eibd (via systemctl): eibd.service.
    3.then i tried ps ax|grep eibd
    2993 pts/1 S+ 0:00 grep eibd
    its not working
    4. i tried also
    /usr/local/bin/eibd -D -T -R -S -i -t 10 -u –eibaddr 1.1.1 usb:1:4:1:0:0
    Layer 1(01447F98,56A8B33C) Detect
    Layer 1(01447F98,56A8B33C) Using 1:4:1:0:0 (2:129)
    Layer 1(01447F98,56A8B33C) Open
    Layer 1(01447F98,56A8B33C) Claimed
    Layer 1(01447F98,56A8B33C) Opened
    Layer 1(01447F98,56A8B33C) Send(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 1(01447F98,56A8B33C) Recv(064): 01 13 0B 00 08 00 03 0F 02 00 00 01 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 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(01447F98,56A8B33C) Send(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 1(014480E8,56A8B33C) CEMI
    Layer 3(014496D0,56A8B33C) Open
    initialisation of the eibd unix protocol failed
    and get this error
    5./home/pi# /usr/local/bin/groupsocketlisten eibaddr 1.1.1
    usage: /usr/local/bin/groupsocketlisten url: Success
    But nothing happened then and i dont understand what it means?
    6.root@raspberrypi:/home/pi# vbusmonitor1 eibaddr 1.1.1
    usage: vbusmonitor1 url: Success
    But then i tried to do
    1.pi@raspberrypi ~ $ /usr/local/bin/eibd -d -D -T -R -S -i -u –eibaddr 1.1.1–daemon=/var/log/eibd.log usb:1:4:1:0:0
    2.pi@raspberrypi ~ $ ps ax|grep eibd
    3006 ? Ss 0:00 /usr/local/bin/eibd -d -D -T -R -S -i -u –eibaddr 1.1.1–daemon=/var/log/eibd.log usb:1:4:1:0:0
    3.pi@raspberrypi ~ $ vbusmonitor1 eibaddr 1.1.1
    usage: vbusmonitor1 url: Success
    root@raspberrypi:/home/pi# bcuaddrtab usb:1:4:1:0:0
    read failed

    Can you please tell me where iam where iam wrong or i totally wrong?
    Will be very appreciate for help!!!

    1. Hi Valeria,

      Layer 1(01447F98,56A8B33C) Send(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 1(01447F98,56A8B33C) Recv(064): 01 13 0B 00 08 00 03 0F 02 00 00 01 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 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(01447F98,56A8B33C) Send(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 1(014480E8,56A8B33C) CEMI
      Layer 3(014496D0,56A8B33C) Open
      initialisation of the eibd unix protocol failed

      => Seems that it can communicate with the USB device.

      initialisation of the eibd unix protocol failed => Means it cannot open the SOCKET /tmp/eib : Have you start eibd with an other user not equal to User eibd 🙂

      Do the following:
      sudo killall eibd
      sudo rm /tmp/eib

      Set a static IP Address, reboot the Raspberry and check again.

      If eibd not starts automatically try to start it manual:

      systemctl start eibd.service

      Michael

  34. Hi Michal!
    I solved my problem now thanks to you!!!
    Ihad already static ip and the problem was not in it.
    I did all steps from your page eibknx-upstart-startup-script-for-eibd
    useradd eibd -s /bin/false -U -M
    Create the upstart conf file /etc/init/eibd.conf
    initctl reload-configuration
    initctl status eibd
    initctl start eibd
    rm /tmp/eib

    and it helped me
    then again run command but not as root
    /usr/local/bin/eibd -D -T -R -S -i -t 10 -u –eibaddr 1.1.1 usb:1:4:1:0:0
    and everything start working.
    but with this command i get all data from all group addresses

    is there a special command to write and read data to special groupaddress by KNX/USB (not KNX IP )?

    and how to write data to KNX device by USB with eib?
    and i still get
    bcuaddrtab usb:1:4:1:0:0
    read failed
    and
    bcuaddrtab -w 0 usb:1:4
    write failed

    1. Hi Valeria,

      to write to groupaddresses use

      Over IP
      groupwrite ip:127.0.0.1 0/1/17 0C 4C
      or with a Socket connection
      groupwrite local:/tmp/eib 0/1/13 1

      simply look in the /usr/local/bin folder, the commands have well known names.

      If eibd is running you cannot access the USB device with bcuaddrtab, because both uses lowlevel USB drivers to access the device and this access is exclusive.

      Michael

      1. yeah i did like this but i always get Open failed: connection refused to groupwrite local:/tmp/eib 0/0/6 1
        and
        bcuaddrtab read failed
        the only comand that is working is eibd -D -T -R -S -i -t 10 -u –eibaddr 1.1.1 usb:1:4:1:0:0
        i have static IP, i close eibd

  35. Thank you for everything i sold all my problems!!!
    so all what i did may be someone will have the same problems
    sudo systemctl start eibd.service
    ps -A
    findknxusb
    eibd -u tpuarts:usb:1:4:1:0:0 -t 1023
    sudo groupsocketlisten local:/tmp/eib
    sudo groupswrite local:/tmp/eib 0/0/6 1

  36. Hi there, I did as written in the tutor. Last three commands show:

    root@raspberrypi:/home/pi# ls -l /usr/local/bin
    -rwxr-xr-x 1 root staff 457540 Jan 31 07:03 eibd
    -rwxr-xr-x 1 root staff 11120 Jan 31 07:03 vbusmonitor2

    root@raspberrypi:/home/pi# ls -l /etc/init.d/eibd
    -rwxr-xr-x 1 root root 2236 Jan 31 07:03 /etc/init.d/eibd

    root@raspberrypi:/home/pi# ls -l /etc/rc3.d/*eibd
    lrwxrwxrwx 1 root root 14 Jan 30 19:43 /etc/rc3.d/S03eibd -> ../init.d/eibd

    So far, so good. BUT then:

    root@raspberrypi:/home/pi# ps ax|grep eibd
    1783 pts/0 S+ 0:00 grep eibd

    root@raspberrypi:/home/pi# vbusmonitor1 ip:localhost
    Open failed: Connection refused

    What happened? What did I miss?

    Thanks for help 🙂

      1. Okay, I did as you have written. But it remains the same, except that

        root@raspberrypi:/home/pi# ls -l /etc/init.d/eibd
        ls: Zugriff auf /etc/init.d/eibd nicht möglich: Datei oder Verzeichnis nicht gefunden
        root@raspberrypi:/home/pi# ls -l /etc/rc3.d/*eibd
        ls: Zugriff auf /etc/rc3.d/*eibd nicht möglich: Datei oder Verzeichnis nicht gefunden

        now returns errors.

        dmesg returns:
        [ 968.768585] usb 1-1.4: USB disconnect, device number 6
        [ 973.864262] usb 1-1.4: new full-speed USB device number 8 using dwc_otg
        [ 973.982757] usb 1-1.4: New USB device found, idVendor=147b, idProduct=5120
        [ 973.982781] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
        [ 973.982793] usb 1-1.4: Product: KNX-USB Interface (MDRC)
        [ 973.982823] usb 1-1.4: Manufacturer: ABB STOTZ-KONTAKT GmbH
        [ 973.992716] hid-generic 0003:147B:5120.0005: hiddev0,hidraw2: USB HID v1.01 Device [ABB STOTZ-KONTAKT GmbH KNX-USB Interface (MDRC)] on usb-3f980000.usb-1.4/input0

        Which means the ABB Interface is now recognized by the Rasp. But I think it now has to come up as /dev/ttyUSB8, but it doesn’t… I tried to bind the Interface to openHAB now, but my Pi refuses that 🙁

        Do you have any further suggestions?

          1. Hello Michael,
            sorry for my late reply, but I didn’t had no time to play around with the rasp for some time due to a lot of work.

            sudo findknxusb

            returns nothing

          2. pi@raspberrypi:~ $ dmesg|grep -i usb
            [ 0.267500] usbcore: registered new interface driver usbfs
            [ 0.267654] usbcore: registered new interface driver hub
            [ 0.267840] usbcore: registered new device driver usb
            [ 0.464334] usbcore: registered new interface driver smsc95xx
            [ 0.911577] dwc_otg 3f980000.usb: DWC OTG Controller
            [ 0.914167] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
            [ 0.916851] dwc_otg 3f980000.usb: irq 32, io mem 0x00000000
            [ 0.924772] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
            [ 0.927396] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
            [ 0.930025] usb usb1: Product: DWC OTG Controller
            [ 0.932678] usb usb1: Manufacturer: Linux 4.1.13-v7+ dwc_otg_hcd
            [ 0.935304] usb usb1: SerialNumber: 3f980000.usb
            [ 0.938821] hub 1-0:1.0: USB hub found
            [ 0.944881] usbcore: registered new interface driver usb-storage
            [ 1.011535] usbcore: registered new interface driver usbhid
            [ 1.014145] usbhid: USB HID core driver
            [ 1.316056] usb 1-1: new high-speed USB device number 2 using dwc_otg
            [ 1.516420] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
            [ 1.519181] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
            [ 1.522890] hub 1-1:1.0: USB hub found
            [ 1.806071] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
            [ 1.906459] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
            [ 1.909489] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
            [ 1.980573] smsc95xx 1-1.1:1.0 eth0: register ‘smsc95xx’ at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:59:50:f2
            [ 2.076031] usb 1-1.2: new low-speed USB device number 4 using dwc_otg
            [ 2.194382] usb 1-1.2: New USB device found, idVendor=1bcf, idProduct=05cf
            [ 2.200643] usb 1-1.2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
            [ 2.200653] usb 1-1.2: Product: SilverCrest STMS 2219 A1
            [ 2.225494] input: SilverCrest STMS 2219 A1 as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:1BCF:05CF.0001/input/input0
            [ 2.276343] hid-generic 0003:1BCF:05CF.0001: input,hidraw0: USB HID v1.00 Keyboard [SilverCrest STMS 2219 A1] on usb-3f980000.usb-1.2/input0
            [ 2.301303] input: SilverCrest STMS 2219 A1 as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.1/0003:1BCF:05CF.0002/input/input1
            [ 2.357058] hid-generic 0003:1BCF:05CF.0002: input,hiddev0,hidraw1: USB HID v1.00 Mouse [SilverCrest STMS 2219 A1] on usb-3f980000.usb-1.2/input1
            [ 2.436104] usb 1-1.3: new high-speed USB device number 5 using dwc_otg
            [ 2.537997] usb 1-1.3: New USB device found, idVendor=7392, idProduct=7811
            [ 2.541343] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
            [ 2.544600] usb 1-1.3: Product: 802.11n WLAN Adapter
            [ 2.548702] usb 1-1.3: Manufacturer: Realtek
            [ 2.552407] usb 1-1.3: SerialNumber: 00e04c000001
            [ 2.636113] usb 1-1.4: new full-speed USB device number 6 using dwc_otg
            [ 2.776763] usb 1-1.4: New USB device found, idVendor=147b, idProduct=5120
            [ 2.779788] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
            [ 2.782689] usb 1-1.4: Product: KNX-USB Interface (MDRC)
            [ 2.785547] usb 1-1.4: Manufacturer: ABB STOTZ-KONTAKT GmbH
            [ 2.800885] hid-generic 0003:147B:5120.0003: hiddev0,hidraw2: USB HID v1.01 Device [ABB STOTZ-KONTAKT GmbH KNX-USB Interface (MDRC)] on usb-3f980000.usb-1.4/input0
            [ 2.886095] usb 1-1.5: new full-speed USB device number 7 using dwc_otg
            [ 3.011416] usb 1-1.5: New USB device found, idVendor=0eef, idProduct=0001
            [ 3.011444] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
            [ 3.011466] usb 1-1.5: Product: USB TouchController
            [ 3.011491] usb 1-1.5: Manufacturer: eGalax Inc.
            [ 3.021808] input: eGalax Inc. USB TouchController as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/0003:0EEF:0001.0004/input/input2
            [ 3.022496] input: eGalax Inc. USB TouchController as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/0003:0EEF:0001.0004/input/input3
            [ 3.022991] hid-generic 0003:0EEF:0001.0004: input,hidraw3: USB HID v2.10 Pointer [eGalax Inc. USB TouchController] on usb-3f980000.usb-1.5/input0
            [ 3.931079] usbcore: registered new interface driver rtl8192cu
            [ 4.126148] usbcore: registered new interface driver usbtouchscreen

          3. Hi Hellobello,

            your Interface is recognized by the kernel as a usb device:
            [ 2.776763] usb 1-1.4: New USB device found, idVendor=147b, idProduct=5120
            [ 2.779788] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
            [ 2.782689] usb 1-1.4: Product: KNX-USB Interface (MDRC)
            [ 2.785547] usb 1-1.4: Manufacturer: ABB STOTZ-KONTAKT GmbH
            [ 2.800885] hid-generic 0003:147B:5120.0003: hiddev0,hidraw2: USB HID v1.01 Device [ABB STOTZ-KONTAKT GmbH KNX-USB Interface (MDRC)] on usb-3f980000.usb-1.4/input0

            when the the device is recognized by the kernel and you have killed all eibd processes

            sudo killall eibd

            and

            sudo findknxusb

            does not find any device try to recompile eibd by loading the script (on Debian Jessie)

            wget http://michlstechblog.info/blog/download/electronic/install_eibd_usb_with_cemi_patches_systemd.sh

            again. Edit the script. Replace:

            CFLAGS=”-static -static-libgcc -static-libstdc++” \
            with
            CFLAGS=”-static -static-libgcc -static-libstdc++ -DENABLE_LOGGING=1 -DENABLE_DEBUG_LOGGING=1″ \

            and replace
            CPPFLAGS=”-static -static-libgcc -static-libstdc++”
            with
            CPPFLAGS=”-static -static-libgcc -static-libstdc++ -DENABLE_LOGGING=1 -DENABLE_DEBUG_LOGGING=1″

            start the script to reinstall eibd. After the script has finshed run

            sudo findknxusb

            again. Now some debug information should be shown. Copy the output to a comment.

            Michael

  37. Hello Michael,

    I have implemented your solution on a Raspberry PI 2, running Jessie. No updates, just plain Jessie, following your guide and using the last script with the cemi patches etc.

    I’m working to create a bluetooth remote monitoring gateway, I have the bluetooth side working and have installed eibd as per your instructions.

    The issue I have is monitoring using groupsocketlisten is being very temperamental, I have tried resetting the filters using bcuaddrtab just in case, but it shows as size 0 anyway. I am using an ABB USB device, do you think this is the problem? I have noticed that people are not very complimentary about these.

    I am logged on using root (sudo su) and execute the following to listen:

    groupsocketlisten ip:localhost

    I have no issue writing to the bus using

    groupswrite ip:localhost 0/0/1 1 (turns a light on)
    groupswrite ip:localhost 0/0/1 0 (turns the light off)

    listening does show the write commands executed locally (the above groupswrite commands) but not other data on the bus.

    regards,

    Matt

    1. Hi,

      have you tried vbusmonitor to trace all bus activity?

      You can also start eibd in foreground and increase debug output level to monitor what eibd does:

      # Start a shell as user eibd
      su -s /bin/bash eibd
      # Find your KNX device
      findknxusb
      # Start eibd in foreground
      /usr/local/bin/eibd -D -T -R -S -i -t 10 -u –eibaddr 1.1.1 usb:YOUR_USB_DEVICE_ADDRESS

      Michael

      1. Michael,

        When I ran as described I got an unexpected parameter error, I assumed a : was needed between -eibaddr and 1.1.1 and when tried got the following

        eibd@raspberrypi:/home/pi$ findknxusb
        Possible addresses for KNX USB devices:
        device: 1:4:1:0:0 (ABB STOTZ-KONTAKT GmbH:KNX-USB Interface (MDRC))
        eibd@raspberrypi:/home/pi$ /usr/local/bin/eibd -D -T -R -S -i -t 10 -u -eibaddr 1.1.1 usb:1:4:1:0:0
        unexpected parameter
        eibd@raspberrypi:/home/pi$ /usr/local/bin/eibd -D -T -R -S -i -t 10 -u -eibaddr: 1.1.1 usb:1:4:1:0:0
        unexpected parameter
        eibd@raspberrypi:/home/pi$ /usr/local/bin/eibd -D -T -R -S -i -t 10 -u -eibaddr:1.1.1 usb:1:4:1:0:0
        Layer 1(019B5F98,56BCBC93) Detect
        Layer 1(019B5F98,56BCBC93) Using 1:4:1:0:0 (2:129)
        Layer 1(019B5F98,56BCBC93) Open
        Layer 1(019B5F98,56BCBC93) Claimed
        Layer 1(019B5F98,56BCBC93) Opened
        Layer 1(019B5F98,56BCBC93) Send(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 1(019B5F98,56BCBC93) Recv(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(019B5F98,56BCBC93) Send(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 1(019B60B8,56BCBC93) EMI1
        Layer 3(019B76D8,56BCBC93) Open
        Layer 1(019B5F98,56BCBC93) Send(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
        initialisation of the eibd inet protocol failed

        Matt

        1. Hi Matt,

          initialisation of the eibd inet protocol failed => means eibd cannot open

          /tmp/eib

          kill eibd and delete the file(as root)

          killall eibd
          rm /tmp/eib

          and start again.

          Michael

          1. Michael,

            OK I have deleted the eib and eibd.env files from /tmp and rerun the commands, I now get this

            eibd@raspberrypi:/tmp$ eibd -D -T -R -S -i -t 10 -u -eibaddr:1.1.1 usb:1:4:1:0:0
            Layer 1(006A2F98,56BCDA6E) Detect
            Layer 1(006A2F98,56BCDA6E) Using 1:4:1:0:0 (2:129)
            Layer 1(006A2F98,56BCDA6E) Open
            Layer 1(006A2F98,56BCDA6E) Claimed
            Layer 1(006A2F98,56BCDA6E) Opened
            Layer 1(006A2F98,56BCDA6E) Send(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 1(006A2F98,56BCDA6E) Recv(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(006A2F98,56BCDA6E) Send(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 1(006A30B8,56BCDA6E) EMI1
            Layer 3(006A46D8,56BCDA6E) Open
            Layer 1(006A2F98,56BCDA6E) Send(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 3(006A46D8,56BCDA6E) registerBroadcast 006A4758
            Layer 3(006A46D8,56BCDA6E) registerBroadcast 006A4758 = 1
            Layer 3(006A46D8,56BCDA6E) registerGroup 006A4758
            Layer 3(006A46D8,56BCDA6E) registerGroup 006A4758 = 1
            Layer 3(006A46D8,56BCDA6E) registerIndividual 006A4758 0
            Layer 3(006A46D8,56BCDA6E) registerIndividual 006A4758 = 1

            Matt

          2. Michael,

            I have tried the same tests and get the same results. No further information comes up on the eibd session, but I can still see the groups write commands using vbusmonitor1 as well as groupsocketlisten. Still not able to see other data on the bus. This did work initially, I have not made any changes to the eibd installation although I did install some other apps (nodejs, bluetooth,java jre). Monitoring hasn’t worked since.

            Matt

          3. Hi Matt,

            have you deleted the bcuaddress table of the USB interface?
            Can you send telegrams to bus and are they executed?
            Is KNX address 1.1.1 with which you start eibd unique?

            Michael

          4. Michael,

            I have been testing various scenarios and have discovered the following:

            eibaddr 1.1.1 was in use, changed to using 1.1.6 which isn’t. The result was I can now see the commands going through on the eibd session.

            I have discovered that eib is always present in /tmp even after eibd has been stopped

            If I delete eib from /tmp and clear the usb int table (bcuaddrtab -w 0 1:4) vbusmonitor then sees other data on the bus.

            I have to do this everytime though, if I stop and start eibd, vbusmonitor fails to work again. Stopping eibd, deleting eib and clearing the usb int table solves this.

            Thanks for your continued help.

            Matt

          5. Hi Matt,

            if user eibd creates the SOCKET /tmp/eib, which is the case when eibd is starting by systemd, eibd can delete/overwrite it himself. It is therefore not necessary to delete the file manually.

            Can you check the permissions on the file ?
            ls -l /tmp/eib

            Michael

  38. Hi Michael

    I have a problem with my KNX-USB Device (TPUART Led USB of busware.de):

    pi@raspberrypi ~ $ ps ax|grep eibd
    4236 pts/0 S+ 0:00 grep –color=auto eibd
    pi@raspberrypi ~ $ findknxusb
    Possible addresses for KNX USB devices:

    Can you help me?
    What data do you need?

    1. Hi Salvador,

      -which script did you execute?
      -you’re eibd parameters from /etc/default/eibd ?

      execute
      sudo dmesg|grep tty

      and post the output here.

      Michael

      1. root@raspberrypi:/home/pi# dmesg|grep tty
        [ 0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1824 bcm2708_fb.fbheight=984 bcm2708.boardrev=0xd bcm2708.serial=0xad10ec12 smsc95xx.macaddr=B8:27:EB:10:EC:12 bcm2708_fb.fbswap=1 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
        [ 0.001712] console [tty1] enabled
        [ 0.140822] 20201000.uart: ttyAMA0 at MMIO 0x20201000 (irq = 83, base_baud = 0) is a PL011 rev2
        [ 0.523067] console [ttyAMA0] enabled
        [ 6.834162] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device

          1. Now, if i use:
            pi@raspberrypi ~ $ sudo /etc/init.d/eibd start

            the answer is:
            pi@raspberrypi ~ $ ps ax|grep eibd

      1. [ 0.000000] Booting Linux on physical CPU 0x0
        [ 0.000000] Initializing cgroup subsys cpuset
        [ 0.000000] Initializing cgroup subsys cpu
        [ 0.000000] Initializing cgroup subsys cpuacct
        [ 0.000000] Linux version 4.1.13+ (dc4@dc4-XPS13-9333) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 – Linaro GCC 2014.03) ) #826 PREEMPT Fri Nov 13 20:13:22 GMT 2015
        [ 0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
        [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
        [ 0.000000] Machine model: Raspberry Pi Model B Rev 2
        [ 0.000000] cma: Reserved 8 MiB at 0x1b800000
        [ 0.000000] Memory policy: Data cache writeback
        [ 0.000000] On node 0 totalpages: 114688
        [ 0.000000] free_area_init_node: node 0, pgdat c088fe7c, node_mem_map db403000
        [ 0.000000] Normal zone: 1008 pages used for memmap
        [ 0.000000] Normal zone: 0 pages reserved
        [ 0.000000] Normal zone: 114688 pages, LIFO batch:31
        [ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
        [ 0.000000] pcpu-alloc: [0] 0
        [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 113680
        [ 0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1824 bcm2708_fb.fbheight=984 bcm2708.boardrev=0xd bcm2708.serial=0xad10ec12 smsc95xx.macaddr=B8:27:EB:10:EC:12 bcm2708_fb.fbswap=1 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
        [ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
        [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
        [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
        [ 0.000000] Memory: 436488K/458752K available (6137K kernel code, 489K rwdata, 1788K rodata, 352K init, 720K bss, 14072K reserved, 8192K cma-reserved)
        [ 0.000000] Virtual kernel memory layout:
        [ 0.000000] vector : 0xffff0000 – 0xffff1000 ( 4 kB)
        [ 0.000000] fixmap : 0xffc00000 – 0xfff00000 (3072 kB)
        [ 0.000000] vmalloc : 0xdc800000 – 0xff000000 ( 552 MB)
        [ 0.000000] lowmem : 0xc0000000 – 0xdc000000 ( 448 MB)
        [ 0.000000] modules : 0xbf000000 – 0xc0000000 ( 16 MB)
        [ 0.000000] .text : 0xc0008000 – 0xc07c5630 (7926 kB)
        [ 0.000000] .init : 0xc07c6000 – 0xc081e000 ( 352 kB)
        [ 0.000000] .data : 0xc081e000 – 0xc08987e4 ( 490 kB)
        [ 0.000000] .bss : 0xc08987e4 – 0xc094c980 ( 721 kB)
        [ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
        [ 0.000000] Preemptible hierarchical RCU implementation.
        [ 0.000000] Additional per-CPU info printed with stalls.
        [ 0.000000] NR_IRQS:522
        [ 0.000000] clocksource stc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
        [ 0.000015] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns
        [ 0.000055] Switching to timer-based delay loop, resolution 1000ns
        [ 0.000340] Console: colour dummy device 80×30
        [ 0.001692] console [tty1] enabled
        [ 0.001756] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=10000)
        [ 0.001857] pid_max: default: 32768 minimum: 301
        [ 0.002227] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
        [ 0.002310] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
        [ 0.003403] Initializing cgroup subsys blkio
        [ 0.003502] Initializing cgroup subsys memory
        [ 0.003580] Initializing cgroup subsys devices
        [ 0.003647] Initializing cgroup subsys freezer
        [ 0.003714] Initializing cgroup subsys net_cls
        [ 0.003837] CPU: Testing write buffer coherency: ok
        [ 0.003967] ftrace: allocating 19796 entries in 59 pages
        [ 0.111194] Setting up static identity map for 0x81c0 – 0x81f8
        [ 0.114019] devtmpfs: initialized
        [ 0.124274] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
        [ 0.124718] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
        [ 0.126729] pinctrl core: initialized pinctrl subsystem
        [ 0.127634] NET: Registered protocol family 16
        [ 0.133145] DMA: preallocated 4096 KiB pool for atomic coherent allocations
        [ 0.134604] bcm2708.uart_clock = 3000000
        [ 0.139997] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
        [ 0.140086] hw-breakpoint: maximum watchpoint size is 4 bytes.
        [ 0.140271] Serial: AMBA PL011 UART driver
        [ 0.140576] 20201000.uart: ttyAMA0 at MMIO 0x20201000 (irq = 83, base_baud = 0) is a PL011 rev2
        [ 0.141428] bcm2835-mbox 2000b880.mailbox: mailbox enabled
        [ 0.203424] bcm2708-dmaengine 20007000.dma: DMA legacy API manager at f2007000, dmachans=0xf35
        [ 0.203574] bcm2708-dmaengine 20007000.dma: Initialized 7 DMA channels (+ 1 legacy)
        [ 0.204431] bcm2708-dmaengine 20007000.dma: Load BCM2835 DMA engine driver
        [ 0.204508] bcm2708-dmaengine 20007000.dma: dma_debug:0
        [ 0.205449] SCSI subsystem initialized
        [ 0.205849] usbcore: registered new interface driver usbfs
        [ 0.206029] usbcore: registered new interface driver hub
        [ 0.206295] usbcore: registered new device driver usb
        [ 0.207301] raspberrypi-firmware soc:firmware: Attached to firmware from 2015-11-18 15:43
        [ 0.234832] Switched to clocksource stc
        [ 0.282250] FS-Cache: Loaded
        [ 0.282700] CacheFiles: Loaded
        [ 0.298900] NET: Registered protocol family 2
        [ 0.300438] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
        [ 0.300605] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
        [ 0.300746] TCP: Hash tables configured (established 4096 bind 4096)
        [ 0.300887] UDP hash table entries: 256 (order: 0, 4096 bytes)
        [ 0.300964] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
        [ 0.301375] NET: Registered protocol family 1
        [ 0.302102] RPC: Registered named UNIX socket transport module.
        [ 0.302186] RPC: Registered udp transport module.
        [ 0.302231] RPC: Registered tcp transport module.
        [ 0.302273] RPC: Registered tcp NFSv4.1 backchannel transport module.
        [ 0.303549] hw perfevents: enabled with armv6_1176 PMU driver, 3 counters available
        [ 0.305327] futex hash table entries: 256 (order: -1, 3072 bytes)
        [ 0.321445] VFS: Disk quotas dquot_6.6.0
        [ 0.321924] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
        [ 0.324484] FS-Cache: Netfs ‘nfs’ registered for caching
        [ 0.326379] NFS: Registering the id_resolver key type
        [ 0.326535] Key type id_resolver registered
        [ 0.326588] Key type id_legacy registered
        [ 0.330476] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
        [ 0.330976] io scheduler noop registered
        [ 0.331062] io scheduler deadline registered (default)
        [ 0.331502] io scheduler cfq registered
        [ 0.333985] BCM2708FB: allocated DMA memory 5bc00000
        [ 0.334125] BCM2708FB: allocated DMA channel 0 @ f2007000
        [ 0.358433] Console: switching to colour frame buffer device 228×61
        [ 0.376897] Serial: 8250/16550 driver, 0 ports, IRQ sharing disabled
        [ 0.378768] vc-cma: Videocore CMA driver
        [ 0.378919] vc-cma: vc_cma_base = 0x00000000
        [ 0.379040] vc-cma: vc_cma_size = 0x00000000 (0 MiB)
        [ 0.379172] vc-cma: vc_cma_initial = 0x00000000 (0 MiB)
        [ 0.379651] vc-mem: phys_addr:0x00000000 mem_base=0x1ec00000 mem_size:0x20000000(512 MiB)
        [ 0.400645] brd: module loaded
        [ 0.410742] loop: module loaded
        [ 0.412111] vchiq: vchiq_init_state: slot_zero = 0xdbc80000, is_master = 0
        [ 0.414522] Loading iSCSI transport class v2.0-870.
        [ 0.416395] usbcore: registered new interface driver smsc95xx
        [ 0.416719] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
        [ 0.617272] Core Release: 2.80a
        [ 0.617410] Setting default values for core params
        [ 0.617565] Finished setting default values for core params
        [ 0.817916] Using Buffer DMA mode
        [ 0.818048] Periodic Transfer Interrupt Enhancement – disabled
        [ 0.818195] Multiprocessor Interrupt Enhancement – disabled
        [ 0.818332] OTG VER PARAM: 0, OTG VER FLAG: 0
        [ 0.818450] Dedicated Tx FIFOs mode
        [ 0.819033] WARN::dwc_otg_hcd_init:1047: FIQ DMA bounce buffers: virt = 0xdbc14000 dma = 0x5bc14000 len=9024
        [ 0.819300] FIQ FSM acceleration enabled for :
        [ 0.819300] Non-periodic Split Transactions
        [ 0.819300] Periodic Split Transactions
        [ 0.819300] High-Speed Isochronous Endpoints
        [ 0.819665] dwc_otg: Microframe scheduler enabled
        [ 0.819765] WARN::hcd_init_fiq:412: FIQ on core 0 at 0xc0424a48
        [ 0.825146] WARN::hcd_init_fiq:413: FIQ ASM at 0xc0424d20 length 36
        [ 0.830445] WARN::hcd_init_fiq:438: MPHI regs_base at 0xdc896000
        [ 0.835773] dwc_otg 20980000.usb: DWC OTG Controller
        [ 0.841128] dwc_otg 20980000.usb: new USB bus registered, assigned bus number 1
        [ 0.846556] dwc_otg 20980000.usb: irq 32, io mem 0x00000000
        [ 0.851727] Init: Port Power? op_state=1
        [ 0.856998] Init: Power Port (0)
        [ 0.862599] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
        [ 0.867822] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
        [ 0.873071] usb usb1: Product: DWC OTG Controller
        [ 0.878356] usb usb1: Manufacturer: Linux 4.1.13+ dwc_otg_hcd
        [ 0.883562] usb usb1: SerialNumber: 20980000.usb
        [ 0.890008] hub 1-0:1.0: USB hub found
        [ 0.895639] hub 1-0:1.0: 1 port detected
        [ 0.901424] dwc_otg: FIQ enabled
        [ 0.901454] dwc_otg: NAK holdoff enabled
        [ 0.901469] dwc_otg: FIQ split-transaction FSM enabled
        [ 0.901541] Module dwc_common_port init
        [ 0.902154] usbcore: registered new interface driver usb-storage
        [ 0.908120] mousedev: PS/2 mouse device common for all mice
        [ 0.914577] bcm2835-cpufreq: min=700000 max=700000
        [ 0.920340] sdhci: Secure Digital Host Controller Interface driver
        [ 0.925741] sdhci: Copyright(c) Pierre Ossman
        [ 0.931589] mmc-bcm2835 20300000.mmc: mmc_debug:0 mmc_debug2:0
        [ 0.936973] mmc-bcm2835 20300000.mmc: DMA channels allocated
        [ 0.975339] sdhci-pltfm: SDHCI platform and OF driver helper
        [ 0.981285] ledtrig-cpu: registered to indicate activity on CPUs
        [ 0.986857] hidraw: raw HID events driver (C) Jiri Kosina
        [ 0.998092] usbcore: registered new interface driver usbhid
        [ 1.003192] usbhid: USB HID core driver
        [ 1.011076] Initializing XFRM netlink socket
        [ 1.017502] NET: Registered protocol family 17
        [ 1.027263] Key type dns_resolver registered
        [ 1.039205] registered taskstats version 1
        [ 1.044789] vc-sm: Videocore shared memory driver
        [ 1.050038] [vc_sm_connected_init]: start
        [ 1.056357] [vc_sm_connected_init]: end – returning 0
        [ 1.063995] Waiting for root device /dev/mmcblk0p2…
        [ 1.077211] mmc0: host does not support reading read-only switch, assuming write-enable
        [ 1.084663] mmc0: new high speed SDHC card at address 1234
        [ 1.090826] mmcblk0: mmc0:1234 SA08G 7.21 GiB
        [ 1.096495] Indeed it is in host mode hprt0 = 00021501
        [ 1.106997] mmcblk0: p1 p2
        [ 1.178564] EXT4-fs (mmcblk0p2): INFO: recovery required on readonly filesystem
        [ 1.183905] EXT4-fs (mmcblk0p2): write access will be enabled during recovery
        [ 1.285020] usb 1-1: new high-speed USB device number 2 using dwc_otg
        [ 1.290748] Indeed it is in host mode hprt0 = 00001101
        [ 1.495471] usb 1-1: New USB device found, idVendor=0424, idProduct=9512
        [ 1.501408] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
        [ 1.510656] hub 1-1:1.0: USB hub found
        [ 1.516342] hub 1-1:1.0: 3 ports detected
        [ 1.804973] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
        [ 1.925450] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
        [ 1.930937] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
        [ 1.939607] smsc95xx v1.0.4
        [ 2.009976] smsc95xx 1-1.1:1.0 eth0: register ‘smsc95xx’ at usb-20980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:10:ec:12
        [ 2.094956] usb 1-1.2: new full-speed USB device number 4 using dwc_otg
        [ 2.230217] usb 1-1.2: New USB device found, idVendor=03eb, idProduct=204b
        [ 2.235799] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=220
        [ 2.241295] usb 1-1.2: Product: TPUART transparent
        [ 2.246851] usb 1-1.2: Manufacturer: busware.de
        [ 2.252140] usb 1-1.2: SerialNumber: 75430343731351309170
        [ 2.354927] usb 1-1.3: new full-speed USB device number 5 using dwc_otg
        [ 2.480123] usb 1-1.3: New USB device found, idVendor=062a, idProduct=4101
        [ 2.485639] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
        [ 2.491100] usb 1-1.3: Product: 2.4G Keyboard Mouse
        [ 2.496677] usb 1-1.3: Manufacturer: MOSART Semi.
        [ 2.511041] input: MOSART Semi. 2.4G Keyboard Mouse as /devices/platform/soc/20980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:062A:4101.0001/input/input0
        [ 2.575422] hid-generic 0003:062A:4101.0001: input,hidraw0: USB HID v1.10 Keyboard [MOSART Semi. 2.4G Keyboard Mouse] on usb-20980000.usb-1.3/input0
        [ 2.598689] input: MOSART Semi. 2.4G Keyboard Mouse as /devices/platform/soc/20980000.usb/usb1/1-1/1-1.3/1-1.3:1.1/0003:062A:4101.0002/input/input1
        [ 2.656006] hid-generic 0003:062A:4101.0002: input,hiddev0,hidraw1: USB HID v1.10 Mouse [MOSART Semi. 2.4G Keyboard Mouse] on usb-20980000.usb-1.3/input1
        [ 8.904456] EXT4-fs (mmcblk0p2): orphan cleanup on readonly fs
        [ 8.911740] random: nonblocking pool is initialized
        [ 8.920282] EXT4-fs (mmcblk0p2): 13 orphan inodes deleted
        [ 8.926728] EXT4-fs (mmcblk0p2): recovery complete
        [ 10.755518] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
        [ 10.761946] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
        [ 10.769670] devtmpfs: mounted
        [ 10.777257] Freeing unused kernel memory: 352K (c07c6000 – c081e000)
        [ 12.566856] udevd[159]: starting version 175
        [ 14.299528] gpiomem-bcm2835 20200000.gpiomem: Initialised: Registers at 0x20200000
        [ 15.313608] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
        [ 15.606710] usbcore: registered new interface driver cdc_acm
        [ 15.787294] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
        [ 19.791430] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
        [ 20.323975] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
        [ 37.813509] cfg80211: Calling CRDA to update world regulatory domain
        [ 40.565644] smsc95xx 1-1.1:1.0 eth0: hardware isn’t capable of remote wakeup
        [ 40.955114] cfg80211: Calling CRDA to update world regulatory domain
        [ 42.170816] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
        [ 44.105139] cfg80211: Calling CRDA to update world regulatory domain
        [ 44.459263] Adding 102396k swap on /var/swap. Priority:-1 extents:121 across:2093224k SSFS
        [ 47.255058] cfg80211: Calling CRDA to update world regulatory domain
        [ 50.405253] cfg80211: Calling CRDA to update world regulatory domain
        [ 53.555052] cfg80211: Calling CRDA to update world regulatory domain
        [ 56.705052] cfg80211: Calling CRDA to update world regulatory domain
        [ 59.855041] cfg80211: Calling CRDA to update world regulatory domain
        [ 63.005070] cfg80211: Calling CRDA to update world regulatory domain
        [ 66.155104] cfg80211: Calling CRDA to update world regulatory domain
        [ 69.305007] cfg80211: Calling CRDA to update world regulatory domain
        [ 72.454988] cfg80211: Exceeded CRDA call max attempts. Not calling CRDA

        1. Hi Salvador,

          http://busware.de/tiki-index.php?page=TUL says you’re adapter has 2 Modes which are set by the choosen firmware.

          In my opinion you use the “FT1.2 serial port BCU” one, because if you use the “transparent TPUART” the kernel must recognize a new serial tty interface on connect

          Two option:
          1. Install the transparent TPUART firmware on the busware adapter (this is the option I prefer). Then the KNX TPUART script is the correct one.
          2. Run the KNX USB Script
          http://michlstechblog.info/blog/download/electronic/install_eibd_usb_with_cemi_patches_systemd.sh
          and add
          # Busware
          SUBSYSTEM==”usb”, ATTR{idVendor}==”03eb”, ATTR{idProduct}==”204b”, ACTION==”add”, GROUP=”eibd”, MODE=”0664″

          to /etc/udev/rules.d/90-knxusb-devices.rules.

          Michael

          1. Thaks for your awswer Michael

            What is the correct installation?:

            ./install_eibd_usb_with_cemi_patches_systemd.sh && update-rc.d eibd defaults

            or

            ./install_eibd_usb_with_cemi_patches_systemd.sh

          2. At end of installation shows:
            useradd: el usuario «eibd» ya existe
            ./install_eibd_usb_with_cemi_patches_systemd.sh: línea 187: /etc/tmpfiles.d/eibd.conf: No existe el fichero o el directorio
            ./install_eibd_usb_with_cemi_patches_systemd.sh: línea 210: systemctl: no se encontró la orden
            ./install_eibd_usb_with_cemi_patches_systemd.sh: línea 220: systemctl: no se encontró la orden
            Please reboot your device…

          3. Hi Salvador,

            for debian 8 Jessie just call:
            ./install_eibd_usb_with_cemi_patches_systemd.sh
            (update-rc.d eibd defaults) is no longer nedded.

            ./install_eibd_usb_with_cemi_patches_systemd.sh: línea 210: systemctl: no se encontró la orden => Have you installed debian/raspbian 8 Jessie ???

            Michael

    1. Hi Salvador,

      have you added the lines

      # Busware
      SUBSYSTEM==”usb”, ATTR{idVendor}==”03eb”, ATTR{idProduct}==”204b”, ACTION==”add”, GROUP=”eibd”, MODE=”0664″

      to /etc/udev/rules.d/90-knxusb-devices.rules ?

      as descripted in my last comment.

      Michael

          1. HI Salvador,

            when

            sudo findknxusb

            does not find a device please load the “transparent TPUART” to the busware adapter. On connecting to the raspberry this should create a virtual serial port.

            Without access to the device its very difficult for me to troubleshoot such a case.

            Michael

          2. Hi Salvador,

            I reviewed your comments and found out you have already installed the “transparent TPUART” firmware. So no action is needed.

            [ 2.094956] usb 1-1.2: new full-speed USB device number 4 using dwc_otg
            [ 2.230217] usb 1-1.2: New USB device found, idVendor=03eb, idProduct=204b
            [ 2.235799] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=220
            [ 2.241295] usb 1-1.2: Product: TPUART transparent
            [ 2.246851] usb 1-1.2: Manufacturer: busware.de
            [ 2.252140] usb 1-1.2: SerialNumber: 75430343731351309170

            [ 15.313608] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device

            With this firmware eibd cannot start with the usb: Parameter because this option needs a “real” knx usb device as it comes with firmware “FT1.2 serial port BCU”

            I think when you simply have to run the eibd TPUART script http://michlstechblog.info/blog/download/electronic/install_eibd_systemd.sh and your eibd should work.

            Michael

  39. Hi Michael,

    there is a thread from February 2015 with some high cpu load of eibd. Now I have a similar problem.

    I installed eibd with your “install_eibd_usb_with_cemi_patches_systemd.sh” on a fresh Rasp Pi 3! with Raspian Jessie. KNX interface is a Siemens USB N148.

    Everthing works fine except the cpu load. After starting eibd with systemctl the cpu load keeps below 1%. Also when connecting the vbusmonitor1 everything is ok. Right after sending the first groupswrite to the bus, the cpu goes up and is nailed to 100%.

    On a Rasp Pi 1 with the original smartvisu image and the same Siemens N 148 the cpu load stays normal.

    Do you have any suggestions?

    best regards

    Alex

    1. Hi Alex,

      unfortunately I never had a KNX USB Interface to reproduce such a behaviour and I have no feedback from the former “poster” :-(. But may be there is a problem with eibd. In the knxd (fork of eibd) forum there is described an similar bug https://github.com/knxd/knxd/issues/10 and it this was fixed.

      If your problem still exists, perhaps, you should give knxd a try:-) ?

      Michael

  40. Hello Michael,

    thanks for this great post and your awsome blog. I found the link to this post in the KNX-User-Forum, I didn’t know michltstechblog before, but it really helps the KNX Maker-community.
    Since I personnaly also like eibd/knxd a lot, I have added some chapters to my Homeautomation and SmartHome Book. Maybe your blog readers are also interested in SmartHome Solutions with OpenSource/Linux, so please feel free to have a look on the books Website: http://www.heimautomation-buch.de
    Thanks again for your great Website, Best Regards, Stefan

  41. Hello Michael,

    First of all thanks for the article. It gives me a good starting point when my Pine64 will arive 🙂

    Just some quick questions that crossed my mind.

    – Why is EIBD not more under development? Is it because of the KNX IP Router Devices?

    – I would like to use EIBD in first place to capture bus events and write them to a MySQL database for reporting. (Like when my garage port / other door opens) Or when I enable / disable my alarm..

    Do you think this is possible with EIBD?

    Thanks again from Belgium!
    Stijn

    1. Hi Stijn,

      – Why is EIBD not more under development? Is it because of the KNX IP Router Devices? => I think Martin Koegler isn’t maintain the bcusdk anymore. But there is a fork knxd, but not sure about the state of the project.
      – I would like to use EIBD in first place to capture bus events and write them to a MySQL database for reporting. (Like when my garage port / other door opens) Or when I enable / disable my alarm.. => This should be possible. There is a client library for accessing the bus in the bcusdk, or simply use the command line tool vboxmonitor1.

      Michael

  42. Hi Michael,

    got a problem during install with your script “install_eibd_usb_with_cemi_patches_systemd.sh” with a fresh Jessie installation on a PI2. No matter if i try it with the full version or the lite, the result are the same. I´m going on to use the lite version.
    The script output says:

    ./install_eibd_usb_with_cemi_patches_systemd.sh: Zeile 56: git: Kommando nicht gefunden.
    ./install_eibd_usb_with_cemi_patches_systemd.sh: Zeile 57: cd: bcusdk: Datei oder Verzeichnis nicht gefunden
    –2016-04-04 23:11:29– XXX//sourceforge.net/p/bcusdk/patches/_discuss/thread/31eb300b/ecc9/attachment/bcusdk-usb-cemi.patch
    Auflösen des Hostnamen »sourceforge.net (sourceforge.net)«… 216.34.181.60
    Verbindungsaufbau zu sourceforge.net (sourceforge.net)|216.34.181.60|:80… verbunden.
    HTTP-Anforderung gesendet, warte auf Antwort… 302 Found
    Platz: XXXsourceforge.net/p/bcusdk/patches/_discuss/thread/31eb300b/ecc9/attachment/bcusdk-usb-cemi.patch[folge]
    –2016-04-04 23:11:29– XXXsourceforge.net/p/bcusdk/patches/_discuss/thread/31eb300b/ecc9/attachment/bcusdk-usb-cemi.patch
    Verbindungsaufbau zu sourceforge.net (sourceforge.net)|216.34.181.60|:443… verbunden.
    HTTP-Anforderung gesendet, warte auf Antwort… 200 OK
    Länge: nicht spezifiziert [application/octet-stream]
    In »»bcusdk-usb-cemi.patch«« speichern.

    bcusdk-usb-cemi.patch [ ] 11,71K –.-KB/s in 0,1s

    2016-04-04 23:11:30 (93,9 KB/s) – »bcusdk-usb-cemi.patch« gespeichert [11993]

    patching file eibd/libserver/cemi.cpp
    patching file eibd/libserver/cemi.h
    can’t find file to patch at input line 415
    Perhaps you used the wrong -p or –strip option?
    The text leading up to this was:
    ————————–
    |diff -Nurp bcusdk-git-orig/eibd/libserver/eibusb.cpp bcusdk-git-usbcemi/eibd/libserver/eibusb.cpp
    |— bcusdk-git-orig/eibd/libserver/eibusb.cpp 2013-02-09 13:37:33.653904548 +0100
    |+++ bcusdk-git-usbcemi/eibd/libserver/eibusb.cpp 2013-02-09 13:36:08.321907637 +0100
    ————————–
    File to patch:

    If i skip the patch, it´s asking the samt thing for 3 more patches. And at the End i got a

    ./install_eibd_usb_with_cemi_patches_systemd.sh: Zeile 67: autoreconf: Kommando nicht gefunden.
    ./install_eibd_usb_with_cemi_patches_systemd.sh: Zeile 82: ./configure: Datei oder Verzeichnis nicht gefunden
    make: *** Keine Targets angegeben und keine »make«-Steuerdatei gefunden. Schluss.
    Created symlink from /etc/systemd/system/multi-user.target.wants/eibd.service to /lib/systemd/system/eibd.service.
    Please reboot your device…
    root@raspberrypi:/home/pi# reboot
    packet_write_wait: Connection to 10.0.0.5: Broken pipe

    I´m not so firm with the system and i have no glue where to search the problem. Could you give me a little help? If you need the complete script output just let me know and i can post it.

    Thanks in advance

    Flo

    1. Hi Flo,

      git is missing => ./install_eibd_usb_with_cemi_patches_systemd.sh: Zeile 56: git: Kommando nicht gefunden.

      sudo apt-get install git

      then try it again.

      Michael

      1. Hi Michael,

        git was allready installed. Strange thing.
        After some try and errors i was able to install your other script without the patches. Everything looks great until the reboot. Eibd don´t start. 🙁

        findknxusb don´t return any informaton.

        lsusb find the device “135e – 002” And tell me thats the Gira KNX USB whats the right one.

        ——————–
        pi@raspberrypi:~ $ ps ax | grep eibd
        1090 pts/0 S+ 0:00 grep –color=auto eibd
        ——————–
        pi@raspberrypi:~ $ sudo journalctl -xn
        — Logs begin at Di 2016-04-05 14:43:16 CEST, end at Di 2016-04-05 14:55:25 CEST. —
        Apr 05 14:52:15 raspberrypi systemd[1]: Starting EIB Daemon…
        — Subject: Unit eibd.service has begun with start-up
        — Defined-By: systemd
        — Support: freedesktop.org/mailman/listinfo/systemd-devel

        — Unit eibd.service has begun starting up.
        Apr 05 14:53:45 raspberrypi systemd[1]: eibd.service start-pre operation timed out. Terminating.
        Apr 05 14:53:45 raspberrypi systemd[1]: Failed to start EIB Daemon.
        — Subject: Unit eibd.service has failed
        — Defined-By: systemd
        — Support: freedesktop.org/mailman/listinfo/systemd-devel

        — Unit eibd.service has failed.

        — The result is failed.
        Apr 05 14:53:45 raspberrypi sudo[1091]: pam_unix(sudo:session): session closed for user root
        Apr 05 14:53:45 raspberrypi systemd[1]: Unit eibd.service entered failed state.
        Apr 05 14:55:24 raspberrypi sudo[1535]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/journalctl -xn#
        Apr 05 14:55:24 raspberrypi sudo[1535]: pam_unix(sudo:session): session opened for user root by pi(uid=0)
        Apr 05 14:55:24 raspberrypi sudo[1535]: pam_unix(sudo:session): session closed for user root
        Apr 05 14:55:25 raspberrypi sudo[1549]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/journalctl -xn
        Apr 05 14:55:25 raspberrypi sudo[1549]: pam_unix(sudo:session): session opened for user root by pi(uid=0)
        pi@raspberrypi:~ $
        ——————–
        pi@raspberrypi:~ $ sudo systemctl status eibd.service
        ● eibd.service – EIB Daemon
        Loaded: loaded (/lib/systemd/system/eibd.service; enabled)
        Active: failed (Result: timeout) since Di 2016-04-05 14:53:45 CEST; 3min 6s ago
        Process: 1100 ExecStartPre=/usr/local/bin/eibd-findusb.sh (code=killed, signal=TERM)

        Apr 05 14:53:45 raspberrypi systemd[1]: eibd.service start-pre operation timed out. Terminating.
        Apr 05 14:53:45 raspberrypi systemd[1]: Failed to start EIB Daemon.
        Apr 05 14:53:45 raspberrypi systemd[1]: Unit eibd.service entered failed state.
        ——————–

        Hardware connections are OK. Bus line powered up and i also try to change the usb port. The result are everytime the same.

        I also try some other eibd installation methodes. I´m pretty sure that the problem is not to find in your installation script. But maybe you have an idea what could be the problem.

        Flo

      2. Hi Michael,

        i got it. 🙂

        What was the Problem?
        First: i didn´t know the difference between the version with patch and without patch. After many google requests i figure out that i need the version with patch for the Gira KNX USB device.

        Second Problem:
        I have a very strong firewall working on the network. And how ever the bcusdk download from git use port 9418. Very uncommon and of course it was blocked in the firewall. After adding the right rule, the download works fine and the script runs till the end without problems.

        After the reboot, everything went fine. And i can communicate with the KNX Bus.

        Many thanks for your effort on creating the script and your help to all the people.

        Flo

  43. Hi!
    I’ve installed install_eibd_usb_with_cemi_patches.sh
    I am using an ABB USB device
    groupswrite ip:localhost 0/0/1 1 (turns a light on)
    groupswrite ip:localhost 0/0/1 0 (turns the light off)
    All works fine.

    And what about thermostat? How can I control thermostats?

    thank you!!

    1. Hi,

      of course, but you have to figured out what (Hex) value you have to send to trigger an action. Use the ETS Busmonitor to captured the sequences and values (raw hec code beginning with $) when changing Operationmodes and send it to the groupaddress.

      Michael

      1. Hi, (sorry for my english 🙂 )
        thank you for your answer.
        When I try to use vbusmonitor nothing happens. Maybe I’ve to change something in my configuration.

          1. Hi Michael,
            now it work…if I use for example: “vbusmonitor1 ip:192.168.1.208”
            and
            groupwrite ip:192.168.1.208 0/5/2 0
            groupwrite ip:192.168.1.208 0/5/2 1
            (0/5/2 is a Thermostat address…)

            The result (for vbusmonitor1) is:
            LPDU: BC 00 00 05 02 F2 00 80 00 36 :L_Data low from 0.0.0 to 0/5/2 hops: 07 T_DATA_XXX_REQ A_GroupValue_Write 00
            LPDU: BC 00 00 05 02 F2 00 80 01 37 :L_Data low from 0.0.0 to 0/5/2 hops: 07 T_DATA_XXX_REQ A_GroupValue_Write 01
            The result (for vbusmonitor2) is:
            BC 00 00 05 02 F2 00 80 01 37
            BC 00 00 05 02 F2 00 80 00 36
            The result (for vbusmonitor3) is:
            TS-Base: 00000000
            (0, 00000000) BC 00 00 05 02 F2 00 80 00 36
            (0, 00000000) BC 00 00 05 02 F2 00 80 01 37
            I don’t know how to set thermostat temperature, and how to turn it on or off.
            If I send “groupswrite ip:192.168.1.208 0/5/2 1” command, it change only the actuator state.

            Thank you.

          2. Hi Franzjimi,

            trace the raw data with ETS when you change the value of thermostat temperature and then try to send the raw date (recognized by the leading $) with groupwrite.

            Michael

  44. Hi, and thank you for still keeping this thread alive 🙂

    I get this:
    Synchronizing state for eibd.service with sysvinit using update-rc.d…
    Executing /usr/sbin/update-rc.d eibd defaults
    insserv: pushd() can not change to directory /etc/init.d: No such file or directory
    update-rc.d: error: insserv rejected the script header
    *** Error in `systemctl’: double free or corruption (fasttop): 0x569e3ea8 ***
    ./install_eibd_usb_systemd.sh: line 196: 14920 Aborted systemctl enable eibd.service
    Please reboot your device…

    I am using a Raspberry 3 and latest version of Raspbian downloaded today. Clean install. This message is from script install_eibd_usb_systemd.sh.

    Any hints on what can be wrong are greatly appreciated!

    1. Hi Marius,

      with Debian Jessie it is, as describted in the post 🙂 , no longer needed to call the script update-rc.d.

      The systemd unit eibd is enabled by the script itself.

      Michael

      1. Thank you so much for answering Michael 🙂 I saw that so I did not run the update-rc.d command 🙂 Still got the error as describe though…

        So what I did was just ./install_eibd_usb.sh Should I perhaps also include the “eibd defaults” even if I am not going to use update-rc.d?

        1. Hi Marius,

          can you check if the directory /etc/init.d exists?
          “insserv: pushd() can not change to directory /etc/init.d: No such file or directory”

          In my opinion this directory should exist for backward compatibility.

          if it not exists, create it and try to enable eibd again:

          sudo mkdir /etc/init.d
          sudo systemctl enable eibd

          Michael

  45. Hi

    during normal boot my eibd is not initialized properly:

    extract form var/log/daemon.log

    raspberrypi eibd[501]: Segmentation fault
    raspberrypi dphys-swapfile[499]: Starting dphys-swapfile swapfile setup …
    raspberrypi eibd[501]: Starting eibd daemon: eibdSegmentation fault
    raspberrypi eibd[501]: failed!

    after logon as pi and starting eibd with sudo every thing works fine…

    any ideas => many thanks

  46. I have no USB, only an IP gateway. On Debian wheezy your script compiled and installed successfully.
    Now I have moved to jessie and cannot get eibd to start. I believed I could modify some scripts to ignore the USB things, but I cannot figure out how.

    Could you please help me?

    Regards
    Per

    1. Hi Per,

      you want to establish an connection between eibd and an IP Gateway?. Then you have to edit /etc/default/eibd and change the backend. Possible options:

      ip connects with the EIBnet/IP Routing protocol over an EIBnet/IP gateway. The
      gateway must be so configured, that it routes the necessary addresses

      ipt connects with the EIBnet/IP Tunneling protocol over an EIBnet/IP gateway.
      The gateway must be so configured, that it routes the necessary addresses

      iptn connects with the EIBnet/IP Tunneling protocol over an EIBnet/IP gateway
      using the NAT mode

      export EIBD_OPTIONS=”-d -D -T -R -S -i -u –eibaddr=1.1.128 ip:192.168.56.1″
      export EIBD_OPTIONS=”-d -D -T -R -S -i -u –eibaddr=1.1.128 ipt:192.168.56.1″
      export EIBD_OPTIONS=”-d -D -T -R -S -i -u –eibaddr=1.1.128 iptn:192.168.56.1″

      where you have to replace 192.168.56.1 with the IP Address of your IP Gateway

      Michael

  47. Hi,

    I used the script version 1.0.4 to run the installation on a Pi 3 with Jessie (fully patched). No error (except for the insserv issue) has been reported during the time running the install script but starting eibd or just running “./findknxusb” returns a:
    “Segmentation fault” using strace it looks like facing some problems accessing the USB bus
    =========================================
    ….
    ..
    .
    openat(AT_FDCWD, “/dev/bus/usb”, O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
    fcntl64(3, F_GETFD) = 0x1 (flags FD_CLOEXEC)
    getdents(3, /* 3 entries */, 32768) = 48
    close(3) = 0
    — SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x7e6c4ffc} —
    +++ killed by SIGSEGV +++
    =========================================

    Any kind of help would be great.

    Klaus

  48. Just to add this to my findings. I copied the binaries over from another Pi running Wheezy to the PI running Jessie. All copied binaries copied execute without any Segmentation fault

  49. Hi Michael,

    Thank you very much for the great article and sharing your knowledge. I am really happy now I had successfully connected a raspberry PI via my Gira USB interface and able to check on the system via SSH. And I now had successfully integrated Openhab into the setup and able to remotely controlling my lighting via my mobile device.

  50. patching file eibd/libserver/cemi.cpp
    patching file eibd/libserver/cemi.h
    can’t find file to patch at input line 415
    Perhaps you used the wrong -p or –strip option?
    The text leading up to this was:
    ————————–
    |diff -Nurp bcusdk-git-orig/eibd/libserver/eibusb.cpp bcusdk-git-usbcemi/eibd/libserver/eibusb.cpp
    |— bcusdk-git-orig/eibd/libserver/eibusb.cpp 2013-02-09 13:37:33.653904548 +0100
    |+++ bcusdk-git-usbcemi/eibd/libserver/eibusb.cpp 2013-02-09 13:36:08.321907637 +0100
    ————————–
    File to patch:
    Skip this patch? [y]
    Skipping patch.
    2 out of 2 hunks ignored
    can’t find file to patch at input line 436
    Perhaps you used the wrong -p or –strip option?
    The text leading up to this was:
    ————————–
    |diff -Nurp bcusdk-git-orig/eibd/libserver/Makefile.am bcusdk-git-usbcemi/eibd/libserver/Makefile.a m
    |— bcusdk-git-orig/eibd/libserver/Makefile.am 2013-02-09 13:37:04.349905593 +0100
    |+++ bcusdk-git-usbcemi/eibd/libserver/Makefile.am 2013-02-09 13:36:08.317907627 +0100
    ————————–
    File to patch:
    Skip this patch? [y]
    Skipping patch.

    1. Hi o5i,

      “can’t find file to patch” it seems the script could download one the patches. I just tried it and all are available.

      Please try to run the script again.

      Michael

  51. Hi,
    I use a raspi 2b+ with jessie and wants to connect to an ip-gateway via ipt.
    After installation it seems that the script eibd-findusb.sh searches only for an USB device and wont start the service?
    What I have to do if I don’t use a USB Device?

    Thx4wards
    Habib

    1. Hi Habib,

      you have to alter /etc/default/eibd

      Simply comment the “usb” part and enable “ipt”
      # EIBD_OPTIONS=”-d -D -T -R -S -i -u –eibaddr=1.1.128 usb:%DEVICEID%”
      # EIBD_OPTIONS=”-d -D -T -R -S -i -u –eibaddr=1.1.128 tpuarts:/dev/ttyAMA0″
      EIBD_OPTIONS=”-d -D -T -R -S -i -u –eibaddr=1.1.128 ipt:192.168.56.1″

      Also comment in /lib/systemd/system/eibd.service
      # ExecStartPre=$INSTALL_PREFIX/bin/eibd-findusb.sh

      then execute
      systemctl daemon-reload

      Michael

  52. Hi Michael, good new year

    i’ need to change my configuration from ttyAMA0 to FT12.

    My /etc/default/eibd is :

    #EIBD_BACKEND_ADDR = 1.1.128
    #EIBD_BACKEND = ipt
    #EIBD_PORT_IP = 224.0.23.12
    #EIBD_PORT_IPT = 192.168.200.200
    EIB_IF=”tpuarts:/dev/ttyAMA0″
    EIBD_D = y
    EIBD_T = y
    EIBD_S = y
    EIBD_R =
    EIBD_I =
    EIBD_C = y
    EIBD_BACKEND=tpuarts
    EIBD_PORT_SERIAL=/dev/ttyAMA0

    What should I change to interface to FT12?

    best regard

    1. Hi pete68,

      I think you have to change
      EIB_IF=”ft12:/dev/ttyAMA0″
      EIBD_BACKEND=ft12
      EIBD_PORT_SERIAL=/dev/ttyAMA0

      but your /etc/default/eibd config file is not created from my script 🙂

      Michael

      1. yes, the script comes from the installation of CometVisu, and unfortunately with the changes you suggested will not work.
        In fact, the command “ps ax|grep eibd” only returns “3016 pts/0 S+ 0:00 grep –color=auto eibd” and nothing else.
        I will try with other systems!

        You’ve been very kind, thank you
        paschal

  53. Hi Michael,
    after a successfull installation of the eibd service using the /install_eibd_usb_with_cemi_patches.sh on wheezy I tried it again on Jessie. But during the installation I got a lot of warnings like

    libtoolize: `AC_PROG_RANLIB’ is rendered obsolete by `LT_INIT’
    aclocal: warning: autoconf input should be named ‘configure.ac’, not ‘configure.in’
    automake: warning: autoconf input should be named ‘configure.ac’, not ‘configure.in’
    configure.in:32: installing ‘./compile’
    configure.in:31: installing ‘./config.guess’
    configure.in:31: installing ‘./config.sub’
    configure.in:29: installing ‘./install-sh’
    configure.in:29: installing ‘./missing’
    archive/Makefile.am: installing ‘./depcomp’
    automake: warning: autoconf input should be named ‘configure.ac’, not ‘configure.in’
    bcu/lib/Makefile.am:21: warning: source file ‘gen/eewrite_QI.c’ is in a subdirectory,
    bcu/lib/Makefile.am:21: but option ‘subdir-objects’ is disabled
    automake: warning: possible forward-incompatibility.
    automake: At least a source file is in a subdirectory, but the ‘subdir-objects’
    automake: automake option hasn’t been enabled. For now, the corresponding output
    automake: object file(s) will be placed in the top-level directory. However,
    automake: this behaviour will change in future Automake versions: they will
    automake: unconditionally cause object files to be placed in the same subdirectory
    automake: of the corresponding sources.
    automake: You are advised to start using ‘subdir-objects’ option throughout your
    automake: project, to avoid future incompatibilities.
    bcu/lib/Makefile.am:21: warning: source file ‘gen/eewrite_HI.c’ is in a subdirectory,
    bcu/lib/Makefile.am:21: but option ‘subdir-objects’ is disabled

    and the log file ends with the following information.

    configure: error: Package requirements (pthsem >= 2.0.8) were not met:

    No package ‘pthsem’ found

    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.

    and the following log at the end:
    Alternatively, you may set the environment variables PTHSEM_CFLAGS
    and PTHSEM_LIBS to avoid the need to call pkg-config.
    See the pkg-config man page for more details.
    ./install_eibd_usb_with_cemi_patches.sh: line 95: make: command not found
    useradd: user ‘eibd’ already exists

    In the directory /usr/local/bin there was no file.

    Do you have any idea? Is it script compatible to Jessie?

    Thank you and best regards,
    Steffen

  54. Hi Michael,
    thank you for this tutorial and all the scripts. I installed all and using a Girl USB device. But if I’m sending with groupswrite the sending address is 15.15.255 instead of 1.1.128. Do have an idea?
    Thanks
    Mike

  55. Hi Michael,

    I have a problem setting up my new Pi-3 with a NOOBS. In your blog, you wrote that in Jessie the update rc.d shouldn’t be executed. Therefore I entered following line #./install_eibd_usb.sh && eibd defaults.

    After the script had run i tried the line #ls -l /etc/rc3.d/*eibd, but got the message “ls: cannot access /etc/rc3.d/*eibd: No such file or directory”.
    I have tried to reinstall the PI several times, but I always get the same result. Can you please give me a hint to solve it ?

    Also the static setup is different in newer version, so I wonder about the line
    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
    Should it be entered in the dhcpcd.conf file? (Using nano)

    1. Hi Mattias,

      the post is not uptodate. It is written for debian wheezy but adjusted to debian jessie (install_eibd_usb_with_cemi_patches_systemd.sh).

      The best way is to use knxd and enable the usb config line in /etc/default/knxd.

      After the script had run i tried the line #ls -l /etc/rc3.d/*eibd, but got the message “ls: cannot access /etc/rc3.d/*eibd: No such file or directory”. => Debian jessie is systemd based. /etc/rcx.c are SysV init folders, as used up to debian wheezy. This is no longer used by the systemd script.

      I have tried to reinstall the PI several times, but I always get the same result. Can you please give me a hint to solve it ? => Use knxd 😉

      Also the static setup is different in newer version, so I wonder about the line => => Use knxd 😉
      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
      Should it be entered in the dhcpcd.conf file? (Using nano) => Is not used when a static IP Address is set. See knxd post.

      Michael

  56. Hello,
    I have very diffrent usb interface. This is it: http://www.intelektronik.pl[slash]files[slash]INT_FT_1_2.pdf Its work on windows xp and only ETS4. I have usb version. I installed raspberry and make all operations from tutorials. Im successfully create /dev/ttyUSB0 device. This interface work on ftdi module so it should by like serial interface. Instruction tells about 57600 baud rate but I cannot set it and I look knxd sources – it doesn`t support this baud rate. I don`t its if make sense to fight with it – maybe you have some idea. I can print all you want like udev rules or something else – but no have idea. Anyway whis interface is cheap and have good support with knxd ?

    1. Hi bfksoql,

      can you post the output of

      dmesg|grep tty

      May be the interface simply installs an virtual serial device…I think you do not have to access the USB device. The screenshot of the the installation document let me assume this.

      I’m I right that this interface costs about 270zt ~ 54Euro? If yes take a look at the TPUART Module Siemens BUS Tranceiver Module BTM UP117 5WG1117-2AB11. Price is just about 27€ and is runs stable.

      Michael

  57. Thanks Michael for help. I was thinking about busware.de[slash]tiki-index.php?page=TUL – it doesn`t need to any modifications – please tell if you now its stable with knxd.

    About my exist device I have:

    [ 0.000000] Kernel command line: bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=9acdc07d-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
    [ 0.001347] console [tty1] enabled
    [ 0.964112] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
    [ 3.605751] usb 1-1.5: FTDI USB Serial Device converter now attached to ttyUSB0

    I force creating ttyUSB0 from this device by adding it to udev rules (normally it only see device but without port – I think it is because it has non-standard vendor/productid):

    ACTION==”add”, ATTRS{idVendor}==”1313″, ATTRS{idProduct}==”6313″, RUN+=”/sbin/modprobe ftdi_sio” RUN+=”/bin/sh -c ‘echo 1313 6313 > /sys/bus/usb-serial/drivers/ftdi_sio/new_id'”, OWNER = “knxd” GROUP=”knxd”

    I guess this is normal serial-port device (ETS4 works with RS232 FT option) but with FTDI USB interface.

    1. Hi bfksoql,

      as a quick and dirty hack try (for current stable, notworking in 0.14.x): Insert into my script

      read -n1 -r -p “Press any key to continue…” key

      after git checkout stable. Start the script and wait for “Press any key to continue…”

      Open a second terminal navigate to the knxd folder and edit ./src/backend/ft12.cpp

      Goto line 63 and change the default baudrate


      cfsetospeed (&t1, B57600);

      went back to the first terminal and press a key to resume the install procedure

      then start your knxd with parameter -b ft12:/dev/ttyUSB0

      After starting knxd (on my test system) the baudrate is set to 57600

      stty -F /dev/ttyS0
      speed 57600 baud; line = 0;

      Let me know if this works…

      Michael

  58. Hi,
    I have tried your script, and have to admit I am a complete Noob when it comes to Raspberry Pi, but I am willing to learn and trying to 🙂 This is my first time working with a Rapberry….
    I got my Siemens REG USB Schnittstelle hooked up to the KNX bus and to the Pi via USB. So I followed all the steps as good as possible, and ran into a few Problems along the way, and was hoping someone could help me out a bit. Thanks a lot already to anyone, that takes the time.
    1.
    At the beginning when setting up a Static I.P. the way you showed. I input the line in to the Terminal::

    “sudo vi /etc/network/interfaces”

    and all I got was:
    _______________________________________
    # interfaces(5) file used by ifup(8) and ifdown(8)

    # Please note that this file is written to be used with dhcpcd
    # For static IP, consult /etc/dhcpcd.conf and ‘man dhcpcd.conf’

    # Include files from /etc/network/interfaces.d:
    source-directory /etc/network/interfaces.d
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    “/etc/network/interfaces” 7 lines, 271 characters
    ______________________________________

    so that didnt work at all. But I kept going with your tutorial hoping to resolve this later.

    2.
    I installed everything like you explained, since i got the newest Rasbian Version I didnt install the update, and I got to the step, where I have to input:

    “ps ax|grep eibd”

    and got::
    “936 pts/0 S+ 0:00 grep –color=auto eibd”
    and as root I got::
    “960 pts/0 S+ 0:00 grep eibd”

    instead of what you posted::
    “2996 ? Ss 0:00 /usr/local/bin/eibd -d -D -T -R -S -i -u –eibaddr=1.1.128 usb:1:6:1:0:0”

    and when I input::
    “vbusmonitor1 ip:localhost”

    I get::
    ” Open failed: Connection refused”

    3.
    I thought maybe the eibd didnt start properly so I tried::
    “/etc/init.d/eibd start”

    and it tells me::
    “Segmentation fault
    [ ok ] Starting eibd (via systemctl): eibd.service.”

    But the, “vbusmonitor1” still doesnt work.

    So i assume that the USB Drive isnt being reached by the eibd, maybe because it goes over I.P. address?? It seems like im not getting an address from the USB Interface so the Eibd doesnt know where to get its info from(USB). Maybe its an entirely different reason and i am totally wrong. Maybe its several things even. Im not sure since “I know nothing” about Raspberry Pi.
    So if someone could help me that would be really great and I could at least learn something. Thanks a lot!!!

  59. Hi Michael,

    I’m trying to connect a raspberri PI 3 to a schneider USB interface (MTN681829) but that device isn’t in the devices list that you have in this tutorial can you add it or tell me how to do it.

    Thank you for this fantastic tutorial, keep the good work,

    Diogo

    1. Hi Diogo,

      determine the USB Device and Product ID.

      lsusb

      lsusb -n

      and insert a line like this

      SUBSYSTEM==”usb”, ATTR{idVendor}==”0e77″, ATTR{idProduct}==”0103″, ACTION==”add”, GROUP=”knxd”, MODE=”0664″

      to /etc/udev/rules.d/90-knxusb-devices.rules. Replace ATTR{idVendor}==”0e77″, ATTR{idProduct}==”0103″ with your IDs.

      Let me know the IDs and I will add them to the script.

      Michael

      1. Hello Michael,

        I’m sorry about the dellay,

        idVendor: 0x135e
        idProduct: 0x0024

        this is the USB interface of schneider eletric (MTN681829)

        I will use knxd instead of eibd, thank you for your help 🙂

  60. Hey,

    This tutorial still works, great work!

    I have noticed the following small issue.
    When the raspberry is connected to the KNX USB interface and the connection has been iddle for a while than the first bus event will not be captured by the raspberry.

    Has anyone else noticed this and is there a fix for this? Is it possible to configure ETS to send a “keep alive” signal?

    For now I have created my own “keep alive” signal by firing an event every 30 seconds but I suppose there is a better method for it.

  61. Hello,

    I have a raspbery pi configured with a knx usb interface.

    The system it working well, but sometimes the lights itselfs turn on.
    Typically the same light goes on every night at about the same time.
    The problem does not occur when home automation is started.

    I not have any rule configured.
    Has anyone ever had this problem? Can someone help me?

    1. Hi Daniel,

      strange behaviour 🙂 . When the time is fixed simply trace it with ETS or knxd busmonitor (and also enable tracing in knxd) from where the packet comes from.

      Michael

      1. Hey,

        I installed the knxd package which is standard in the Debian Buster on Pi 4, but I fail 🙁 to configure the USB which I use to connect to the EIB bus.

        in /etc/knxd.conf the standard configuration is for ip :

        KNXD_OPTS=”-e 0.0.1 -E 0.0.2:8 -u /tmp/eib -b ip:”

        What should it be for USB ( Siemens 5WG1 148- 1AB12) ?

        Many thanks,

        Erwin

          1. Hi,

            following message is when the USB/KNX coupling device in connected to Raspeberry. So there is something wrong with permissions I guess…
            Nov 05 17:54:54 raspberrypi systemd[1]: Starting KNX Daemon…
            Nov 05 17:54:54 raspberrypi knxd[458]: libusb: error [_get_usbfs_fd] libusb couldn’t open USB device /dev/bus/usb/001/005: Permission denied
            Nov 05 17:54:54 raspberrypi knxd[458]: libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
            Nov 05 17:54:54 raspberrypi knxd[458]: E00000064: [13:B.usb] B.usb: setup B.usb: failed
            Nov 05 17:54:54 raspberrypi knxd[458]: F00000109: [ 1:main] Error setting up the KNX router.
            Nov 05 17:54:54 raspberrypi systemd[1]: knxd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
            Nov 05 17:54:54 raspberrypi systemd[1]: knxd.service: Failed with result ‘exit-code’.
            Nov 05 17:54:54 raspberrypi systemd[1]: Failed to start KNX Daemon.
            Nov 05 17:55:05 raspberrypi systemd[1]: knxd.service: Service RestartSec=10s expired, scheduling restart.
            Nov 05 17:55:05 raspberrypi systemd[1]: knxd.service: Scheduled restart job, restart counter is at 1.
            Nov 05 17:55:05 raspberrypi systemd[1]: Stopped KNX Daemon.
            Nov 05 17:55:05 raspberrypi systemd[1]: Starting KNX Daemon…
            Nov 05 17:55:05 raspberrypi knxd[937]: libusb: error [_get_usbfs_fd] libusb couldn’t open USB device /dev/bus/usb/001/005: Permission denied
            Nov 05 17:55:05 raspberrypi knxd[937]: libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
            Nov 05 17:55:05 raspberrypi knxd[937]: E00000064: [13:B.usb] B.usb: setup B.usb: failed
            Nov 05 17:55:05 raspberrypi knxd[937]: F00000109: [ 1:main] Error setting up the KNX router.
            Nov 05 17:55:05 raspberrypi systemd[1]: knxd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
            Nov 05 17:55:05 raspberrypi systemd[1]: knxd.service: Failed with result ‘exit-code’.
            Nov 05 17:55:05 raspberrypi systemd[1]: Failed to start KNX Daemon.
            Nov 05 17:55:15 raspberrypi systemd[1]: knxd.service: Service RestartSec=10s expired, scheduling restart.
            Nov 05 17:55:15 raspberrypi systemd[1]: knxd.service: Scheduled restart job, restart counter is at 2.
            Nov 05 17:55:15 raspberrypi systemd[1]: Stopped KNX Daemon.
            Nov 05 17:55:15 raspberrypi systemd[1]: Starting KNX Daemon…
            Nov 05 17:55:15 raspberrypi knxd[1019]: libusb: error [_get_usbfs_fd] libusb couldn’t open USB device /dev/bus/usb/001/005: Permission denied
            Nov 05 17:55:15 raspberrypi knxd[1019]: libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
            Nov 05 17:55:15 raspberrypi knxd[1019]: E00000064: [13:B.usb] B.usb: setup B.usb: failed
            Nov 05 17:55:15 raspberrypi knxd[1019]: F00000109: [ 1:main] Error setting up the KNX router.
            Nov 05 17:55:15 raspberrypi systemd[1]: knxd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
            Nov 05 17:55:15 raspberrypi systemd[1]: knxd.service: Failed with result ‘exit-code’.
            Nov 05 17:55:15 raspberrypi systemd[1]: Failed to start KNX Daemon.
            ~

          2. Hey Michael,

            it is a Siemens 5WG1 148-1AB12 -> Works with ETS5 ( tested !)

            lsusb :

            lsusb
            Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
            Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
            Bus 001 Device 008: ID 0908:02dd Siemens AG
            Bus 001 Device 004: ID 1a2c:0e24 China Resource Semico Co., Ltd
            Bus 001 Device 003: ID 1c4f:0034 SiGma Micro
            Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
            Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

            usb-devices
            T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 1
            D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
            P: Vendor=1d6b ProdID=0002 Rev=04.19
            S: Manufacturer=Linux 4.19.75-v7l+ xhci-hcd
            S: Product=xHCI Host Controller
            S: SerialNumber=0000:01:00.0
            C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
            I: If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub

            T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 4
            D: Ver= 2.10 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
            P: Vendor=2109 ProdID=3431 Rev=04.20
            S: Product=USB2.0 Hub
            C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
            I: If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub

            T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0
            D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
            P: Vendor=1c4f ProdID=0034 Rev=01.10
            S: Manufacturer=SIGMACHIP
            S: Product=Usb Mouse
            C: #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
            I: If#=0x0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbhid

            T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 4 Spd=1.5 MxCh= 0
            D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
            P: Vendor=1a2c ProdID=0e24 Rev=01.10
            S: Manufacturer=SEM
            S: Product=USB Keyboard
            C: #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=98mA
            I: If#=0x0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=01 Driver=usbhid
            I: If#=0x1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid

            T: Bus=01 Lev=02 Prnt=02 Port=02 Cnt=03 Dev#= 8 Spd=12 MxCh= 0
            D: Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
            P: Vendor=0908 ProdID=02dd Rev=01.01
            S: Manufacturer=Siemens
            S: Product=N 148/12 KNX Interface
            S: SerialNumber=000100442761
            C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=80mA
            I: If#=0x0 Alt= 0 #EPs= 2 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid

            T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=5000 MxCh= 4
            D: Ver= 3.00 Cls=09(hub ) Sub=00 Prot=03 MxPS= 9 #Cfgs= 1
            P: Vendor=1d6b ProdID=0003 Rev=04.19
            S: Manufacturer=Linux 4.19.75-v7l+ xhci-hcd
            S: Product=xHCI Host Controller
            S: SerialNumber=0000:01:00.0
            C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
            I: If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub

            T: Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 1
            D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
            P: Vendor=1d6b ProdID=0002 Rev=04.19
            S: Manufacturer=Linux 4.19.75-v7l+ dwc_otg_hcd
            S: Product=DWC OTG Controller
            S: SerialNumber=fe980000.usb
            C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
            I: If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub

          3. Hi Erwin,

            AFAIK, this device doesn’t work with knxd. The opinion of knxd maintainer is that KNX USB devices are broken by design. Look for USB-HID…

            To fix the permission denied error on startup temporary change the permissions on /dev/bus/usb/001/005

            chown knxd:knxd /dev/bus/usb/001/005
            

            and start try to start knxd (without rebooting) again and see whats happend.

            If knxd won’t work for you maybe you should give calimero chance 🙂

            Michael

  62. Hello,
    i dont get it to work, all files are installed.
    is there a file i have to change? and wat do i have to change?

    this are from mu command line:

    pi@raspberrypi:~ $ sudo su
    root@raspberrypi:/home/pi# ps ax|grep eibd
    837 pts/0 S+ 0:00 grep eibd
    root@raspberrypi:/home/pi# vbusmonitor1 ip:localhost
    Open failed: Connection refused
    root@raspberrypi:/home/pi# bcuaddrtab usb:1:4:1:0:0
    Segmentatiefout
    root@raspberrypi:/home/pi# findknxusb
    Segmentatiefout
    root@raspberrypi:/home/pi# sudo killall eibd
    eibd: geen proces gevonden
    root@raspberrypi:/home/pi# sudo rm /tmp/eib
    rm: kan ‘/tmp/eib’ niet verwijderen: Bestand of map bestaat niet
    root@raspberrypi:/home/pi# sudo /etc/init.d/eibd start
    Segmentation fault
    [ ok ] Starting eibd (via systemctl): eibd.service.
    root@raspberrypi:/home/pi# ^C
    root@raspberrypi:/home/pi# ps ax|grep eibd
    911 pts/0 S+ 0:00 grep eibd
    root@raspberrypi:/home/pi# vbusmonitor1 ip:localhost
    Open failed: Connection refused
    root@raspberrypi:/home/pi# findknxusb
    Segmentatiefout

    i home someone can help me.

    thanks

  63. Hi,

    I have to admit that my linux skills are not the very best. Using your EIBD install script on Jessie works perfect for me. knxd seems not to work with my USB device therefore I would need to go on with EIBD (which works perfect for me). My little problem is that I would like to use stretch bit the systemd eibd.service script does not work during the boot process.

    ● eibd.service – EIB Daemon
    Loaded: loaded (/lib/systemd/system/eibd.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Sat xxx CET; 13min ago
    Process: 561 ExecStart=/usr/local/bin/eibd -p /run/eibd/eibd.pid $EIBD_OPTIONS (code=exited, status=0/SUCCESS)
    Process: 482 ExecStartPre=/usr/local/bin/eibd-findusb.sh (code=exited, status=0/SUCCESS)
    Main PID: 563 (code=exited, status=1/FAILURE)

    It looks like the options script already fails passing over the required parameters. restarting the service later ob works. So this happens only during booting up my pi 3b+. systemd seems to work different on stretch… I spend already a couple of hours but get out of ideas what might be wrong here…

    Klaus

  64. Pingback: essay

Leave a Reply