0

I use ARM board with embedded Linux on it, but it is very limited. Somehow I managed to install node.js and npm. The idea is to send data via CAN bus on button click event from the web page. I have found only one module called "socketcan", but I cannot install it due to following lines:

npm install -g node-gyp
node-gyp configure && node-gyp build

My board fails to execute the first line, that means I can't use the only found CAN tool for node.js. Is there any other possibility to read and write messages on CAN bus from node.js?

Manos Nikolaidis
  • 21,608
  • 12
  • 74
  • 82
PaulPonomarev
  • 355
  • 1
  • 4
  • 20

1 Answers1

2

Socketcan doesn't work on the lattest Nodejs. I've got the same problem. Just install a Node.js version 0.10.x. For the arm7 you can get it from this page :

Conor O'Neills Page: http://conoroneill.net/

Thanks to Conor O'Neill you can download it on his Page and install socketcan without getting any errors. At the moment, I am struggeling how socketcan works in express-generate. So if someone has clue. I would appreciate it.

AnnaBanana
  • 131
  • 2
  • 6
  • 1
    According to this posts [link](https://github.com/sebi2k1/node-can/issues/7) it should now working on Node 4.1 – AnnaBanana Nov 05 '15 at 09:19
  • Thanks to @AnnaBanana I managed to install node-gyp on my board, but to install socketcan I need to rebuild node-gyp and this process requires "make", which I don't have due to limited Linux version – PaulPonomarev Nov 10 '15 at 10:04
  • If you use "npm install socketcan" it will build it by himself and you don't need to execute these lines by yourself anymore. – AnnaBanana Nov 10 '15 at 15:48
  • That's correct, during install socketcan will try to rebuild node-gyp automatically. But then node-gyp will require "make", which I don't have in my limited embedded Linux – PaulPonomarev Nov 12 '15 at 07:07