En un nuevo MacBook16 ejecución de Catalina (10.15.1) recibo el siguiente error al intentar conectarse a un FTDI FT232R USB UART dispositivo.
Python 2.7.17 (v2.7.17:c2f86d86e6, Oct 19 2019, 16:07:15)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import serial
>>> ser = serial.Serial('/dev/tty.usbserial-A106NU2I', 38400, timeout=1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/cbagwell/.virtualenvs/toolbelt/lib/python2.7/site-packages/serial/serialutil.py", line 240, in __init__
self.open()
File "/Users/cbagwell/.virtualenvs/toolbelt/lib/python2.7/site-packages/serial/serialposix.py", line 268, in open
raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 16] could not open port /dev/tty.usbserial-A106NU2I: [Errno 16] Resource busy: '/dev/tty.usbserial-A106NU2I'
Veo los eventos siguientes en virtud de la aplicación de Consola:
006002.877344 python@(null): AppleUSBHostUserClient::openGated: could not open provider USB3.0 Hub . provider already opened for exclusive access by a kernel client
006002.878136 python@(null): AppleUSBHostUserClient::openGated: could not open provider USB2.0 Hub . provider already opened for exclusive access by a kernel client
Así que parece que algunos kernel cliente ya tiene el directorio "/dev/tty.usbserial-A106NU2I" archivo abierto con acceso exclusivo.
Mi pregunta es, ¿cómo puedo determinar el kernel de cliente (o extensión del kernel?) tiene este archivo abierto?
He intentado usar "sudo lsof | grep tty" y no se ve nada allí.
El dispositivo es visible y reconocida en Acerca de este Mac -> Informe de Sistema -> USB
Gracias!