Results 1 to 10 of 21

Thread: Wireless USB problem in Ubuntu with VirtualBox vm

Hybrid View

  1. #1
    Join Date
    Jan 2013
    Beans
    10

    Wireless USB problem in Ubuntu with VirtualBox vm

    Hello Ubuntu Forum,

    Does anyone know how to get TP-Link TL-WN722N wireless USB adaptor working in Ubuntu with VirtualBox as the virtual machine running Ubuntu?

    This adapter works fine in Ubuntu when using VMware as the virtual machine, but fails to work when using VirtualBox. Any suggestions?

    When I do a lsusb i get this:

    Code:
    :~$ lsusb
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 002 Device 002: ID 80ee:0021 VirtualBox USB Tablet
    Bus 001 Device 002: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
    but when I do a ifconfig, wlan0 wont show up.

    Doing an ifconfig wlan0 up shows this:

    Code:
    :~$ ifconfig wlan0 up
    wlan0: ERROR while getting interface flags: No such device
    and a iwconfig:

    Code:
    :~$ iwconfig
    lo        no wireless extensions.
    
    eth0      no wireless extensions.


    Computer Set-up Info
    :
    Virtual machine: VirtualBox 4.2.6
    Guest OS: Ubuntu 12.04.1 LTS
    Host OS: Mac OS X 10.8.2
    USB Wireless Adaptor: TP-Link TL-WN722N

    Thank you
    Last edited by uusr1; January 10th, 2013 at 08:37 AM.

  2. #2
    squakie is offline I Ubuntu, Therefore, I Am
    Join Date
    Oct 2012
    Beans
    2,238
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Wireless USB problem in Ubuntu with VirtualBox vm

    Did you install the guest additions to the virtualbox vm? It should give you access to your USB device. However, I would have thought that defining the network connection as NAT would have sufficed.

  3. #3
    Join Date
    Jan 2013
    Beans
    10

    Re: Wireless USB problem in Ubuntu with VirtualBox vm

    Hello Squakie,

    Yes, I have Guest Additions on VirtualBox installed. As for defining the network as NAT, I think I did that. In the vm settings I clicked on Adapter 2 then on Enable Network Adpater. I went to the Advanced section. For the adapter type I have the default Intel PRO/1000 MT Desktop. I didn't see TP-Link or Atheros there.

    After doing that I went to the Terminal window and did lsusb


    Code:
    lsusb
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 002 Device 002: ID 80ee:0021 VirtualBox USB Tablet
    Bus 001 Device 002: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
    My wireless chipset is shown again like last time (Atheros Communication...)
    but when I do an ifconfig wlan0 isn't there:

    Code:
    ifconfig
    eth0      Link encap:Ethernet  HWaddr 08:00:27:ef:ae:f1  
              inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
              inet6 addr: fe80::a00:27ff:feef:aef1/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:73 errors:0 dropped:0 overruns:0 frame:0
              TX packets:136 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:27006 (27.0 KB)  TX bytes:15753 (15.7 KB)
    
    eth1      Link encap:Ethernet  HWaddr 08:00:27:a8:18:3a  
              inet addr:10.0.3.15  Bcast:10.0.3.255  Mask:255.255.255.0
              inet6 addr: fe80::a00:27ff:fea8:183a/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:2 errors:0 dropped:0 overruns:0 frame:0
              TX packets:51 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:1180 (1.1 KB)  TX bytes:9414 (9.4 KB)
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:37 errors:0 dropped:0 overruns:0 frame:0
              TX packets:37 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:4705 (4.7 KB)  TX bytes:4705 (4.7 KB)
    and ifconfig wlan0 up:

    Code:
    ifconfig wlan0
    wlan0: error fetching interface information: Device not found
    iwconfig:

    Code:
    iwconfig
    lo        no wireless extensions.
    
    eth1      no wireless extensions.
    
    eth0      no wireless extensions.
    Adding another adapter only added another eth but not a wlan.

    Thank you for your response.

  4. #4
    Join Date
    Jun 2011
    Location
    The Shadow Gallery
    Beans
    6,744

    Re: Wireless USB problem in Ubuntu with VirtualBox vm

    defining NAT is for the built in network adaptor.

    If you are accessing the USB adaptor in the VM the network settings for the VM are redundant.
    Backtrack - Giving machine guns to monkeys since 2006
    Kali-Linux - Adding a grenade launcher to the machine guns since 2013

  5. #5
    squakie is offline I Ubuntu, Therefore, I Am
    Join Date
    Oct 2012
    Beans
    2,238
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Wireless USB problem in Ubuntu with VirtualBox vm

    Not sure I quite understand that - do you mean "built in" as to VirtualBox? I have wireless on my desktop that attaches via USB and my VM settings to NAT and it works great. I thought the idea was so that you didn't need to install a driver, but perhaps mine works out of the box and that was why I didn't need a driver? At any rate, what can we do to help the OP - do they need to install a driver?

    EDIT: Ah, I think I understand what you were saying now The op shouldn't need a driver because, like my setup, VirtualBox treats NAT as using a virtual ethernet adapter (not wireless) to connect to the host adapter (which can be wireless). I hope I have that right now. OP: don't try to connect with wireless in your VM - just try something like the browser and it should open up, I think.
    Last edited by squakie; January 10th, 2013 at 10:26 PM.

  6. #6
    Join Date
    Jun 2011
    Location
    The Shadow Gallery
    Beans
    6,744

    Re: Wireless USB problem in Ubuntu with VirtualBox vm

    Quote Originally Posted by squakie View Post
    Not sure I quite understand that - do you mean "built in" as to VirtualBox? I have wireless on my desktop that attaches via USB and my VM settings to NAT and it works great. I thought the idea was so that you didn't need to install a driver, but perhaps mine works out of the box and that was why I didn't need a driver? At any rate, what can we do to help the OP - do they need to install a driver?
    The network setting in virtualbox for the VM are for configuring networking using the HOST OS network adapter. So yes you are right it doesnt need a driver.

    To the OP, What do you want to do, use the HOST network adapter which is USB or use the USB adapter seperately in the VM as standalone?

    If the USB adapter you want to use is the one on your HOST then you dont need to do anything with USB in the VM.

    In the settings choose NAT if you want it to get its own IP from the host via DHCP, you wont see your USB listed.

    In the VM it will be seen as eth0 or eth1.

    it wont be seen as a USB device or wireless device in the VM, it will be seen as a hardwired ethx connection, if you want to use the USB as seperate stand alone wireless device in the VM then you need to choose the device from the devices menu and then you will lose connectivity on your host but gain USB wifi in the VM.
    Last edited by haqking; January 10th, 2013 at 10:30 PM.
    Backtrack - Giving machine guns to monkeys since 2006
    Kali-Linux - Adding a grenade launcher to the machine guns since 2013

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •