Experiment 1: Interface a Nintendo Wiimote using Bluetooth radio and C++ in Microsoft Windows XP Professional Service Pack 2, using Microsoft VisualC++.NET 2003 Academic Edition. The interface consists of a DLL designed to be used as a language extension plug-in for DarkBASIC Professional. N.B. This DLL does not use .NET; it is straight up Win32.
06/07/08: I have a working DLL project with DBPro code that uses the classes exported by the library. There are three classes exposed as simple vectors, jzHID, jzDI8Device and jzBluetoothDevice. Each class uses some common code, and each also uses some unique code. The jzBluetoothDevice class is the least developed, and has little functionality at this time. The class jzHID is the one I am using now. jzDI8Device exposes the complete DirectInput 8 API. I have a class that exposes XInput too, but have not included it in this DLL yet. It seems a likely candidate for inclusion in the near term.
The code can find and connect to Wiimotes, and I can select the input report format fine. I attempted to enable the Nunchuk controller to some success, but I never got the data, despite writing a decryption function to satisfy the documentation that I have read. I am disappointed that there appears to be nothing in the way of reset for the Wiimote.
One thing about this type of project (Which I have repeated dozens of times with devices and PCs for a couple of decades, and then some.)...it is vital to be consistent about your methods, and their application and interpretation. I am lacking a graceful disconnect in my software. The Wiimote has an annoying way of flashing all of its lights when you stop talking to it, but that is a known state that I use to help me interpret results sometimes. I use BlueSoleil, and you can stop the HID service, and restart it. This makes the Bluetooth stack redo the service discovery, which is a part of the process I've yet to explore. I feel certain that there is a portion of functionality in there that I am missing. The SDP information would be of great benefit. Once I get the Bluetooth figured out, then it will be possible to expand the code to include all Bluetooth and all HID devices, as well as all DirectInput 8 compatible devices.
06/10/08: I have the Wiimote mostly sorted now. I only have one report that is still giving me some trouble, the Read Data report. That is preventing me from finishing, but I don't expect it will take me long to get it finished. I am spending some time on the DarkBASIC Pro side, and I will likely be adding some higher-level functions as a result. Most of the .NET based solutions provide that type of high level functionality.
The issue with enabling the Nunchuk and IR camera was that the Wiimote (like many devices) does not like it when you ignore its confirmation of your command request. I wrote a smarter sending routine in DarkBASIC Pro to accomodate the communications protocol exposed by Nintendo. Currently, I am using report 0x37, which is a very complete report with the Nunchuk attached. I was not aware that the Nunchuk had its own accelerometer. There is quite alot of data in report 0x37.
I work solely on the strength of donations. I am currently unemployed and I have not worked in the technology sector since late 2000. If you want to support my efforts, you can do so using PayPal. Thank you for your support in any event.