USB Port selection


I'm having the following problem.

The computer does not always assigns the same USB Port to Arduino and then Processing does not communicate sometimes. I have to restart the computer for it to reassing the Port to Arduino. It happends specifically when I close my laptop at the end of the day and unplug everything. When I comeback next day and plug it in again the USB Port assigned to Arduino is not right and I have to restart the computer.

My question is this:

Can I assing a permanent Port to Arduino, so I won't have this problem?

I'm using a USB extender hub as my laptop only have 2 USB Ports. With it I connect printers, etc. It is also annoying with the printers as they are not always assigned the same USB an I have copies of each of them depending the Port they are assigned. I send a document to be printed and it does not print until I select another printer copy and next day when I plug in everythig, the documents that were not printed are all printed now when I don't need them. I have to be guessing all the time which Port was assigned to everything.

By the way, I also connect my HTC EVO phone to another USB Port. Everytime I unplug or plug the phone, Arduino (on another Port) gets ressetted. Allways happens even without Arduino IDE or Processing running. Kind of weird for me...

Any help appreciated.

Thanks, Adrian

What OS are you using?

Windows 7

Can I assing a permanent Port to Arduino, so I won't have this problem?

Not on Windows, you can't. The port is assigned based on the next available port number. You could have Processing display a list of port numbers, and prompt you to select the correct one, before it tries to create the serial instance.

I guess I will haveto do that. Thanks, Adrian