Bluetooth in a Windows 10 VirtualBox VM

Introduction

While all of my computers run Linux, sometimes it’s useful to have Windows – fortunately, not often. Due to the long wet grey dreary winters here in the WA state Puget Sound area, I recently got an indoor cycling trainer. You can use lots of different software with these. The software emulates rides in either the real world (based on video & GPS tracks) or the virtual world (like a video game). It connects to the trainer using Bluetooth or ANT+ to dynamically control the resistance (simulating hills) and measure the rider’s power output.

The only software I could find that runs natively on Linux is very basic and not well supported. These include Auuki and Golden Cheetah. I wanted something more full featured. The next best thing would be Android.

Android?

Most of the popular apps (Zwift, MyWhoosh, Rouvy, Kinomap, icTrainer, etc.) support Android. MyWhoosh was out of the question because it consumed 7 GB of space on my tablet before it could even start running. It is a big, slow, steaming pile of bloat-ware. Most of the others are too expensive for my frugal nature. So I started with icTrainer, which is less well known. At $30 per year, it is the least expensive of the non-free apps. They had great support, promptly answering a couple of questions I emailed them. Their Android app ran just fine on my old slow tablet. The rides I downloaded are huge since they have full video, and icTrainer stored them on the external SD card, which was a nice plus.

So far, so good. But I wondered if I could run indoor cycling software on my laptop, which runs Ubuntu 22. This would give me a bigger screen, and the ability to drive an even bigger external monitor. But it would require getting Windows to work.

Windows 10

First I installed VirtualBox on my Ubuntu 22 laptop, then unearthed an old Windows 10 installer ISO file and unused license key I had hanging around. The Win 10 install went fine and I installed the icTrainer Windows app, which also went fine. The problem was: how to get the Windows 10 VM to use the laptop’s Bluetooth so icTrainer could control the trainer?

I’ll cut to the chase. Start by ensuring that the Win10 VM is shut down.

First, shut down Ubuntu’s bluetooth service, so it releases the computer’s Bluetooth hardware.

sudo service bluetooth shutdown

Next, find the computer’s Bluetooth hardware. It’s considered a subset of the USB system, so list the USB devices:

lsusb

In the list, look for an entry related to Bluetooth. On mine, it is this:

Bus 001 Device 003: ID 8087:0a2b Intel Corp. Bluetooth wireless interface

Next, start the Win10 VM and then log into it.

In VirtualBox, go to USB Devices, look for that same device in the list, and check the box so VirtualBox so it can make it available to the VM.

Now in Win10, confirm that it’s there by going to “Device Manager” and finding the Bluetooth section. If it doesn’t appear, try rebooting the Win10 VM.

At this point, the Win10 VM has access to the computer’s Bluetooth and any apps that use Bluetooth (such as indoor cycling training programs) should work.