# Node-red-node-arduino not connecting to the configured Arduinos after update

**URL:** <https://discourse.nodered.org/t/node-red-node-arduino-not-connecting-to-the-configured-arduinos-after-update/38505>\
**Category:** Hardware\
**Created:** [4 January 2021 10:27 UTC](https://discourse.nodered.org/t/node-red-node-arduino-not-connecting-to-the-configured-arduinos-after-update/38505 "2021-01-04T10:27:01Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![lizzardguki](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lizzardguki/32/103637_2.png) [@lizzardguki](https://discourse.nodered.org/u/lizzardguki)\
**Post date:** [24 January 2021 10:52 UTC](https://discourse.nodered.org/t/node-red-node-arduino-not-connecting-to-the-configured-arduinos-after-update/38505/23 "2021-01-24T10:52:23Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/a/9a95ab337e4d735f3eba0e3796c74b45c56650d4.png)  
Here is the firmata auto scan function...

Okay so I just found something useful I think, thanks @Colin for suggestion...

```auto
Jan 24 10:48:54 raspberrypi Node-RED[1684]: 24 Jan 10:48:54 - [error] serial port /dev/ttyACM0 error: Error: Error Resource temporarily unavailable Cannot lock port

```

This message is being shown when redeploying.

So did a quick google search and there is already an issue for node.js [serialport](https://github.com/serialport/node-serialport/issues/1426)

Will try to follow it and hopefully report back with a solution.

---

<div class="post-metadata">

**Author:** ![lizzardguki](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lizzardguki/32/103637_2.png) [@lizzardguki](https://discourse.nodered.org/u/lizzardguki)\
**Post date:** [26 January 2021 19:24 UTC](https://discourse.nodered.org/t/node-red-node-arduino-not-connecting-to-the-configured-arduinos-after-update/38505/24 "2021-01-26T19:24:42Z")

</div>

Yes , this is what is happening, i had to isolate everything on a pi in my home, and when connecting/disconnecting the arduino , even sometime on the raspberry reboot the port number changes, i have been searching for a solution you mentioned to use udev rule to force a device to a device name, do you have any idea how to do this?

Edit: Please close this topic, i will create a new one.

---

<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:** [26 January 2021 21:32 UTC](https://discourse.nodered.org/t/node-red-node-arduino-not-connecting-to-the-configured-arduinos-after-update/38505/25 "2021-01-26T21:32:29Z")

</div>

> [@lizzardguki](#):
>
> how to do this

I always have to look it up when I want to do it  
Start with this [How udev rules can help us to recognize a usb-to-serial device over /dev/tty interface - DEV Community](https://dev.to/enbis/how-udev-rules-can-help-us-to-recognize-a-usb-to-serial-device-over-dev-tty-interface-pbk)

---

<div class="post-metadata">

**Author:** ![lizzardguki](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lizzardguki/32/103637_2.png) [@lizzardguki](https://discourse.nodered.org/u/lizzardguki)\
**Post date:** [27 January 2021 06:58 UTC](https://discourse.nodered.org/t/node-red-node-arduino-not-connecting-to-the-configured-arduinos-after-update/38505/26 "2021-01-27T06:58:53Z")

</div>

I tried writing a udev rule to map the Arduino to a specific /dev/ name , but the node-red-node-arduino doesn't find the newly mapped name, so something like this (at least without editing the node source code) is not possible...

---

<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:** [27 January 2021 07:22 UTC](https://discourse.nodered.org/t/node-red-node-arduino-not-connecting-to-the-configured-arduinos-after-update/38505/27 "2021-01-27T07:22:13Z")

</div>

Is the mapped name working correctly with another client?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [27 January 2021 07:33 UTC](https://discourse.nodered.org/t/node-red-node-arduino-not-connecting-to-the-configured-arduinos-after-update/38505/28 "2021-01-27T07:33:48Z")

</div>

Indeed, you can't just remap the name. You need to use the rule to set the name in the first place based off something like its serial number , or which physical usb connector it is plugged into.

---

<div class="post-metadata">

**Author:** ![lizzardguki](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lizzardguki/32/103637_2.png) [@lizzardguki](https://discourse.nodered.org/u/lizzardguki)\
**Post date:** [27 January 2021 09:01 UTC](https://discourse.nodered.org/t/node-red-node-arduino-not-connecting-to-the-configured-arduinos-after-update/38505/29 "2021-01-27T09:01:24Z")

</div>

Well haven't tried with another client, but the map is set , tried flashing Arduino through arduino-cli and it worked...  
But as @dceejay mentioned you can't just remap it...  
Do you have any reference or example for the set rule?

---

<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:** [27 January 2021 09:54 UTC](https://discourse.nodered.org/t/node-red-node-arduino-not-connecting-to-the-configured-arduinos-after-update/38505/30 "2021-01-27T09:54:45Z")

</div>

> [@lizzardguki](#):
>
> Do you have any reference or example for the set rule?

The link I supplied describes the principles of how to do it. You have to do that and look for something specific about your device for udev to recognise and link to the name you specify. For example I have a pi where I use the vendor and product id to identify it. That wouldn't work if I plugged in another similar device at the same time of course. This is the rule  
`SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="LinkUSB"`  
which links /dev/LinkUSB to whatever /dev/USBxxx the system has mounted it at.

Work through the procedure in the link I supplied and see how far you get.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [27 January 2021 12:05 UTC](https://discourse.nodered.org/t/node-red-node-arduino-not-connecting-to-the-configured-arduinos-after-update/38505/31 "2021-01-27T12:05:04Z")

</div>

Of course if you have two identical devices that won't won't :-)... so you may need to use ATTRS{devpath} instead which then needs the actual USB which will probably be something like 1-1:1 or 1-1:2 etc

---

<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:** [27 January 2021 12:31 UTC](https://discourse.nodered.org/t/node-red-node-arduino-not-connecting-to-the-configured-arduinos-after-update/38505/32 "2021-01-27T12:31:24Z")

</div>

Yes, as I said. Alternatively there may be a serial number.

---

<div class="post-metadata">

**Author:** ![lizzardguki](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lizzardguki/32/103637_2.png) [@lizzardguki](https://discourse.nodered.org/u/lizzardguki)\
**Post date:** [27 January 2021 15:07 UTC](https://discourse.nodered.org/t/node-red-node-arduino-not-connecting-to-the-configured-arduinos-after-update/38505/33 "2021-01-27T15:07:27Z")

</div>

Well, I followed the tutorial but I can't see my newly generated path for the configured port...  
Any other idea guys?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/e/2e155a9d663d034fcc70834736a30743acb0ca7a.png)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [27 January 2021 15:15 UTC](https://discourse.nodered.org/t/node-red-node-arduino-not-connecting-to-the-configured-arduinos-after-update/38505/34 "2021-01-27T15:15:26Z")

</div>

it won't autodetect one you create - but try just typing it in... /dev/myPortName

---

<div class="post-metadata">

**Author:** ![lizzardguki](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lizzardguki/32/103637_2.png) [@lizzardguki](https://discourse.nodered.org/u/lizzardguki)\
**Post date:** [27 January 2021 15:20 UTC](https://discourse.nodered.org/t/node-red-node-arduino-not-connecting-to-the-configured-arduinos-after-update/38505/35 "2021-01-27T15:20:47Z")

</div>

Well I that worked (how stupid of me not trying to type in text 😑 )

[Previous page](https://discourse.nodered.org/t/node-red-node-arduino-not-connecting-to-the-configured-arduinos-after-update/38505.md?page=1)
