KNX USB Interface, issue device

  • Platform information:
    • Hardware: Intel Core i5
    • OS: Ubuntu 20.04
    • Java Runtime Environment: openjdk 11.0.14.1 2022-02-08
    • openHAB version: 3.2

Hi all
I’m new here and I want to ask if somebody can help me with my KNX USB Interface. I try to connect this here J 11501 | Niko - Züblin | Elektro-Material Shop

With usb-devices I became the following output. My question is, how does I found out which serial port is used? So which serial port (/dev…) I need to put on knx configuration?

T:  Bus=02 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#=  7 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=28c2 ProdID=0007 Rev=02.01
S:  Manufacturer=Zueblin
S:  Product=KNX-USB Inteface
S:  SerialNumber=0072102E001A
C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=20mA
I:  If#=0x0 Alt= 0 #EPs= 2 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
T:  Bus=02 Lev=02 Prnt=02 Port=03 Cnt=02 Dev#=  3 Spd=12  MxCh= 4
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0557 ProdID=8021 Rev=01.00
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

Thank you for helü

Run

sudo dmesg

this should show which devices are detected and setup when you connect them to an usb port like:

[   60.139563] usb 1-1.1.2: New USB device found, idVendor=1cf1, idProduct=0030, bcdDevice= 1.00
[   60.139573] usb 1-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   60.139581] usb 1-1.1.2: Product: ConBee II
[   60.139589] usb 1-1.1.2: Manufacturer: dresden elektronik ingenieurtechnik GmbH
[   60.139595] usb 1-1.1.2: SerialNumber: DE2192454
[   60.144330] cdc_acm 1-1.1.2:1.0: ttyACM0: USB ACM device

hi wolfgang

thank you for your fast answer. I try it out and change the port… the message is bellow… possible that this device is not working with linux? did I need a driver?

[27303.494522] usb 2-1.1: USB disconnect, device number 7

[27305.762752] usb 2-1.2: new full-speed USB device number 8 using ehci-pci

[27305.932225] usb 2-1.2: New USB device found, idVendor=28c2, idProduct=0007, bcdDevice= 2.01

[27305.932229] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=4

[27305.932231] usb 2-1.2: Product: KNX-USB Inteface

[27305.932232] usb 2-1.2: Manufacturer: Zueblin

[27305.932234] usb 2-1.2: SerialNumber: 0072102E001A

[27305.940350] hid-generic 0003:28C2:0007.000A: hiddev0,hidraw0: USB HID v1.10 Device [Zueblin KNX-USB Inteface] on usb-0000:00:1d.0-1.2/input0

It seems to be identified as USB HID ( human interface device ).
Can you try to create a udev rule:
Filename: /etc/udev/rules.d/90-knxusb-devices.rules
The file’s content:

# Züblin KNX USB Interface
SUBSYSTEM==”usb”, ATTR{idVendor}==”28c2″, ATTR{idProduct}==”0007″, SYMLINK+="ttyKNX", ACTION==”add”, GROUP=”knxd”, MODE=”0664″

You then should get a symlink called /dev/ttyKNX pointingto the device.

thank you wolfgang

I have create the role and restart the whole server, but nothing happens, bellow two outputs after disconnect / connect the usb device. I don’t see any ttyKNX

/etc/udev/rules.d# udevadm monitor 
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[480.774238] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/usbmisc/hiddev0 (usbmisc)
KERNEL[480.774323] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:28C2:0007.0001/hidraw/hidraw0 (hidraw)
KERNEL[480.774380] unbind   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:28C2:0007.0001 (hid)
KERNEL[480.774450] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:28C2:0007.0001 (hid)
KERNEL[480.774506] unbind   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
KERNEL[480.774568] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
KERNEL[480.774638] unbind   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
KERNEL[480.774705] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
UDEV  [480.796298] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/usbmisc/hiddev0 (usbmisc)
UDEV  [480.796628] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:28C2:0007.0001/hidraw/hidraw0 (hidraw)
UDEV  [480.797915] unbind   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:28C2:0007.0001 (hid)
UDEV  [480.798835] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:28C2:0007.0001 (hid)
UDEV  [480.800156] unbind   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
UDEV  [480.801140] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
UDEV  [480.802539] unbind   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
UDEV  [480.803374] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
KERNEL[485.734044] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
KERNEL[485.736940] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
KERNEL[485.740759] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:28C2:0007.0009 (hid)
KERNEL[485.740877] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/usbmisc/hiddev0 (usbmisc)
KERNEL[485.740965] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:28C2:0007.0009/hidraw/hidraw0 (hidraw)
KERNEL[485.741032] bind     /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:28C2:0007.0009 (hid)
KERNEL[485.741095] bind     /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
KERNEL[485.741164] bind     /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
UDEV  [485.743965] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
UDEV  [485.746341] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
UDEV  [485.748975] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:28C2:0007.0009 (hid)
UDEV  [485.749942] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/usbmisc/hiddev0 (usbmisc)
UDEV  [485.754971] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:28C2:0007.0009/hidraw/hidraw0 (hidraw)
UDEV  [485.756623] bind     /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:28C2:0007.0009 (hid)
UDEV  [485.758390] bind     /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
UDEV  [485.760389] bind     /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
[  485.620113] usb 2-1.2: new full-speed USB device number 7 using ehci-pci
[  485.750196] usb 2-1.2: New USB device found, idVendor=28c2, idProduct=0007, bcdDevice= 2.01
[  485.750199] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=4
[  485.750201] usb 2-1.2: Product: KNX-USB Inteface
[  485.750203] usb 2-1.2: Manufacturer: Zueblin
[  485.750204] usb 2-1.2: SerialNumber: 0072102E001A
[  485.757352] hid-generic 0003:28C2:0007.0009: hiddev0,hidraw0: USB HID v1.10 Device [Zueblin KNX-USB Inteface] on usb-0000:00:1d.0-1.2/input0

