# Serial-in in Debian

**URL:** <https://discourse.nodered.org/t/serial-in-in-debian/55366>\
**Category:** Dashboard\
**Created:** [17 December 2021 21:38 UTC](https://discourse.nodered.org/t/serial-in-in-debian/55366 "2021-12-17T21:38:35Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nygma2004](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nygma2004/32/1308_2.png) [@nygma2004](https://discourse.nodered.org/u/nygma2004)\
**Post date:** [17 December 2021 21:38 UTC](https://discourse.nodered.org/t/serial-in-in-debian/55366/1 "2021-12-17T21:38:35Z")

</div>

I am migrating my Node-Red flows from an older 1.x Node-Red that was running in a rPi, to the current version running in a PC with Debian.  
I am using RFLink 443Mhz receiver board which is connected over USB.  
My flow had a serial-in connected to /dev/ttyUSB0.

In my new setup, it says "not connected". When I got to the wizard, I can see the /dev/ttyUSB0 port in the dropdown when I search.  
I think it is connected correctly because I see this:

```auto
NodeRedServer:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

```

And this:

```auto
NodeRedServer:~$ sudo dmesg | grep tty
[0.053967] printk: console [tty0] enabled
[0.821566] 00:01: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[0.823223] 0000:00:16.3: ttyS1 at I/O 0xf0a0 (irq = 19, base_baud = 115200) is a 16550A
[2.373245] systemd[1]: Created slice system-getty.slice.
[2.812173] usb 1-5: ch341-uart converter now attached to ttyUSB0

```

Is it possible that it works different in Debian as in Raspbian?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [17 December 2021 21:58 UTC](https://discourse.nodered.org/t/serial-in-in-debian/55366/2 "2021-12-17T21:58:08Z")

</div>

Look at:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/9/f9aa55ff1d8bff576aff194136f06cd9bcf5e7e8.png)

and try one of those paths. That way, you wont get caught out if it changes.

Also, did you copy over your `.node-red` folder to the PC - complete with `node_modules` folder? Because if you did, it won't work. You need to do `cd ~/.node-red && npm rebuild`.

---

<div class="post-metadata">

**Author:** ![nygma2004](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nygma2004/32/1308_2.png) [@nygma2004](https://discourse.nodered.org/u/nygma2004)\
**Post date:** [17 December 2021 23:05 UTC](https://discourse.nodered.org/t/serial-in-in-debian/55366/3 "2021-12-17T23:05:13Z")

</div>

No, it is a brand new install. I install Node-Red with the install script, added the nodes manually, and imported my flows one-by-one.

I get an error that this port not exists, if I am trying to use that ID.

```auto
"[serialconfig:744e8e141f50c2da] serial port /dev/serial/usb-1a86_USB2.0-Serial-if00-port0 error: Error: Error: No such file or directory, cannot open /dev/serial/usb-1a86_USB2.0-Serial-if00-port0"

```

---

<div class="post-metadata">

**Author:** ![nygma2004](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nygma2004/32/1308_2.png) [@nygma2004](https://discourse.nodered.org/u/nygma2004)\
**Post date:** [17 December 2021 23:12 UTC](https://discourse.nodered.org/t/serial-in-in-debian/55366/4 "2021-12-17T23:12:34Z")

</div>

Damn, the pi user on the rpi set up with all access conveniently.  
But this time I had to add myself to the dialout group to have access to serial:

```auto
sudo adduser second_user dialout

```

It works now 🙂

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [17 December 2021 23:18 UTC](https://discourse.nodered.org/t/serial-in-in-debian/55366/5 "2021-12-17T23:18:45Z")

</div>

OK, check the permissions next I think?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/6/869b40567a1145f0668f874ed008e1545b834050.png)

So if you are using the usual ttyUSBx devices, the user running Node-RED needs to be a member of the dialout group (assuming your config is the same). But if using the by-id devices, you shouldn't need any special permissions.

* * *

Ah, I see we crossed posts.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [18 December 2021 10:58 UTC](https://discourse.nodered.org/t/serial-in-in-debian/55366/6 "2021-12-18T10:58:50Z")

</div>

> [@nygma2004](#):
>
> `[serialconfig:744e8e141f50c2da] serial port /dev/serial/usb-1a86_USB2.0-Serial-if00-port0`

That should be `/dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0` as @TotallyInformation suggested.

---

<div class="post-metadata">

**Author:** ![nygma2004](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nygma2004/32/1308_2.png) [@nygma2004](https://discourse.nodered.org/u/nygma2004)\
**Post date:** [18 December 2021 20:14 UTC](https://discourse.nodered.org/t/serial-in-in-debian/55366/7 "2021-12-18T20:14:59Z")

</div>

> [@Colin](#):
>
> /dev/serial/by-id/usb-1a86\_USB2.0-Serial-if00-port0

Thanks you. Yes it is working now. This is a very good tip. I had 2 USB serial devices in the past and it made me mad whenever they changes places (ttyUSB0 \<\> ttyUSB1).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [1 January 2022 20:15 UTC](https://discourse.nodered.org/t/serial-in-in-debian/55366/8 "2022-01-01T20:15:55Z")

</div>

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