You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I came here searching about node.js + serial port, so I'm a first-timer on node.js but I think there's a no-sense line on this file: serialport_native/serialport_native.cc
At line 47 you are using lseek() function on the serial port fd, and from "man lseek" I get this information:
ERRORS:
ESPIPE fildes is associated with a pipe, socket, or FIFO.
RESTRICTIONS:
Linux specific restrictions: using lseek on a tty device
returns ESPIPE.
Since serial ports are tty devices. What's the point on using lseek?
As far as I'm concerned, using read() on the serial port will empty the receive FIFO and you'll always get all the content.
The text was updated successfully, but these errors were encountered:
I came here searching about node.js + serial port, so I'm a first-timer on node.js but I think there's a no-sense line on this file: serialport_native/serialport_native.cc
At line 47 you are using lseek() function on the serial port fd, and from "man lseek" I get this information:
ERRORS:
ESPIPE fildes is associated with a pipe, socket, or FIFO.
RESTRICTIONS:
Linux specific restrictions: using lseek on a tty device
returns ESPIPE.
Since serial ports are tty devices. What's the point on using lseek?
As far as I'm concerned, using read() on the serial port will empty the receive FIFO and you'll always get all the content.
The text was updated successfully, but these errors were encountered: