Which port ?

Hi,
Just a simple question, but i'm not sure about the answer

Is Arduino, connected by USB, always marked as COM3 port ?

I've got an application in .NET which comunicates fine at my notebook - i've got there 2 usb ports, and it works on both, and connected on both of it is marked as COM3

but.. if i'll use other machine, PC with more ports - would it be always COM3 ?

I just wonder if i should make in my application a list of ports to connect or stick it to COM3 for always ?

Thanks a lot in advance for anwer! , I know i could just try it, but it's quite complicated to run it on otgher machines for now

Each time you plug a device into a PC, it is assigned a COM port. That port varies by machine, and depends on what else is connected to the machine. You can not rely on any specific device being connected to COM3.

On my laptop, nothing ever appears to be connected to COM3. The lowest port for me is COM4.

The port depends on how many other devices were pluggeed in before it. Mine varies from COM3 to COM4 depending on which arduino board it is!
Before I rebooted my PC and I had my bluetooth adaptor divers installed, my arduino board was about COM20 or something due to the amount of virtual bluetooth COM ports

You can change device COM ports in device manager (on windows). I did change mine to COM256 recently for a laugh but then a program I had wouldn't show it so I changed it back to COM3.

Mowcius

what you can do is have your application send out a special command on each of the available serial ports

on the arduino side have it listen for that command and send back a special response

the 2 should be able to find each other

Ok, i get it. Thanks a lot for all answers.

Looks like have to add a "port choser" in my appl. with list of all ports and a connector.
Maybe it would even makre it look more "professional" hah:)

anyway, thanks once again !

[resolved]

what you can do is have your application send out a special command on each of the available serial ports

on the arduino side have it listen for that command and send back a special response

the 2 should be able to find each other

That would require the arduino have to have pre-loaded code on it.

It may not be that sort of program, maybe that is not practical. Good idea though, it is something I may do on one of my current projects now that you have mentioned it...

Mowcius

thanks :slight_smile:

I recently did a similar thing in one of my own VB.net programs, I had a list of the serial ports, so the user could pick the correct one.

Details for getting a list of the serial ports are below: