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
Using 1.6.3 on Linux (Ubuntu 14.04). Doing the usual:
p = serialport.SerialPort('/dev/ttyUSB0', { ... });
p.on('open', function () {
some_callback();
});
In my callback, the port object is all there, but the "fd" property of the port object is still null, and attempting a write() will throw an exception. Simply waiting until fd is not null fixes the issue, but really, shouldn't open() be doing that, and not returning until the port is actually open and ready for business?
The text was updated successfully, but these errors were encountered:
Found this on several versions, and it seems to be related to running under a shell. When the program is run by manually typing "nodejs ./myprog.js ...", then all is well, or if it is run from .bashrc. It's when I try to run the program from a Gnome autostart script that it fails. "fd" comes out 0. Maybe it's legitimately returning fd 0 in this case, and we can't deal with it. In this state, all writes fail and this condition persists, so I can't just wait it out.
@lcrocker the port should be open and writes shouldn't fail after an open event. We didn't support systems where the fd might be 0, but now we do! Our latest beta 2.0.7-beta2 lands support you can read more #688
Please try it out and let us know if this fixes your issue!
Using 1.6.3 on Linux (Ubuntu 14.04). Doing the usual:
In my callback, the port object is all there, but the "fd" property of the port object is still null, and attempting a write() will throw an exception. Simply waiting until fd is not null fixes the issue, but really, shouldn't open() be doing that, and not returning until the port is actually open and ready for business?
The text was updated successfully, but these errors were encountered: