| View previous topic :: View next topic |
| Author |
Message |
CarlKenner Site Admin
Joined: 29 Nov 2006 Posts: 614
Digg It |
Posted: Fri Dec 22, 2006 7:50 pm Post subject: |
|
|
chikin, don't do that! I tried that in GlovePIE 0.23 or something like that and it was a disaster. Most people couldn't accesss it because it skipped their one and only wiimote.
Instead I just number the wiimotes in the opposite order, from last to first, so that way the fake wiimotes all seem to end up at the end. It still thinks there are more wiimotes than there actually are on some computers, but nobody has noticed.
I'm not using Bluetooth or Sockets. I'm using HID. I'm using a delphi component, which I haven't looked at in detail, so I can't explain exactly how to do the low-level HID stuff. But I am writing 22 bytes to the HID device handle as though it was a file (even when the reports are less than 22 bytes). Unless the Bluetooth Fix menu is used, in which case I try HidD_SetOutputReport (if it exists, XP only) to send 22 bytes, and then only if HidD_SetOutputReport fails (or doesn't exist) I write to it like a file.
HidD_SetOutputReport fails but returns success on BlueSoleil, so the fix won't work on bluesoleil, which is why I default to the original behaviour. |
|
| Back to top |
|
 |
Dodger_
Joined: 21 Dec 2006 Posts: 15
Digg It |
Posted: Fri Dec 22, 2006 8:19 pm Post subject: |
|
|
| Yeah, I've been working out exactly what I have to do for C# or C++ and I'm well on my way now. I figured you might say you were using the same or similar HID component for Delphi that the WiinRemote author uses. I've found some useful articles that describe the low level HID process that I'll have to go through and I think I understand how the BlueSoleil SDK will have to fit into the picture for dynamic controller addition/removal. |
|
| Back to top |
|
 |
Kevin
Joined: 20 Dec 2006 Posts: 3
Digg It |
Posted: Fri Dec 22, 2006 11:45 pm Post subject: |
|
|
Thanks for the responses, guys. It looks like chikin was right - you don't have to write the header byte when using writefile.
Now that I can write data, I'll clean up the code and share it  |
|
| Back to top |
|
 |
Kevin
Joined: 20 Dec 2006 Posts: 3
Digg It |
Posted: Sat Dec 23, 2006 9:52 am Post subject: |
|
|
I've got a preliminary C++ wiimote wrapper working for Win32 (Bluesoliel).
You can get the source code from my blog. I can't post URLs here yet, so go to my webcomic (Simulated Comic Product), click on blog, and it should be the most recent post. |
|
| Back to top |
|
 |
Dodger_
Joined: 21 Dec 2006 Posts: 15
Digg It |
Posted: Sat Dec 23, 2006 2:09 pm Post subject: |
|
|
| Thanks for posting that Kevin! I was hung up on how to figure out what the correct device to open is because I didn't see how to get the vendor id/product id. Now that I've seen that you have to actually use CreateFile() first and THEN check the vid/pid, it's pretty clear now. |
|
| Back to top |
|
 |
Dodger_
Joined: 21 Dec 2006 Posts: 15
Digg It |
Posted: Mon Dec 25, 2006 6:34 am Post subject: |
|
|
| Is anyone attempting to use Windows HID and BlueSoleil with C++ or C#? I'm having difficulties finding the Wiimote using this method. I've talked to someone else and with the default Microsoft stack, the vendor and product ids appear properly, but they do not appear to with BlueSoleil. Can anyone else confirm this? |
|
| Back to top |
|
 |
Dodger_
Joined: 21 Dec 2006 Posts: 15
Digg It |
Posted: Tue Dec 26, 2006 2:58 am Post subject: |
|
|
| Well, I figured it out. ULONG in C/C++ is not ulong in C#. Ooops. |
|
| Back to top |
|
 |
|