digitalhack / pcDuino-openFrameworks

Other
2 stars 1 forks source link

Mouse & keyboard #1

Closed fieldOfView closed 10 years ago

fieldOfView commented 10 years ago

I am running the pcDuino-dev branch on a "Phoenix A20" board (http://linux-sunxi.org/Phoenix_Board) running the Cubietruck version of Cubian (http://cubian.org). Overall, most examples are working, but I receive the following output on stdout (and the mouse and keyboard are not working):

[notice ] ofAppEGLWindow: setupMouse(): mouse_fd= -1 devicePath=/dev/input/by-path/platform-sw-ehci.2-usb-0:1.6:1.0-event-mouse [ error ] ofAppEGLWindow: setupMouse(): did not open mouse [ error ] ofAppEGLWindow: setupMouse(): did not open mouse, mouse_fd < 0 [notice ] ofAppEGLWindow: setupKeyboard(): keyboard_fd= -1 devicePath=/dev/input/by-path/platform-sw-ehci.2-usb-0:1.7:1.0-event-kbd [ error ] ofAppEGLWindow: setupKeyboard(): did not open keyboard [ error ] ofAppEGLWindow: setupKeyboard(): did not open keyboard, keyboard_fd < 0

It does not seem to make a difference whether I start the apps from an ssh session or directly from the tty0.

Do you get proper mouse and keyboard support in openframeworks on your pcDuino?

digitalhack commented 10 years ago

With the pcDuino I do get mouse and keyboard support both when run from ssh or from tty0.

After work today I will post output from a run where the keyboard and mouse work and maybe we can figure out what the difference is.

I am not sure why it would matter but for reference my keyboard and mouse are connected to the pcDuino using an external USB hub.

fieldOfView commented 10 years ago

I have my kb/mouse on a hub as well, but connecting directly does not help.

digitalhack commented 10 years ago

Do you have read and write access to your mouse and keyboard?

Have you tried running an openFramework application using sudo or ...

Setup udev rules so that users in group input can access keyboard and mouse input and then add users to appropriate groups.

groupadd input

cat > /etc/udev/rules.d/99-input.rules KERNEL=="event*", NAME="input/%k", MODE="660", GROUP="input" ^D

usermod -Ga video,audio,input

Then reboot and run the application.

When I removed read + write access to input/event* from my username I get the same results that you show in your first post.

Let me know how it goes.

digitalhack

fieldOfView commented 10 years ago

Yes, that fixed it! Awesome.

I had sort-of ruled out the permissions, because running the app with sudo did not help. At least, I think I tried that, but now I am beginning to doubt.