Found: another way to fix the "not in sync" problem

I don't have a question, this is just a heads-up for others.

It all started when I bought an ArduCam. ArduCam sketches would not compile under my old version 1.6.5 IDE, so upgraded to 1.8.8. After that, my sketches compiled, but when I tried to upload them, or any sketch at all, the "not in sync" errors appeared, and there was no sign of activity on the Arduino Uno's Tx/Rx LEDs.

I had a similar experience several years ago. The situations are similar. I had just changed versions of the IDE, installed new drives, and more than one Arduino was involved. So I figured that it was a version mismatch of some kind.

I struggled with this for days, reading the forum and performing all of the recommended tests. Nothing worked. I bought a second Uno, and it did not work either, making me suspect the driver. But installing the new driver did not help.

The crucial hint appeared as I disconnected one Uno and connected the other, when to my surprise, I was notified that the driver was being installed, on a different COM port, #4. And suddenly, I could upload sketches to that Uno.

But the other Uno still used COM #3, and could not be uploaded. So I had two Unos, which when attached used different COM ports, and behaved differently. Yet there was only one Arduino driver in my DriverStore.

With the non-functional device connected, I went to the Device Manager and looked at the driver. The COM port setting is in the Advanced section. It showed as COM #3, and when I went to change it, the list showed COM 4 "in use". That struck me as wrong, so on a hunch I changed it to #4, which worked with the other Uno. The Device Manager complained that the port was "already in use" but allowed me to alter it. After that, both of my devices used COM 4, and could be uploaded.

Apparently the the COM port setting was corrupted, and the Arduino appeared to use one COM port, but actually used another. Under Windows 7, the way to diagnose (and fix) this is by logging on as Administrator, going to the Device Manager, choosing the Arduino device, going to the Port Settings tab page, and pressing the Advanced button. The current COM port setting appears in a combo box, with 256 choices in the drop-down list. If any of these are marked as "in use" then that is a problem. Get rid of them by choosing each "in use" port, which will cause the "in use" tag to vanish. When they are all gone, choose the desired COM port, and press OK. That's all.

Once I learned about this quirk, I started checking the Advanced settings whenever I had difficulties with a COM port. Many times I saw the "in use" tag, and removing it always solved the problem.

The fastest way to get an "in use" tag is to open a COM port and then terminate without closing it. Most of my tags appeared during program development, either because my program crashed, or was terminated in the debugger.

Another way to get in trouble is when you sometimes plug the Arduino into one USB socket, and sometimes into another.

Thanks for taking the time to share your findings! I have seen the port change in Device Manager reported to have solved upload problems a few times in the past, but it was never explained in such detail as you’ve done here.