• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Development Discussion v
« Previous 1 ... 35 36 37 38 39 ... 116 Next »

[Technical] Wiimote Bluetooth HID Question
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
[Technical] Wiimote Bluetooth HID Question
04-08-2015, 01:10 PM
#1
Flafla2
Unregistered
 
Hello all,

I'm new here, so apologies if this is in the wrong subforum (I thought about putting it in Delfino Plaza but that seems to be more general discussion than developer focused). This question has nothing to do with Dolphin, but I have a feeling some Dolphin devs may know the answer.

I am currently trying to write a (real) Wiimote bluetooth communication system similar to the one in Dolphin. I have communication working between the PC and the Wiimote, but when I get a response from the wiimote, it responds with an error code. For example, if I send the wiimote a simple LED change command:

Code:
0x11 0x10

... the wiimote responds with:

Code:
0x22 0x00 0x00 0x11 0x03

According to the Wiibrew Documentation this means that the wiimote has received the command 0x11 (LED Change), but has run into some sort of error. I don't know what this error actually means however. So, I guess my question is: What triggers the wiimote to respond with error code 0x03 when acknowledging an output report?

---

Here's some info that could help you help me fix this problem (if you graciously lend me your awesomeness for a moment Smile ):

1. I am using Signal11's HIDAPI to communicate with the Wiimote.
2. The command goes through correctly on Mac, but NOT on my Windows PC. My macbook is using the default Mac bluetooth driver. My PC is using the Broadcomm driver.
3. My theory is that, in the example given above, only two bytes are written to the remote, whereas on Windows 22 bytes are written (as reported by hidapi). So somehow this is throwing off the remote. This occurs because of a WinAPI WriteFile() limitation. However, Dolphin never does anything to circumvent this, so I may be wrong.

Sorry for the long post. If anyone can do anything to help, I would be really grateful!

- Flafla2
Reply
04-09-2015, 09:58 AM
#2
skid Offline
skidau / skid_au
**********
Developers (Some Administrators and Super Moderators)
Posts: 2,006
Threads: 8
Joined: Aug 2009
(04-08-2015, 01:10 PM)Flafla2 Wrote: This occurs because of a WinAPI WriteFile() limitation.  However, Dolphin never does anything to circumvent this, so I may be wrong.

Are you using a -TR wiimote? If so, the default Windows bluetooth stack doesn't work completely and the Toshiba bluetooth stack needs to be installed.
Find
Reply
04-10-2015, 12:20 PM
#3
Flafla2
Unregistered
 
(04-09-2015, 09:58 AM)skid Wrote:
(04-08-2015, 01:10 PM)Flafla2 Wrote: This occurs because of a WinAPI WriteFile() limitation.  However, Dolphin never does anything to circumvent this, so I may be wrong.

Are you using a -TR wiimote?  If so, the default Windows bluetooth stack doesn't work completely and the Toshiba bluetooth stack needs to be installed.

Interesting. I actually solved the problem by implementing a similar solution to what you guys use here - on the MS stack I use HidD_SetOutputReport() instead of WriteFile(). This seems to fix my issue.

I will keep this in mind though when dealing with the -TR remotes.

Thanks for your help!
Reply
04-10-2015, 02:20 PM
#4
tueidj Offline
Senior Member
****
Posts: 552
Threads: 0
Joined: Apr 2013
That's exactly why the MS stack doesn't work with -TR wiimotes; they don't accept output reports.
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode