[SOLVED] Weird USB issue, multipe USB dongles attached but unable to select correct one from OH paperUI

I’m new to OH, really like it and expanding OH quickly with all kinds of tools and bindings. But I have a weird issue with the USB devices connected to the Pi.

I cannot use udec/rules.d to symlink my USB device to a named USB device, this does not work. I can get over this and have accepted it for now and will deal with this later.

But the weird issue is I cannot select the correct ttyUSBx port in PaperUI when configuring the thing for a binding. It just wont allow me to select the correct ttyUSB port. Sometimes PaperUI presents me with a free text field to enter my port manually and sometimes it presents me with a fixed pull-doen selection menu with not all the available ports listed.

Here is my setup:
I have OH running on a Pi3B, OH version 2.4.0-M4-1
I have 4 USB devices connected to the Pi.

P1 cable (for DSMR binding)
RFXCOM (for rfxcom binding)
USB300 (for enocean binding)
MiLight iBox (for MiLight binding, only power connection)

I’ve already tried booting up with no USB devices attached, and attaching them one-by-one. But I just cannot get it to work. if I only connect the RFXCOM it works fine, if I connect the P1 it works but as soon as I connect the USB300 things get weird and ass you can see from the output I have the RFXCOM connected to both ttyUSB0 and ttyUSB2, how is this happening?

here is the dmesg | grep ‘usb 1-1’ output:

[    1.691460] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    1.841818] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[    1.843411] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[  162.913202] usb 1-1.3: new full-speed USB device number 4 using dwc_otg
[  163.069373] usb 1-1.3: New USB device found, idVendor=0403, idProduct=6015
[  163.069386] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  163.069395] usb 1-1.3: Product: RFXtrx433XL
[  163.069404] usb 1-1.3: Manufacturer: RFXCOM
[  163.069412] usb 1-1.3: SerialNumber: DO2VHXAH
[  163.127802] usb 1-1.3: Detected FT-X
[  163.131119] usb 1-1.3: FTDI USB Serial Device converter now attached to **ttyUSB0**
[  347.706000] usb 1-1.3: USB disconnect, device number 4
[  358.494630] usb 1-1.3: new full-speed USB device number 5 using dwc_otg
[  358.652122] usb 1-1.3: New USB device found, idVendor=0403, idProduct=6001
[  358.652134] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  358.652143] usb 1-1.3: Product: FT232R USB UART
[  358.652152] usb 1-1.3: Manufacturer: FTDI
[  358.652160] usb 1-1.3: SerialNumber: A42IEITZ
[  358.660537] usb 1-1.3: Detected FT232RL
[  358.661452] usb 1-1.3: FTDI USB Serial Device converter now attached to **ttyUSB0**
[  918.117715] usb 1-1.4: new full-speed USB device number 7 using dwc_otg
[  918.273998] usb 1-1.4: New USB device found, idVendor=0403, idProduct=6015
[  918.274014] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  918.274023] usb 1-1.4: Product: RFXtrx433XL
[  918.274031] usb 1-1.4: Manufacturer: RFXCOM
[  918.274039] usb 1-1.4: SerialNumber: DO2VHXAH
[  918.281139] usb 1-1.4: Detected FT-X
[  918.283045] usb 1-1.4: FTDI USB Serial Device converter now attached to **ttyUSB2**
[  765.536857] usb 1-1.5: new full-speed USB device number 6 using dwc_otg
[  765.697131] usb 1-1.5: New USB device found, idVendor=0403, idProduct=6001
[  765.697147] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  765.697156] usb 1-1.5: Product: EnOcean USB 300 DB
[  765.697164] usb 1-1.5: Manufacturer: EnOcean GmbH
[  765.697172] usb 1-1.5: SerialNumber: FT2PTSWO
[  765.705658] usb 1-1.5: Detected FT232RL
[  765.706553] usb 1-1.5: FTDI USB Serial Device converter now attached to **ttyUSB1**

1 Like

Have you tried typing “/dev/ttyUSB2” in the serial port field, instead of selecting it from the proposed list?

Hi George, I cannot type anything, it is a list where I can only select one of the items listed

Try adding the thing RFXCOM USB Transceiver manually (first delete the one automatically discovered) and type in the serial port, see this:


I intentionally typed bogus there!

Tried this, but same issue occurs, I can only select ttyUSB0 from the list, I cannot type anything! also tried Chrome but same problem.

What issues are you having with udev rules and symlink? What is the output of /dev ls -al

The issue I’m having with the udev/symlink is that I cannot get the symlink to work. see below.

[13:52:45] openhabian@homeHAB:/dev$ ls -al
total 4
drwxr-xr-x 15 root root        3400 Oct 26 13:40 .
drwxr-xr-x 21 root root        4096 Oct 19 17:13 ..
crw-r--r--  1 root root     10, 235 Oct 26 13:40 autofs
drwxr-xr-x  2 root root         580 Oct 26 13:40 block
crw-------  1 root root     10, 234 Oct 26 13:40 btrfs-control
drwxr-xr-x  3 root root          60 Jan  1  1970 bus
crw-------  1 root root     10,  63 Oct 26 13:40 cachefiles
drwxr-xr-x  2 root root        2540 Oct 26 13:40 char
crw-------  1 root root      5,   1 Oct 26 13:40 console
crw-------  1 root root     10,  62 Oct 26 13:40 cpu_dma_latency
crw-------  1 root root     10, 203 Oct 26 13:40 cuse
drwxr-xr-x  7 root root         140 Oct 26 13:40 disk
crw-rw----  1 root video    29,   0 Oct 26 13:40 fb0
lrwxrwxrwx  1 root root          13 Nov  3  2016 fd -> /proc/self/fd
crw-rw-rw-  1 root root      1,   7 Oct 26 13:40 full
crw-rw-rw-  1 root root     10, 229 Oct 26 13:40 fuse
crw-rw----  1 root gpio    254,   0 Oct 26 13:40 gpiochip0
crw-rw----  1 root gpio    254,   1 Oct 26 13:40 gpiochip1
crw-rw----  1 root gpio    254,   2 Oct 26 13:40 gpiochip2
crw-rw----  1 root gpio    248,   0 Oct 26 13:40 gpiomem
crw-------  1 root root     10, 183 Oct 26 13:40 hwrng
lrwxrwxrwx  1 root root          25 Nov  3  2016 initctl -> /run/systemd/initctl/fifo
drwxr-xr-x  2 root root          60 Jan  1  1970 input
crw-r--r--  1 root root      1,  11 Oct 26 13:40 kmsg
lrwxrwxrwx  1 root root          28 Nov  3  2016 log -> /run/systemd/journal/dev-log
brw-rw----  1 root disk      7,   0 Oct 26 13:40 loop0
brw-rw----  1 root disk      7,   1 Oct 26 13:40 loop1
brw-rw----  1 root disk      7,   2 Oct 26 13:40 loop2
brw-rw----  1 root disk      7,   3 Oct 26 13:40 loop3
brw-rw----  1 root disk      7,   4 Oct 26 13:40 loop4
brw-rw----  1 root disk      7,   5 Oct 26 13:40 loop5
brw-rw----  1 root disk      7,   6 Oct 26 13:40 loop6
brw-rw----  1 root disk      7,   7 Oct 26 13:40 loop7
crw-rw----  1 root disk     10, 237 Oct 26 13:40 loop-control
drwxr-xr-x  2 root root          60 Oct 26 13:40 mapper
crw-r-----  1 root kmem      1,   1 Oct 26 13:40 mem
crw-------  1 root root     10,  59 Oct 26 13:40 memory_bandwidth
brw-rw----  1 root disk    179,   0 Oct 26 13:40 mmcblk0
brw-rw----  1 root disk    179,   1 Oct 26 13:40 mmcblk0p1
brw-rw----  1 root disk    179,   2 Oct 26 13:40 mmcblk0p2
drwxrwxrwt  2 root root          40 Jan  1  1970 mqueue
drwxr-xr-x  2 root root          60 Oct 26 13:40 net
crw-------  1 root root     10,  61 Oct 26 13:40 network_latency
crw-------  1 root root     10,  60 Oct 26 13:40 network_throughput
crw-rw-rw-  1 root root      1,   3 Oct 26 13:40 null
crw-------  1 root root    108,   0 Oct 26 13:40 ppp
crw-rw-rw-  1 root tty       5,   2 Oct 26 13:52 ptmx
drwxr-xr-x  2 root root           0 Nov  3  2016 pts
brw-rw----  1 root disk      1,   0 Oct 26 13:40 ram0
brw-rw----  1 root disk      1,   1 Oct 26 13:40 ram1
brw-rw----  1 root disk      1,  10 Oct 26 13:40 ram10
brw-rw----  1 root disk      1,  11 Oct 26 13:40 ram11
brw-rw----  1 root disk      1,  12 Oct 26 13:40 ram12
brw-rw----  1 root disk      1,  13 Oct 26 13:40 ram13
brw-rw----  1 root disk      1,  14 Oct 26 13:40 ram14
brw-rw----  1 root disk      1,  15 Oct 26 13:40 ram15
brw-rw----  1 root disk      1,   2 Oct 26 13:40 ram2
brw-rw----  1 root disk      1,   3 Oct 26 13:40 ram3
brw-rw----  1 root disk      1,   4 Oct 26 13:40 ram4
brw-rw----  1 root disk      1,   5 Oct 26 13:40 ram5
brw-rw----  1 root disk      1,   6 Oct 26 13:40 ram6
brw-rw----  1 root disk      1,   7 Oct 26 13:40 ram7
brw-rw----  1 root disk      1,   8 Oct 26 13:40 ram8
brw-rw----  1 root disk      1,   9 Oct 26 13:40 ram9
crw-rw-rw-  1 root root      1,   8 Oct 26 13:40 random
drwxr-xr-x  2 root root          60 Jan  1  1970 raw
crw-rw-r--  1 root netdev   10,  58 Oct 26 13:40 rfkill
drwxr-xr-x  4 root root          80 Oct 26 13:40 serial
lrwxrwxrwx  1 root root           5 Oct 26 13:40 serial0 -> ttyS0
lrwxrwxrwx  1 root root           7 Oct 26 13:40 serial1 -> ttyAMA0
drwxrwxrwt  2 root root          40 Nov  3  2016 shm
drwxr-xr-x  3 root root         160 Oct 26 13:40 snd
lrwxrwxrwx  1 root root          15 Nov  3  2016 stderr -> /proc/self/fd/2
lrwxrwxrwx  1 root root          15 Nov  3  2016 stdin -> /proc/self/fd/0
lrwxrwxrwx  1 root root          15 Nov  3  2016 stdout -> /proc/self/fd/1
crw-rw-rw-  1 root tty       5,   0 Oct 26 13:40 tty
crw--w----  1 root tty       4,   0 Oct 26 13:40 tty0
crw--w----  1 root tty       4,   1 Oct 26 13:40 tty1
crw--w----  1 root tty       4,  10 Oct 26 13:40 tty10
crw--w----  1 root tty       4,  11 Oct 26 13:40 tty11
crw--w----  1 root tty       4,  12 Oct 26 13:40 tty12
crw--w----  1 root tty       4,  13 Oct 26 13:40 tty13
crw--w----  1 root tty       4,  14 Oct 26 13:40 tty14
crw--w----  1 root tty       4,  15 Oct 26 13:40 tty15
crw--w----  1 root tty       4,  16 Oct 26 13:40 tty16
crw--w----  1 root tty       4,  17 Oct 26 13:40 tty17
crw--w----  1 root tty       4,  18 Oct 26 13:40 tty18
crw--w----  1 root tty       4,  19 Oct 26 13:40 tty19
crw--w----  1 root tty       4,   2 Oct 26 13:40 tty2
crw--w----  1 root tty       4,  20 Oct 26 13:40 tty20
crw--w----  1 root tty       4,  21 Oct 26 13:40 tty21
crw--w----  1 root tty       4,  22 Oct 26 13:40 tty22
crw--w----  1 root tty       4,  23 Oct 26 13:40 tty23
crw--w----  1 root tty       4,  24 Oct 26 13:40 tty24
crw--w----  1 root tty       4,  25 Oct 26 13:40 tty25
crw--w----  1 root tty       4,  26 Oct 26 13:40 tty26
crw--w----  1 root tty       4,  27 Oct 26 13:40 tty27
crw--w----  1 root tty       4,  28 Oct 26 13:40 tty28
crw--w----  1 root tty       4,  29 Oct 26 13:40 tty29
crw--w----  1 root tty       4,   3 Oct 26 13:40 tty3
crw--w----  1 root tty       4,  30 Oct 26 13:40 tty30
crw--w----  1 root tty       4,  31 Oct 26 13:40 tty31
crw--w----  1 root tty       4,  32 Oct 26 13:40 tty32
crw--w----  1 root tty       4,  33 Oct 26 13:40 tty33
crw--w----  1 root tty       4,  34 Oct 26 13:40 tty34
crw--w----  1 root tty       4,  35 Oct 26 13:40 tty35
crw--w----  1 root tty       4,  36 Oct 26 13:40 tty36
crw--w----  1 root tty       4,  37 Oct 26 13:40 tty37
crw--w----  1 root tty       4,  38 Oct 26 13:40 tty38
crw--w----  1 root tty       4,  39 Oct 26 13:40 tty39
crw--w----  1 root tty       4,   4 Oct 26 13:40 tty4
crw--w----  1 root tty       4,  40 Oct 26 13:40 tty40
crw--w----  1 root tty       4,  41 Oct 26 13:40 tty41
crw--w----  1 root tty       4,  42 Oct 26 13:40 tty42
crw--w----  1 root tty       4,  43 Oct 26 13:40 tty43
crw--w----  1 root tty       4,  44 Oct 26 13:40 tty44
crw--w----  1 root tty       4,  45 Oct 26 13:40 tty45
crw--w----  1 root tty       4,  46 Oct 26 13:40 tty46
crw--w----  1 root tty       4,  47 Oct 26 13:40 tty47
crw--w----  1 root tty       4,  48 Oct 26 13:40 tty48
crw--w----  1 root tty       4,  49 Oct 26 13:40 tty49
crw--w----  1 root tty       4,   5 Oct 26 13:40 tty5
crw--w----  1 root tty       4,  50 Oct 26 13:40 tty50
crw--w----  1 root tty       4,  51 Oct 26 13:40 tty51
crw--w----  1 root tty       4,  52 Oct 26 13:40 tty52
crw--w----  1 root tty       4,  53 Oct 26 13:40 tty53
crw--w----  1 root tty       4,  54 Oct 26 13:40 tty54
crw--w----  1 root tty       4,  55 Oct 26 13:40 tty55
crw--w----  1 root tty       4,  56 Oct 26 13:40 tty56
crw--w----  1 root tty       4,  57 Oct 26 13:40 tty57
crw--w----  1 root tty       4,  58 Oct 26 13:40 tty58
crw--w----  1 root tty       4,  59 Oct 26 13:40 tty59
crw--w----  1 root tty       4,   6 Oct 26 13:40 tty6
crw--w----  1 root tty       4,  60 Oct 26 13:40 tty60
crw--w----  1 root tty       4,  61 Oct 26 13:40 tty61
crw--w----  1 root tty       4,  62 Oct 26 13:40 tty62
crw--w----  1 root tty       4,  63 Oct 26 13:40 tty63
crw--w----  1 root tty       4,   7 Oct 26 13:40 tty7
crw--w----  1 root tty       4,   8 Oct 26 13:40 tty8
crw--w----  1 root tty       4,   9 Oct 26 13:40 tty9
crw-rw----  1 root dialout 204,  64 Oct 26 13:40 ttyAMA0
crw-------  1 root root      5,   3 Oct 26 13:40 ttyprintk
crw-rw----  1 root dialout   4,  64 Oct 26 13:40 ttyS0
crw-rw----  1 root dialout 188,   0 Oct 26 13:40 ttyUSB0
crw-rw----  1 root dialout 188,   1 Oct 26 13:40 ttyUSB1
crw-rw----  1 root dialout 188,   2 Oct 26 13:40 ttyUSB2
crw-------  1 root root     10, 239 Oct 26 13:40 uhid
crw-------  1 root root     10, 223 Oct 26 13:40 uinput
crw-rw-rw-  1 root root      1,   9 Oct 26 13:40 urandom
crw-rw----  1 root video   246,   0 Oct 26 13:40 vchiq
crw-rw----  1 root video   249,   0 Oct 26 13:40 vcio
crw-------  1 root root    250,   0 Oct 26 13:40 vc-mem
crw-rw----  1 root tty       7,   0 Oct 26 13:40 vcs
crw-rw----  1 root tty       7,   1 Oct 26 13:40 vcs1
crw-rw----  1 root tty       7,   2 Oct 26 13:40 vcs2
crw-rw----  1 root tty       7,   3 Oct 26 13:40 vcs3
crw-rw----  1 root tty       7,   4 Oct 26 13:40 vcs4
crw-rw----  1 root tty       7,   5 Oct 26 13:40 vcs5
crw-rw----  1 root tty       7,   6 Oct 26 13:40 vcs6
crw-rw----  1 root tty       7, 128 Oct 26 13:40 vcsa
crw-rw----  1 root tty       7, 129 Oct 26 13:40 vcsa1
crw-rw----  1 root tty       7, 130 Oct 26 13:40 vcsa2
crw-rw----  1 root tty       7, 131 Oct 26 13:40 vcsa3
crw-rw----  1 root tty       7, 132 Oct 26 13:40 vcsa4
crw-rw----  1 root tty       7, 133 Oct 26 13:40 vcsa5
crw-rw----  1 root tty       7, 134 Oct 26 13:40 vcsa6
crw-------  1 root root     10, 137 Oct 26 13:40 vhci
crw-------  1 root root     10, 130 Oct 26 13:40 watchdog
crw-------  1 root root    252,   0 Oct 26 13:40 watchdog0
crw-rw-rw-  1 root root      1,   5 Oct 26 13:40 zero

