Dolphin, the GameCube and Wii emulator - Forums

Full Version: DolphinBar + Wiimote does not work
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
(08-17-2016, 01:36 AM)JulianLoehr Wrote: [ -> ]Would you mind running my test program with your Wiimote and DolhpinBar? https://github.com/jloehr/Wiimote-HIDAPI/releases
Close Dolphin, connect your Wiimote to DolphinBar and set it to Mode 4. Then run that program, press some buttons on your Wiimote. After that press "Enter" in the CMD Window so it prints "Existing!" and send me the log (copy pase the CMD content, as it does not write to a log file; either per PM or pastebin). After that another "Enter" will close the CMD.

It searches for all connected Wiimotes, prints a lot of stuff about each connected HID, sets two LEDs on all found Wiimotes and then prints everything send from the Wiimotes. It is basically the stripped down implementation Dolphin uses. So if that program can receives input from your Wiimote it means there is an issue with Dolphin, if not then there is either an issue with the knockoff Wiimote or the HID Stack.

You got a pm.
Thx, looked through it and it does pick up the DolphinBar Wiimote and also receives Input. Therefore there is definitely something wrong with Dolphin.
Though it's weird that it only affects some Wiimote but not all.
(08-16-2016, 11:52 PM)JulianLoehr Wrote: [ -> ]You knockoff Wiimote does work with DolphinBar on Linux, but doesn't on Windows with DolphinBar?
Is it just the Mode 4 that doesn't work or is none working (i.e. it is not connecting to the DolphinBar at all)?
Then that would be very strange, as the OS (Linux and Windows) just see a composite USB device and all the LL Bluetooth pairing and sending/recieving is done by its hardware/firmware.
I haven't tested the other modes (since I was only trying real Wiimotes), but yes, it connects to the DolphinBar, it works with Linux, but on Windows, the battery is empty and eventually it gets disconnected. Maybe I should just try it again, could've been a random failure…
One thing that is "bad" about the Windows HID stack and may be the source of the issue is that "ReadFile" will always report 22 Bytes read. Can you check Linux whether its "read" reports the actual size of the read report?
That plus some uninitialized memory (either in Dolphin or Driver-Level) may be the root for that issue.
So it seems its a Dolphin error, thats only appear with some 3rd party Wiimotes, or did I missunderstand something?
The question is... does a Nintendo Wiimote really fix my problem? I dont want to waste 50€ (or whatever it costs) for a Wiimote, when its not the problem.
When it is the problem for sure, ill just buy it and im fine Smile

Another interesting thing:
I tried the Wiimote in Dolphin 5, 4 and also 3.5.
In 5 and 3.5 i got the problem we are talking about.
But Dolphin 4 cant connect to the Wiimote. Not even rumbling or the empty batteries, nothing.
(08-17-2016, 02:31 AM)Caturix Wrote: [ -> ]But Dolphin 4 cant connect to the Wiimote. Not even rumbling or the empty batteries, nothing.

That's a known problem with 4.0. DolphinBar support was broken around that time.
(08-17-2016, 02:31 AM)JulianLoehr Wrote: [ -> ]One thing that is "bad" about the Windows HID stack and may be the source of the issue is that "ReadFile" will always report 22 Bytes read. Can you check Linux whether its "read" reports the actual size of the read report?
That plus some uninitialized memory (either in Dolphin or Driver-Level) may be the root for that issue.

Dolphinbar doesnt work in Linux i think...? I dont have any other bluetooth dongle.

Maybe leolam can?

Btw.... thanks to all of you for your great support Smile
(08-17-2016, 02:31 AM)JulianLoehr Wrote: [ -> ]One thing that is "bad" about the Windows HID stack and may be the source of the issue is that "ReadFile" will always report 22 Bytes read. Can you check Linux whether its "read" reports the actual size of the read report?
That plus some uninitialized memory (either in Dolphin or Driver-Level) may be the root for that issue.
Oh, really? I thought that was only for writing reports… What a weird limitation. On Linux, I use hidapi, and according to the documentation it returns the "actual number of bytes read". I've just added some debug code, and it seems to return the real number of read bytes, indeed.

(08-17-2016, 02:36 AM)Caturix Wrote: [ -> ]Dolphinbar doesnt work in Linux i think...? I dont have any other bluetooth dongle.
DolphinBar currently isn't implemented in the official dev builds, but if you want to try it and see if it's a Wiimote issue or a Dolphin/system issue, you can try building and using this pull request.
Ah ok. It is also possible (providing a buffer that is large enough) that one read yields multiple reports. Then the read bytes are a multiple of the largest report. I think it is by design as the documentation suggest to then use some more HIDAPI-Calls to extract the actual data from the reports. Those calls do take the Report Descriptor into account and therefore are only using the valid bytes.
So for that to work (processing multiple reports with one ReadFile-Call) it is necessary that all reads yield the same length (or a multiple of that).
(08-17-2016, 02:59 AM)JulianLoehr Wrote: [ -> ]Ah ok. It is also possible (providing a buffer that is large enough) that one read yields multiple reports. Then the read bytes are a multiple of the largest report. I think it is by design as the documentation suggest to then use some more HIDAPI-Calls to extract the actual data from the reports. Those calls do take the Report Descriptor into account and therefore are only using the valid bytes.
So for that to work (processing multiple reports with one ReadFile-Call) it is necessary that all reads yield the same length (or a multiple of that).

Ok im a lil experienced in scripting like php or js, but thats too much for me Tongue
However, do you think a real Wiimote will solve this?
Pages: 1 2 3 4 5 6 7