Hi! It's the same problem posted by me and Alessandro on some other threads.
I think something has gone wrong after some Windows update (e.g., SP3 for XP) or similar.
Summing up, the issues are the following:
- if you have registered more than 1 wiimote and then you use only some of them, you get an exception while connecting (the option to check if the device is connected is just ignored at least in my experience);
- with some bluetooth stacks you can simply connect no more than 1 wiimote, since other ones, even if connected, are not seen and you get the exception.
I propose the following workarounds:
- connect all the wiimotes you registered or remove them from the list of bluetooth devices (simple, but boring and does not fix the issue)
- update the library by handling the exception: e.g., as exception raises, remove that wiimote from the collection, and continue working with the others; since this requires some changes in the code, it would be best if Brian does it and includes it in the next release; in the past I did some ad hoc changes (e.g., to handle more than one wiimote), but now I had to throw them away and fix dependencies all around my code to use the new version of the library, so it is just better to have a single source of code; I can provide a bit of help if needed;
- check with MS how they modified Bluetooth stuff and ask them for a bugfix (since, in particular, the setting to ignore unconnected devices is ignored
).
Bests,
Fabio.