I've been using a program written by another coder which requires connection to the wiimote via compatible bluetooth dongle (such as the trendnet tbw-105ub) and the bluesoleil bluetooth driver. This program has been proven to run without flaw by the original coder on her XP-based computer. When I run the program on my computer, it reaches a certain line of code and then yields the blue screen of death (crash). Here is a list of things I have tried and ruled out:
1. I have downloaded, installed, and uninstalled bluesoleil about 50 times-no problem there (besides, it's so widely used without problem that this couldn't be it)
2. I've downgraded from Vista Business to XP Professional (didn't work, but still an improvement nonetheless)
3. I've tried working with the code, debugging until I narrowed it down to a single line (but that shouldn't be the problem because the code has executed flawlessly in the past)
4. I tried switching computers and successfully crashed my coworker's computer
5. I used the wiimote with a wii game console without any problems (so the wiimote is not malfunctioning here)
6. I tried removing the windows bluetooth drivers so they wouldn't interfere with bluesoleil
7. I tried updating the bluetooth driver to Broadcom (bluesoleil)
8. I tried a different, also compatible, dongle (still crashed)
9. I tried another program known to run perfectly fine (it also caused a crash-glovePIE and a wiimote tester program written by the same coder mentioned before)
10. I tried all of the above again, with the same results.
To give you more details, what happens is this:
The code calls a method WriteData():
that method will in turn call WriteReport();
private void WriteReport()
{
if(mAltWriteMethod)
HIDImports.HidD_SetOutputReport(this.mHandle.DangerousGetHandle(), mBuff, (uint)mBuff.Length);
else
mStream.Write(mBuff, 0, REPORT_LENGTH);
Thread.Sleep(100);
}
normally, this method works fine-it is called by other methods without a hitch, but when called by WriteData(), it goes to the if statement, returns false, and then goes to the else statement. when it gets to mStream.Write(mBuff, 0, REPORT_LENGTH); the computer crashes. This happens 100% of the time.
To summarize,
We have ruled out the following problems.
1. OS. We tried both Vista Business and Windows XP
2. Bluetooth dongle and driver. The dongle works fine with other Bluetooth devices
3. Wii remote hardware. Our remote works fine with the Wii station through Bluetooth.
Anyone have any idea what is going on?