Bluetooth with VirtualBox Guest

I know some of you are also using a Ubuntu VirtualBox Guest under a Windows Host. If you want to be able to use your Windows Bluetooth device in Ubuntu, you are going to have to use a workaround. To check from the Ubuntu Guest if BT is working, issue the following:

hciconfig -a

If you don’t have it installed, do so. If that returns nothing, chances are you are going to have to manually disable your bluetooth device and manually enable it in Windows Device Manager. A real pain in the ass, right? Fortunately, you can use Powershell and TaskManager to automate this. First, download the Powershell Device Management Module and follow the instructions to install it. After you unzip, make sure you select the DLL and “unblock” it via properties or else it won’t install.

Now create a powershell script called disable-enable.ps1 and put inside:

$device = "*Intel(R) Wireless Bluetooth(R)*"
Get-Device | where {$ -like $device} | Disable-Device
Get-Device | where {$ -like $device} | Enable-Device

Replace the name of your bluetooth device that you see in your Device Manager.

Now setup a task scheduler to run this script. My system does an auto login, so mine starts 1 min after the login. This allows VirtualBox to start up before this script runs. When you run hciconfig -a a couple of minutes after booting your machine, you should get some information instead of a blank line.