java-native/jssc

Slowness sending characters

ianrenton opened this issue · 3 comments

Hi, I have a very strange issue - I'm not 100% sure it's a JSSC issue but I'm leaning towards thinking it is.

The issue is a slowness sending characters. My software sends a line at once, consisting of around 100 characters per line. I normally send this to a USB serial device, but for testing I have replicated the issue using com0com on a Windows 10 PC, talking to the SaTerm software on the other end of the software emulated null modem link. I am using 19200 baud, 8 N 1. Java is Oracle JRE 8.

When I use scream3r JSSC 2.8.0, the whole line appears pretty much at once in my serial client. However, when I switch to java-native JSSC 2.9.3, I see the line written out more slowly, maybe 10-20 characters per second. (Still using 19200 baud so the characters are intelligible in my serial client, they just appear slowly.) I have not changed any code in my software, just the dependency.

Here's the weirdest thing. After starting up the PC, if I run the java-native version, I see this problem. I then run the scream3r version, and I don't see the problem. If I subsequently run the java-native version again, I don't have this problem. It seems like it's only an issue when using the java-native version alone, and a run of the scream3r version "fixes" both versions, until the next time the PC is restarted.

In the real system I am talking to a serial device that is very picky on timing (bit-banging an IO line) so the java-native version doesn't work with it, but as with my test scenario, if I run the scream3r version it works, then subsequently the java-native version will work until the PC is restarted.

Has anyone seen anything like this before? Any idea what could be causing it?

Thanks

tresf commented

@ianrenton I believe this is a duplicate of #113 (comment), fixed in 2.9.4 per:

Fixes

  • Corrected Baud Rate being ignored on Windows #113

Please see if the previous behavior comes back when switching to 2.9.4.

Note: If the same, this issue should only affect Windows versions of 2.9.3.

Oh, brilliant! Thank you and sorry for posting a duplicate bug, I didn't realise #113 was the same issue.

Updating to 2.9.4 has resolved my problem.

tresf commented

No worries! I'd have done the same. I considered changing the title to be more verbose. The good thing about duplicates is it helps others searching.