| Wii OSC bridge in Python |
|
|
|
| Written by Andreas Böhler |
| Sunday, 24 May 2009 08:38 |
|
For a project at university we needed a way to communicate with various Nintendo Wii devices through Matlab. We found two projects dealing with Matlab and Nintendo-Devices, fWIIne and WiiLab. Unfortunately, there were some drawbacks: Both work only on Windows XP with Matlab, but not on Linux and MacOS. Therefore, we decided to do our own implementation in Python. ImplementationI implemented two Python scripts, a backend and a frontend. The frontend is a simple OSC server that waits for connections from Matlab or whatever OSC capable application and launches the backend as desired. The backend itself connects to the Nintendo devices, receives data and sends them via OSC. One backend for each device is launched (the underlying Bluetooth-Framework on OS X does not support threading). Prerequisites and LimitationsThe WiiMote, Nunchuk (even Wireless Nunchuks, at least the Datel Duo FX and Nyko Kama), Classic Controller (only tested on a Datel brand) and the BalanceBoard are supported at the moment. Windows XP, Mac OS X and Linux are supported. However, you need different other libraries in order to function properly. Windows XPYou need to have the WIDCOMM stack installed, other stacks simply won't work. Additionally, you need Python, pyliblo and pybluez installed. Mac OS XYou need to install XCode (for compiling lightblue and pyliblo) lightblue (as root), pyliblo and OSCulator (and launch it once to install the Kernel Driver). GNU/LinuxInstall some packages through your distribution's package manager: python-bluez, python-liblo and you are done. DownloadAnonymous access to our mercurial repository is possible by either browsing and downloading online at http://klasseonline.dyndns.org/hg/wiipy or by directly cloning the source via the 'hg' command: hg clone http://klasseonline.dyndns.org/hg/wiipy wiipy Then, simply launch wiipy_frontend.py and initiate a connection. HowTo and DocumentationSee the attached HowTo for installation instructions. Additional documentation is only available in German at the moment, again, see attachments. |
| Last Updated on Tuesday, 04 August 2009 13:39 |