Serial Bridge Gateway(/dev/ttyUSB0) Error


I have followed all the procedure to run an openHAB version 2.5(stable runtime) server in ubuntu(manual installation), its working fine in ubuntu 16.04.

I am using xbee binding to communicate with hardware through “/dev/ttyUSB0” port, it’s working fine in ubuntu 16.04.

Note: As suggested by Kai Kruzer I have removed RXTX JAR from classpath its working fine in ubuntu 16.04.

Now I am trying to run same server in ubuntu 18.04 I am getting error like below

java.lang.NoClassDefFoundError: Could not initialize class thrown while loading
com.digi.xbee.api.exceptions.InvalidInterfaceException: No such port: /dev/ttyUSB0
at org.openhab.binding.snavxbee2.handler.SNAVXbee2BridgeHandler.initialize(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
Caused by:…

note: As suggest I have installed "RXTX Libray" using below command

      sudo apt-get install

Then I have added RXTXComm.jar and rxtx-2.2.2.jar to classpath in MANIFEST.MF, still no use.

Also I have copy/paste RXTXComm.jar and rxtx-2.2.2.jar into addons folder then also I am getting the same error.

Note: Also I have tried all versions of "RXTX" jar still getting same error.

Please help me out to resolve this issue.

Thank you

dose openhab user have permission to use port?

does the device /dev/ttyUSB0 exist ?

When I was running a native install of OH in 18.04 and up, serial stick were assigned to dev locations of /dev/ttyACM*.

that’s also the case for 16.04 for me.

@Wolfgang_S thanks for the reply,

Yes, port/dev/ttyUSB0 exists.

Hi denominator, thanks for reply

yes openhab have the permission to use USB port, it’s working fine in ubuntu 16.04

Have you added openHAB to the dialout and tty group?

id -Gn openhab

Hi @denominator thanks for the reply yes it is added to dialout group.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.