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

Wiimote support via bluetooth #822

Closed
okyeron opened this issue Apr 25, 2019 · 4 comments
Closed

Wiimote support via bluetooth #822

okyeron opened this issue Apr 25, 2019 · 4 comments
Labels

Comments

@okyeron
Copy link
Contributor

@okyeron okyeron commented Apr 25, 2019

This came up in a conversation today so I started poking around and now I'm looking for a little help

RasPI 3b has Bluetooth built-in. Norns hardware could have BT with a USB dongle. I'm thinking it should be possible to get the wiimote working as a HID device.

I've got my wiimote connected to raspi-norns and I'm not sure where to go next to get HID data. Looks like some mods will be needed?

after connecting the wiimote dmesg shows me:

[   60.521044] Bluetooth: HIDP socket layer initialized
[   60.714181] wiimote 0005:057E:0306.0003: unknown main item tag 0x0
[   60.714812] wiimote 0005:057E:0306.0003: hidraw2: BLUETOOTH HID v6.00 Gamepad [Nintendo RVL-CNT-01] on b8:27:eb:63:4d:4b
[   60.714872] wiimote 0005:057E:0306.0003: New device registered
[   60.760104] wiimote 0005:057E:0306.0003: detected device: Nintendo Wii Remote (Gen 1)
[   60.760948] input: Nintendo Wii Remote Accelerometer as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:12/0005:057E:0306.0003/input/input7
[   60.761331] input: Nintendo Wii Remote IR as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:12/0005:057E:0306.0003/input/input8
[   60.761677] input: Nintendo Wii Remote as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:12/0005:057E:0306.0003/input/input6

Best I can sort out here is that the wiimote is showing up as a serial/tty device and not an input/event that norns device_monitor would see as an HID device.

Any suggestions on how I might get this to show up as HID?

do I need some kind of udev rule?

@okyeron
Copy link
Contributor Author

@okyeron okyeron commented Apr 25, 2019

Ok - further checking - I AM getting the wiimote to show up as /dev/input/event* devices, but now I realize that device_monitor.c is ONLY looking at the usb subsystem, so it won't work without some more hacking

Thus we would need to extend device_monitor to add the bluetooth subsystem?

@komicone
Copy link

@komicone komicone commented May 17, 2019

Beyond the Wiimote use, supporting keyboard input via bluetooth would allow input to ORCA and any other text based scripts that get developed and fewer cables is always nice :)

@okyeron
Copy link
Contributor Author

@okyeron okyeron commented May 17, 2019

pinging to @catfact to see if there's any suggestions here.

I tried to extend device_monitor.c to look alternately look at bluetooth adding the following

else if (udev_device_get_parent_with_subsystem_devtype(dev, "bluetooth", NULL)) {
                    handle_device(dev);
                }

and again around line 250

but it pretty much crashed matron everytime and I got kinda stumped.

@catfact
Copy link
Collaborator

@catfact catfact commented May 18, 2019

you can certainly try bypassing the usb test as in this PR:
https://github.com/monome/norns/pull/532/files

in my view the closure of this PR was abortive; i have questions and issues with it but would be pleased to hear constructive feedback. i think it will mean we'll get a bunch of events from subsystems that we don't actually know how to work with in lua; that's OK but probably needs more work

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

Successfully merging a pull request may close this issue.

None yet
4 participants