expose GPS device to virtualbox VM

1

1

Is it possible to expose a GPS device to a VM running on virtualbox? I hae found there are Android apps that can expose a GPS signal via Bluetooth to the computer, I was wondering if for a computer that has a working GPS signal incoming, can expose it to a vitualbox VM, as one would do for CPUs, GPUs, disks, USB devices and other devices. Any ideas?

EDIT: my best option on the hardware side right now is to plug my Android phone via USB to my Linux laptop, where the VM is running. Another option is Bluetooth, but seems more complicated.

719016

Posted 2013-01-25T11:51:19.833

Reputation: 2 899

You will probably need to specify how exactly the GPS signal is coming to the computer, because it's a huge difference if it's USB, serial port, bluetooth or something else. – Stefan Seidel – 2013-02-12T22:32:16.583

Answers

1

Spent too much of my time getting USB to work in virtualbox. It, in my opinion is inherently broken. You will get it to work once, but then it stops. I know this GPS dongle auto detects nicely in almost all OS's http://www.amazon.co.uk/GLOBALSAT-ND-100-Receiver-NetBook-Notebook/dp/B00286KXGU/ref=pd_sxp_f_pt

Experiment with other USB devices in virtualbox first - remember to create a filter for the device in the USB settings menu of virtualbox. If you find it works even after reboots etc then purchase the dongle above and then direct it's USB connection directly to the VM.

Occasionally, USB works fine all the time in Virtualbox - but when it stops ....

JohnnyVegas

Posted 2013-01-25T11:51:19.833

Reputation: 2 820

1

You can really only do this if the device can be accessed via Serial or USB.

Bluetooth used to be a common connection type for external GPS devices (before all smartphones got them built in!). In reality what happens is the the Bluetooth drivers expose a virtual USB interface. I'm fairly sure, given that VirtualBox USB support is somewhat sketchy, this wouldn't work. In any case, though smartphones had reasonable support for such things, PC's are rather more complex and you'd be unlikely to get it working. However, if your need is great, it might be worth investing some time and effort.

Get the GPS working with the host OS first and see if a virtual USB port is exposed. If it is, try to pass this port through to the VirtualBox guest OS.

Julian Knight

Posted 2013-01-25T11:51:19.833

Reputation: 13 389

I've never heard of Bluetooth creating a virtual USB. Its more likely they're using the Bluetooth Serial Port Profile.

– heavyd – 2013-01-25T14:54:18.993

1

Your GPS device is most likely to be connecting to you PC via the Bluetooth Serial Port Profile. This creates a COM port on the host which you should be able to use to communicate with the GPS.

If this is true, it should be pretty trivial to expose the COM port to the virtual machine. VirtualBox has that functionality built in.

heavyd

Posted 2013-01-25T11:51:19.833

Reputation: 54 755