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

Data-dump bluetooth OSX #9

Open
mikkmartin opened this issue Apr 11, 2016 · 2 comments
Open

Data-dump bluetooth OSX #9

mikkmartin opened this issue Apr 11, 2016 · 2 comments

Comments

@mikkmartin
Copy link

mikkmartin commented Apr 11, 2016

$ ds4-dump works great on USB, but with bluetooth it throws an error:

buffer.js:663
    throw new RangeError('index out of range');
    ^

RangeError: index out of range
    at checkOffset (buffer.js:663:11)
    at Buffer.readInt16LE (buffer.js:798:5)
    at parseDS4HIDData (/Users/mikkmartin/Documents/dualshock-test/node_modules/ds4/index.js:40:18)

when i log the buffer without parsing, the HID device returns smaller dataset (without trackpad / gyro data) initially:

<Buffer 01 80 7f 84 77 08 00 00 00 00>

and nothing after hidDevice.getFeatureReport(0x04, 66);
then I have to reconnect the controller on bluetooth to reset the controller state.

@matthewbauer
Copy link

Change it to hidDevice.getFeatureReport(0x04, 37); and it works

@matthewbauer
Copy link

Sending LED, rumble, etc. over bluetooth is also possible but it will take some work: https://github.com/todbot/node-hid-ds4-test/blob/master/node-hid-ds4-test.js

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