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

Code stop after i try to getCommPorts() #576

Open
ElPountie opened this issue Oct 14, 2024 · 1 comment
Open

Code stop after i try to getCommPorts() #576

ElPountie opened this issue Oct 14, 2024 · 1 comment

Comments

@ElPountie
Copy link

I'm on windows 10 and i try to get all serial ports but my code just stop without error and even with a try catch i have no exception how i understand what just happend, here is my code :

	public static void initialisePortsSerie() {
		//Parcours et lance le traitement sur chaque port série 
		try {
			System.out.println("Recherche des ports série");
			
			SerialPort[] ports = SerialPort.getCommPorts();
			
			System.out.println("Nombre de ports série détectés : " + ports.length);
			
			if (ports.length == 0) {
			    return;
			}

			for (SerialPort port : ports) {
				lecturePortUsb(port);
			}
		} catch (Exception e) {
			System.out.println("Erreur lors de la recherche des ports série : " + e.getMessage());
		}
		
	}
@antoineveldhoven
Copy link

Maybe a duplicate of #555; hopefully @hedgecrw will find some time to do a release

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

2 participants