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

mac: fix behaviour of hid_get_feature_report #219

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rbarazzutti
Copy link

This fix is quite important for the Mac platform, since the behaviour of hid_get_feature_report was not following the specs.

@rbarazzutti
Copy link
Author

Hello Alan,

I'm pretty happy to see that you're carefully checking patches submissions.

I agree Apple docs are kinda horrible. I double checked my fix and tested it on OSX 10.10.

Keep me posted,

Raphaël

@ilovezfs
Copy link

What is the status of this PR? It's currently being applied in the Homebrew formula, but it's not clear that upstream agrees with the change, in which case we would probably want to remove it from the formula.

@cboulay
Copy link

cboulay commented Dec 1, 2016

+1 on this. For psmoveapi and PSMoveService this is a problem. The number of bytes returned by hid_get_feature_report is different on Windows than it is on Mac. According to your API doc strings, the Windows version is returning the correct number of bytes but the Mac version returns one less.

However, it's not entirely so straightforward. The PSMove can be connected via bluetooth or USB. All of the BT feature reports behave as described above. At least one of the USB feature reports does not, where the first byte no longer contains the report id. I'll have to investigate this further.

@ilovezfs
Copy link

@signal11 ping on this PR

@bakercp
Copy link

bakercp commented Jun 30, 2017

Also confirming that on the current master branch does not match the documentation on macOS 10.12. The first byte returned is not the report id, even when the report id is requested and the length is off by one.

@micolous
Copy link

micolous commented Nov 9, 2018

This behaviour in master on OSX 10.14 is still incorrect, and differs from the Linux version.

The work-around I have is to explicitly set a non-zero report ID (by setting the 0th byte in the buffer to something other than 0).

In this case the Linux and OSX APIs will return the same result, but it does mean that the commands sent to the device change. There don't appear to be any negative side-effects for the device I'm working with, but this may be problematic for others.

Update (2019-08-11):

@Youw
Copy link

Youw commented Aug 11, 2019

@rbarazzutti do you happen to remember, have you been using numbered reports or not?

as far as I can tell from the original message of @micolous (9 Nov 2018) - Report ID is his case was zero (no numbered reports)

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

Successfully merging this pull request may close these issues.

7 participants