6 Replies Latest reply: Nov 7, 2013 11:52 PM by piz_wu
acfkt Level 1 (0 points)

When I try to use a terminal program to access a serial port, i get the message that the serial port is busy.  There is nothing currently using the port, how to i tell the os that the port is not busy?

MacBook Air, OS X Mountain Lion (10.8)
  • Retired Engineer Level 4 (2,735 points)

    MBAs don't have serial ports so you will have to tell us what you connected to the MBA that provides a serial port and whether its manufacturer provides a driver for OS X.

  • cshotton Level 1 (0 points)

    A MacBook Air has USB ports (guess what the "S" stands for?)  I am guessing the question is "how do I release a serial device marked as busy in /dev?" There are plenty of devices that can be connected via USB that show up as virtual serial devices in /dev, so this is a completely valid question. Unfortunately, I don't know the answer either, and am looking for it myself.

  • LousyFool Level 4 (2,645 points)

    ...however, since the OP is stating that "there is nothing currently using the port", I assume he has nothing connected to whatever physical serial port he is referring to.


    Making it an oxymoron, IMHO:

    Why would the OP want or need to access a serial port without anything being connected? Maybe the port is busy looking for a device?

    If something is connected, why should the port not be busy? If it's a process, it can be killed.


    Or am I overlooking something?


    Anyway, I second "Retired Engineer", more specific info on what the OP is up to would be good to have, if not necessary. Meanwhile the answer is, "it depends..."

  • cshotton Level 1 (0 points)

    Unless you've got experience with the actual issue at hand, trying to explain to someone why they are wrong in asking a question is most unhelpful. Let me describe a scenario so you can offer specific knowledge if you have any.


    If you have a device connected to the USB port of any Mac and there is appropriate driver support for the device to do so, it is mapped to a dynamically created serial device in the /dev directory. Generally, if you unplug the device, the associated /dev entry is removed. However, if the device is in use when unplugged, or if an app terminates and fails to close/release the device, it is very often the case that the the /dev entry continues to be recognized as in use by OS X.


    This is a common annoyance that seems to only be fixable with a reboot. lsof doesn't indicate any processes using the /dev file (let's use /dev/tty.usbmodem1d21 as an example, since that's the device that becomes active with an Arduino Uno plugged directly into an on-board USB port). Once the /dev/tty.usbmodem1d21 device becomes busy due to some software/O/S failure, it stays that way.


    I believe the question being asked is "Is there a way to reset the busy status of what appears to be an open /dev device or file descriptor that doesn't require a reboot?" 


    It doesn't matter if the device is plugged in or not. Added, removed, whatever. The device stays busy at the O/S level. It's not a difficult question convey. I understood this to be what the original poster was asking, but it seems like the responses so far want to answer some other unspecified question or find fault with the questioner.


    Do you know the answer to THIS question?

  • LousyFool Level 4 (2,645 points)

    Thanks for your kind reply.


    So then, I might have overlooked something (didn't rule out that option, obviously). Well, at least now we have more, or better, questions to an unknown answer. Thanks again.

  • piz_wu Level 1 (0 points)

    I have a similar issue as OP, wondering if OP resolved this issue. 

    When I plugged in an bluetooth usb dongle, OS shows as /dev/tty.usbmodemfd121 but it cannot be recognized what it's shown as Busy status.