WiFi USB Adapter hangs almost immediately

Discussions about using Linux guests in VirtualBox.
Post Reply
Nutbutters
Posts: 2
Joined: 19. Oct 2021, 16:57

WiFi USB Adapter hangs almost immediately

Post by Nutbutters »

Hello people, i've run into a bit of a problem and it seems like the problem originates from the virtual box.

So i have this DWA-140 rev. D WiFi usb and i tried to use it in the vm to scan some networks with kali.
This is my first time experimenting with that kind of stuff, usually the "eth" connection from the host is fine.

Now i made a filter for the stick so i plug it in, the os finds the drivers and attaches them. I can see APs in range. Seconds later i get hit with the "Vendor Request 0x07 failed for offset 0x0500 -110" and it stops.
Doesn't come back doesn't fix itself just stops working. It won't try again either just gives up.

Now it works in my host perfectly, both host and guest are updated and i even dragged the driver.bin to the guest just in case the kali one came broken but nothing seems to work.

I am interested in any potential solutions of course but if possible i would also like to understand what happens.
The driver is found, attached and the device works fully. What timed out? We are good just stop and chill. But it won't.And then it will fail. And now you are reading my sleep deprived rambling

dmesg bellow:

Code: Select all

[   53.984198] usb 1-2: config 1 interface 0 altsetting 0 endpoint 0x4 has invalid maxpacket 512, setting to 64
[   54.007922] usb 1-2: New USB device found, idVendor=2001, idProduct=3c20, bcdDevice= 1.01
[   54.007934] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   54.007941] usb 1-2: Product: 802.11 n WLAN
[   54.007945] usb 1-2: Manufacturer: Ralink
[   54.007949] usb 1-2: SerialNumber: 1.0
[   54.461829] usb 1-2: reset full-speed USB device number 4 using ohci-pci
[   54.969682] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 5392, rev 0223 detected
[   56.019020] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 5372 detected
[   56.028205] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[   56.137335] ieee80211 phy1: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[   56.137360] rt2800usb 1-2:1.0: firmware: direct-loading firmware rt2870.bin
[   56.137362] ieee80211 phy1: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
[   71.253870] ieee80211 phy1: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x0500 with error -110   


Also the ifconfig for the little bit it's up then wlan0 disappears from the list:

