but recieved data show like this T-0 0.05 1.20 5799.35719.52 0 0-23.3@???? expected T-0 0.05 1.20 5799.35719.52 0 0-23.301020305 my code for these connection
port = new SerialPort({path:portName, baudRate:baudRate,dataBits: 8,
stopBits: 1,parity: parity,timeout: 100});
// Open the port
port.open(function (err) {
const parser = port.pipe(new InterByteTimeoutParser({ interval: 5 }));
// const parser = port.pipe(new ByteLengthParser({length:254}));
parser.on('data', function (data) {
console.log('Data received from port: ', data.toString());
console.log('Data received from port: ', data.toString('hex'));
console.log('Data received from port: ', data);
})}
but recieved data show like this T-0 0.05 1.20 5799.35719.52 0 0-23.3@???? expected T-0 0.05 1.20 5799.35719.52 0 0-23.301020305
Durvesh Choudhary is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.