sebi2k1 / node-can

NodeJS SocketCAN extension
222 stars 72 forks source link

PEAK System PCAN-USB with example #126

Closed ptorrent closed 1 year ago

ptorrent commented 1 year ago

Hello there !

Thanks for the awesome job made !

Just have a question about this example:

var can = require("socketcan");

var channel = can.createRawChannel("can0", true);

// Log any message
channel.addListener("onMessage", function(msg) { console.log(msg); } );

// Reply any message
channel.addListener("onMessage", channel.send, channel);

channel.start();

I'm using PEAK interface and it seems that can0 is correctly mounted. When I start this example, I've no error but the script just close. Is that a normal behavior ?

Thanks for your support !

ptorrent commented 1 year ago

Oh, seems ok now, just missing this

ip link set up can0

sebi2k1 commented 1 year ago

Thank you for the flower. Enjoy.