Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to open HID Device (with solution) #2

Open
Ryuno-Ki opened this issue Apr 11, 2021 · 2 comments
Open

Unable to open HID Device (with solution) #2

Ryuno-Ki opened this issue Apr 11, 2021 · 2 comments

Comments

@Ryuno-Ki
Copy link

Today I finally could set aside some time to test the demo website using my Wii MotionPlus!

I struggled a bit on Linux using Chromium, so let me explain how I eventually managed to solve it:

Pairing via Bluetooth

For some reason, Bluetooth wasn't shown in my Network Manager applet nor in Mate's Control Center.
Using Bluedevil offered me a GUI to connect (PIN remains empty) while clicking the Sync button on the rear side of the device. Another option might be hitting 1 + 2 on the Wii Motion at the same time?

Using BlueZ' sudo bluetoothctl did not allow me to do so.
I had a hard time getting the Nintendo device to show up. (XWiimote lists other alias names for Wii Motion devices).

Connecting via HID

Once paired, I could pick the device from the Chromium prompt to connect.

However, I noticed a DOMException that the device was not able to open (on your call to .open() - perhaps worth to show an UI error?).

Resolution

After debugging for a few hours, I finally realised that I could sudo chmod 0606 /dev/hidraw0 to grant read AND write access. chrome://device-log/ was helpful in pointing me towards missing write access.

Remaining issues

I could read the Accelerometer values and the button presses. LEDs can blink and vibrate works.
I couldn't figure out, though, what to do with the canvas (shows up black here). From reading the code, it ought to show white dots? How am I suppose to create those?
Do you know, whether Gyroscope data is available, too?

@PicchiKevin
Copy link
Owner

Massive thanks for sharing your experience using the lib.
I'll try to integrate this in a troubleshoot section.

About the remaining issues, once connected you should be able to go on the extended mode and select Core Buttons + Accelerometer + IR, which should after a few seconds display the IR dots on the canvas.

There is a way to get gyroscope data but I haven't integrated yet in the library. (requires to send some packets data to the Wiimote to enable it more info here)

@Ryuno-Ki
Copy link
Author

There is a way to get gyroscope data but I haven't integrated yet in the library.

I'm happy to test this once it's part of the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants