-
Notifications
You must be signed in to change notification settings - Fork 12
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 receiving data after connection #57
Comments
Are you subscribing to the onReceived event like this: // subscribe received data
const sub = serialPort.onReceived(buff => {
console.log(buff.toString('hex').toUpperCase());
}) |
Hey @lagschwein I am working on an RFID Reader, and when the scan/reading is triggered I am not receiving the data. |
I would need a bit more information about your code to diagnose the problem |
Hey @lagschwein I use UseRef to keep the state of the connection and have separated the closing and sending through of data. I know that connection works because I don't get any error when I send data after connecting. |
Does it work when sending data? Also are you calling devicePathsAsync() to determine whether /dev/ttys4 is correct serial port path? |
I think it does cause it does not return any error. And yes, the device path is just a check, which works as well. |
When I ask does it work I mean are you actually receiving the serial data on the other end of the serial port? |
Once I connect I can get the device paths, so I am guessing the connection is correct. |
I would suggest switching to using https://github.com/bastengao/react-native-usb-serialport-for-android. I have been having much more success with this module. |
Thank you @lagschwein |
Hey
After connecting successfully, I am not receiving data from the serialport.
Is there an additional step required after connecting?
This is my connection :
The text was updated successfully, but these errors were encountered: