RxTx on Mac - Serial port already in use

与世无争的帅哥 提交于 2019-12-05 02:55:39
mkstlwtz

The OS X has some kind of exclusion mechanism on the serials ports. The MacBook does not have any serial ports, but the USB ports emulate them. When the Arduino is hooked up, it appears in the port list as "/dev/tty.usbmodem..." where ... are some trailing digits.

When is said the port was busy, that's a standard I/O exception that meant that we could not get access. The current owner was undefined because there was no current owner. We just did not have the required access to the directory to take ownership.

Using the Apple Terminal, do the following:

 sudo mkdir /var/lock
 sudo chmod a+rw /var/lock

This creates the required directory and makes it accessible. The serial port will no longer be busy, unless of course something else is really using it!

processing.app.SerialException: Serial port '/dev/tty.usbmodem...' already in use. Try quitting any programs that may be using it.

This happens to me when my external USB HDD is also connected. when I disconnect it, Arduino's upload process works as it should.

JAMESSTONEco

I found some information on the RXTX site under troubleshooting, Mac OS X. They have a shell script that you can run called fixperm.sh that changes the permissions of /var/lock/. There is more information about /var/lock on the FHS site.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!