PDA

View Full Version : Ouya controller input on computer macosx



nakas
06-16-2013, 05:53 AM
Hey, ive been trying to get proper input from my ouya controller on my mac osx 10.8 machine. It detects in the bluetooth and i can use the touch pad to control the mouse but any movement from any buttons sends the cursor into the corner. I can't use it to play and games on my computer or more importantly develop games in unity3d. Any solutions or drivers i can get to help out?

Liuhu
07-05-2013, 09:33 PM
I'm having the same issue. Would there be anyone who could help or write a simple driver?

edmundmk
10-13-2013, 12:15 AM
For what it's worth, I have written a driver:

OUYA Controller Driver.zip (http://edmund.birotanker.com/OUYA%20Controller%20Driver.zip)

As far as I can tell OSX was misclassifying the OUYA controller as a mouse, because the controller's touch pad is listed first in the HID report descriptor. The cursor jumps because OSX gets confused between the X/Y reports from the mouse part of the controller and the X/Y reports from the left thumbstick. Both these sets of axes have the same HID element usage of X/Y. The first three buttons O U Y are also confused with the three mouse buttons the controller pretends it has - hence the clicking when you press a button.

The bug is in OSX's mouse handling. There can't be too many mice with thumbsticks attached out there. Weirdly, loading any driver at all (even one that does nothing except have a different name to the built-in driver) fixed the problem for me. After this fix the touch pad no longer moves the cursor. I guess Apple need to do some more testing with devices that have more than one function.

I haven't made any modifications to the information that the controller provides. I have a wired Xbox pad that I could compare the layout/data ranges to but it's in a box somewhere so I haven't.

The OUYA controller provides the following HID elements:

Pointer
X (relative to last position)
Y (relative to last position)
Wheel (always 0)
Button 0 (clicks when pad is tapped)
Button 1 (never clicks)
Button 2 (never clicks)

Gamepad
X (left thumbstick, 0-0xFFFF, so the rest position is actually 0x8000)
Y (left thumbstick, same range)
Rx (right thumbstick, same range)
Ry (right thumbstick, same range)
Z (left trigger, same range, annoyingly on my pad this wobbles around 20% even when released)
Rz (right trigger, same range)
Button 0 (0)
Button 1 (U)
Button 2 (Y)
Button 3 (A)
Button 4 (left bumper)
Button 5 (right bumper)
Button 6 (left thumbstick click)
Button 7 (right thumbstick click)
Button 8 (dpad up)
Button 9 (dpad down)
Button 10 (dpad left)
Button 11 (dpad right)
Button 12 (left trigger, when pressed at all)
Button 13 (right trigger, when pressed at all)
Button 14 (central button press and release - can't detect when this button is pressed only)
Button 15 (central button hold - triggers after about two seconds)

Plus it claims to provide battery level and a bunch of undocumented stuff. Looking at the OUYA Android source it seems like the people writing their driver didn't know what the undocumented elements did either.

Thought I would share in case someone else finds this useful. Use of my code is at your own risk.

Shiftone
12-27-2013, 10:32 AM
I can't seem to get this driver to work...

I install the pkg and the driver appears in my S/L/E but my Ouya controller still misbehaves...

Am I missing something in the install procedure? Running ML 10.8.4


Devices (Paired, Favorites, etc):
OUYA Game Controller:
Address: b8-5a-f7-c0-9e-ec
Type: Joystick
Firmware Version: 0x102
Services: Broadcom Bluetooth Wireless Joystick SDP Server, OUYA Game Controller, Broadcom Bluetooth Wireless Joystick PnP Server
Paired: Yes
Favorite: No
Connected: Yes
Manufacturer: Broadcom (0x5, 0x2211)
Vendor ID: 0x2836
Product ID: 0x01
EDR Supported: No
eSCO Supported: No

Looking at Extensions in System Report - the OuyaGameController.kext isn't loaded. Any ideas?

EDIT

Further investigation shows Vendor ID as 10294 in the OuyaGameController.kext but 2836 in the output above - I think we have a winner, let me fiddle a bit more.

Diablohead
12-29-2013, 03:15 PM
OSX pad support would be great as I have no mac controllers currently, the ouya pad would be a good fit.

Joe Gatling
09-07-2014, 06:12 AM
I know this thread is very old, but I have come here in search of a driver for a working Mac driver for the OUYA controller too.

edmundmk, I installed your driver. However, like Shitone, I am unable to get it to work. My cursor still moves around as if the drivers weren't installed.

PS, Shiftone: The vendor id listed in the System report is 0x2836, not 2836. The 0x part means it is in hex. 0x2836 is equal to 10294.

hugegreenbug
09-13-2014, 11:14 PM
I know this thread is very old, but I have come here in search of a driver for a working Mac driver for the OUYA controller too.

edmundmk, I installed your driver. However, like Shitone, I am unable to get it to work. My cursor still moves around as if the drivers weren't installed.

PS, Shiftone: The vendor id listed in the System report is 0x2836, not 2836. The 0x part means it is in hex. 0x2836 is equal to 10294.

The driver still works. I tested it in 10.9. All you have to do is type the following in a terminal:

sudo kextload /System/Library/Extensions/OUYAGameController.kext

You will get a warning popup that the developer is not known, but just press ok.