-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
I'm attempting to use xmodem to send data to a serial port. The API and code comments suggest this is possible. However if a SerialPort is given to the send function:
serialPort = new SerialPort(port, {baudRate: 9600}, false);
xmodem.send(port, buffer);
The following error occurs:
.\node_modules\xmodem.js\lib\index.js:221 Uncaught (in promise) TypeError: socket.on is not a function
at Xmodem.send (.\node_modules\xmodem.js\lib\index.js:221)
at ReadLineParser.<anonymous> (app.js:490)
at ReadLineParser.emit (events.js:200)
at addChunk (_stream_readable.js:294)
at readableAddChunk (_stream_readable.js:271)
at ReadLineParser.Readable.push (_stream_readable.js:210)
at ReadLineParser.Transform.push (_stream_transform.js:150)
at ReadLineParser._transform (.\node_modules\@serialport\parser-delimiter\delimiter.js:35)
at ReadLineParser.Transform._read (_stream_transform.js:189)
at ReadLineParser.Transform._write (_stream_transform.js:177)
Does this package not support SerialPort?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels