Hi @manuelbl,
I arrived here from the other thread about the same issue, through your suggestion to my question.
I’m using an ESP32 WeMos Bluetooth WiFi Battery Board (wemosbat) 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 tried to unload using kextunload, but it doesn’t work:
$ 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 4 instances.
Failed to unload com.silabs.driver.CP210xVCPDriver - (libkern/kext) kext is in use or retained (cannot unload).
I restarted the computer, and got unload and remove it
sudo kextunload /Library/Extensions/SiLabsUSBDriver.kext/
sudo rm -rf /Library/Extensions/SiLabsUSBDriver.kext/
But, when I try to upload or go to serial monitor:
Checking size .pio/build/wemosbat/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 9.8% (used 32180 bytes from 327680 bytes)
Flash: [====== ] 62.4% (used 654300 bytes from 1048576 bytes)
Configuring upload protocol...
AVAILABLE: esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Error: Please specify `upload_port` for environment or use global `--upload-port` option.
For some development platforms it can be a USB flash drive (i.e. /media/<user>/<device name>)
*** [upload] Explicit exit, status 1
================================================================================================== [FAILED] Took 19.17 seconds ==================================================================================================
The terminal process "platformio 'run', '--target', 'upload', '--environment', 'wemosbat'" terminated with exit code: 1.
It’s not possible find the device. But, if I go to System Information, I can see CP2102 USB to UART there:
My question: when I got the error classes have instances
in kextunload
command, Can’t find out what the instances are and unload them one by one?
Thanks