and here is the output of 99-usb-serial.rules

ACTION=="add", SUBSYSTEM==“tty", ATTRS{idVendor}==“0403", ATTRS{idProduct}=="6015”, ATTRS{serial}==“DO2VHXAH", SYMLINK+="ttyUSB-RFXCOM“, GROUP="dialout", MODE="0666"
ACTION=="add", SUBSYSTEM==“tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}==“6001”, ATTRS{serial}=="A42IEITZ", SYMLINK+="ttyUSB-P1“, GROUP="dialout", MODE="0666"
ACTION=="add", SUBSYSTEM==“tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}==“6001”, ATTRS{serial}=="FT2PTSWO", SYMLINK+="ttyUSB-G300“, GROUP="dialout", MODE="0666"

Have you tried adding those to your EXTRA_JAVA_OPTS in /ect/default/openhab2

1 Like

Okay, I do not know what I changed, but this seems to work now. I have 3 ttyUSBx devices in the pull-down menu now!
the /etc/default/openhab2 file now looks like this:

.....
## EXTRA_JAVA_OPTS=""

EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyUSB1:/dev/ttyUSB2”

.....

That’s a good sign.:grinning: Before going to far I would stop OH using sudo systemctl stop openhab2.service then reboot with sudo reboot to check that everything is good. Last thing you want is a power blip or restart and having to configure it again.

1 Like