Page 1 of 1

USB Beaglebone Black device can not attach to VM: Failed to create a proxy device

Posted: 7. Mar 2018, 20:34
by mattbsea
Hello,

I have a Beaglebone Black device with an empty eMMC, which means the processor is trying to RNDIS boot over USB. I am running a Ubuntu 16.04 host with VirtualBox 5.2.8r121009 and the extension pack installed. My user account is a member of vboxusers and I can successfully attach other USB devices to the Guest VM. The Guest VM is also Ubuntu 16.04. My Laptop is a Dell Precision 7520 and the USB port is USB 3.0, however the device is USB 2.0.

When I attempt to attach the Beaglebone Black in RNDIS mode, VirtualBox gives this error:

Code: Select all

00:00:23.327630 ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={872da645-4a9b-1727-bee2-5585105b9eed} aComponent={ConsoleWrap} aText={Failed to create a proxy device for the USB device. (Error: VERR_READ_ERROR)}, preserve=false aResultDetail=0
Is there a fix for this issue?

I am configuring the VM using Vagrant:

Code: Select all

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/xenial64"

  config.vm.box_check_update = false
  config.ssh.forward_agent = true

  config.vm.synced_folder "../../tisdk/build/arago-tmp-external-linaro-toolchain/deploy", "/yocto_deploy"

  config.vm.provider "virtualbox" do |vb|
    vb.memory = '256'
    vb.customize ['modifyvm', :id, '--usb', 'on', '--usbxhci', 'on']
    vb.customize ["modifyvm", :id, "--ioapic", "on"]
    vb.customize ['usbfilter', 'add', '0', '--target', :id, '--name', 'Texas Instruments AM335x USB', '--vendorid', '0x0451', '--productid', '0x6141']
    vb.customize ["modifyvm", :id, "--hwvirtex", "on"]
  end

  config.vm.provision "shell", inline: <<-SHELL
    apt-get update
    apt-get dist-upgrade -y
    apt-get install -y tftpd-hpa tftp isc-dhcp-server
  SHELL
end
The device shows up in lsusb -v like this:

Code: Select all

Bus 001 Device 008: ID 0451:6141 Texas Instruments, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            2 Communications
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0451 Texas Instruments, Inc.
  idProduct          0x6141 
  bcdDevice            0.00
  iManufacturer          33 (error)
  iProduct               37 (error)
  iSerial                 0 
  bNumConfigurations      1
OTG Descriptor:
  bLength                 3
  bDescriptorType         9
  bmAttributes         0x03
    SRP (Session Request Protocol)
    HNP (Host Negotiation Protocol)
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           70
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          1 (error)
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol    255 Vendor Specific (MSFT RNDIS?)
      iInterface              2 (error)
      CDC Header:
        bcdCDC               1.10
      CDC Call Management:
        bmCapabilities       0x00
        bDataInterface          1
      CDC ACM:
        bmCapabilities       0x00
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 
      iInterface              2 (error)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Status:     0xb4e0
  (Bus Powered)
  ALT port is HNP Capable
  Debug Mode

And vboxmanage list usbhost shows:

Code: Select all

UUID:               1e1e0e25-b265-45cb-89b2-c284572242b6
VendorId:           0x0451 (0451)
ProductId:          0x6141 (6141)
Revision:           0.0 (0000)
Port:               2
USB version/speed:  2/Full
Manufacturer:       Texas Instruments
Product:            AM335x USB
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3//device:/dev/vboxusb/001/008
Current State:      Available

Re: USB Beaglebone Black device can not attach to VM: Failed to create a proxy device

Posted: 8. Mar 2018, 01:46
by socratis
mattbsea wrote:the processor is trying to RNDIS boot over USB
What does that mean, and is it a critical part of the functionality of the device?
mattbsea wrote:When I attempt to attach the Beaglebone Black
How? Filter or Device menu? Have you tried both methods?
mattbsea wrote:in RNDIS mode
Is there any other mode? If yes, what? Elaborate...

Re: USB Beaglebone Black device can not attach to VM: Failed to create a proxy device

Posted: 8. Mar 2018, 02:42
by mattbsea
socratis wrote:
mattbsea wrote:the processor is trying to RNDIS boot over USB
What does that mean, and is it a critical part of the functionality of the device?
RNDIS is a USB network boot mode. The device presents itself as a USB Ethernet adapter. It sends DHCP requests to the host, then attempts to download u-boot, the linux kernel, and the rootfs over TFTP. This processor goes into RNDIS automatically when the eMMC flash disk is not bootable. This is critical for loading software in a factory as the eMMC will be empty.
socratis wrote:
mattbsea wrote:When I attempt to attach the Beaglebone Black
How? Filter or Device menu? Have you tried both methods?
I have tried both methods. I tried booting the VM without the filter, then plug in the Beaglebone. And also booting the VM with the filter.

I also tried playing with the VM USB settings: Using OHCI vs XHCI.

For what it's worth, I can connect a USB Ethernet dongle to the VM. That doesn't solve my issue though.
socratis wrote:
mattbsea wrote:in RNDIS mode
Is there any other mode? If yes, what? Elaborate...
No, unfortunately this is the only USB mode that will work for factory loading the software.

I'm attaching a log file that shows manually attaching the USB Ethernet dongle, then detaching. Then attempting to attach (using a VM usb filter) the Beaglebone Black in RNDIS mode.