# Can not run serial module on jetson nano

**URL:** <https://discourse.nodered.org/t/can-not-run-serial-module-on-jetson-nano/63337>\
**Category:** General\
**Tags:** docker, home-assistant\
**Created:** [1 June 2022 02:12 UTC](https://discourse.nodered.org/t/can-not-run-serial-module-on-jetson-nano/63337 "2022-06-01T02:12:46Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![SP-Mushrooms](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sp-mushrooms/32/61710_2.png) [@SP-Mushrooms](https://discourse.nodered.org/u/SP-Mushrooms)\
**Post date:** [1 June 2022 02:12 UTC](https://discourse.nodered.org/t/can-not-run-serial-module-on-jetson-nano/63337/1 "2022-06-01T02:12:46Z")

</div>

Hello I am running home assistant on a container on jetson nano.

I am trying to run a serial node as I have a device that is using simple serial commandes I am trying to use node-red-node-serialport 1.0.1 ([node-red-node-serialport](https://flows.nodered.org/node/node-red-node-serialport))

When I try to run the node red I get a error log like this

> Welcome to Node-RED  
> ===================  
> 31 May 16:52:39 - [info] Node-RED version: v2.2.2  
> 31 May 16:52:39 - [info] Node.js version: v16.14.2  
> 31 May 16:52:39 - [info] Linux 4.9.253-tegra arm64 LE  
> 31 May 16:52:41 - [info] Loading palette nodes  
> 31 May 16:52:49 - [info] Dashboard version 3.1.6 started at /endpoint/ui  
> Traceback (most recent call last):  
> File "/opt/node\_modules/node-red-node-pi-gpio/testgpio.py", line 3, in   
> import RPi.GPIO as GPIO  
> File "/usr/lib/python3.9/site-packages/RPi/GPIO/ **init**.py", line 23, in   
> from RPi.\_GPIO import \*  
> RuntimeError: This module can only be run on a Raspberry Pi!  
> 31 May 16:52:50 - [warn] rpi-gpio : Raspberry Pi specific node set inactive  
> 31 May 16:52:51 - [info] Settings file : /etc/node-red/config.js  
> 31 May 16:52:51 - [info] Context store : 'default' [module=memory]  
> 31 May 16:52:51 - [info] User directory : /config/node-red/  
> 31 May 16:52:51 - [warn] Projects disabled : editorTheme.projects.enabled=false  
> 31 May 16:52:51 - [info] Flows file : /config/node-red/flows.json  
> 31 May 16:52:51 - [info] Server now running at [http://127.0.0.1:46836/](http://127.0.0.1:46836/)  
> 31 May 16:52:51 - [info] Starting flows  
> [16:52:52] INFO: Starting Node-RED...  
> start  
> node $NODE\_OPTIONS node\_modules/node-red/red.js "--settings" "/etc/node-red/config.js"  
> 31 May 16:52:56 - [info]  
> Welcome to Node-RED  
> ===================

How do I solve it? I did try to follow this Topic [https://discourse.nodered.org/t/using-gpio-via-node-red-on-the-jetson-nano/16629/3](https://discourse.nodered.org/t/using-gpio-via-node-red-on-the-jetson-nano/16629/3) but I can't find where the file is located.

Is there any other nodes that can allow simple serial port read writes? I tried this node [https://flows.nodered.org/node/node-red-contrib-serialport-rs485](https://flows.nodered.org/node/node-red-contrib-serialport-rs485) but I couldn't install due to compatibility issues

---

<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:** [1 June 2022 16:00 UTC](https://discourse.nodered.org/t/can-not-run-serial-module-on-jetson-nano/63337/2 "2022-06-01T16:00:59Z")

</div>

Hi there, the log you've shown does not have an error really. It is only telling you that the Raspberry Pi specific node doesn't work on anything other than a Pi.

Have you tried installing node-red-node-serialport from the pallet manager? Note that it will almost certainly require a build step and so you will need to have dev-tools installed.

---

<div class="post-metadata">

**Author:** ![SP-Mushrooms](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sp-mushrooms/32/61710_2.png) [@SP-Mushrooms](https://discourse.nodered.org/u/SP-Mushrooms)\
**Post date:** [2 June 2022 04:50 UTC](https://discourse.nodered.org/t/can-not-run-serial-module-on-jetson-nano/63337/3 "2022-06-02T04:50:08Z")

</div>

> [@TotallyInformation](#):
>
> Have you tried installing node-red-node-serialport from the pallet manager? Note that it will almost certainly require a build step and so you will need to have dev-tools installed.

Thanks for your quick reply when I installed the node red it already installed node-red-node-serialport for me.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/c/dc33abd282ece97e6ea3e386bd47fd49dbcdf3fe.png)

What I mean is when I deploy a serial node with this settings

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/3/d3feb85cdda5f54bd8e1e42c534a4e7a6d3d5a48.png)  
my node red stops working with the log as my first post  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/d/fd6b227976bc2040f80c614c8238081470f67c06.png)

---

<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:** [2 June 2022 12:24 UTC](https://discourse.nodered.org/t/can-not-run-serial-module-on-jetson-nano/63337/4 "2022-06-02T12:24:54Z")

</div>

OK, so firstly try removing the `node-red-node-pi-gpio` node to make sure that isn't causing problems. Also make sure that the user id that is running node-red has access to the serial ports. On most versions of Linux, I think if you add the user to the `dialout` group, that should work but do double check.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [2 June 2022 12:42 UTC](https://discourse.nodered.org/t/can-not-run-serial-module-on-jetson-nano/63337/5 "2022-06-02T12:42:03Z")

</div>

Also, since you are running node-red in a docker container, you might have to do some jiggery-pokery to permit the container to use the physical serial port (not sure if HA already sets this up - you will have to ask on the HA forums)

Here is how someone using docker would setup a container to access the physical serial port...

> **[How to Access Serial Devices in Docker](https://www.losant.com/blog/how-to-access-serial-devices-in-docker)**
>
> This article provides step-by-step instructions for how to access serial devices from inside Docker containers. Learn more.

* * *

If that all seems too much, then ditch the HA Node-RED Addon version red and install node-red to the OS instead.

---

<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:** [2 June 2022 13:08 UTC](https://discourse.nodered.org/t/can-not-run-serial-module-on-jetson-nano/63337/6 "2022-06-02T13:08:07Z")

</div>

I missed that. I'll update the tags to make it clearer.

---

<div class="post-metadata">

**Author:** ![SP-Mushrooms](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sp-mushrooms/32/61710_2.png) [@SP-Mushrooms](https://discourse.nodered.org/u/SP-Mushrooms)\
**Post date:** [3 June 2022 12:01 UTC](https://discourse.nodered.org/t/can-not-run-serial-module-on-jetson-nano/63337/7 "2022-06-03T12:01:55Z")

</div>

Thanks I tried disableing the `node-red-node-pi-gpio` and now the program is stuck in this loop

> Welcome to Node-RED  
> ===================  
> 3 Jun 19:58:56 - [info] Node-RED version: v2.2.2  
> 3 Jun 19:58:56 - [info] Node.js version: v16.14.2  
> 3 Jun 19:58:56 - [info] Linux 4.9.253-tegra arm64 LE  
> 3 Jun 19:58:58 - [info] Loading palette nodes  
> 3 Jun 19:59:03 - [info] Dashboard version 3.1.6 started at /endpoint/ui  
> 3 Jun 19:59:04 - [info] Settings file : /etc/node-red/config.js  
> 3 Jun 19:59:04 - [info] Context store : 'default' [module=memory]  
> 3 Jun 19:59:04 - [info] User directory : /config/node-red/  
> 3 Jun 19:59:04 - [warn] Projects disabled : editorTheme.projects.enabled=false  
> 3 Jun 19:59:04 - [info] Flows file : /config/node-red/flows.json  
> 3 Jun 19:59:04 - [info] Server now running at [http://127.0.0.1:46836/](http://127.0.0.1:46836/)  
> 3 Jun 19:59:04 - [info] Starting flows  
> [19:59:06] INFO: Starting Node-RED...  
> start  
> node $NODE\_OPTIONS node\_modules/node-red/red.js "--settings" "/etc/node-red/config.js"  
> 3 Jun 19:59:09 - [info]  
> Welcome to Node-RED  
> ===================  
> '''

---

<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:** [3 June 2022 13:01 UTC](https://discourse.nodered.org/t/can-not-run-serial-module-on-jetson-nano/63337/8 "2022-06-03T13:01:56Z")

</div>

Well, as you can see, Node-RED is not reporting any errors. I would increase the logging level in settings.js to see if you can spot what is causing the restart.

If that doesn't show anything then I'm afraid that I think it is either a Docker or more likely, a home-assistant issue and you may need to ask on the HA forum unless someone else here knows. Personally I use neither HA nor Docker for Node-RED.

---

<div class="post-metadata">

**Author:** ![SP-Mushrooms](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sp-mushrooms/32/61710_2.png) [@SP-Mushrooms](https://discourse.nodered.org/u/SP-Mushrooms)\
**Post date:** [3 June 2022 13:50 UTC](https://discourse.nodered.org/t/can-not-run-serial-module-on-jetson-nano/63337/9 "2022-06-03T13:50:47Z")

</div>

> [@TotallyInformation](#):
>
> ell, as you can see, Node-RED is not reporting any errors. I would increase the logging level in settings.js to see if you can spot what is causing the restart.
> 
> If that doesn't show anything then I'm afraid that I think it is either a Docker or more likely, a home-assistant issue and you may need to ask on the HA forum unless someone else here knows. Personally I use neither HA nor Docker for Node-RED.

I found the the issue it is a bug that has not been solve yet thanks for all the help

[https://github.com/hassio-addons/addon-node-red/issues/1312](https://github.com/hassio-addons/addon-node-red/issues/1312)

---

<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:** [17 June 2022 13:51 UTC](https://discourse.nodered.org/t/can-not-run-serial-module-on-jetson-nano/63337/10 "2022-06-17T13:51:24Z")

</div>

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