Page 1 of 1

(SOLVED) Ubuntu host Windows guest can't access USB port

Posted: 19. Mar 2016, 05:26
by theHedster
Ubuntu 14.0.4 Trusty host
USB MTP protocol driver installed
Added my user name to the vboxusers group
VirtualBox 5.0.16 r105871
Virtual Box Extensions installed
USB 2.0 enabled, USB filter added to Settings > USB "USB Filters" list
Windows 7 Professional guest
Guest Additions installed
Samsung USB drivers installed
Samsung Kies backup and maintenance manager installed
Samsung Galaxy Note 3 smartphone
USB debug and USB Media Access (MTP) enabled

See my further response below where I give the complete steps for getting the Win7 guest to recognise the Note 3. These instructions follow on from the prerequisites listed above.

The issue is that when the Windows 7 VM is running and Kies has been launched, plugging in the Note 3 phone immediately activates Nautilus, which captures the USB allowing one to browse the phone's inbuilt and SD card storage. Presumably, this prevents the Windows guest from seeing the phone.
I click the Unmount icon next to the phone entry to unmount the phone and then kill Nautilus.

Then, in Kies I click the option to search for a phone. Nothing happens. Can anybody help? As far as I know all the USB boxes have been ticked -- see the list of items above.

With a filter for the phone, looking in the Win7 Devices and Printer control panel does not show the phone as an USB device.

Re: Ubuntu host Windows guest can't access USB port

Posted: 19. Mar 2016, 11:29
by mpack
Re your first point: this isn't a Windows Guest problem because the guest isn't even involved until the device is successfully connected to the VM, at which point you wouldn't have a problem. You have an Ubuntu host problem, specifically with Nautilus. I'm not a Linux user so must leave it to someone else to offer Linux advice.

One tip: never use blank USB filters. A blank filter doesn't mean grab everything, it means grab one randomly selected thing. It is only reliable if you have NO other USB devices on your system, but I'll bet you have mouse, keyboard, maybe webcam too. Add a field or two to the filter to reliably identify the device.

Re: Ubuntu host Windows guest can't access USB port

Posted: 19. Mar 2016, 14:27
by Perryg
We need to information to actually be able to help you.

1) Post the guests log file ( as an attachment ). Right click on the guest in the Main Manager then click show log. Save and post as an attachment. Compress if it is too large to post.
2) Did you add your user name to the vboxusers group and at least log off and back on or better reboot?

Re: Ubuntu host Windows guest can't access USB port

Posted: 23. Mar 2016, 12:11
by theHedster
Ignore these instructions as they do not give the correct data required for the filter. See my correct procedure below.
Perryg wrote:2) Did you add your user name to the vboxusers group and at least log off and back on or better reboot?
Yes, added my user name to the vboxusers group. Created a USB filter using results of lsusb, as follows:

$ lsusb
Bus 002 Device 002: ID 04e8:6860 Samsung Electronics Co., Ltd Galaxy (MTP)

USB-filter-Samsung-Galaxy-Note-3.png
USB-filter-Samsung-Galaxy-Note-3.png (35.73 KiB) Viewed 5568 times
Shut down Win7 guest, Vbox, and Ubuntu, and restarted all in reverse order. When the Samsung Galaxy Note 3 was connected, Nautilus launched and showed Phone and SD-Card. Win7 still could not see the phone.

Re: Ubuntu host Windows guest can't access USB port

Posted: 23. Mar 2016, 14:10
by Perryg
I would remove the filter, it is not really needed in Linux, at least to test with. You need to verify that your user name is actually in the vboxusers group. This is the single biggest cause of failure besides using a fork of VirtualBox. Then use the devices tab at the top of the guest window to access the device you want to attach.

Re: Ubuntu host Windows guest can't access USB port

Posted: 4. Apr 2016, 04:43
by theHedster
ANSWER:
  1. In VirtualBox click the Win7 VM.
  2. Click Settings and then click USB.
  3. Launch the Win7 VM.
  4. Plug in the Samsung Note 3 phone. Nautilus will open and display the "SD Card" and "Phone" subdirectories.
  5. In Nautilus, unmount the Samsung Android device.
  6. In VirtualBox > Settings > USB, right-click in the USB Filters list, then click Add filter from device (or press the Alt-Ins keys). A pop-up list of connected USB devices appears at the mouse pointer.
  7. Click the Samsung_Android [0400] item. An USB filter with the same name is created.
  8. Edit the filter name if you wish, e.g. "Su Ling's Galaxy Note 3", by double-clicking on the new filter.
  9. Unplug the phone.
  10. Exit the Win7 VM, VirtualBox, and Ubuntu. Restart them in reverse order, Ubuntu, VirtualBox, and Win7.
  11. Plug in the phone again, and unmount it in Nautilus.
  12. In Windows, click on Start, then click Computer. The phone is shown as one of the connected devices.*
  13. In Windows Explorer, double-click on the phone icon, and the window should then display the Phone and SD Card folders.
* If in Windows you open Start > Devices and Printers, you will see a yellow warning ! triangle on the phone icon. Right-click on the phone and click Properties to see the list of modes the phone can potentially connect as.

There are no drivers for the CDC Serial mode but, as this is the first in the list, it causes the yellow ! triangle to appear on the phone icon. However, the phone is recognised as an MTP device by Windows. [Added 6 Apr 2016] You could install Android Studio to experiment whether that will allow you to access the phone using other modes.

Re: Ubuntu host Windows guest can't access USB port

Posted: 4. Apr 2016, 05:02
by theHedster
Perryg wrote:Then use the devices tab at the top of the guest window to access the device you want to attach.
I tried clicking the USB plug icon at the top of the Win7 VM window but it was faded and nothing occurred. The pop-up help said it is for viewing the activity of attached devices. There was nothing about adding devices.

Then I tried right-clicking and -- aha! -- there it was, listed with the other connected devices. You can add it by clicking the desired device, but if you want it recognised by the Win7 VM each time, see my instructions just above.