csllc / cs-pcan-usb-binding

NodeJS PCAN-USB Module Bindings Releases
0 stars 0 forks source link

question about NodeJS Universal CAN Bus Module #1

Closed nujabes closed 3 years ago

nujabes commented 3 years ago

Sorry for wrong place to ask. I want to ask about NodeJS Universal CAN Bus Module(https://www.npmjs.com/package/@csllc/cs-canbus-universal) but I couldn`t find any contact to you or about package. If this bother this, you can delete this.

I want to use NodeJS Universal CAN Bus Module to my application. My goal is simple. "Use can-bus with node on windows 10" This module looks fit my needs. Therefore I tried but I think something wrong. Im quite new to node-js, it seems no problem with installation. But I`m not sure. Can you let me know the problem? This is how I tried.

I tried list_ports.js. the result was just "[]" I tried this windows 10, and also tried my osx, but same result.

D:\nodetest>npm install @csllc/cs-canbus-universal

npm WARN deprecated node-pre-gyp@0.15.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported

> @serialport/bindings@8.0.8 install D:\nodetest\node_modules\@serialport\bindings
> prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild

> usb@1.6.5 install D:\nodetest\node_modules\usb
> prebuild-install --verbose || node-gyp rebuild

prebuild-install info begin Prebuild-install version 5.3.6
prebuild-install info looking for cached prebuild @ C:\Users\master\AppData\Roaming\npm-cache\_prebuilds\d47d15-usb-v1.6.5-node-v72-win32-x64.tar.gz
prebuild-install info found cached prebuild
prebuild-install info unpacking @ C:\Users\master\AppData\Roaming\npm-cache\_prebuilds\d47d15-usb-v1.6.5-node-v72-win32-x64.tar.gz
prebuild-install info unpack resolved to D:\nodetest\node_modules\usb\build\Release\usb_bindings.node
prebuild-install info unpack required D:\nodetest\node_modules\usb\build\Release\usb_bindings.node successfully
prebuild-install info install Successfully installed prebuilt binary!

> @csllc/cs-canlib@0.1.7 install D:\nodetest\node_modules\@csllc\cs-canbus-universal\node_modules\@csllc\cs-canlib
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
[@csllc/cs-canlib] Success: "D:\nodetest\node_modules\@csllc\cs-canbus-universal\node_modules\@csllc\cs-canlib\binding\Release\node-v72-win32-x64\cs_canlib.node" is installed via remote

> @csllc/cs-pcan-usb@0.1.10 install D:\nodetest\node_modules\@csllc\cs-pcan-usb
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
[@csllc/cs-pcan-usb] Success: "D:\nodetest\node_modules\@csllc\cs-pcan-usb\binding\Release\node-v72-win32-x64\cs_pcan_usb.node" is installed via remote

> serialport@8.0.8 postinstall D:\nodetest\node_modules\serialport
> node thank-you.js

Thank you for using serialport!
If you rely on this package, please consider supporting our open collective:
> https://opencollective.com/serialport/donate

npm WARN saveError ENOENT: no such file or directory, open 'D:\nodetest\package.json'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @csllc/cs-socketcan@0.0.3 (node_modules\@csllc\cs-canbus-universal\node_modules\@csllc\cs-socketcan):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @csllc/cs-socketcan@0.0.3: wanted {"os":"linux","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: socketcan@^2.8.0 (node_modules\@csllc\cs-socketcan\node_modules\socketcan):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for socketcan@2.8.0: wanted {"os":"linux","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN enoent ENOENT: no such file or directory, open 'D:\nodetest\package.json'
npm WARN NODE-CAN No description
npm WARN NODE-CAN No repository field.
npm WARN NODE-CAN No README data
npm WARN NODE-CAN No license field.

+ @csllc/cs-canbus-universal@0.1.10
added 276 packages from 172 contributors, removed 1 package and audited 278 packages in 25.304s

20 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

D:\nodetest>node cs.js
[]

D:\nodetest> node -v
v12.18.4

D:\nodetest> npm -v
6.14.6
cwalden-cs commented 3 years ago

cs-canbus-universal and the underlying native modules cs-pcan-usb, cs-canlib, and can-usb-com only support specific USB CAN adapters. At the moment, we've only tested them with the Kvaser Leaf Light v2, PEAK-System PCAN-USB, and GridConnect CAN-USB-COM. Based on your terminal output, all packages were installed successfully, but no supported CAN adapters were found. If you're using PCAN-USB or Leaf Light with Windows, make sure the necessary drivers are installed.

nujabes commented 3 years ago

Thanks for comment. I`m using CAN USB board(https://openlightlabs.com/collections/frontpage/products/canable-0-4) with TJA1050 chip. I thought some output will shown, but you mean my device not working with this package, am I right?

cwalden-cs commented 3 years ago

That's correct. This package wasn't designed to be used with the CANable board, so it won't be detected by any of the modules or listed in the output from the demo code.