-
Notifications
You must be signed in to change notification settings - Fork 193
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
USB serial port reads only one line of ASCII data #38
Comments
Can you provide more information? Which version of serialplot are you using? Which OS? Can you capture a few lines of your data with a text terminal software and put here? |
Serial plot: 0.12.0 |
What does your data format settings look like? Can you share a screenshot? Your data seems okay. But can you also check with a terminal software that can display hex data? Sometimes there can be other binary data that confuses serialplot. I just want to make sure we are on the same page before I try to reproduce this. |
@BranislavHatala I'm sorry but I cannot reproduce the issue on my linux based system with the data you provided. This could be a windows specific issue which means it will take a while before I can debug it. Maybe you can try to use another data format? Actually if you switch to 'simple binary format' you should be able to see some data even though it would be junk. If you observe the same behavior this would mean that this is most likely a serialport reading issue (not a parser issue). |
It seems so. In binary it does read the data continuously. |
Hmm this means there is an issue with the parsing.
It might be the line endings. Can you try linux style line endings (just
No, separator isn't required after the last column. |
I tried changing firmware of source device to use the linux style line ending. |
Hello folks, I'm using Fedora 36, serialPlot from AppImage and I am hitting the same issue. I tried sending The other side is micro:bit's serial console redirected to usb, I tried simple binary format as well as ASCII using space separated values (7 values). |
Interesting, I tried running it with strace and suddenly it started working and now it works even when running without strace. |
This is strange. I am not familiar with strace. Not sure what it changed. I would try restarting my pc to see if issue comes back. In that case I would suspect the libraries included in the appimage. Maybe you can build serialplot yourself and see if you see the same issue? |
Still no luck reproducing, I'll let you know if that reoccurs. |
I am facing the exact same issue in Debian 12. I am using a pl2303 usb to serial adapter. I also have another usb to serial adapter (blackmagic debug probe) that works just fine. The pl2303 works fine with minicom so I must assume that there is an issue in serialplot. starting it with strace did not solve the issue in my case |
Seems that there is an issue with If someone is interested I solved it like this:
I am not very familiar with Qt so probably not a good solution but it works for me. |
@franzflasch Thanks for debugging the issue and even providing a workaround. Since this seems like a bug with the Qt library (probably related to hw differences as you mentioned), maybe a newer version of Qt have already fixed it? Can you tell me which version of Qt you are using? |
There is this note in
If I remember correctly, QSerialPort always have a buffer, so canReadLine should have worked. But maybe it doesn't use buffer in some cases. Need to investigate. And probably I should implement buffering in the Serialplot code (as you did) instead of relying on QSerialPort::canReadLine. |
I am happy to test your solution with my setup if you want. |
only one line of data is read per opening of port when USB COM is used.
This can be seen in text view where only one line is added when port is opened.
Closing and reopening port adds another line.
The text was updated successfully, but these errors were encountered: