Page 1 of 2

Virtualbox with USB wifi adapter: ath9k_htc driver

Posted: 19. Aug 2011, 06:25
by mctiew
I am having problem with virtualbox 4.1.2 ( also happens with older versions ) when using USB wifi adapter model WN TL722N, or for that matter, any USB wifi adapter which uses ath9k_htc driver. I can never get it to go pass the firmware loading, sample output is this :-

usb 1-1: new high speed USB device number 4 using ehci_hcd
usb 1-1: New USB device found, idVendor=0cf3, idProduct=9271
usb 1-1: New USB device strings: Mfr=16, Product=32, SerialNumber=48
usb 1-1: Product: USB2.0 WLAN
usb 1-1: Manufacturer: ATHEROS
usb 1-1: SerialNumber: 12345
usb 1-1: ath9k_htc: Transferred FW: htc_9271.fw, size: 51272
ath9k_htc 1-1:1.0: ath9k_htc: Target is unresponsive
Failed to initialize the device
ath9k_htc: probe of 1-1:1.0 failed with error -22

Both my guest OS and host OS are kernel 3.0.1.

I have searched the net quite extensively, and it seems everyone is able to get this model of USB interface working, except in Virtualbox. In fact, there are quite a few articles about such report that it is not working in VirtualBox.

I have tested the same (converted) image inside VMPlayer 3.1.4. In VMPlayer, I could get it working by a hotplug. VMWare is also not able to get the device working from a cold boot, while the same image is working from cold boot, if one were to boot natively on a physical computer.

Besides my own created image, I have also tested BackTrack 5, which is downloaded from internet, and found that the device has the exact same problem. Though BackTrack 5 is using slightly older kernel than I am, the same behaviour can be repeated, that is :-

1. Boot natively on physical computer BT5 is working with the USB interface.
2. Boot using BT5 iso in VMPlayer 3.1.4, the device is working if I do a hotplug.
3. Boot using VirtualBox 4.1.3, nothing is working, always get Target is unresponsive.

I really want to use VirtualBox for my emulation work because of certain features which is lacking in VMPlayer. I hope someone could attend to this.

Thank you.

Re: Virtualbox with USB wifi adapter: ath9k_htc driver

Posted: 19. Aug 2011, 08:43
by Martin
Does this wifi adapter change its USB product ID after loading the firmware?

Re: Virtualbox with USB wifi adapter: ath9k_htc driver

Posted: 19. Aug 2011, 09:14
by mctiew
Not that I know of.
I run 'lsusb' I still get the same VID:PID, ie 0cf3:9271.

Re: Virtualbox with USB wifi adapter: ath9k_htc driver

Posted: 22. Aug 2011, 19:37
by rhaven
Hi mctiew
I am also trying to get my WN722N wireless usb card to work. No success yet. I am using Virtualbox 4.1.2 and the guest OS is debian 2.6.32 .

I have installed compat-wireless to get the ath9k_htc driver.
However when I connect the usb device in virtual box dmesg displays the following

Code: Select all

[  117.604627] usb 1-2: new full speed USB device using ohci_hcd and address 3
[  118.301240] usb 1-2: New USB device found, idVendor=0cf3, idProduct=9271
[  118.301246] usb 1-2: New USB device strings: Mfr=16, Product=32, SerialNumber=48
[  118.301250] usb 1-2: Product: USB2.0 WLAN
[  118.301252] usb 1-2: Manufacturer: ATHEROS
[  118.301255] usb 1-2: SerialNumber: 12345
[  118.303799] usb 1-2: configuration #1 chosen from 1 choice
[  118.763528] Compat-wireless backport release: compat-wireless-2011-07-27-1-g9276969
[  118.763532] Backport based on linux-next.git next-20110808
[  118.801175] cfg80211: Calling CRDA to update world regulatory domain
[  119.327176] usb 1-2: ath9k_htc: Transferred FW: htc_9271.fw, size: 51272
[  120.328138] ath9k_htc 1-2:1.0: ath9k_htc: Target is unresponsive
[  120.328166] Failed to initialize the device
[  121.253693] ath9k_htc: probe of 1-2:1.0 failed with error -22
[  121.253741] usbcore: registered new interface driver ath9k_htc
If you find a solution, or if anyone has some suggestions, much appreciated!

Re: Virtualbox with USB wifi adapter: ath9k_htc driver

Posted: 24. Aug 2011, 03:11
by mctiew
You have the same problem as I am.

