-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data isn't read from a PTY #2
Comments
It's a readable stream — it should emit data events just fine if you listen for them…? |
Just checked, data events work fine. |
Thanks for checking, I used try {
fs.accessSync(path, fs.F_OK);
port = new Serial(path, 9600);
port.on('open', function(){
console.log('serial path: ' + path);
});
port.on('data', function(chunk){
console.log(chunk);
});
} catch (error) {
if (error.code === 'ENOENT') console.log('serial path: ' + path + ' is not available');
} I could see the data I pushed into |
Welp, that's a pickle — mind helping me repro this? I'm not entirely sure how to get a PTY pair set up like that. So far I haven't done that because:
Neither of those seem to be true now, so if I can reproduce this easily for testing, I could get started on that. (heck, maybe I could even write some integration tests using PTY pairs!) |
Sure, this is my current test command:
I've used this to testing node-serialport before trying serialport-stream. |
https://nodejs.org/api/stream.html#stream_event_data
Or how should I get data from serial port with serialport-stream?
The text was updated successfully, but these errors were encountered: