USB connections to Arduino

4

1

In a class programming Arduinos from Windows 7 boxes, we have noticed that it is advantageous to plug in the same board, because each new board is recognized as a new COM port. If this happens too much, it seems like a maximum is reached and no more COM ports can be allocated.

It also appears to be advantageous to plug in the board to the same USB socket every time because different sockets appear to be allocated different COM port numbers.

There are a number of related questions here:

  1. How does Windows persist the knowledge of the location of which USB devices are in which ports? The behavior clearly changes if I plug in the same board after a reboot, or a different board.

  2. Is there any way to look through and/or edit the list of COM ports?

  3. Every now and then, despite our best efforts (at random), the machines seem to lock up and refuse to recognize an Arduino. Then we pop up the Device Manager, look for the device. Sometimes another reboot is necessary. Sometimes merely unplugging and replugging the Arduino works.

  4. Is there any way to manually "lock" a COM port to a specific board, for example, reserve COM9 for a particular Arduino.

We are particularly interested in preventing these problems, because this is a high school environment with multiple users with new users. A way to streamline the process and reduce the incidence of problems would improve our ability to focus on the subject matter.

Dov

Posted 2012-07-11T18:53:02.827

Reputation: 559

Answers

0

Windows will store information about the hardware in the registry, but it's a fairly tedious task to use it for this purpose.

In this case it will be faster to use the Device Manager to show hidden devices. This will require to set an environment variable. This can be done either in the windows settings or in a command prompt. The former will work forever, while the latter will only work for the current session.

Use environment variables

Right click on "my computer" -> properties -> in the menu on the left "advanced system settings" brings up another tabbed window. Open the "Advanced" page and at the bottom you can find Environment variables. Click on it and set a new value:

devmgr_show_nonpresent_devices = 1

Close, logoff, logon, open device manager.

Use the command prompt

type:

set devmgr_show_nonpresent_devices=1
start devmgmt.msc

Both

Open the View menu and select Show Hidden Devices

Riccardo Zorn

Posted 2012-07-11T18:53:02.827

Reputation: 101