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
Not able to read the data from serial port #1668
Comments
You don't want to mix |
I get the following output when I use the debug mode. $ DEBUG=* node flow.js I am not getting any data. What do you suggest ? |
That's telling me it wrote 9 bytes and was told by your os that there
wasn't any more data. Do you have the right baudrate?
…On Fri, Sep 21, 2018, 2:48 AM Vishal S ***@***.***> wrote:
I get the following output when I use the debug mode.
$ DEBUG=* node flow.js
@serialport/bindings loading LinuxBinding +0ms
@serialport/stream opening path: /dev/ttyS0 +0ms
@serialport/binding-abstract open +0ms
@serialport/stream _read queueing _read for after open +189ms
@serialport/bindings:poller Creating poller +0ms
@serialport/stream opened path: /dev/ttyS0 +74ms
Open connections!
@serialport/stream _write 9 bytes of data +130ms
@serialport/binding-abstract write 9 bytes +331ms
@serialport/stream _read reading +40ms
@serialport/binding-abstract read +40ms
@serialport/bindings:unixWrite Starting write 9 bytes offset 0
bytesToWrite 9 +0ms
@serialport/bindings:unixRead Starting read +0ms
@serialport/bindings:unixWrite write returned null 9 +50ms
@serialport/bindings:unixWrite wrote 9 bytes +27ms
@serialport/bindings:unixWrite Finished writing 9 bytes +2ms
@serialport/stream binding.write write finished +105ms
message written
@serialport/bindings:unixRead waiting for readable because of code: EAGAIN
+76ms
@serialport/bindings:poller Polling for "readable" +311ms
I am not getting any data. What do you suggest ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1668 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABlbg3TbkPYiideAh9pVqvbfr1lALe5ks5udIukgaJpZM4Wx-Jb>
.
|
Yes the baud rate is correct. It is working perfectly in Node RED framework but not in Node JS. So, What do you suggest ? |
Is it any problem in the code or the library ? |
@Vishal000 What version of serialport are you using? |
Node: 6.12.3 |
Can anyone please help with this situation ? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week no further activity occurs. Feel free continue the discussion or ask for a |
Hi,
My usecase is I am running the NodeJS code to fetch the data from the custom made shield which uses the Modbus protocol for communication. I am using serial port to send a request to the shield and get back the response from the shield. I have written the code in NODE-RED, which has a serial port and it is able to send request and receive response. I have to connect to port /dev/ttyS0. My board in Intel Galelio Board and the board is connected to the shield via arduino pins. I have written the following code to establish the communication but the message (request) is written but I do not get any response. Please help me with this.
The text was updated successfully, but these errors were encountered: