3
votes

I wonder if there is a way to somehow automatically find a COM port which Arduino device is connected to. (Like it is done in Arduino IDE)

I have a piece of code which is working with Arduino via serial communication (using JSSC library) and it is quite frustrating I have to manually set COM port number every time. Is there a way of either autodetect of the correct Arudino COM port or maybe communicate with Arduino via other ways, like HID device communication? (Dunno.)

Thanks in advance for your answers/ideas.

1

1 Answers

0
votes

Serial communication manager have APIs to find serial port names like COMxx dynamically. Just connect your USB-USRT IC and SCM library will tell you the device node for it. Just google for Serial communication manager. It is hosted on github.