Skip to content
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

Stopped working after 2.9.3, no data can be read #539

Open
lolhol opened this issue Jan 2, 2024 · 6 comments
Open

Stopped working after 2.9.3, no data can be read #539

lolhol opened this issue Jan 2, 2024 · 6 comments

Comments

@lolhol
Copy link

lolhol commented Jan 2, 2024

Hi.

Was there some breaking change (except the one mentioned in the release) that could break the library usage between 2.9.3 and 2.10.0? It looks like 2.10.0 stopped receiving any data in my configuration (in VMWare Fusion installed Linux working with /dev/ttyUSB0). I tried to use strace to figure out the issues, but I couldn't find anything suspicious.

Screenshot 2024-01-01 at 10 50 36 PM

Here is a full screencast: https://streamable.com/schhu0

TL;DR:

In 2.9.3:

Screenshot 2024-01-01 at 10 47 28 PM

it works (and also, pyserial works too, it's able to send/receive data, so it's not about the device):

Screenshot 2023-12-30 at 10 57 42 PM

But starting from 2.10.0:

Screenshot 2024-01-01 at 10 48 47 PM

it stops receiving (and maybe sending?) data:

Screenshot 2023-12-30 at 10 57 08 PM
@hedgecrw
Copy link
Contributor

hedgecrw commented Jan 2, 2024

No, there shouldn't be any breaking changes between 2.9.3 and the 2.10.X series. Just to verify, have you tried using the most current release (2.10.4), or have you just tested 2.10.0?

@lolhol
Copy link
Author

lolhol commented Jan 5, 2024

Hi!

Firstly, sorry for the late response. Yes, I have started at that version and, seeing that something is broken, started experimenting.

Thanks!

@TMSSassen
Copy link

Hey lolhol, perhaps stupid question, but have you tried restarting your virtual machine? I had the oddest issue with JSerialComm not reading data after opening an outputstream / writing data for the first time (so before any call to getOutputStream() it received data events, but if I tried sending anything to my arduino I would never receive incoming data again). Tried a few different versions via Maven, had the same problem with all of them.

But now (a few days later) somehow I can't reproduce that behaviour anymore, and now everything works fine. I can send / read data no problem. Only thing I can think of that could've changed was that I rebooted my computer in between.

@hedgecrw
Copy link
Contributor

Just curious if a restart resolved this issue for the original poster (or upgrading to 2.11.X). I can't see any reason why this would have stopped working after 2.9.3, but we can try to debug if the issue still persists.

@phillipscheng
Copy link

Perhaps related to #562?

@emilm
Copy link

emilm commented Aug 9, 2024

It stopped receiving data for me as well all of a sudden.
I see in the native code that datetime functions are used to measure time. This is unreliable as the NTP server can shift the time during a wait. I suggest using a wall clock (stop watch).

https:/Fazecast/jSerialComm/blob/master/src/main/c/Posix/SerialPort_Posix.c#L950

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants