MacOS – How to restart USB subsystem

macosrestartusb

I'm developing onto Arduino and sometimes the USB port that is being used stops working. Then I need to plug the device into another USB port. Once all the USB ports stop working I have to restart the machine which is really annoying.

As far as I remember there is a command which is able to restart the USB subsystem individually but I can't remember. How can I restart USBs without restarting the entire system?

I'm using macOS Sierra.

This is different to the question Resetting the USB port on a MacBook Pro as I need software-only solution as my USB ports get frozen – which means they stop working until full system restart. There must be a way of restarting the USB subsystem individually.

Best Answer

You can reset the USB Bus with the USB Prober.app. It's not included with XCode, but you can download it separately from the Apple Developer Download page. You will need to signup and login.

  1. search for iousbfamily
  2. Download the latest IOUSBFamily Log Release file (at the time of this post it was IOUSBFamiliy Log Release for OS X 10.9.3)
  3. Mount the .dmg and navigate to the directory with IOUSB-XXXXXX-log.
  4. DO NOT install. Just right click the package and "Show Package Contents"
  5. Unzip the Archive.pax.gz; the file USBProber.app will be in /Archive/DevTools/Hardware


Important:

Just launching the app will reset your USB bus. Make sure you you unmount any drives you don't want unceremoniously and improperly removed!

Related Question