Go Down

Topic: Serial port already in use. (Read 440 times) previous topic - next topic

hilukasz

I am using a leonardo and for some reason I can only upload sometimes to it. I've noticed it happens usually only when I have serial communication happening, I am assuming its because leonardo continues to read serial even when window is closed.

I am on OSX and have tried two things:
1. adding delay in setup of 5seconds so I could try a reboot and upload right after its been rebooted.
2. this suggestion http://www.baldengineer.com/blog/2012/10/08/arduino-fixing-serial-port-in-use/

not sure what else it could be. any ideas on fixing this? It only happens with leonardo.
for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

James C4S


I am assuming its because leonardo continues to read serial even when window is closed

No, that doesn't make sense.  "Serial port in use" is on the PC side, not the Leonardo's side.

If you load Blink on the Leonardo and keep trying to reload it, do you still get the serial port in use?


2. this suggestion http://www.baldengineer.com/blog/2012/10/08/arduino-fixing-serial-port-in-use/

Yeah, I wrote that with the Uno and Mega in mind.  The Leonardo is different.  Although, it would be good to use lsof to find out what is holding the port open (something has to be).
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

hilukasz



I am assuming its because leonardo continues to read serial even when window is closed

No, that doesn't make sense.  "Serial port in use" is on the PC side, not the Leonardo's side.

If you load Blink on the Leonardo and keep trying to reload it, do you still get the serial port in use?


2. this suggestion http://www.baldengineer.com/blog/2012/10/08/arduino-fixing-serial-port-in-use/

Yeah, I wrote that with the Uno and Mega in mind.  The Leonardo is different.  Although, it would be good to use lsof to find out what is holding the port open (something has to be).


nope, like i mentioned earlier, it only happens when I have serial communication it seems, simple sketches like blink don't seem to have an affect.
for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

James C4S


nope, like i mentioned earlier, it only happens when I have serial communication it seems, simple sketches like blink don't seem to have an affect.

Okay then load something with serial communication and run lsof to find out what is keeping the port open.  Again, if you're getting "serial port in use" that means some process is holding it open.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Go Up