I have almost given up on it already. Actually I tried a few usb adapters, sad to say that my conclusion is that for the purpose of using usb wifi adapter, virtualbox is not suitable for it. I tried TL WN722N ( ath9k_htc ), TL WN321G ( rt73usb ) and another one ( forgot the model) using rt2800usb. The finding is that it is easier to get it working inside VMplayer than in virtualbox. Somehow the USB passthrough fedelity in VirtualBox is not as good as VMWare. But I prefer to use VirtualBox because of certain feature not found in the VMPlayer.

Re: Virtualbox with USB wifi adapter: ath9k_htc driver

Posted: 26. Aug 2011, 07:16
by solamour
I have the exactly same problem; 0cf3:9271 Atheros doesn't work in VirtualBox guest (Gentoo Linux). I'd like to hear if anyone is able to get it working.
__
sol

Re: Virtualbox with USB wifi adapter: ath9k_htc driver

Posted: 26. Aug 2011, 14:40
by mctiew
Did you guys tested it using the same OS when it is run natively to see if it works ? I did.

But if you guys also tested it, then it is more conclusively that this is a virtualbox issue. Perhaps this should be filed as a bug on the bug tracker somewhere ?

Re: Virtualbox with USB wifi adapter: ath9k_htc driver

Posted: 26. Aug 2011, 20:47
by solamour
I did try the USB device in a native environment rather than in a virtual machine, and it worked as expected. So I'm fairly positive the setup is correct and the issue is in the VirtualBox's USB interface. I might need to see the bug list and see if it's already filed.
__
sol

Re: Virtualbox with USB wifi adapter: ath9k_htc driver

Posted: 27. Aug 2011, 20:00
by rhaven
same for me, i plug it in and works right away when not using virutalbox. I guess it is a bug. Searched a bit, but didnt find our bug in the tracker. Let me know if you'v filled one already,
cheers

Re: Virtualbox with USB wifi adapter: ath9k_htc driver

Posted: 27. Aug 2011, 20:27
by solamour
I filed the following.

USB WiFi ath9k_htc device not initialized in Linux guest
http://www.virtualbox.org/ticket/9511

Come to think of it, perhaps it's not specific to ath9k_htc; it might be applicable to other USB WiFi devices, but I don't have anything else to test, so feel free to chime in and share your experience.
__
sol

Re: Virtualbox with USB wifi adapter: ath9k_htc driver

Posted: 28. Aug 2011, 02:03
by mctiew
I have tested two other models of usb wifi adapters ( rt73usb and rt2800usb), both are not working in virtualbox, while they work nicely in VMplayer using the same image. As I am only interested to test Master Mode, I did not check out the client mode. When I searched the net, I also come across reports that virtualbox is not working with their other models of WIFI adapters ( eg AR9170 ), most using the adapters in client mode.

Re: Virtualbox with USB wifi adapter: ath9k_htc driver

Posted: 5. Feb 2013, 22:35
by newbsftw
Same issue here, people still filling up the same bug report over and over again (last one was 8 hours ago, and now mine!!) --> https://www.virtualbox.org/ticket/9511, so /me thinks that Oracle should start to give a bit more priority to this I guess.

Re: Virtualbox with USB wifi adapter: ath9k_htc driver

Posted: 1. Mar 2013, 12:12
by bejelith
Same problem here, TPLINKWN722N and VirtualBox 4.2.6 r82870

Re: Virtualbox with USB wifi adapter: ath9k_htc driver

Posted: 16. Apr 2013, 07:39
by narusuke
Host : Linux Mint 14 MATE (Kernel Linux 3.5.0-22-generic)

Guest : Linux Kali / Backtrack 6 (Kernel Linux 3.7-trunk-amd64)

VBox Version : 4.2.10 r84104 (Latest Version)

Wireless Adaptor : Alfa AWUS036NHA

Chipset : Atheros AR9271 / Atheros UB91C

On the host my alfa work perfectly, but on my guest is like this :

[ 2023.183715] usb 1-1: Product: UB91C
[ 2023.183723] usb 1-1: Manufacturer: ATHEROS
[ 2023.183730] usb 1-1: SerialNumber: 12345
[ 2023.185712] usb 1-1: ath9k_htc: Firmware htc_9271.fw requested
[ 2023.623632] usb 1-1: ath9k_htc: Transferred FW: htc_9271.fw, size: 51272
[ 2024.624291] ath9k_htc 1-1:1.0: ath9k_htc: Target is unresponsive
[ 2024.624344] ath9k_htc: Failed to initialize the device
[ 2024.646098] usb 1-1: ath9k_htc: USB layer deinitialized

Re: Virtualbox with USB wifi adapter: ath9k_htc driver

Posted: 16. Apr 2013, 08:02
by noteirak
None of you bothered to give a guest log file yet, when you tried this.
Read Minimum information needed for assistance.