serialport and websocket interfere causing a delay of firing of the port.on data event
Problem here with macOS 26.6.2, Node 26.13.1, SerialPort 13.0.0. Two node.js running, node server and node readubport. Using serial to listen to an USB port and websocket to send received data to an idle server. Delays of 10 seconds to receive the data, port.on("data", (bytes) => { , is not called either in these 10 seconds. If I place an interval of 0.5 second in the script and exactly on every interval the data is received and port.on is called. If I stop the server it also works perfect do not need the interval. Looks like the interval functions triggers the eventloop. setInterval(() => { c
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.