I’m using an ESP32 WeMos Bluetooth WiFi Battery Board (wemosbat).
My Mac Version: High Sierra, version 10.13.6 and sometimes I got upload or monitor the serial, sometimes I got the error:
Errno 16] could not open port /dev/cu.SLAB_USBtoUART: [Errno 16] Resource busy: '/dev/cu.SLAB_USBtoUART'
I use Visual Code with PlatformIO extension, but I face this erro even using any other program to access the board, for instance:
screen /dev/cu.SLAB_USBtoUART 115200
It’s important to notice that some times I get upload and open serial monitor with SiLabs driver, but not in a regular basis. Example: I got upload the binary to the board, if I try to open serial monitor, I need to repeat the process: unplug, plug, until Error 16 (Resource Busy) disappear. And I cannot identify what exactly happens before I got the connection.
I’ve already tried to
# unplug the board sudo kextunload /Library/Extensions/SiLabsUSBDriver.kext/ sudo kextload /Library/Extensions/SiLabsUSBDriver.kext/ # plug the board
But even with this procedure I got resource busy error (but as I said before, some times it works).
Doing more tests, some times I cannot unload driver even with board disconnected
# unplug the board $ sudo kextunload /Library/Extensions/SiLabsUSBDriver.kext/ (kernel) Can't unload kext com.silabs.driver.CP210xVCPDriver; classes have instances: (kernel) Kext com.silabs.driver.CP210xVCPDriver class com_silabs_driver_CP210xVCPDriver has 1 instance. Failed to unload com.silabs.driver.CP210xVCPDriver - (libkern/kext) kext is in use or retained (cannot unload).
How to know what exactly is using the resource, and how to release it in these cases?
Thank you for contacting to Silicon Labs Technical support regarding to CP210x VCP Driver.
To understand more about the problem, could you please provide us some information as below:
Any way, could you please try to check this on Silicon Labs latest VCP driver (download link is below)?
In addition, Could you please try to test after reset the SMC and NVRAM on your Mac machine?
Hi Quyen, thanks for your reply
1. Unfortunately I don't have access to any other similar Mac machine
2. I got the driver from Silabs site: https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers
But, looking for other solutions, when I opened the dmg file and open Troubleshooting folder:
I found out another pkg file:
First of all, I uninstalled the current driver, and installed this one (found in the troubleshooting folder)
So far, it’s working well. I get upload, open serial monitor, several times in a row, without unplug the board. I really don't know if this was the actual solution. Because I've already tried this (install this package) before without success.