USB-Reset not forwarded to the Host

Discussions related to using VirtualBox on Linux hosts.
Post Reply
TheEiken
Posts: 2
Joined: 12. Apr 2017, 11:05

USB-Reset not forwarded to the Host

Post by TheEiken »

Currently I'm developing a USB Device with DFU support (Device Firmware Upgrade).
To finalise the firmware upgrade, normally the application on the Windows/Linux System resets the USB Devicc via a USB Reset.

Everything works fine between the application in the guest system and the USB device.
But if the application sends the USB reset, it is not received by the USB device.
But it works, if the application runs in the host environment or in a direct installed Windows7 System (without virtualbox).
So from my point of view, the USB Device is not the problem and also not the application.
For me it seems, that the virtualbox blocks or does not forward the USB reset.

My question is, is this a feature or a bug? I was not able to find any hints/specification (google/this forum) which describes this behaviour or that someone else had this problem.
And if this a feature, can it be configured, that a USB reset is forwarded to the host system.

For Testing I'm working on an Ubuntu 16.04 (xenial) as host system.
Installed is VirtualBox 5.1.18 with the corresponding extension Pack (also installed in the guest).
The guest is a Windows7 system.

The USB device is connected to the windows system with the libusk driver. The application uses the libusb library. For the USB reset, the libusb_reset_device function of the libusb library is used.

The output of VBoxManage list extpacks and showvminfo is added.

Code: Select all

Extension Packs: 1
Pack no. 0:   Oracle VM VirtualBox Extension Pack
Version:      5.1.18
Revision:     114002
Edition:      
Description:  USB 2.0 and USB 3.0 Host Controller, Host Webcam, VirtualBox RDP, PXE ROM, Disk Encryption, NVMe.
VRDE Module:  VBoxVRDP
Usable:       true 
Why unusable: 

Code: Select all

Name:            Windows7Office
Groups:          /
Guest OS:        Windows 7 (64-bit)
UUID:            7f1f3d66-c49b-442a-9b7e-e7aa63cdbae3
Config file:     /data/vms/Windows7Office/Windows7Office.vbox
Snapshot folder: /data/vms/Windows7Office/Snapshots
Log folder:      /data/vms/Windows7Office/Logs
Hardware UUID:   7f1f3d66-c49b-442a-9b7e-e7aa63cdbae3
Memory size:     8192MB
Page Fusion:     off
VRAM size:       256MB
CPU exec cap:    100%
HPET:            off
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  4
PAE:             off
Long Mode:       on
Triple Fault Reset: off
APIC:            on
X2APIC:          off
CPUID Portability Level: 0
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): DVD
Boot Device (2): Floppy
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          on
BIOS APIC mode:  APIC
Time offset:     0ms
RTC:             local time
Hardw. virt.ext: on
Nested Paging:   on
Large Pages:     off
VT-x VPID:       on
VT-x unr. exec.: on
Paravirt. Provider: Legacy
Effective Paravirt. Provider: None
State:           running (since 2017-04-12T05:00:54.045000000)
Monitor count:   2
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address: 
Teleporter Password: 
Tracing Enabled: off
Allow Tracing to Access VM: off
Tracing Configuration: 
Autostart Enabled: off
Autostart Delay: 0
Default Frontend: 
Storage Controller Name (0):            IDE
Storage Controller Type (0):            PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  2
Storage Controller Port Count (0):      2
Storage Controller Bootable (0):        on
Storage Controller Name (1):            SATA
Storage Controller Type (1):            IntelAhci
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1):  30
Storage Controller Port Count (1):      2
Storage Controller Bootable (1):        on
IDE (0, 0): /usr/share/virtualbox/VBoxGuestAdditions.iso (UUID: c1d86086-1616-4285-887e-913e2885d0ed)
IDE (1, 0): Empty
SATA (0, 0): /data/vms/Windows7Office/NewVirtualDisk3.vdi (UUID: f4e4b116-542b-4c94-98ff-9f79841bc9eb)
NIC 1:           MAC: 080027CCD346, Attachment: Bridged Interface 'eth0', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 2:           disabled
NIC 3:           disabled
NIC 4:           disabled
NIC 5:           disabled
NIC 6:           disabled
NIC 7:           disabled
NIC 8:           disabled
Pointing Device: PS/2 Mouse
Keyboard Device: PS/2 Keyboard
UART 1:          I/O base: 0x03f8, IRQ: 4, disconnected
UART 2:          disabled
UART 3:          disabled
UART 4:          disabled
LPT 1:           disabled
LPT 2:           disabled
Audio:           enabled (Driver: PulseAudio, Controller: HDA, Codec: STAC9221)
Clipboard Mode:  Bidirectional
Drag and drop Mode: disabled
Session name:    GUI/Qt
Video mode:      1920x1140x32 at 0,0 enabled
VRDE:            enabled (Address 0.0.0.0, Ports 3389, MultiConn: off, ReuseSingleConn: off, Authentication type: null)
VRDE port:       3389
Video redirection: disabled
VRDE property: TCP/Ports  = "3389"
VRDE property: TCP/Address = <not set>
VRDE property: VideoChannel/Enabled = <not set>
VRDE property: VideoChannel/Quality = <not set>
VRDE property: VideoChannel/DownscaleProtection = <not set>
VRDE property: Client/DisableDisplay = <not set>
VRDE property: Client/DisableInput = <not set>
VRDE property: Client/DisableAudio = <not set>
VRDE property: Client/DisableUSB = <not set>
VRDE property: Client/DisableClipboard = <not set>
VRDE property: Client/DisableUpstreamAudio = <not set>
VRDE property: Client/DisableRDPDR = <not set>
VRDE property: H3DRedirect/Enabled = <not set>
VRDE property: Security/Method = <not set>
VRDE property: Security/ServerCertificate = <not set>
VRDE property: Security/ServerPrivateKey = <not set>
VRDE property: Security/CACertificate = <not set>
VRDE property: Audio/RateCorrectionMode = <not set>
VRDE property: Audio/LogPath = <not set>
USB:             enabled
EHCI:            enabled
XHCI:            disabled

USB Device Filters:

Index:            0
Active:           no
Name:             STMicroelectronics STM32  BOOTLOADER [2100]
VendorId:         0483
ProductId:        df11
Revision:         2100
Manufacturer:     STMicroelectronics
Product:          STM32  BOOTLOADER
Remote:           0
Serial Number:    315735643131

Index:            1
Active:           yes
Name:             UsbMOT
VendorId:         4223
ProductId:        
Revision:         
Manufacturer:     
Product:          
Remote:           
Serial Number:    

Index:            2
Active:           no
Name:             Vector Informatik GmbH Vector VN1630 [0001]
VendorId:         1248
ProductId:        1060
Revision:         0001
Manufacturer:     Vector Informatik GmbH
Product:          Vector VN1630
Remote:           0
Serial Number:    

Index:            3
Active:           yes
Name:             WIBU-SYSTEMS AG CodeMeter-Stick [0100]
VendorId:         064f
ProductId:        03e9
Revision:         0100
Manufacturer:     WIBU-SYSTEMS AG 
Product:          CodeMeter-Stick 
Remote:           0
Serial Number:    000002682699

Available remote USB devices:

<none>

Currently Attached USB Devices:

UUID:               87573a97-9287-4f49-8856-d235b5b09eaa
VendorId:           0x0483 (0483)
ProductId:          0x374b (374B)
Revision:           1.0 (0100)
Manufacturer:       STMicroelectronics
Product:            STM32 STLink
SerialNumber:       0669FF545152717267255725
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3//device:/dev/vboxusb/003/009

UUID:               02934d2c-2cb3-4bca-9c49-dbf9dedd5224
VendorId:           0x4223 (4223)
ProductId:          0x0001 (0001)
Revision:           2.0 (0200)
Manufacturer:       MOTORTECH
Product:            MIC100
SerialNumber:       000-001-00-3
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-6/3-6.4//device:/dev/vboxusb/003/024

Bandwidth groups:  <none>

Shared folders:  

Name: 'data', Host path: '/data' (machine mapping), writable

VRDE Connection:    not active
Clients so far:     0

Video capturing:    not active
Capture screens:    0
Capture file:       /data/vms/Windows7Office/Windows7Office.webm
Capture dimensions: 1024x768
Capture rate:       512 kbps
Capture FPS:        25

Guest:

Configured memory balloon size:      0 MB
OS type:                             Windows7_64
Additions run level:                 3
Additions version:                   5.1.18 r114002


Guest Facilities:

Facility "VirtualBox Base Driver": active/running (last update: 2017/04/12 05:01:02 UTC)
Facility "VirtualBox System Service": active/running (last update: 2017/04/12 05:01:18 UTC)
Facility "VirtualBox Desktop Integration": active/running (last update: 2017/04/12 05:03:09 UTC)
Facility "Seamless Mode": active/running (last update: 2017/04/12 05:01:02 UTC)
Facility "Graphics Mode": active/running (last update: 2017/04/12 05:01:02 UTC)
Last edited by socratis on 12. Apr 2017, 11:48, edited 2 times in total.
Reason: Included the attachments inline
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: USB-Reset not forwarded to the Host

Post by socratis »

  1. Please post the output of "VBoxManage -version".
  2. Try switching to USB3 for the guest, even if the host or the guest doesn't directly support it. Please read the following: USB basics and troubleshooting.
  3. Does the reset actually "resets" the USB VendorID/DeviceID of the device in question? You have set two very specific USB filters. Any chance that after the reset the deviceIDs aren't propagated?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
TheEiken
Posts: 2
Joined: 12. Apr 2017, 11:05

Re: USB-Reset not forwarded to the Host

Post by TheEiken »

Thanks for the fast response.
To point 1: 5.1.18r114002
To point 2: I've activated the USB3.0 for the guest and I've installed the Intel USB3.0 driver as described in the USB basics and troubleshooting, but the behavior stays the same.

To Point 3: The reset does not reset any IDs on the device. Also the VendorID and DeviceID of the device is the same for the device in DFU and Runtime mode. I can offer you the USB traffic dump of usbmon, if wanted. If I power off/on the USB device (in DFU mode) manually, which has the same effect as a USB reset, the deviceIDs are propagated immediately.

However, the current problem is, that the USB device does not receive a USB reset, if the application in the guest system initiates it. In non-guest environments it works.
Post Reply