What does

ls -l /dev/ttyKNX

show after you plugged in the device ( which you already did ) ?

nothing…

I try also another rule (see bellow) and this is working… so no idea why…

SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="/bin/device_added.sh"

SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN+="/bin/device_removed.sh"

other question, did you can recomend me a usb knx which is working? or where can I find a list with devices which are compatible?

I was also seeing that the characters I copy out from here was wrong, so I create now a roles with

SUBSYSTEM=="usb", ACTION=="add", SYMLINK+="ttyKNX", GROUP="knxd", MODE="0664"

and they give me this output

[13538.758597] usb 2-3: USB disconnect, device number 15

[13543.433292] usb 2-3: new full-speed USB device number 16 using xhci_hcd

[13543.614282] usb 2-3: New USB device found, idVendor=28c2, idProduct=0007, bcdDevice= 2.01

[13543.614287] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=4

[13543.614290] usb 2-3: Product: KNX-USB Inteface

[13543.614293] usb 2-3: Manufacturer: Zueblin

[13543.614296] usb 2-3: SerialNumber: 0072102E001A

[13543.622717] hid-generic 0003:28C2:0007.000F: hiddev1,hidraw2: USB HID v1.10 Device [Zueblin KNX-USB Inteface] on usb-0000:00:14.0-3/input0
ls -l /dev/ttyKNX
ls: cannot access '/dev/ttyKNX': No such file or directory

I assume that you have some KNX tools installed on your Ubuntu host.
Does that also contain the tool called findknxusb ? Does that tool find the USB interface ?

This article refers to KNX USB interfaces but I am not sure if this is exactly what you are looking for:

no, I installed a plain ubuntu 20 server… so no other tools. can you give me a link where I can find the source for installation?

This is a page ( KNXD Tutorial - ) points to github ( GitHub - knxd/knxd ) as well as KNX - Bindings | openHAB .

EDITed: Debian/Ubuntu based systems provide packages knxd and knxd-tools.
So there is no need to download and compile the package on your own.

hi wolfgang
I have now buy an ABB i-bus KNX Router/Tunnel. Is possible to use it as Router or as Tunnel. The setup as Tunnel is working fine, I setup it directly in a knx.things file like bellow. But I would prefere it to use as Router. Did you have experience with this?

Bridge knx:ip:bridge [
    type="TUNNEL",
    ipAddress="10.10.1.10",
    portNumber=3671,
    readingPause=50,
    responseTimeout=10,
    readRetriesLimit=3,
    autoReconnectPeriod=60,
    localSourceAddr="0.0.0"
] {
    Thing device generic [
        address="0.2.28",
        fetch=true,
        pingInterval=300,
        readInterval=3600
    ] {
        Type switch        : demoSwitch        "Light Waschküche beide"       [ ga="24/5/103" ]
    }
}

I am sorry. I don’t have experience with it.

If you have the router option choose router and make sure your network has igmp snopping disabled if it doesnt connect

Hi stamate_viorel

Thank you, I change my config from TUNNEL to ROUTER but always Status “unknown”. I don’t find any possibility to disalbe IGMP on my network. We use a EDGEROUTER of unifi.

Igmp mostly deals with multicast traffic so if your switches are capable of monitoring this flow then basically instead of flooding all the ports they route the flow from the transmitter por directly to the receiver port. If your switches are manageable see in it’s interface if your switches are unmanaged then it should just work b cause there is no restrictions.Also show your thing configuration for debugging further and network topology

thank you for your answer, I try now and have create some firewall roles on my router. one to drop all igmp and udp on the whole network and then I add one role to allow the openhab <> knx ip router udp and igmp. but always unknown… possible to debug this?

No your firewall has nothing to do with that in term of flow within the internal network unless we talk about different subnets vlan etc. Explain topology of network thing configuration and platform for hosting openhab.

We have different VLANs. The KNX Gateway and the OpenHab are in the same VLAN. And this is why I create a firewall role for dropping and allow igmp. I don’t know if I have a possibility to debug this… Is so hard if you don’t see anithing :slight_smile:

Ok then then. You can use Wireshark to see the flow of data in that vlan. Then i think is something wrong at the host of openhab. Try this tool if it’s possible with 2 computers on the same vlan to see if the packets are flowing
http://www.dqnetworks.ie/toolsinfo/mcasttest/