Pages: [1]   Go Down
Author Topic: Intermittent Serial Port in use error with OS X 10.6.7  (Read 594 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

I have two mac laptops side by side.  One is working perfectly and the other is having problems uploading sketches to the same Duemilanove 328 board.

The one that is working is running OS X 10.6.4 with the FTDI drivers version 2.2.14.  I have no problems communicating with my board on this machine.

The one that is not working is running OS X 10.6.7 with the most recent FTDI drivers, version 2.2.16.  This one will occasionally upload a small sketch to my board.  However, while running I see that there is a activity on TX/RX that will cause the Blink sketch to reset.  This happens approximately every 5 seconds.  Also, I frequently get the error that the 'Serial Port is in use' and can't upload the sketch.

I have done quite a bit of troubleshooting but am still stuck with this.  I have:
  • uninstalled and reinstalled the FTDI drivers several times
  • confirmed that I don't have stray rxtx jar files in my Extensions folder
  • quit nearly everything running via the activity manager to ensure that there isn't anything actually trying to use the usbserial port
  • toggled between the tty.usbserial and cu.usbserial ports
  • double-checked that the setup is the as close as possible on the two laptops and using the same Duemilanove when testing

Unfortunately the problem persists.  I feel like there must be something silly that I'm missing or that there is some rogue serial process that I'm missing.  I can't for the life of me figure out what's going on though.  Might anyone have a suggestion for other things to try?  Has anyone had this sort of intermittent problem?

Thanks in advance!
Logged

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

Does of the size of the sketch matter?

Do you have any kind of 3G mobile adapters you use with the Mac?  Or ever install such software?  Those tend to poll the serial ports on a regular basis.

You can also run:  "lsof | grep usbmodem" in a terminal anytime you get a Serial Port in Use Error.  It will tell you the name of the process that has any files (or devices) with usbmodem open.
Logged

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

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, the size of the sketch matters to the extent that a larger sketch will be seemingly interrupted whereas something like Blink seems more likely to get through.

I don't have any mobile adapters on this machine.  I shut down things like dropbox and growl that I think might be doing this, but those didn't seem to have an impact.  I have bluetooth turned off just for good measure.

I had tried the lsof command, but it's not yielding much information.  Both 'lsof | grep usbserial' and 'lsof | grep usbmodem' return no result.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Found it! 

In case anyone else stumbles across this:

I had to manually sort through everything running on the machine using 'ps -ax'

I spotted what looked like it could be a daemon for a usb tablet that I had disabled but apparently still had something running in the background- presumably polling to see if the device would appear.  I used 'sudo kill -9 XX' where XX was the process id (pid).

With that process out of the way things are running as they should again.

Thanks!
Logged

Pages: [1]   Go Up
Jump to: