# Nrjavaserial upgrade causes "Serial Error: Port /dev/ttyACM0 does not exist"

**URL:** <https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783>\
**Category:** Runtime\
**Created:** [December 26, 2016, 1:42am UTC](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783 "2016-12-26T01:42:14Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![Kai](https://community.openhab.org/user_avatar/community.openhab.org/kai/32/116281_2.png) [@Kai](https://community.openhab.org/u/Kai)\
**Post date:** [January 10, 2017, 11:20am UTC](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783/41 "2017-01-10T11:20:22Z")

</div>

If it is a problem that only exists on specific Linux versions (as you now assume), you might try to seek for some help at [GitHub - NeuronRobotics/nrjavaserial: A Java Serial Port system. This is a fork of the RXTX project that uses in jar loading of the native code. · GitHub](https://github.com/NeuronRobotics/nrjavaserial) and see if others came across similar problems.

Some more specific and detailed log files might also be helpful.

Can anybody else confirm here that he is successfully using Z-Wave with a recent build with /dev/ttyAMA0?

---

<div class="post-metadata">

**Author:** ![sihui](https://community.openhab.org/user_avatar/community.openhab.org/sihui/32/55674_2.png) [@sihui](https://community.openhab.org/u/sihui)\
**Post date:** [January 10, 2017, 11:50am UTC](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783/42 "2017-01-10T11:50:51Z")

</div>

> [@Kai](#):
>
> with a recent build with /dev/ttyAMA0?

Confirmed with build #710, but using not a Razberry but a USB Zwave stick on /dev/ttyACM0.

```
2017-01-10 09:32:50.257 [INFO] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyACM0'
2017-01-10 09:32:50.406 [INFO] [ing.zwave.handler.ZWaveSerialHandler] - Serial port is initialized
2017-01-10 09:32:50.526 [INFO] [mmandclass.ZWaveSecurityCommandClass] - Update networkKey
2017-01-10 09:32:50.575 [INFO] [ve.internal.protocol.ZWaveController] - Starting ZWave controller

```

---

<div class="post-metadata">

**Author:** ![robb01](https://community.openhab.org/letter_avatar_proxy/v4/letter/r/838e76/32.png) [@robb01](https://community.openhab.org/u/robb01)\
**Post date:** [January 10, 2017, 9:16pm UTC](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783/43 "2017-01-10T21:16:06Z")

</div>

In this situation the more detail the better to isolate the problem. Which Raspberry Pi are you using and are you running Debian Wheezy or Jessie?  
The other difference of course is that the Razberry sits on the RX and TX pins of the gpio and not on the USB bus. This comes down to serial device recognition that was working fine on version 3.9 of nrjavaserial and does not work at all (for me in the situation stated) on version 3.12 of this library.

---

<div class="post-metadata">

**Author:** ![robb01](https://community.openhab.org/letter_avatar_proxy/v4/letter/r/838e76/32.png) [@robb01](https://community.openhab.org/u/robb01)\
**Post date:** [January 10, 2017, 9:20pm UTC](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783/44 "2017-01-10T21:20:11Z")

</div>

Thanks Kai. I will pursue this on the github link you provided and am happy to keep testing.  
In the meantime I expect it could take a little while to fully shake this one out. Could you please provide a link to an archived version from early December using 3.9 of the library. I have not been able to run my zwave devices for several weeks now.

---

<div class="post-metadata">

**Author:** ![sihui](https://community.openhab.org/user_avatar/community.openhab.org/sihui/32/55674_2.png) [@sihui](https://community.openhab.org/u/sihui)\
**Post date:** [January 10, 2017, 9:20pm UTC](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783/45 "2017-01-10T21:20:31Z")

</div>

> [@robb01](#):
>
> Which Raspberry Pi are you using and are you running Debian Wheezy or Jessie?

Did you ask me?

> [@robb01](#):
>
> the Razberry sits on the RX and TX pins of the gpio and not on the USB bus

So my answer above is not of any interest and should be ignored.

---

<div class="post-metadata">

**Author:** ![robb01](https://community.openhab.org/letter_avatar_proxy/v4/letter/r/838e76/32.png) [@robb01](https://community.openhab.org/u/robb01)\
**Post date:** [January 10, 2017, 9:34pm UTC](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783/46 "2017-01-10T21:34:18Z")

</div>

> [@sihui](#):
>
> Did you ask me?

Yes sorry sihui, I hit the wrong Reply button. Thanks for yr response.

---

<div class="post-metadata">

**Author:** ![robb01](https://community.openhab.org/letter_avatar_proxy/v4/letter/r/838e76/32.png) [@robb01](https://community.openhab.org/u/robb01)\
**Post date:** [January 11, 2017, 10:45am UTC](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783/47 "2017-01-11T10:45:39Z")

</div>

New installation of openhabian on a clean SD card on the rPi2 (installs under Debian Jessie) works with Razberry card 🙂 after :  
adding -Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0" to setenv and  
sudo chmod 666 /dev/ttyAMA0  
which gives  
ls -la /dev/ttyAMA0  
crw-rw-rw- 1 root tty 204, 64 Jan 11 18:24 /dev/ttyAMA0  
Thanks to all of those involved over at [openHABian hassle-free openHAB Setup](https://community.openhab.org/t/openhabian-hassle-free-rpi-image/13379) in putting openhabian together. The installation works very smoothly.

So this may support the case that NrjavaSerial 3.12 does not work under Debian Wheezy - at least on rPi2 devices whereas the previous version 3.9 worked fine. Maybe Wheezy does not support a required dependency of nrjavaserial library.

---

<div class="post-metadata">

**Author:** ![ThomDietrich](https://community.openhab.org/user_avatar/community.openhab.org/thomdietrich/32/71239_2.png) [@ThomDietrich](https://community.openhab.org/u/ThomDietrich)\
**Post date:** [January 11, 2017, 11:03am UTC](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783/48 "2017-01-11T11:03:48Z")

</div>

Hey @robb01 I didn’t get if the new system with openHABian + the two commands helped you in whatever you are trying to do. Please be aware, that these commands are not all that’s needed and that the file setenv is the wrong place for your modifications. There is a menu entry under `sudo openhabian-config` to do everything for you in the right way: [Tackle serialPorts setting in menu entry (Razberry, ...) · Issue #33 · openhab/openhabian · GitHub](https://github.com/openhab/openhabian/issues/33#issuecomment-267465644)

[![](https://cloud.githubusercontent.com/assets/2870104/21244785/78cba348-c31f-11e6-95cb-d8c4494da842.png) ](https://cloud.githubusercontent.com/assets/2870104/21244785/78cba348-c31f-11e6-95cb-d8c4494da842.png)

---

<div class="post-metadata">

**Author:** ![robb01](https://community.openhab.org/letter_avatar_proxy/v4/letter/r/838e76/32.png) [@robb01](https://community.openhab.org/u/robb01)\
**Post date:** [January 11, 2017, 11:25am UTC](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783/49 "2017-01-11T11:25:12Z")

</div>

Thanks @ThomDietrich for this comment and all of your good work. I am happy that the new installation went well and the razberry device is recognised. All is looking good after some weeks struggling with nrjavaserial. I will defintely check out the openhabian-config tool and make sure everything is good there. Should I then remove the line I addded to setenv?

---

<div class="post-metadata">

**Author:** ![ThomDietrich](https://community.openhab.org/user_avatar/community.openhab.org/thomdietrich/32/71239_2.png) [@ThomDietrich](https://community.openhab.org/u/ThomDietrich)\
**Post date:** [January 11, 2017, 11:29am UTC](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783/50 "2017-01-11T11:29:15Z")

</div>

It would be redundant then and would get overwritten with one of the future openHAB updates anyhow. So yes, remove it and execute the openHABian steps. Good luck!

---

<div class="post-metadata">

**Author:** ![PoorYuppie](https://community.openhab.org/letter_avatar_proxy/v4/letter/p/4af34b/32.png) [@PoorYuppie](https://community.openhab.org/u/PoorYuppie)\
**Post date:** [January 12, 2017, 5:14pm UTC](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783/51 "2017-01-12T17:14:49Z")

</div>

Fresh Openhabian(OH2) on R-pi 3b, using usb to serial cable to my Optoma projector. I was stumped up until yesterday. I was getting the /dev/ttyUSB0 does not exist error until I did this as stated above:

- Update system sudo apt-get update
- Install: liblockdev1-dev package sudo apt-get install liblockdev1-dev

The projector fired right up on the first try after that.  
Thanks guys!

---

<div class="post-metadata">

**Author:** ![ThomDietrich](https://community.openhab.org/user_avatar/community.openhab.org/thomdietrich/32/71239_2.png) [@ThomDietrich](https://community.openhab.org/u/ThomDietrich)\
**Post date:** [January 12, 2017, 5:38pm UTC](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783/52 "2017-01-12T17:38:37Z")

</div>

This package is part of openHABian I believe…  
Out of the house currently. Will have to check later

---

<div class="post-metadata">

**Author:** ![da\_kurgan](https://community.openhab.org/letter_avatar_proxy/v4/letter/d/71e660/32.png) [@da\_kurgan](https://community.openhab.org/u/da_kurgan)\
**Post date:** [January 12, 2017, 10:20pm UTC](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783/53 "2017-01-12T22:20:26Z")

</div>

Running Raspbian on R-pi 2B and using Razberry.  
Installed liblockdev1 and liblockdev1-dev and then upgrading to latest openhab2 (2.0.0~20170112185728-1).

If I add “-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0” Openhab2 just dies on me with this as the last log message:  
2017-01-12 23:07:28.231 [INFO] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port ‘/dev/ttyAMA0’

openhab user is a member of dailout etc etc, it has been working before upgrade late december.

But I guess I am not not alone with this problem, so I have that going for me which is nice.

---

<div class="post-metadata">

**Author:** ![erland\_lestander](https://community.openhab.org/letter_avatar_proxy/v4/letter/e/dec6dc/32.png) [@erland\_lestander](https://community.openhab.org/u/erland_lestander)\
**Post date:** [January 13, 2017, 9:21am UTC](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783/54 "2017-01-13T09:21:05Z")

</div>

I had the same problem, i.e. sudden death after a z-wave message .  
I gave up and:  
Did apt-get purge, and apt-get install of the new single distro  
Purge removed the openhab user. So I got the “does not exist” error.  
Added user openhab user to dialout and tty groups.  
After that I was back at the sudden death problem…

There was a revert of some code in OH relating to those liblockdev around christmas,  
but after new year the problems was back, albeit with a bit different symptoms.

( On top of that I realised I was running on wheezy instead of jessie so recent queries of issues seems to be answered with “Upgrade!” )

Edit: I’ve not seen a root cause analysis on this sudden death issue.

---

<div class="post-metadata">

**Author:** ![ThomDietrich](https://community.openhab.org/user_avatar/community.openhab.org/thomdietrich/32/71239_2.png) [@ThomDietrich](https://community.openhab.org/u/ThomDietrich)\
**Post date:** [January 13, 2017, 11:28am UTC](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783/55 "2017-01-13T11:28:06Z")

</div>

@da_kurgan @erland_lestander Please check if you followed the instructions documented here: [http://docs.openhab.org/installation/linux.html#privileges-for-common-peripherals](http://docs.openhab.org/installation/linux.html#privileges-for-common-peripherals)

As for the Raspberry Pi: openHABian has all these settings pre-configured. Might be something for you.

---

<div class="post-metadata">

**Author:** ![erland\_lestander](https://community.openhab.org/letter_avatar_proxy/v4/letter/e/dec6dc/32.png) [@erland\_lestander](https://community.openhab.org/u/erland_lestander)\
**Post date:** [January 13, 2017, 11:47am UTC](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783/56 "2017-01-13T11:47:56Z")

</div>

Thanks.  
I haven’t set EXTRA\_JAVA\_OPTS .  
On the other hand it worked without this up until the 3rd of January.  
I will set it and test.

Maybe the binding can do this in the background?

---

<div class="post-metadata">

**Author:** ![erland\_lestander](https://community.openhab.org/letter_avatar_proxy/v4/letter/e/dec6dc/32.png) [@erland\_lestander](https://community.openhab.org/u/erland_lestander)\
**Post date:** [January 13, 2017, 5:00pm UTC](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783/57 "2017-01-13T17:00:02Z")

</div>

Changed to this:

> pi@homeauto /etc/default $ cat openh\*  
> EXTRA\_JAVA\_OPTS=“-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyACM0”  
> pi@homeauto /etc/default $

Still doesn’t start at reboot and doesn’t start by issuing

`pi@homeauto /etc/default $ sudo ./openhab2 start`  
So basically no change.

---

<div class="post-metadata">

**Author:** ![ThomDietrich](https://community.openhab.org/user_avatar/community.openhab.org/thomdietrich/32/71239_2.png) [@ThomDietrich](https://community.openhab.org/u/ThomDietrich)\
**Post date:** [January 13, 2017, 5:06pm UTC](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783/58 "2017-01-13T17:06:16Z")

</div>

> [@erland\_lestander](#):
>
> pi@homeauto /etc/default $ sudo ./openhab2 start

There are multiple things wrong about this command. Sorry to tell you. At this point I’m not sure what might be the problem as you seem to already have changed a lot. Would you consider simply switching over to openHABian? You just have to flash the image onto your SD card and half an hour later you’ll be looking at a working openHAB 2 frontend.

---

<div class="post-metadata">

**Author:** ![erland\_lestander](https://community.openhab.org/letter_avatar_proxy/v4/letter/e/dec6dc/32.png) [@erland\_lestander](https://community.openhab.org/u/erland_lestander)\
**Post date:** [January 13, 2017, 5:56pm UTC](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783/59 "2017-01-13T17:56:07Z")

</div>

Moving to another OS is one of my options yes.  
The copy-paste was from my history so the directory certainly looks a bit odd.

Again, it doesn’t start at reboot.

What I don’t like with starting over from scratch is that multiple others have the same issue, and no one of them is helped by that solution.  
I also had a working setup until 1st apt-get upgrade of the year.  
So the solution to start from scratch every time the setup stops working is less appealling as it requires a lot of reconfiguration. In my case setting up tellstick all over again and possibly also ther stuff.

Since that breaking upgrade I’ve done purge and taken down the new distro.  
And that started fine until I added bindings for tellstick aand zwave.  
(I did not reboot at every change. Granted that might have given better fault analysis)

The situation is serious from an OH perspective as there is no possibility to address faults if it chrasches,  
as all configuration is done in Paper UI as far as I know.

---

<div class="post-metadata">

**Author:** ![ThomDietrich](https://community.openhab.org/user_avatar/community.openhab.org/thomdietrich/32/71239_2.png) [@ThomDietrich](https://community.openhab.org/u/ThomDietrich)\
**Post date:** [January 13, 2017, 6:13pm UTC](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783/60 "2017-01-13T18:13:41Z")

</div>

> [@erland\_lestander](#):
>
> What I don’t like with starting over from scratch is that multiple others have the same issue, and no one of them is helped by that solution.

I see. Okay that’s a valid argument. As only little evidence is there to proceed on, I would try to go as clean as possible, without loosing everything.

- Make a backup of all files (just copy somewhere): `/etc/openhab2`, `/var/lib/openhab2`, `/usr/share/openhab2`
- `sudo apt-get purge openhab2*`
- delete mentioned folder above (if still available)
- delete the openhab user
- `sudo apt-get install openhab2`
- restore the important files from the backup (rules, sitemaps, uuid&secret files, jsondb, persistence files, …)
- start openhab

At this point I would expect your problems to be gone as I did not hear any openHABian users complain about such problems, hence the assumption your installation is buggy (which as you know is to be expected with snapshot builds…)

Good luck! 😉

[Previous page](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783.md?page=2)

[Next page](https://community.openhab.org/t/nrjavaserial-upgrade-causes-serial-error-port-dev-ttyacm0-does-not-exist/18783.md?page=4)
