Google Analytics

Monday, March 12, 2012

Arduino - COM USB Unknown Device Problem

Every once in a while, while working on my Arduino stuff, I get this really aggravating problem, whereby my USB suddenly disappears.  This means I can't upload code to the Arduino, and I can't access the Serial Monitor to see what the Arduino might be printing out.  Windows, after working with it for weeks, if not months, suddenly decides it doesn't know what this device is!  It also decides that it will load a device driver for you.  And of course, once it's loaded this bad device driver, you can no longer talk to your Arduino.

To add insult to injury, you may have gone to the Control Panel -> Device Manager -> USB devices, and selected the 'Unknown Device', as Windows has labeled it, and attempt to update the device driver.  And that's when things really get pissie - Windows now tells me that it's using the right driver, so it's not going to do anything.

There are a lot of entries out in the web-o-sphere, where people are looking for answers to this.  Some of those answers will work, for some of the people.  Other peoples' problems might be too severe for those treatments, and so they are still looking for a solution - and I hope the solution I'm going to give you below is the one you need to make it work again!

First, try the other solutions you might find.  Only use these if those solutions haven't worked for you!!!

First, go to the Control Panel -> Device Manager, and delete every entry you see within the higher level USB entry.  In other words, in the Device Manager, enter the USB devices area, then in that area, delete everything.  Then shutdown (hard shutdown), to make sure all of the power is off of the motherboard and parts.  Now boot up. The system will start loading and defining the USB ports.  This might be all you need - it was for me a couple of times.  Try out your Arduino IDE software now.

If that didn't work, then go back and delete everything again.  Then, using a Registry Cleanup tool, like the one that comes with Symantic's Norton 360, run the Registry Cleanup.  This will remove any hanging port definitions that Windows changed when it decided it was going to help you earlier.  Shut down, boot back up, and see if things work.  Hopefully, you can stop here.

If you still aren't working, then make a backup of your sketch folders - you should have placed them somewhere else other than in the folders that hold the Arduino binaries anyway.  Then delete the Arduino binaries - the whole directory structure, from the top of the Arduino folders to the bottom, but remember - your sketch stuff and 3rd party libraries should be in another directory structure if you set things up properly.  Now download a new instance of Arduino, and install it (unless, of course, you still have the zip from your previous download of Arduino, in which case you can just install it again).  You are doing this because Arduino isn't currently 'installed' into the Windows program environment, so you can't 'uninstall' it either - you've got to delete stuff.  Now do the stuff you did earlier - USB deletions, Registry Cleanup, etc.  Now install the complete Arduino package.  See if your stuff works.  I hope it does!

If it doesn't then open the Arduino IDE, go to FILES, then open the 'prefereneces' - it will give you the file location, in the AppData directory (it may be hidden, in which case you'll have to override Windows and make it visable).  Now rename the preferences.txt file to something like presferences.txt.old.  Now restart the IDE; this will recreate the preferences.txt file.  Now try to see if you can access the port.  If not, then do everything from beginning to end, including the deletion and recreation of the preferences.txt file, and see if it works...I hope it does, because this has been the answer to all my problems that I've encountered!


1 comment:

  1. Hi what windows version are you using? I've got the same problem and at this point only the Mega is recognized although previously so were the others. I'm running on windows 7 professional version. I've tried some of what you suggested but not everything just yet. I'll give some of the other stuff a try. thanks