JArduino
JArduino copied to clipboard
Change com port
If you try to change the com port while running the advanced gui you only get the port that you are currently using in the list of available ports.
This is kind of old, but I had a similar issue. In my case I have an Arduino and a Bluetooth controller connected to different COM ports. I talk to the Arduino through JArduino and to the Bluetooth device through RxTx (Kevoree). I need to initialize the connection to the Arduino first and to the Bluetooth device second. When I do that I get a NoSuchPortException on the init of the BT.
CommPortIdentifier.getPortIdentifiers() returns both ports as available before the Arduino connection and only the Arduino port after.
I tracked down the problem to Serial4JArduino.connect(String portName) which calls registerPort(String portName). I am not completely sure what is the purpose of this registration, but when I disable it, everything runs fine.
Hi,
Thank you for the good feedback.
RxTx is somehow obscure, I think we needed this registerPort to make sure it worked on an platform (Win, Linux, etc). I will try to make experiments on those different platforms and see if it indeed works without registerPort.
I forgot to mention that I was on Windows 8 x64, not sure how it would behave on other platforms.