Enable host wifi adapter

Discussions related to using VirtualBox on Windows hosts.
Post Reply
travelnman
Posts: 3
Joined: 31. Dec 2016, 11:35

Enable host wifi adapter

Post by travelnman »

I use virtualbox to test software, which is often flakey or dangerous.

I created a windows 7 ultimate virtual guest.

This is a stand alone computer, connected to a public wifi (isp) network.

I am running a alfa usb radio , realtek drivers on the host system with a very powerful homebuilt antenna to increase signal strength.

Additionally the laptop itself has a built in wifi radio. which frequently connects at the same time as the realtek alfa radio. When both are connected I disconnect the laptop radio as it does not have the powerful antenna.

When I start my win7 virtual guest I sometimes get a connection and sometimes not. It connects through the laptop radio with either a virtualbox installed adapter or the laptop's, not sure which, but again no benefit from the antenna and thus my host internet is MUCH faster than the very slow VB/laptop connection.

When I tried to install the alpha drivers on the virtual machine my guest wifi would not work (no internet).
This is funny cuz the First time I installed them both guest and host wifi worked, but again guest was using internal laptop radio, no antenna (i think, no indication of signal strength from windows, cannot even see what network it's connected to)

I am a dummy when it comes to networking. I see provisions for multiple adapters in VB settings, but I am not sure how to benefit from the antenna and not cause conflicts. Any on topic, helpful, clear solutions much appreciated. If I cannot benefit under guest from the antenna (I think that's why its so slow) I will have to physically move the laptop to try to get a better signal from the wifi which is difficult since it's weak. Thanks for reading.
travelnman
Posts: 3
Joined: 31. Dec 2016, 11:35

Re: Enable host wifi adapter

Post by travelnman »

Ps, both the guest and host are win7 ultimate
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Enable host wifi adapter

Post by mpack »

The basic way to ensure that you can use a USB device in a VM is to make sure that the host isn't already using it, because USB devices can't be shared and sometimes the host just doesn't want to say goodbye.

Some tips on getting USB devices to work: Some USB tips for Windows Hosts. I assume you know that you have to install the driver in every guest that uses the device - the guest can't use the host driver.

Also, I assume it's obvious that the host will lose the network connection if the guest has it, so make sure the host isn't hogging the PC trying to reestablish a broken connection. Also make sure that the guest isn't trying to access the network using NAT or bridged while also accessing the same card using USB - as mentioned USB devices can't be shared, so that simply isn't going to work.

Important note: benchmarking apps run inside a VM are usually not reliable because the timer is shared with the host. For example, if you were using an app that tested the speed of network connections. OTOH if you were using an app such as inSSIDer or ViStumbler that just report signal strength as a percentage of packets lost then I'd expect that to work fine. If you want top performance in the guest then I'd consider configuring a VirtIO (vm aware) network adapter. This bypasses the overhead of simulating a network card at the chipset level.

As it happens, I've been spending my xmas hols learning very similar stuff: Alfa USB NIC, various antennas - and watching Andrew McNeils's YouTube videos? However I have not tried to access the Alfa from inside a VM. I may do if you continue having problems... though my time may be limited by new year celebrations today and tomorrow.
travelnman
Posts: 3
Joined: 31. Dec 2016, 11:35

Re: Enable host wifi adapter

Post by travelnman »

Thanks mpack for your reply.

I get the part about usb device not being able to share connection for both host and guest.

So I guess the next logical question is how to switch between guest and virtual box to use the one usb radio.

If I exit the usb/wifi software on the host thus terminating the connection and I have installed the same drivers on the guest, will I then be able to use the usb/antenna/radio on the guest or will the adapter drivers installed by VM by default(without any input by me) interfere or block the other drivers from establishing a connection? What are all the extra wifi adapter (I think there are 3) in settings in VM used for?

I do not have to use any benchmarking software to know that same page, under same cache conditions loads in twice the time on the guest wifi connection as same page on the host. All I need to do is use a stopwatch.
The slow loading of wifi pages on the guest is because it's not using the antenna that I have connected to the usb radio on the guest.

I need a way to switch the use of the radio/antenna combination from host to guest and vice versa.

The alfa radio is a very good radio with a strong receive sensitivity and extends my range by quite alot. The homemade parabolic antenna I made in an afternoon is very good, but I cannot use it on guest so far.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Enable host wifi adapter

Post by mpack »

You should follow the "tips" I linked to above to get the USB working in the guest.

The best way to ensure that the host isn't using a USB device is to manually unplug it, and replug it after the guest OS has finished booting up and is waiting for input, and has the focus. Of course I'm assuming you'll have defined a USB filter, per the instructions.
da_goldstein
Posts: 4
Joined: 15. Sep 2008, 03:06

Re: Enable host wifi adapter

Post by da_goldstein »

I know this is an old thread, but it looks similar to my problem, and i have tried everything listed above.

I am using a Windows 10 Host with a Linux Virtual PC.

I am trying to get Wifi access via a USB Wifi adaptor (TP-LINK Archur T2UH).

It shows as MediaTek Wifi 0100 , and I have performed the above steps.

The virtual computer does not seem to connect to the device, despite the check mark being on the wifi adaptor.

Is this adaptor just not compatible? It says it is compatible with Linux, and the prior version did seem to work.

Thanks for any help
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Enable host wifi adapter

Post by mpack »

Did you install Linux drivers for the device into your Linux guest?
da_goldstein
Posts: 4
Joined: 15. Sep 2008, 03:06

Re: Enable host wifi adapter

Post by da_goldstein »

Thanks for the reply.

I tried to install the drivers, but I got an error when trying to install it.

I downloaded the drivers for Linux from the link

http://www.tp-link.com/us/download/Arch ... tml#Driver

Is there a way for Linux to download the drivers automatically like windows update?

Thanks
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Enable host wifi adapter

Post by mpack »

You should quote precise error messages. Saying "I got an error" does not help us.

So far that sounds like a Linux support question. Behind that is a Linux related support question for your WiFi adapter (i.e. how to choose the correct driver for your OS, and whether such a driver exists). In both cases I can't answer because I'm not a Linux user, and anyway those Qs are somewhat off topic in a VirtualBox user forum.

A VirtualBox virtual PC is still just a PC. In your case a PC running Linux. You should do whatever is normal for a Linux PC in order to get your device working. I can't tell you what that consists of.

Are you sure you actually need the guest OS to own your WiFi adapter? Since it works on the host why not just let the host own it, and access it via NAT networking? The OP needed to access the card at a detailed level because he wanted to investigate WiFi antennas. You have not mentioned any similar requirement.
Post Reply