VirtualBox

Opened 8 years ago

Closed 7 years ago

#15400 closed defect (fixed)

USB: Can't enter a hexdecimal revision no at the USB device filter

Reported by: MicK Owned by:
Component: USB Version: VirtualBox 5.0.20
Keywords: filter Cc:
Guest type: all Host type: Windows

Description

I want to create a new USB filter entry using a revision number. But the input field for the revision number allows only 4-digit numbers, no letters (A-F).

Attachments (8)

VirtualBox_USBFilter_no_hexadecimal_revisionNo.png (25.0 KB ) - added by MicK 8 years ago.
no hexadecimal revison-No. possible
VirtualBox_USBFilter_no_hexadecimal_revisionNo_02.png (29.2 KB ) - added by MicK 8 years ago.
USB filter box tooltip
VirtualBox_USBFilter_no_hexadecimal_revisionNo_03.png (41.0 KB ) - added by MicK 8 years ago.
usb device manager during the execution of the VM
VirtualBox_USBFilter_no_hexadecimal_revisionNo_04.png (21.1 KB ) - added by MicK 8 years ago.
Virtualbox device manager
VirtualBox_USBFilter_no_hexadecimal_revisionNo_05.png (63.3 KB ) - added by MicK 8 years ago.
add usb device via select usb device
VirtualBox_USBFilter_no_hexadecimal_revisionNo_06.png (59.8 KB ) - added by MicK 8 years ago.
change revision no 01c01 to 2801
VirtualBox_USBFilter_no_hexadecimal_revisionNo_07.png (35.4 KB ) - added by MicK 8 years ago.
firmware with valid integer integer part and hex- fractional part
VirtualBox_USBFilter_no_hexadecimal_revisionNo_08.png (57.0 KB ) - added by MicK 8 years ago.
firmware with valid integer integer part and hex- fractional part USB Filter details

Download all attachments as: .zip

Change History (19)

by MicK, 8 years ago

no hexadecimal revison-No. possible

comment:1 by Frank Mehnert, 8 years ago

The revision number has the form of IIFF where II is the integer part of the revision while FF is the fractional part of the revision. For instance, revision 1.0 is encoded as 0100 (16-bit packed BCD). Which USB device has a revision number with a hexadecimal revision? Can you provide the output of

VBoxManage list usbhost

when this device is attached to your VirtualBox host?

comment:2 by MicK, 8 years ago

The tooltip of the input field of the USB filter box says clearly: "Sets the revision number for the filter. The format for the exact comparison is XXXX, where X is a hexadecimal number. An empty string will match any IDs.". Further, this representation is used also in the USB device Display and you can enter only 4 digits.(see screenshots 2 & 3).

Here is the list of my devices:

Host USB Devices:

UUID:               1406899a-6ca3-425e-ae03-f8005d7ce091
VendorId:           0x046d (046D)
ProductId:          0xc016 (C016)
Revision:           3.64 (0364)
Port:               0
USB version/speed:  2/High
Manufacturer:       Logitech
Product:            Optical USB Mouse
Address:            {745a17a0-74d3-11d0-b6fe-00a0c90f57da}\0014
Current State:      Busy

UUID:               4d09421f-51e5-4a03-8707-8589644bf5c9
VendorId:           0x0c72 (0C72)
ProductId:          0x000c (000C)
Revision:           28.1 (2801)
Port:               0
USB version/speed:  1/Full
Manufacturer:       PEAK System
Product:            VER1:PEAK    VER2:02.8.01        DAT :06.05.2004TIME:09:35:37
Address:            \\?\usb#vid_80ee&pid_cafe#7&25b9522b&0&2#{00873fdf-cafe-80ee-aa5e-00c04fb1720b}
Current State:      Captured

UUID:               6f38ecc7-3b11-4b7b-8391-c957b93429e4
VendorId:           0x0c72 (0C72)
ProductId:          0x000c (000C)
Revision:           28.240 (28240)
Port:               0
USB version/speed:  1/Full
Manufacturer:       PEAK System
Product:            VER1:PEAK    VER2:02.8.01        DAT :06.05.2004TIME:09:35:37
Address:            \\?\usb#vid_80ee&pid_cafe#7&25b9522b&0&3#{00873fdf-cafe-80ee-aa5e-00c04fb1720b}
Current State:      Captured

UUID:               177760a8-252a-477f-937b-2ed01cbc6cc6
VendorId:           0x0c72 (0C72)
ProductId:          0x000c (000C)
Revision:           28.255 (28255)
Port:               0
USB version/speed:  1/Full
Manufacturer:       PEAK System
Product:            VER1:PEAK    VER2:02.8.01        DAT :06.05.2004TIME:09:35:37
Address:            \\?\usb#vid_80ee&pid_cafe#8&326fc7b6&0&3#{00873fdf-cafe-80ee-aa5e-00c04fb1720b}
Current State:      Captured

