Go Down

Topic: Yet Another "Serial Port Already in Use" Problem (Read 1 time) previous topic - next topic

bjosephs

Hi folks,


I'm still new to programming but thanks to a senior project I'm 6 months into I've had quite a bit of practice with my uno and mega boards.  Recently I started having a problem come up - maybe after hours of successful uploading or sometimes with my first upload of the day - my sketches won't upload and I get the error below.  This includes my sketches and all of the standard examples as well.  It's not related to port/board settings as I don't change them once I get rolling and once it starts none of my arduino compatible hardware will access a serial port.  I restart the IDE and nothing changes, I restart the computer, fully shut down, log into different users.... nothing works.  After a day or to the problem goes away.  I get some time in and suddenly the error starts up and I can't do any work until it decides to go away.  I've even taken the boards to other computers with the Arduino IDE and about 50% of the time they will work, the rest of the time they give the same error on the second computer.  If I can get the board working on that second computer, when I bring it back to my main computer it sometimes works and sometimes doesn't.  I wish I could be more specific on the frequency but I haven't been doing much more than frantically trying things.

I've googled extensively on this and read every thread on the matter including on windows computers.  I don't have any software (I know of) that is using my serial ports.  I've tried running the "lsof | grep usbmodem" line (from http://arduino.cc/forum/index.php?topic=28487.0 thread) to see if anything is using my port (dev/tty/BrianJosephssMacPro-Blu) and nothing returns.  I've tried https://gist.github.com/jens-a-e/1419677 and there is no change.  I hope someone can help as this is a devastating setback every time it comes up.  Not a lot of weeks left until graduation....

My computer:  Mac OS 10.7.5
My Boards: Arduino Mega 2560 and Uno via Arduino IDE 1.0.4 ; Chipkit Uno32 via MPIDE


This is the error:

Binary sketch size: 18,368 bytes (of a 258,048 byte maximum)
processing.app.SerialException: Serial port '/dev/tty.BrianJosephssMacPro-Blu' already in use. Try quiting any programs that may be using it.
   at processing.app.Serial.<init>(Serial.java:171)
   at processing.app.Serial.<init>(Serial.java:77)
   at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:77)
   at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:174)
   at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)
   at processing.app.Sketch.upload(Sketch.java:1671)
   at processing.app.Sketch.exportApplet(Sketch.java:1627)
   at processing.app.Sketch.exportApplet(Sketch.java:1599)
   at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)
   at java.lang.Thread.run(Thread.java:680)
processing.app.debug.RunnerException: Serial port '/dev/tty.BrianJosephssMacPro-Blu' already in use. Try quiting any programs that may be using it.
   at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:101)
   at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:174)
   at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)
   at processing.app.Sketch.upload(Sketch.java:1671)
   at processing.app.Sketch.exportApplet(Sketch.java:1627)
   at processing.app.Sketch.exportApplet(Sketch.java:1599)
   at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)
   at java.lang.Thread.run(Thread.java:680)

cmiyc

Quote
Serial port '/dev/tty.BrianJosephssMacPro-Blu' already in use.

That isn't a valid name for a Arduino board.  Looks like you haven't selected the right serial port.

An official 2560 and Uno will show up as a "usbmodem".   If the board has a FTDI chip (like a OSEPP knockoff) and you have FTDI drivers it will show up as "usbserial".
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

fpuntel

http://www.ajudino.com/2013/04/1-condigurando-sua-ide-arduino-para.html :)

bjosephs

James C4S,


You certainly respond to a lot of these type of issues, I'm honored you took the time!  I think you must be right.  In my poking and prodding I discovered that port name I listed above was a bluetooth port set up by my computer to talk to a smartphone.  It was never the serial port I was using when programming was actually working.  When I plug in my Mega or my Uno no new ports show up in the list of available ports.  When I plug my Chipkit board in with MPIDE open I do get a new port there, but it doesn't flinch when I plug the Arduino boards in, though it should. 

So, I guess my problem gets reduced down to: Arduino IDE doesn't recognize my boards when they are plugged.  It certainly used to, I don't know what changed.  When they disappeared from the list I must have mistakenly picked the bluetooth port - which was already in use and never let the IDE get far enough to tell me that there was no board to communicate to.

Any thoughts on the missing ports?  I downloaded FTDI drivers even though I read 10 times that I don't need them...

Brian



cmiyc


Any thoughts on the missing ports?  I downloaded FTDI drivers even though I read 10 times that I don't need them...

Where did you buy them from?
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

codlink


In my poking and prodding I discovered that port name I listed above was a bluetooth port set up by my computer to talk to a smartphone.


I've read several threads where disabling the Bluetooth driver from Device Manager fixed their issue.  More than likely a bug with some Bluetooth drivers.
//LiNK

cmiyc



In my poking and prodding I discovered that port name I listed above was a bluetooth port set up by my computer to talk to a smartphone.


I've read several threads where disabling the Bluetooth driver from Device Manager fixed their issue.  More than likely a bug with some Bluetooth drivers.

The bluetooth issue applies to windows. 

This user is on a Mac.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

bjosephs

Folks,



Bad cable!  I got so wrapped up in the "serial port" error I missed the fact that my board simply wasn't recognized... and I'd spent so long looking at complex explanations for that I missed the simple possibility that it might not be connected... the boards get power but no data transmission.


Switched cables and all is well now. 


Brian

Go Up