I'm using node-serialport
available here.
Open the port and reading works very well, however I am unable to close the port.
I use the following code for that:
myserialport.on('close', function (err) {
console.log('port closed', err);
});
The callback function is never executed (no console output). Can anyone, please show me the way?
I would like to be able to close one port and open another if needed or just close the port if user changes the page.
Jan