Closed visupro closed 9 years ago
Well that's an interesting bug at least! I will set up an installation of OpenSUSE 13.2 and try to resolve this issue. Just for clarification, you aren't losing the MSB on Windows, just on OpenSUSE?
Yes that is correct. I don't have any problems on Windows. On opensuse everything works fine as well except for the MSB after a random number of bytes.
Dirk,
I'm having trouble replicating this bug on my end. From your description, it sounds like the library is set up to listen for an 8N1 (8 data bits, no parity, 1 stop bit) serial stream (which is its default), but is receiving a 7E1 stream instead. This would cause half of the received MSBs to be incorrect. If it's working on Windows, however, it may be a problem with the way Linux is defaulting these values (which is fixable on my end).
To help me further investigate this problem, would you mind telling me what are the expected port settings of the device you are trying to talk to (e.g. parity, number of data bits, and number of stop bits). Also, are you using any sort of flow control? And finally, what does the code block look like that you are using to initialize/setup the jSerialComm library? This will help me greatly in figuring out what the problem is. Thanks!
Scratch all that, I was finally able to replicate the problem locally. I think I found the problem in a very low-level Linux call. Please verify the fix by trying the following:
https://dl.dropboxusercontent.com/u/3274122/jSerialComm-1.2.3-testing.jar
(Note that this fix has only been implemented on Linux in this testing JAR. If correct, I'll also need to update the OS X binaries, so please don't use this JAR as a release-ready product.)
Will,
Great to hear that you could repicate the problem. I will test the fix as soon as I'm back in the office.
You are correct my port configuration is 8N1 with no flow control. I will come back too you asap.
Thanks a lot Dirk
Perfect job! The problem is gone. Now I get the missing MSB on Linux as well. I will do some more test and wait for a released version before productive use.
Thanks again for the quick help Dirk
No problem - thanks for the issue report...that would've been a major one if left uncaught! The next release will be version 1.2.3 which will include this fix and a couple of other minor ones, and I expect to push it out on Monday. Thanks for your patience and help!
FYI: Version 1.3.0 has been released which includes this bug fix.
Dear Team,
Thanks for great work on JSerialComm. I use it as a multi platform solution to support home automation systems like KNX. This works great on Windows for plain TPUART and BCU connections.
It also works works basically on opensuse 13.2, but after a few data packages I miss for some reason the MSB for all bytes. It doesn't matter if I read integer with is.read() or bytes using is.read(byte[]). I build the binary for 1.1.1 on opensuse 13.2 and used pre build binaries from 1.0.1, 1.11. and 1.2.0 but this did not solve the problem.
It would be really great if you could help to make this work.
Best Regards Dirk