-
Notifications
You must be signed in to change notification settings - Fork 54
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
Can't read serial port on Windows 10 #173
Comments
Hi, Although you may find others that have the same problem, it's difficult for a JSSC developer to reproduce the issue without some form of reproducible code snippet. Can you provide a minimally reproducible code snippet that illustrates the issue? Even a very basic Netbeans project that illustrates the issue may suffice. |
numberaddition.zip |
@AlexanderSveshnikov thanks for sharing the code. This code is not a minimally reproducible example as it 1,400 lines of code, which makes it a bit harder to understand what's going wrong with JSSC. Can you prepare a very simple example with JSSC that illustrates the problem?
When you say "debug mode", do you mean that you are placing the STM32 device into debug mode, or that you are running Netbeans in debug mode? When you cannot read data, do you receive any information at all (console logs, symptoms, etc) that may allude to the problem? |
When I say "Debug mode", I mean Netbeans in debug mode of course. public void serialEvent(SerialPortEvent event) {
if (event.isRXCHAR()) {
if (event.getEventValue() > 0) {
try {
System.out.println("Got reply"); //<- This is the message I can view in debug mode, but can't in run mode! |
I'm not sure how the IDE's debug mode would impact the reliability of the library's behavior. Initial thoughts are that it will use a different compiled class cache, which may allude to the problem, but that's purely speculative. There may also be something about Java 22 that's causing something we haven't seen before. I can fire up NetBeans on just about any OS and test the same version of JSSC against a serial device that I have locally to see if this is reproducible, but I would need a minimally reproducible code example, preferably a sample Netbeans project that I can use to click "Run" or "Debug" from. |
Hello. I'm trying to use JSSC to communicate with my STM32 device via virtual serial port, but I can read data only under debug mode. When I switch into run-mode, no reading performed. I use netbeans 22, java se 22.0.2 on 64 bit machine.
And I use event listener to read data. What's wrong? Does anybody faced with this problem?
The text was updated successfully, but these errors were encountered: