# Open zwave Cannot open serial port /dev/ttyUSB0

**URL:** <https://discourse.nodered.org/t/open-zwave-cannot-open-serial-port-dev-ttyusb0/18994>\
**Category:** Hardware\
**Created:** [10 December 2019 13:50 UTC](https://discourse.nodered.org/t/open-zwave-cannot-open-serial-port-dev-ttyusb0/18994 "2019-12-10T13:50:05Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![juntiedt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juntiedt/32/58357_2.png) [@juntiedt](https://discourse.nodered.org/u/juntiedt)\
**Post date:** [10 December 2019 13:50 UTC](https://discourse.nodered.org/t/open-zwave-cannot-open-serial-port-dev-ttyusb0/18994/1 "2019-12-10T13:50:05Z")

</div>

I am trying to install openzwave on a raspberry B3 with a new buster installation. So far all went ok until I started the test program MinOZW which gives me the following message  
**ERROR: Cannot open serial port /dev/ttyUSB0. Error code 2**  
how can I fix this problem. In Node-Red I also need this device.  
Any help very much appreciated

---

<div class="post-metadata">

**Author:** ![juntiedt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juntiedt/32/58357_2.png) [@juntiedt](https://discourse.nodered.org/u/juntiedt)\
**Post date:** [10 December 2019 14:14 UTC](https://discourse.nodered.org/t/open-zwave-cannot-open-serial-port-dev-ttyusb0/18994/3 "2019-12-10T14:14:16Z")

</div>

yes, I have done it.

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [10 December 2019 14:16 UTC](https://discourse.nodered.org/t/open-zwave-cannot-open-serial-port-dev-ttyusb0/18994/4 "2019-12-10T14:16:45Z")

</div>

Do you have a Zwave adapter attached to the port?

Can you post the output of

ls -lah /dev/ttyUSB0

---

<div class="post-metadata">

**Author:** ![juntiedt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juntiedt/32/58357_2.png) [@juntiedt](https://discourse.nodered.org/u/juntiedt)\
**Post date:** [10 December 2019 14:30 UTC](https://discourse.nodered.org/t/open-zwave-cannot-open-serial-port-dev-ttyusb0/18994/5 "2019-12-10T14:30:05Z")

</div>

these are all my devices: I highlighted the ones starting with u.  
autofs loop-control ram9 tty25 tty53 vcs5  
block mapper random tty26 tty54 vcs6  
btrfs-control media0 raw tty27 tty55 vcs7  
bus mem rfkill tty28 tty56 vcsa  
cachefiles memory\_bandwidth serial tty29 tty57 vcsa1  
char mmcblk0 serial0 tty3 tty58 vcsa2  
console mmcblk0p1 serial1 tty30 tty59 vcsa3  
cpu\_dma\_latency mmcblk0p2 shm tty31 tty6 vcsa4  
cuse mqueue snd tty32 tty60 vcsa5  
disk net stderr tty33 tty61 vcsa6  
fb0 network\_latency stdin tty34 tty62 vcsa7  
fd network\_throughput stdout tty35 tty63 vcsm  
full null tty tty36 tty7 vcsm-cma  
fuse ppp tty0 tty37 tty8 vcsu  
gpiochip0 ptmx tty1 tty38 tty9 vcsu1  
gpiochip1 pts tty10 tty39 ttyACM0 vcsu2  
gpiochip2 ram0 tty11 tty4 ttyAMA0 vcsu3  
gpiomem ram1 tty12 tty40 ttyprintk vcsu4  
hwrng ram10 tty13 tty41 ttyS0 vcsu5  
initctl ram11 tty14 tty42 **uhid** vcsu6  
input ram12 tty15 tty43 **uinput** vcsu7  
kmsg ram13 tty16 tty44 **urandom** vhci  
log ram14 tty17 tty45 v4l video10  
loop0 ram15 tty18 tty46 vchiq video11  
loop1 ram2 tty19 tty47 vcio video12  
loop2 ram3 tty2 tty48 vc-mem watchdog  
loop3 ram4 tty20 tty49 vcs watchdog0  
loop4 ram5 tty21 tty5 vcs1 zero  
loop5 ram6 tty22 tty50 vcs2  
loop6 ram7 tty23 tty51 vcs3  
loop7 ram8 tty24 tty52 vcs4  
pi@raspberrypi:~ $

Zugriff auf /dev/ttyUSB0' nicht möglich: Datei oder Verzeichnis nicht gefunden  
this is the response to your command line. File or directory not found

---

<div class="post-metadata">

**Author:** ![juntiedt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juntiedt/32/58357_2.png) [@juntiedt](https://discourse.nodered.org/u/juntiedt)\
**Post date:** [10 December 2019 14:33 UTC](https://discourse.nodered.org/t/open-zwave-cannot-open-serial-port-dev-ttyusb0/18994/6 "2019-12-10T14:33:46Z")

</div>

in an old installation I had dev/ttyACM0 and it worked. But how can I tell openzwace to use this device instead of dev/ttyUSB0?

---

<div class="post-metadata">

**Author:** ![juntiedt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juntiedt/32/58357_2.png) [@juntiedt](https://discourse.nodered.org/u/juntiedt)\
**Post date:** [10 December 2019 14:49 UTC](https://discourse.nodered.org/t/open-zwave-cannot-open-serial-port-dev-ttyusb0/18994/7 "2019-12-10T14:49:01Z")

</div>

pi@raspberrypi:~ $ lsusb  
Bus 001 Device 004: ID 0658:0200 Sigma Designs, Inc. Aeotec Z-Stick Gen5 (ZW090) - UZB  
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter  
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub  
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

on bus 001 Device 004 I can see my zwave controller. Which /dev/ttyUSB? is this

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [10 December 2019 15:00 UTC](https://discourse.nodered.org/t/open-zwave-cannot-open-serial-port-dev-ttyusb0/18994/8 "2019-12-10T15:00:59Z")

</div>

Try MinOZW /dev/serial0

---

<div class="post-metadata">

**Author:** ![juntiedt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juntiedt/32/58357_2.png) [@juntiedt](https://discourse.nodered.org/u/juntiedt)\
**Post date:** [10 December 2019 15:06 UTC](https://discourse.nodered.org/t/open-zwave-cannot-open-serial-port-dev-ttyusb0/18994/9 "2019-12-10T15:06:13Z")

</div>

no sucess. ERROR code 13 now

---

<div class="post-metadata">

**Author:** ![juntiedt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juntiedt/32/58357_2.png) [@juntiedt](https://discourse.nodered.org/u/juntiedt)\
**Post date:** [10 December 2019 15:08 UTC](https://discourse.nodered.org/t/open-zwave-cannot-open-serial-port-dev-ttyusb0/18994/10 "2019-12-10T15:08:13Z")

</div>

is buster the problem? did something change compared to stretch?

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [10 December 2019 15:09 UTC](https://discourse.nodered.org/t/open-zwave-cannot-open-serial-port-dev-ttyusb0/18994/11 "2019-12-10T15:09:18Z")

</div>

MiniOZW /dev/ttyAMA0 ?

or sudo MinOZW /dev/serial0

---

<div class="post-metadata">

**Author:** ![juntiedt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juntiedt/32/58357_2.png) [@juntiedt](https://discourse.nodered.org/u/juntiedt)\
**Post date:** [10 December 2019 15:58 UTC](https://discourse.nodered.org/t/open-zwave-cannot-open-serial-port-dev-ttyusb0/18994/12 "2019-12-10T15:58:28Z")

</div>

> [@ghayne](#):
>
> MiniOZW /dev/ttyAMA0

did not work ☹  
never touch a running system. On strech it ran perfectly

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [10 December 2019 16:32 UTC](https://discourse.nodered.org/t/open-zwave-cannot-open-serial-port-dev-ttyusb0/18994/13 "2019-12-10T16:32:15Z")

</div>

Any error message?

---

<div class="post-metadata">

**Author:** ![juntiedt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juntiedt/32/58357_2.png) [@juntiedt](https://discourse.nodered.org/u/juntiedt)\
**Post date:** [10 December 2019 18:42 UTC](https://discourse.nodered.org/t/open-zwave-cannot-open-serial-port-dev-ttyusb0/18994/14 "2019-12-10T18:42:52Z")

</div>

Problem fixes. Will post Solution tomorrow.

---

<div class="post-metadata">

**Author:** ![ncherry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ncherry/32/27_2.png) [@ncherry](https://discourse.nodered.org/u/ncherry)\
**Post date:** [11 December 2019 01:20 UTC](https://discourse.nodered.org/t/open-zwave-cannot-open-serial-port-dev-ttyusb0/18994/15 "2019-12-11T01:20:11Z")

</div>

This may help simplify things a bit:

```auto
sudo dmesg -C # clear the ring (messages)

```

Remove the USB dongle, then run:

```auto
sudo dmesg -T # displays the message with a timestamp

```

Insert the USB dongle, then run:

```auto
sudo dmesg -T # displays the message with a timestamp

```

Now you should see the current tty assignment

---

<div class="post-metadata">

**Author:** ![juntiedt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juntiedt/32/58357_2.png) [@juntiedt](https://discourse.nodered.org/u/juntiedt)\
**Post date:** [12 December 2019 09:43 UTC](https://discourse.nodered.org/t/open-zwave-cannot-open-serial-port-dev-ttyusb0/18994/16 "2019-12-12T09:43:40Z")

</div>

this solved the problem:

lsusb  
I found my device and made a note of the ID xxxx:xxxx (8 numbers separated with colon)

sudo modprobe ftdi\_sio

sudo bash

sh -c "echo xxxx xxxx \> /sys/bus/usb-serial/drivers/ftdi\_sio/new\_id"  
I put in the product ID I found with lsusb but without a colon separator

reboot  
in order to get a clean system and user pi

cd Home/pi/open-zwave

./MinOZW dev/ttyACM0 (no error 🙂 )

I used dev/ttyACM0 in node red and it worked!
