Serial Port Already in Use errors Arduino 0023 and Arudino 1.0

I’m getting Serial Port not found errors several different Duemilinove boards using Mac OS X 10.6.8

I’ve rebooted, nothing else is running, and I’ve updated the FTDI software from the manufacturers site. I’ve also gone all the way to shutdown and reboot. In the Tools->Serial Port menu I’ve got “/dev/cu.usbserial-A6008cPb” selected. I’ve also tried the tty version with no luck. The board is set to “Duemilinove ATmega 328” which matches both my arduinos. Neither one can be uploaded to. Serial port '/dev/cu.usbserial-A6008cPb' already in use.  Try quiting any programs that may be using it.

I’m getting the same errors on Arduino 0021, Arduino 0023 and Arduino 1.0

I can’t figure out why it thinks the port is busy. Nothing else is running on the computer.

What other diagnostics can I run or what am I missing?


filmo: I can't figure out why it thinks the port is busy. Nothing else is running on the computer.

Of course, this is never true. There are many processes running in the background.

  1. Drop to a terminal and run: lsof | grep usbserial

This will identify any processes that are holding the serial devices open.

If nothing is listed then, 2. Drop to a terminal and run: sudo mkdir /var/lock sudo chmod 777 /var/lock

You'll be asked for your password once.

Thanks. When I ran

lsof | grep usbserial

It showed nothing, so I did your /var/lock tip and that made all the difference. But I don't understand why.

Can you provide some clarity on what the /var/lock directory did, why it worked, and why it wasn't there before??

/var/lock is typically used by processes to indicate they are using a resource. It appears avrdude does this and if it can't access /var/lock, it just assumes the serial port is in use.

I really can't explain it, I just know how to fix it.