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

sparkleBatch failed #10

Open
lanzafame opened this issue Jul 4, 2018 · 5 comments
Open

sparkleBatch failed #10

lanzafame opened this issue Jul 4, 2018 · 5 comments

Comments

@lanzafame
Copy link

On commit 2870383, I uncommented the sparkleBatch() call in POC/ts/index.tx, after building and running, I got the following error:

$ npm run-script poc-ts

> [email protected] poc-ts /Users/lanzafame/dev/src/github.com/diefarbe/node-lib
> ts-node --project tsconfig.json POC/ts/index.ts

Firmware Version:147.7.3.245.18

/Users/lanzafame/dev/src/github.com/diefarbe/node-lib/src/keyboard.ts:158
    this.hidDevice.sendFeatureReport(buff);
                   ^
Error: could not send feature report to device
    at Keyboard.featureReports (/Users/lanzafame/dev/src/github.com/diefarbe/node-lib/src/keyboard.ts:158:20)
    at Keyboard.executePackets (/Users/lanzafame/dev/src/github.com/diefarbe/node-lib/src/keyboard.ts:131:12)
    at Keyboard.setKeyState (/Users/lanzafame/dev/src/github.com/diefarbe/node-lib/src/keyboard.ts:82:12)
    at sparkleBatch (/Users/lanzafame/dev/src/github.com/diefarbe/node-lib/POC/ts/index.ts:104:16)
    at Object.<anonymous> (/Users/lanzafame/dev/src/github.com/diefarbe/node-lib/POC/ts/index.ts:27:1)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Module.m._compile (/Users/lanzafame/dev/src/github.com/diefarbe/node-lib/node_modules/ts-node/src/index.ts:439:23)
    at Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    at Object.require.extensions.(anonymous function) [as .ts] (/Users/lanzafame/dev/src/github.com/diefarbe/node-lib/node_modules/ts-node/src/index.ts:442:12)
    at Module.load (internal/modules/cjs/loader.js:612:32)

I am guessing this is probably because I am yet to upgrade the 5Qs firmware at all as I don't have a windows box. But thought the error report may still be useful.

OS: macOS 10.13.5

Thanks for all the work you are all putting into this 👍

@chris13524
Copy link
Contributor

Thanks for the report!

I don't have a Mac, so I can't attest to the quality of these suggestions:

  • try running the software as root, possibly the device is protected (it is on Linux)
  • ensure you're on NodeJS v8 and rm -rf node_modules; npm install
  • use a friend's (if you have any) Windows device to install the firmware update or use a virtual machine

If you figure it out, please let us know so we can document it.

@sebirdman
Copy link
Contributor

@lanzafame I'm seeing a similar issue. After a little while of running sparkleBatch, it seems like we get an error.

Also, thank you very much for submitting the report, as you've helped us test that new firmware version check 👍

@chris13524
Copy link
Contributor

@lanzafame When you run the script, does your keyboard perform the animation and then error out after pressing a few keys? Or does it immediately error without performing any animation?

@lanzafame
Copy link
Author

@chris13524 depends...

TL;DR it never performs the animation

So I was just testing things and came across a few things:

  • running poc-ts renders the brightness button ineffective
  • poc-ts can set the brightness without erroring
  • the animation may result in a static pattern being displayed, see here

and lastly, this may be my inability to write JS but adding a console.log before after the setBrightness causes the firmware version and the additionally log not to be logged out before the program errors (same error as above).

Hopefully, that is some useful information.

@mikejr83
Copy link
Contributor

@lanzafame,

I think you may have caught the code in a bit of a transition phase. Try grabbing latest and attempting again. In issue #12 we have another user with a similar firmware. My keyboard was reporting back a 147.x firmware version for a while but now it is reporting the common 7.3.253.18 version number which seems to be what DAS has out as the latest.

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

4 participants