# Odroid-io crashes nodered

**URL:** https://discourse.nodered.org/t/odroid-io-crashes-nodered/53478
**Category:** General
**Created:** [9 November 2021 23:18 UTC](https://discourse.nodered.org/t/odroid-io-crashes-nodered/53478 "2021-11-09T23:18:38Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![habakuk25](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/habakuk25/32/80963_2.png) [@habakuk25](https://discourse.nodered.org/u/habakuk25)
#### Post date: [9 November 2021 23:18 UTC](https://discourse.nodered.org/t/odroid-io-crashes-nodered/53478/1 "2021-11-09T23:18:38Z")

</div>

hello!

I am Running **node-red 1.3.0-beta.1 with node.js V 12.11.1 on Odroid C2 on Kernel 5.14.19**.

I installed  
`npm install johnny-five`

with no problems

then I installed

`npm install odroid-io`

with no problems either.

But as soon a node (in my case **node-red-contrib-gio: gpio-in** ) uses the **"Odroid-io" plugin** , node-red crashed with:

```auto
TypeError: Cannot read property 'index' of undefined
    at OdroidIO.normalize (/home/odroid/node_modules/odroid-io/lib/odroid-io.js:182:32)
    at OdroidIO.pinMode (/home/odroid/node_modules/odroid-io/lib/odroid-io.js:189:33)
    at iopluginNode.<anonymous> (/home/odroid/.node-red/node_modules/node-red-contrib-gpio/gpio.js:82:20)
    at iopluginNode.emit [as _emit] (events.js:210:5)
    at iopluginNode.Node.emit (/home/odroid/.nvm/versions/node/v12.11.1/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:181:20)
    at /home/odroid/.node-red/node_modules/node-red-contrib-gpio/lib/iopluginNode.js:38:16
    at processTicksAndRejections (internal/process/task_queues.js:75:11)
    at runNextTicks (internal/process/task_queues.js:62:3)
    at processImmediate (internal/timers.js:412:9)
    at process.topLevelDomainCallback (domain.js:131:23)
**1 Mar 04:27:06 - [red] Uncaught Exception:
1 Mar 04:27:06 - TypeError: Cannot read property 'index' of undefined**
    at OdroidIO.normalize (/home/odroid/node_modules/odroid-io/lib/odroid-io.js:182:32)
    at OdroidIO.digitalRead (/home/odroid/node_modules/odroid-io/lib/odroid-io.js:225:23)
    at iopluginNode.<anonymous> (/home/odroid/.node-red/node_modules/node-red-contrib-gpio/gpio.js:83:14)
    at iopluginNode.emit [as _emit] (events.js:210:5)
    at iopluginNode.Node.emit (/home/odroid/.nvm/versions/node/v12.11.1/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:181:20)
    at /home/odroid/.node-red/node_modules/node-red-contrib-gpio/lib/iopluginNode.js:38:16
    at processTicksAndRejections (internal/process/task_queues.js:75:11)
    at runNextTicks (internal/process/task_queues.js:62:3)
    at processImmediate (internal/timers.js:412:9)
    at process.topLevelDomainCallback (domain.js:131:23)

```

Does anyone know how to fix this?

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [10 November 2021 09:27 UTC](https://discourse.nodered.org/t/odroid-io-crashes-nodered/53478/2 "2021-11-10T09:27:28Z")

</div>

1. why are you running Node-RED 1.3.0-beta.1? The final v1.xx release is v1.3.7 so if you are going to use v1.xxx you should be on that release.

2. I see you have opened an issue on the GitHub page for `odroid-io`. That is probably the best way to get an answer.

---

<div class="post-metadata">

### Author: ![habakuk25](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/habakuk25/32/80963_2.png) [@habakuk25](https://discourse.nodered.org/u/habakuk25)
#### Post date: [10 November 2021 13:11 UTC](https://discourse.nodered.org/t/odroid-io-crashes-nodered/53478/3 "2021-11-10T13:11:15Z")

</div>

Hello!

tanks for your answer.  
Yes I do - will.

But how to update best from 1.3.0-beta.1 to 1.37 ( and finally to nodered v2.xxx), please?

I just upgraded from node.js 12.11.1 tp 17.1.0.

now odroid-io not crashing nodered anymore but get the following: ??  
weird:

```auto
error loading plugin odroid-io The module '/home/odroid/node_modules/i2c-bus/build/Release/i2c.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 102. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).

```

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [10 November 2021 13:20 UTC](https://discourse.nodered.org/t/odroid-io-crashes-nodered/53478/4 "2021-11-10T13:20:37Z")

</div>

Why did you jump to node.js v17.1.0? I would go to v16 at the current point in time

> **[Node-RED Release Plan](https://docs.google.com/spreadsheets/d/1swMH5DXVposBIdnm6Q3BvIplMjAZSZVnU_cRS0jAPjY/edit#gid=0)**
>
> Latest
> 
> 
> 2021,2022
> Jan,Apr,Jul,Oct,Jan,Apr
> Node-RED,1.3.x,Maintenance
> 2.0.x,2.1.x,2.2.x,Maintenance
> 3.0.x
> Node 12,Maintenance
> Node 14,Active,Maintenance
> Node 16,Current,Active
> Dates are subject to change
> https://nodered.org/about/releases

That error is saying that odroid-io was compiled with a different version of Node.js. You could try compiling it but I'd still be looking to the author of the odroid-io node for help.

---

<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: [10 November 2021 13:56 UTC](https://discourse.nodered.org/t/odroid-io-crashes-nodered/53478/5 "2021-11-10T13:56:20Z")

</div>

> [@habakuk25](#):
>
> I just upgraded from node.js 12.11.1 tp 17.1.0

After a major version upgrade of nodejs you must go into the .node-red folder and run  
`npm rebuild`  
But as pointed out already, don't use V17, use an LTS version which is 16 (or 14 or 12).

---

<div class="post-metadata">

### Author: ![habakuk25](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/habakuk25/32/80963_2.png) [@habakuk25](https://discourse.nodered.org/u/habakuk25)
#### Post date: [10 November 2021 13:56 UTC](https://discourse.nodered.org/t/odroid-io-crashes-nodered/53478/6 "2021-11-10T13:56:58Z")

</div>

I will try

---

<div class="post-metadata">

### Author: ![habakuk25](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/habakuk25/32/80963_2.png) [@habakuk25](https://discourse.nodered.org/u/habakuk25)
#### Post date: [11 November 2021 11:39 UTC](https://discourse.nodered.org/t/odroid-io-crashes-nodered/53478/7 "2021-11-11T11:39:30Z")

</div>

I give up guys!

I tried everything:

I am on nodered 2.1.3 now and everything works stable, so far.

But then I install node-red-contrib-johnny5 (from palette) and the ioplugin:

odroid-io

with `npm install odroid-io`

which seems to be a prererequisite for the johnny5 - nodes.

Unfortunately there is neither for the johnny5 node nore @ hte odroid-io plug in ANY support at all:

> **[GitHub - hreichert/node-red-contrib-johnny5: A set of node-red nodes for...](https://github.com/hreichert/node-red-contrib-johnny5)**
>
> A set of node-red nodes for connecting to johnny-five IO Plugins - GitHub - hreichert/node-red-contrib-johnny5: A set of node-red nodes for connecting to johnny-five IO Plugins

> **[GitHub - racerxdl/odroid-io: Odroid C2 I/O Plugin for Jonnhy-Five based on...](https://github.com/racerxdl/odroid-io)**
>
> Odroid C2 I/O Plugin for Jonnhy-Five based on linux-io - GitHub - racerxdl/odroid-io: Odroid C2 I/O Plugin for Jonnhy-Five based on linux-io

Unfortunately due to my situation (odroid, Kernel 5) and the spec of the johnny5 node, there is no other alternative in terms of gpiod!

However, no matter which config I use - absolutely no luck.. I had the configs:

```auto
nvm 12.22.1
npm 6.14.15 (or 8.1.3)

```

```auto
nvm 14.18.1
npm 8.1.3

```

```auto
nvom 16.13.0
npm 8.1.3

```

no luck

I am kind of stuck having npm install or npm rebuild kicking out my node-red-contrib-johnny5 node as well as my odroid-io config node, du to several errors and incompatibilities!

please help.

I have huge project here where we switched from kernel 3.16.85 (gipio ion sysfs, wiringpi (Gordon's) all the way up to 5.13.14 (gpiod, but odroid --\> no wiringpi support anymore, gpiod only for raspi) and now I need to get my GPIOs going again on node red!!

---

<div class="post-metadata">

### Author: ![habakuk25](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/habakuk25/32/80963_2.png) [@habakuk25](https://discourse.nodered.org/u/habakuk25)
#### Post date: [11 November 2021 13:52 UTC](https://discourse.nodered.org/t/odroid-io-crashes-nodered/53478/8 "2021-11-11T13:52:22Z")

</div>

However,

I identified another posibility for gpio on odroid using gpiod:  
[https://forum.odroid.com/viewtopic.php?f=180&t=37543&p=338112#p338112](https://forum.odroid.com/viewtopic.php?f=180&t=37543&p=338112#p338112)

but:

```auto
droid@odroid:~/.node-red$ npm install node-red-contrib-lot --force
npm WARN using --force Recommended protections disabled.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path /home/odroid/.node-red/node_modules/lot-gpio
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory '/home/odroid/.node-red/node_modules/lot-gpio/build'
npm ERR! CC(target) Release/obj.target/nothing/node_modules/node-addon-api/src/nothing.o
npm ERR! AR(target) Release/obj.target/node_modules/node-addon-api/src/nothing.a
npm ERR! COPY Release/nothing.a
npm ERR! CXX(target) Release/obj.target/lot/c_src/lot.o
npm ERR! lot.target.mk:119: recipe for target 'Release/obj.target/lot/c_src/lot.o' failed
npm ERR! make: Leaving directory '/home/odroid/.node-red/node_modules/lot-gpio/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@5.0.7
npm ERR! gyp info using node@12.11.1 | linux | arm64
npm ERR! gyp info find Python using Python version 2.7.17 found at "/usr/bin/python"
npm ERR! gyp info spawn /usr/bin/python
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/home/odroid/.node-red/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/odroid/.node-red/node_modules/lot-gpio/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/odroid/.node-red/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/odroid/.cache/node-gyp/12.11.1/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/home/odroid/.cache/node-gyp/12.11.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/home/odroid/.node-red/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/odroid/.cache/node-gyp/12.11.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/odroid/.node-red/node_modules/lot-gpio',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args ['BUILDTYPE=Release', '-C', 'build']
npm ERR! In file included from ../c_src/lot.cpp:28:0:
npm ERR! ../c_src/GpioWrapper.h:28:10: fatal error: lot/Gpio.h: No such file or directory
npm ERR! #include <lot/Gpio.h>
npm ERR! ^ ~~~~~~~~~~~
npm ERR! compilation terminated.
npm ERR! make: *** [Release/obj.target/lot/c_src/lot.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/home/odroid/.node-red/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:210:5)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
npm ERR! gyp ERR! System Linux 5.14.16-arm64
npm ERR! gyp ERR! command "/home/odroid/.nvm/versions/node/v12.11.1/bin/node" "/home/odroid/.node-red/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /home/odroid/.node-red/node_modules/lot-gpio
npm ERR! gyp ERR! node -v v12.11.1
npm ERR! gyp ERR! node-gyp -v v5.0.7
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! /home/odroid/.npm/_logs/2021-11-11T13_46_58_154Z-debug.log

```

My understanding of how node-red works in the background ends here.  
Do you have any ideas about this failure?

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [11 November 2021 21:05 UTC](https://discourse.nodered.org/t/odroid-io-crashes-nodered/53478/9 "2021-11-11T21:05:58Z")

</div>

I would open an issue on the node's [GitHub issues page](https://github.com/hhk7734/node-red-contrib-lot/issues) and see what the author of the node has to say.

---

<div class="post-metadata">

### Author: ![habakuk25](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/habakuk25/32/80963_2.png) [@habakuk25](https://discourse.nodered.org/u/habakuk25)
#### Post date: [11 November 2021 23:20 UTC](https://discourse.nodered.org/t/odroid-io-crashes-nodered/53478/10 "2021-11-11T23:20:12Z")

</div>

github - new issue is disabled interestingly.

but: placed it here:  
[https://forum.odroid.com/viewtopic.php?f=180&t=37543](https://forum.odroid.com/viewtopic.php?f=180&t=37543)

with kind regards.

however its really sad. no gpiod supprt on ARM64 boards for node-red.

I searched a lot - but no way.

Since Kernel 4.8 and since Gordon killed his support the Odroid Users plummeted in a **Node-red GPIO(D)-hole**, which is really hard to escape.

Throughout the pinning mess over all the different platforms it's absolutly understandable on one side that the developers give up on maintain node-red modules like "odroid-io" for the johnny-five" community or

`"what-ever-contrib-pi-gpiod"`

developers conectrate on Raspi leaving odroid behind but on the other hand thats sad. Thats sad, really sad.

However `gpiomon` is NOT working on modern kernels yet on Ondroid at all becuse the interrupt() was not set for the pins, but thats a whole lot a different story ......  
([help gpio irq mainline kernel - ODROID](https://forum.odroid.com/viewtopic.php?t=40322))

However if some one (probably @Kolleary @Colin ) has an idea how to overcome this please HELP!

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [12 November 2021 04:33 UTC](https://discourse.nodered.org/t/odroid-io-crashes-nodered/53478/11 "2021-11-12T04:33:56Z")

</div>

I have had a couple of Odroids myself (XU4 and N2) that I used earlier. At the time they arrived they performed very well in comparison with previous versions of the RPi. I remember there was special also in the OS and special when you had to keep them updated. So today they are retired, the XU4 is since long recycled. For me this was not a problem to move on to other devices since it was only for personal usage. For you, if you have a large customer project, I understand the problems are much worse

Your C2 is listed as obsolete/discontinued. It is of course not good news for you and it could cause huge problems if you have a large project as you say and later will run out of spare parts/replacements. Time to think about migrating to a newer platform? Or consider another topologi for your I/O controls, using separate boards instead

---

<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: [11 January 2022 04:34 UTC](https://discourse.nodered.org/t/odroid-io-crashes-nodered/53478/12 "2022-01-11T04:34:50Z")

</div>

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