Code: Select all

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255
        inet6 fe80::a00:27ff:fe3d:e073  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:3d:e0:73  txqueuelen 1000  (Ethernet)
        RX packets 91  bytes 29027 (28.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 107  bytes 12933 (12.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 8  bytes 400 (400.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 8  bytes 400 (400.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 36:d3:79:8e:bd:57  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
Lastly it appears always on lsusb so my slot seems to be fine. i run it through usb 2.0 and i don't have a 3.0 slot


:(
Last edited by scottgus1 on 19. Oct 2021, 17:31, edited 2 times in total.
Reason: removed barely-obfuscated expletive
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: WiFi USB Adapter hangs almost immediately

Post by scottgus1 »

Please go through USB basics and troubleshooting and doublecheck your setup against this tutorial. If steps 1 through 7 cannot get your device working, please provide the troubleshooting command outputs in step 8, as text. Also zip and post the requested vbox.log, using the forum's Upload Attachment tab.

Also, note that the USB 3 Virtualbox stack is said by the developers to be more robust than USB 2. Even if you don't have a USB 3 port on the host, a USB 3 system in the VM will run better. USB 2 devices will pass through a USB 3 VM connection.
Nutbutters
Posts: 2
Joined: 19. Oct 2021, 16:57

Re: WiFi USB Adapter hangs almost immediately

Post by Nutbutters »

Ok so :

id

Code: Select all

uid=1000(george) gid=100(users) groups=100(users),454(vboxusers),459(plugdev)
extpacks

Code: Select all

Extension Packs: 0
usbhost

Code: Select all

Host USB Devices:

UUID:               76cc27a1-35d0-4c73-b66e-2b2d80539a35
VendorId:           0x8087 (8087)
ProductId:          0x0a2a (0A2A)
Revision:           0.1 (0001)
Port:               6
USB version/speed:  2/Full
Manufacturer:       Intel Corp.
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7//device:/dev/vboxusb/001/004
Current State:      Busy

UUID:               c4d649c0-c228-4ac6-b95b-b93d7dc34528
VendorId:           0x2001 (2001)
ProductId:          0x3c20 (3C20)
Revision:           1.1 (0101)
Port:               1
USB version/speed:  2/High
Manufacturer:       Ralink
Product:            802.11 n WLAN
SerialNumber:       1.0
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2//device:/dev/vboxusb/001/005
Current State:      Available

UUID:               f9700009-1cd3-490e-9478-c36541d80493
VendorId:           0x1532 (1532)
ProductId:          0x0527 (0527)
Revision:           80.2 (8002)
Port:               0
USB version/speed:  2/Full
Manufacturer:       Razer
Product:            Razer Kraken Ultimate
SerialNumber:       00000000
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1//device:/dev/vboxusb/001/002
Current State:      Busy

UUID:               d91810a8-c372-4733-94a8-53a28b07a0ee
VendorId:           0x046d (046D)
ProductId:          0xc534 (C534)
Revision:           41.1 (4101)
Port:               2
USB version/speed:  2/Full
Manufacturer:       Logitech
Product:            USB Receiver
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3//device:/dev/vboxusb/001/003
Current State:      Busy

showvminfo

Code: Select all

Name:                        Kali
Groups:                      /
Guest OS:                    Debian (64-bit)
UUID:                        47fcac2f-7caa-4ad6-8bd2-d95e6d321a8a
Config file:                 /home/George/VirtualBox VMs/Kali/Kali.vbox
Snapshot folder:             /home/George/VirtualBox VMs/Kali/Snapshots
Log folder:                  /home/George/VirtualBox VMs/Kali/Logs
Hardware UUID:               47fcac2f-7caa-4ad6-8bd2-d95e6d321a8a
Memory size:                 3151MB
Page Fusion:                 disabled
VRAM size:                   16MB
CPU exec cap:                100%
HPET:                        disabled
CPUProfile:                  host
Chipset:                     piix3
Firmware:                    BIOS
Number of CPUs:              1
PAE:                         disabled
Long Mode:                   enabled
Triple Fault Reset:          disabled
APIC:                        enabled
X2APIC:                      enabled
Nested VT-x/AMD-V:           disabled
CPUID Portability Level:     0
CPUID overrides:             None
Boot menu mode:              message and menu
Boot Device 1:               Floppy
Boot Device 2:               DVD
Boot Device 3:               HardDisk
Boot Device 4:               Not Assigned
ACPI:                        enabled
IOAPIC:                      enabled
BIOS APIC mode:              APIC
Time offset:                 0ms
RTC:                         UTC
Hardware Virtualization:     enabled
Nested Paging:               enabled
Large Pages:                 disabled
VT-x VPID:                   enabled
VT-x Unrestricted Exec.:     enabled
Paravirt. Provider:          Default
Effective Paravirt. Prov.:   KVM
State:                       powered off (since 2021-10-20T14:36:19.570000000)
Graphics Controller:         VMSVGA
Monitor count:               1
3D Acceleration:             disabled
2D Video Acceleration:       disabled
Teleporter Enabled:          disabled
Teleporter Port:             0
Teleporter Address:          
Teleporter Password:         
Tracing Enabled:             disabled
Allow Tracing to Access VM:  disabled
Tracing Configuration:       
Autostart Enabled:           disabled
Autostart Delay:             0
Default Frontend:            
VM process priority:         default
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):      1
Storage Controller Bootable (1):        on
IDE (1, 0): Empty
SATA (0, 0): /home/George/VirtualBox VMs/Kali/Snapshots/{bc952531-e080-4b36-b72b-68b4cea07e69}.vmdk (UUID: bc952531-e080-4b36-b72b-68b4cea07e69)
NIC 1:                       MAC: 0800273DE073, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 1 Settings:  MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)
NIC 2:                       disabled
NIC 3:                       disabled
NIC 4:                       disabled
NIC 5:                       disabled
NIC 6:                       disabled
NIC 7:                       disabled
NIC 8:                       disabled
Pointing Device:             USB Tablet
Keyboard Device:             PS/2 Keyboard
UART 1:                      disabled
UART 2:                      disabled
UART 3:                      disabled
UART 4:                      disabled
LPT 1:                       disabled
LPT 2:                       disabled
Audio:                       enabled (Driver: PulseAudio, Controller: AC97, Codec: AD1980)
Audio playback:              enabled
Audio capture:               disabled
Clipboard Mode:              Bidirectional
Drag and drop Mode:          disabled
VRDE:                        disabled
OHCI USB:                    enabled
EHCI USB:                    disabled
xHCI USB:                    disabled

USB Device Filters:

Index:                       0
Active:                      yes
Name:                        Ralink 802.11 n WLAN [0101]
VendorId:                    2001
ProductId:                   3c20
Revision:                    0101
Manufacturer:                Ralink
Product:                     802.11 n WLAN
Remote:                      0
Serial Number:               1.0

Bandwidth groups:  <none>

Shared folders:<none>

Capturing:                   not active
Capture audio:               not active
Capture screens:             0
Capture file:                /home/George/VirtualBox VMs/Kali/Kali.webm
Capture dimensions:          1024x768
Capture rate:                512kbps
Capture FPS:                 25kbps
Capture options:             

Guest:

Configured memory balloon size: 0MB

show filters command yielded no global filters but the one on the vm captures the usb successfully on plug in and on power-on

EDIT:
scottgus1 wrote:Also, note that the USB 3 Virtualbox stack is said by the developers to be more robust than USB 2. Even if you don't have a USB 3 port on the host, a USB 3 system in the VM will run better. USB 2 devices will pass through a USB 3 VM connection.
I was running it on usb3, the physical port was usb2 but i didn't know there was an actual reason so thanks for the info :D
Attachments
Kali-2021-10-20-17-36-19.zip
The log
(31.12 KiB) Downloaded 5 times
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: WiFi USB Adapter hangs almost immediately

Post by scottgus1 »

Thanks for the info!

OK, so far this one is easy:
Nutbutters wrote:Extension Packs: 0
the vbox.log wrote:00:00:00.945758 Installed Extension Packs:
00:00:00.945783 None installed!
The Oracle Extension Pack is required for USB 2 & 3, but it is not installed.

Curiously, this need for the EP is pointed out in USB Basics post #4 step 1:
Make sure that the Extension Pack (ExtPack) is installed on the host.
I don't know why this was skipped?

Also, you're running the SUSE fork of Virtualbox:
the vbox.log wrote:00:00:00.935854 VirtualBox VM 6.1.26_SUSE r145957 linux.amd64 (no date no time) release log
We don't technically support the forks here. Be prepared to uninstall the fork and install from Official Virtualbox https://www.virtualbox.org/wiki/Linux_Downloads if the complete tutorial does not get the adapter working.
Post Reply