Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to eject a USB HID Device from Mac OSX to use in Ubuntu VM?

I'm running Ubuntu 14.04LTS, 64bit via VirtualBox on a mac. I want to talk to a USB HID device from my VM via a python app (pyusb) but I can't select the device. From VirtualBox -> Devices -> USB Devices I see my device but it's grayed out.

I was hoping to find a command I could run on the mac terminal to 'let go' of it, but it's turning out to be more difficult than I imagined. On an Ubuntu VM via Windows 7, I can take control of the USB HID device via Devices -> USB Devices -> Select my device and talk to it just fine.

Is there some reason why this may not be possible on a mac?

like image 757
tarabyte Avatar asked Jan 11 '23 09:01

tarabyte


1 Answers

There is no concept of 'unmount in host OS to grab it in vm's OS'.

To get a normally plug-and-play device to work:

  1. Shut down the guest machine.
  2. Highlight the guest machine in the VirtualBox panel.
  3. Go to Settings for that vm -> Ports -> USB
  4. Click the green plus icon to add your device.
  5. Your usb device should now be visible, click to add that.
  6. Remove the USB device from your physical machine
  7. Start VB and guest OS (in my case Ubuntu 14.04 LTS, 64bit)
  8. Plug in USB device
  9. Inspect that the device has been captured by the vm's operating system in Devices -> USB Devices
like image 160
tarabyte Avatar answered Apr 29 '23 15:04

tarabyte