Segment fault error occurs when deploy node-red-node-serial in openWRT

Hi, experts:
First, I'm new for this forum but loved node-RED very much and used it for education years.
Here is my environment:

  1. raspberry pi cm4(8G/8G) with a motherboard.
  2. opwnWRT kernel version:5.10.113
  3. version of node.js:16.15.1, npm: 8.11.0
  4. install node-RED and node-red-node-serial via:
    4.1 opkg update
    4.2 opkg install node && node-npm
    4.3 npm i -g node-red
    4.4 manage palette > install > node-red-node-serial

Everything runs well except I define a serial-port node then deploy it, then segment fault occurs,
I tried everything as far as I know, still unable to solve it, hope anyone of you can help me.

ps. character device /dev/ttyAMA1 is working fine with minicom connection test, so I thing H/W allocations should be O.K. I also add the permission to it by chmod 777, but it still occur segment fault error.

appreciate in advance!

Vincent



I guess the serialport binaries are not correct... can you go into the /root/.node-red directory and run npm rebuild and see if that is successful

Thanks, dceejay:
I did, same error occurs.

I would have expected some output from the rebuild... can you try npm rebuild node-red-node-serialport --verbose ?

or maybe

cd .node-red
npm uninstall node-red-node-serialport
npm install node-red-node-serialport --build-from-source
1 Like

hi, dceejay:
Here is my result:

  1. npm rebuild node-red-node-serialport --verbose
    --> build result: OK and Situation is same, segmentation fault.

  2. npm uninstall node-red-node-serialport
    npm install node-red-node-serialport --build-from-source
    --> lots of error came out, attached files are the rebuild logs for those 2 commands.

Please have a look, appreciate again.

build-from-source-erros.log (17.5 KB)
rebuild-OK.log (9.1 KB)

Hi, Sir:
I updated python tp 3.10.4 and do npm install node-red-node-serialport --build-from-source again,
still not success and came out errors, log is as attached.
Please have a look.
thanks again.


updated-python-build-from-source-error.log (17.4 KB)

Right so you also need the rest of the build tools. Usually gcc and make. There is probably a package that includes them all for openwrt , you can remove them once we get this to work if you need the space back.

dear dceejay sir:
I'v tried my best to install the required package for openwrt, there was some progresses, however, there is still errors (
npm ERR! code 1
npm ERR! path /root/.node-red/node_modules/@serialport/bindings-cpp
.......
)
so I can't finish the rebuild process, may you take a look and help...
regards,
Vincent




[2022-06-14T09_26_46_327Z-debug-0.log|attachment]

(upload://vWLA3FHw3ydxHUUly4446updNLR.log) (32.0 KB)

Hi, Sir:
I finally finish npm install node-red-node-serialport --build-from-source process and complete from the message.
But ....
How come segmentation fault still happens....
Any idea or hint is much helpful
Vincent


the make command seemed to say it couldn't find libpthread - is that installed ?
but yes - you are into territory I have not explored so not sure how I can help much more.

Dear Dceeja:
Many many thanks anyway.
Vincent

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