WiiLi Wiki frontpage Include your post in the News Get links Hoteles Quito
WiiLi.org Forum Index WiiLi.org
a new revolution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Accessing the Wiimote from Parallels VM on MacOS X

 
Post new topic   Reply to topic    WiiLi.org Forum Index -> Wii Remote and Nunchuck
View previous topic :: View next topic  
Author Message
volsung
Site Admin


Joined: 26 Nov 2006
Posts: 24

Digg It
PostPosted: Sun Nov 26, 2006 3:53 pm    Post subject: Accessing the Wiimote from Parallels VM on MacOS X

I blew much of my vacation trying to get the Wiimote to talk to OS X and failed. The reports about having to type in a PIN you may have seen are just because people didn't see the "Passkey Options" button in the Bluetooth Setup Assistant, and blindly kept pressing "Continue." However, if you select the "Do not use a PIN" option, the setup completes, but OS X never starts the HID driver. The Wiimote times out in 20 seconds, much like what happens in Linux if you don't run hidd after discovering the Wiimote with hcitool.

I've given up on OS X for now (the IOBluetooth and HIDManager APIs are of no use), and switched to doing development on an Ubuntu virtual machine running inside Parallels. Parallels lets you pass through USB 1.1 devices to the virtual machine, and the Bluetooth hardware on the MacBook (and I think the other Intel Macs) is either a Broadcom or a Cambridge Silicon Radio device on the internal USB connection.

When OS X boots, it takes control of the Bluetooth device, so it is not available to Parallels to share with the VM. However, I dug up handy tip in the Parallels forum: After the system boots, you can open up a terminal window and type:
Code:

sudo kextunload -b com.apple.driver.CSRUSBBluetoothHCIController
sudo kextunload -b com.apple.driver.AppleUSBBluetoothHCIController

The first command unloads the manufacturer specific driver, and the second command unloads the generic interface. If your Mac uses the Broadcom chip, you may have to swap out CSR for Broadcom in the first command. The kextstat command will show you all the loaded modules. If you get complaints that you can't unload the extensions, then they might be in use, and you should make sure to disable Bluetooth in the System Preferences and reboot first.

Once you have successfully disabled the Bluetooth driver, you can boot your VM and in the Devices / USB submenu, there will be a device labeled "Apple Wireless" which is the Bluetooth device. Click on it to connect, and it should be detected in the VM. (Depending on how fancy your Linux distribution is about detecting and initializing USB hardware, you might want to connect the device while grub is running so it is present at boot time.)

When you reboot OS X, the Bluetooth driver will be loaded again, and you will have to repeat the kextunload process to share it with Parallels.

Note that you should not attempt this if you have a Bluetooth keyboard or mouse! This cuts off all Bluetooth devices on the OS X side until you reboot! Attempt at your own risk. Your milage may vary. Void where prohibited.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> Wii Remote and Nunchuck All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group