UUID:               d3767a41-a47f-4311-9e7d-80f3a89d90e8
VendorId:           0xc251 (C251)
ProductId:          0x2723 (2723)
Revision:           1.0 (0100)
Port:               0
USB version/speed:  2/High
Manufacturer:       Keil Software
Product:            Keil ULINK-ME CMSIS-DAP
SerialNumber:       M0458CGE
Address:            {745a17a0-74d3-11d0-b6fe-00a0c90f57da}\0021
Current State:      Busy
Last edited 8 years ago by Frank Mehnert (previous) (diff)

by MicK, 8 years ago

USB filter box tooltip

by MicK, 8 years ago

usb device manager during the execution of the VM

in reply to:  1 comment:3 by MicK, 8 years ago

Replying to frank:

The revision number has the form of IIFF where II is the integer part of the revision while FF is the fractional part of the revision. For instance, revision 1.0 is encoded as 0100 (16-bit packed BCD). Which USB device has a revision number with a hexadecimal revision? Can you provide the output of

VBoxManage list usbhost

when this device is attached to your VirtualBox host?


Hello Frank, okay, I understand the system and searching for the reason. I have found the bug at line 42 in UIMachineSettingsUSBFilterDetails.cpp and now there are, in my humble opinion, two possible solutions:

  1. allow all hexadecimal characters like line 41 (matching the tooltip description)

-> perhaps the value must subsequently be converted to decimal internally to setup the USB-filter correct (preferred solution) OR

  1. allow 5 numbers and limited the range (from 0 to 65535 ?) and change the tooltip (bad solution, because everywhere in virtual box the USB revision-no is shown as hexadecimal number -> e.g. device manager)

Unfortunately I had no time previously to set up the build environment and solve the problem directly, but I hope my assist helps to fix it in a future release.. Thx!

comment:4 by Frank Mehnert, 8 years ago

MicK, actually the tooltip for the German translation is wrong. IIFF is correct, XXXX is wrong. But the output of

VBoxManage list usbhost

is very interesting. Could you also run

lsusb -v

on your host and attach the output to this ticket? The Revision 28.240 looks invalid. According to http://www.sprut.de/electronic/interfaces/usb/deskriptor.htm, bcdDevice cannot have no more than 4 digits.

comment:5 by Frank Mehnert, 8 years ago

MicK, could you provide the informtion I requested?

comment:6 by Socratis, 8 years ago

Frank, please take also a look at https://forums.virtualbox.org/viewtopic.php?f=2&t=79254 especially the second USB device where the SerialNumber is unusual; "12²". Parsing error perhaps?

comment:7 by Frank Mehnert, 8 years ago

socratis, thanks, but I don't think this is a problem. What I'm after in the context in this ticket is the weird format of the USB revision in some of the USB devices listed above.

comment:8 by MicK, 8 years ago

Hi Frank, hi socratis,

okay, the (my) main problem is that some manufacturers of USB adapters using a weird format of the usb revision from 0 to 255 instead of BCD-conform values (0-99) and the wrong german tool-tip translation.

But the bcdDevice field is NOT used by any usb driver (inside windows!, Linux ?) (see your sprut link - section bcdDevice ), so that's MAYBE possible to allow all (hex-)numbers in the revision field. The virtualbox devices manager read and convert them correct internally, only the filter input field blocks it ;-) .

See attachment 04 and USB HOST LIST

Thanks for your help & time! MicK

by MicK, 8 years ago

Virtualbox device manager

comment:9 by MicK, 8 years ago

Hi Frank, hi socratis, I just add the usb device(s) with the (wrong) revision id via "Add...selected usb device" to the filter and now all values accepted (attachment 05). After shut down and start up the keil adapter connects automatically, but the peak adapter [1cff] or [1c01]does not so (Virtualbox is showing that the filter is active!). If I change the revision number to 2801 [1c01] the adapter won't connect too :-( (attachment 06)

I know that this is not (directly) the beginning problem, but depends on it. best regards MicK

by MicK, 8 years ago

add usb device via select usb device

by MicK, 8 years ago

change revision no 01c01 to 2801

comment:10 by MicK, 8 years ago

Update: After consultation with the manufacturers I get updated firmware for the different adapters, so that the integer part is a valid BCD number. The fractional part is still 0xFF or 0xF1. Now does the USB filter and binds the CAN adapter correctly and the automatic connection, when the guest system start up, works. Furthermore, now works disconnect and re-connect, although the revision number is 0x33FF (51 255).

MicK see attachment 07 & 08

by MicK, 8 years ago

firmware with valid integer integer part and hex- fractional part

by MicK, 8 years ago

firmware with valid integer integer part and hex- fractional part USB Filter details

comment:11 by Frank Mehnert, 7 years ago

Resolution: fixed
Status: newclosed

Finally fixed in 5.1.10.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use