12

I have the ESP32 board with Silicon Labs CP2102 controller. When I connect it to my MacBook, I can get the details about this device using the command system_profiler SPUSBDataType, but it is not listed in /dev as a virtual serial port - so I can't communicate with it.

    CP2102 USB to UART Bridge Controller:

      Product ID: 0xea60
      Vendor ID: 0x10c4  (Silicon Laboratories, Inc.)
      Version: 1.00
      Serial Number: 0001
      Speed: Up to 12 Mb/sec
      Manufacturer: Silicon Labs
      Location ID: 0x14200000 / 5
      Current Available (mA): 500
      Current Required (mA): 100
      Extra Operating Current (mA): 0

I'm using the official driver downloaded from https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers.

Any ideas how to make it visible in /dev? I have also Windows installed on the same computer where it works fine, so the HW and the USB cable are OK.

Dominik Palo
  • 2,873
  • 4
  • 29
  • 52

5 Answers5

16

I found that macOS High Sierra has blocked the SiLabs kernel extension.

Here are steps to allow this extension:

  1. Go to "System Preferences" -> "Security & Privacy"
  2. In the bottom of the window, you will see a message "System software from developer "SiLabs" was blocked from loading."
  3. Click on "Allow" button
  4. Restart your Mac

Now my device is listed as /dev/cu.SLAB_USBtoUART and everything work as expected.

Dominik Palo
  • 2,873
  • 4
  • 29
  • 52
  • 1
    Apple has an official technical note called "Technical Note TN2459: User Approved Kernel Extension Loading" which describes this new process that Apple added in MacOS X High Sierra. It applies to any third party kernel extension. All kernel extensions for MacOS X must be signed using a special key from Apple and then must be approved by the user. There is currently no extra level of certification available to third parties to allow Kernel Extensions to load bypassing this step. This is not a problem specific to this driver or specific to Silicon Labs. Its not a "bug". – brant Nov 07 '17 at 19:21
11

The Allow button did not work for me, so I had to disable checking altogether:

  1. Shut Down
  2. Hold mac+ R during boot to enter recovery mode
  3. Open a terminal
  4. type spctl kext-consent disable and press enter
  5. Reboot
  6. It worked
Vlad Nistor
  • 111
  • 1
  • 3
  • 1
    Using 10.13.6 and after following the install instructions for the SiLabs CP210x driver for Mac, the installer says it was successful but I never received the System security pop up at all so there was nothing to "accept". This was the only solution that worked for me. – Robert Walters Aug 27 '18 at 12:52
  • 1
    @RobertWalters 2 years on, but I had exactly the same problem as you - no message. The trick is to manually load the extension to make the message pop up: `sudo kextload /Library/Extensions/SiLabsUSBDriver.kext/` – gremwell May 04 '20 at 11:33
2

If you approved through Security settings but still can't see /dev/cu.SLAB_USBtoUART, most likely that you need a new micro-usb cable. It's not that your cable is broken, but some cables are only meant for power so they can't transfer data.

For me, I tried four cables and only the last one works, which comes from Sony (forgot where I got this cable though)

Ethan Yanjia Li
  • 711
  • 8
  • 13
  • I was 100% sure this couldn't be it. Then, literally four cables later, I found one that works. – alexose Oct 28 '20 at 22:19
1

For me I would install the driver but I never got the message in the Security & Privacy screen that I was supposed to "Allow". The solution:

sudo kextload /Library/Extensions/SiLabsUSBDriver.kext/

This will actually spit out an error:

/Library/Extensions/SiLabsUSBDriver.kext failed to load - (libkern/kext) system policy prevents loading; check the system/kernel logs for errors or try kextutil(8).

However, if you now go to System Preferences-> Security & Privacy, you'll find the necessary message and Accept button to allow the kext to load. Click that, plug in your device and check that there is a detected device:

ls /dev/cu.*

...
/dev/cu.SLAB_USBtoUART
...
gremwell
  • 1,419
  • 17
  • 23
0

Try another cable. You might be using one with only power connections, not data.

asc
  • 21
  • Welcome to stackoverflow, before ask any other question please read https://stackoverflow.com/help/how-to-ask – Ali Bigdeli Aug 15 '20 at 19:45
  • Actually this is a good suggestion. I also thought that it can't be a cable, while tried 3-4 cables in my box. But another worked. Problem was in cable. Thanks! – acidernt Dec 12 '22 at 15:18