Pages: [1]   Go Down
Author Topic: Serial port already in use.  (Read 392 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 3
Posts: 188
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6141
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

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).
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Offline Offline
Full Member
***
Karma: 3
Posts: 188
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

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.
Logged

for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6141
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Pages: [1]   Go Up
Jump to: