Replace nrjavaserial with RXTXcomm


I’m trying to get openhab to work on a raspberry pi with arch linux. However, it fails to open the serial port. I found that openhab uses nrjavaserial instead of “good old” RXTXcomm. Pity enough, there is obviously no ARM support for nrjavaserial on my system. Is it possible to replace nrjavaserial with RXTXcomm without learning OSGI first? I found nrjavaserial as ./server/configuration/org.eclipse.osgi/bundles/202/1/.cp/lib/nrjavaserial-3.9.3.jar. Can I simply replace that with RXTXcomm.jar?

  • Michael

There must be something else wrong since for sure the RPi is supported by openHAB with the nrjavaserial library.

Maybe it’s due to the fact that I actually use a raspberry pi 2. Looking into nrjavaserial.jar, I find native libraries for ARM v5 and v6, but not for v7.

Is there no easy way to simply use RXTXcomm?

I know people are using the RPi 2 with zwave and it is working fine as well.

I would look for other problems since you might spend a lot of time replacing the library and still have the same problem - it should work fine.

The most common problem is that the user you are using to run OH doesn’t have privileges to open COM ports.

Okay, here you are…

crw-rw---- 1 root uucp 188, 0 7. Jan 16:49 /dev/ttyUSB0
drwxrwxr-x 2 root lock 40 7. Jan 17:46 /var/run/lock/lockdev/

$ id
uid=1001(openhab) gid=1001(openhab) Gruppen=1001(openhab),14(uucp),54(lock)

RXTXcomm works perfectly fine BTW…

Hey all, I am the main developer for NrjavaSerial.

This issue was just opened: to address this problem.
We will be hoping to get a solution this month for a release at the end of january. If anyone would like to contribute upstream to make NrjavaSerial more rock-solid, that would be appreciated.

In any case, I just wanted to pop in and let you know that we have just been made aware of this problem and will be addressing it soon.

1 Like