Git Product home page Git Product logo

Comments (12)

haata avatar haata commented on May 19, 2024

Interesting.
These were working, though I might have broken this when I fixed a bunch of USB issues in the last few months.

from controller.

9ary avatar 9ary commented on May 19, 2024

I've started investigating the issue, enabled all debug in usb_dev.c and I get the following output when any LED changes to any state (toggling them with another keyboard to make sure I only get LED packets).

CONTROL - pid:0xD, count:0x80034 - bmRequestType:0x21, bRequest:0x9, wValue:0x201, wIndex:0x1, len:2
WARNING - SET_REPORT - 0x201 - 0x1
STALL
CONTROL - pid:0xD, count:0x80034 - bmRequestType:0x21, bRequest:0x9, wValue:0x200, wIndex:0x0, len:1
WARNING - SET_REPORT - 0x200 - 0x0
STALL

So it's indeed trying to update the LEDs but not receiving the proper data from the PC. Since it happens on both Linux and Windows I suppose it might be a descriptor issue since the possibility of an OS bug is already cleared.

from controller.

haata avatar haata commented on May 19, 2024

The USB portion seems to work correctly for me.

0x1 - Numlock
0x2 - Capslock
0x4 - Scrolllock

readLEDs only reads the current status. It doesn't automatically trigger when a change occurs (even though the state is recorded).

I do have some draft spec details on how to use USB Leds as triggers to combinations, but I won't have time to get to do the implementation until the first set of ErgoDox issues are fixed.

The easiest thing to do for now would be just to modify the led handling code here: https://github.com/kiibohd/controller/blob/master/Output/pjrcUSB/arm/usb_dev.c#L426

Now, this may be a 6KRO issue (looking at that next).

from controller.

9ary avatar 9ary commented on May 19, 2024

Odd, it doesn't work for me. readLEDs always reports 0 or 1 regardless of numlock and capslock. Seems to change at random when I change the LED states.

And yeah, that's exactly what I was planning to do.

from controller.

haata avatar haata commented on May 19, 2024

Hmm, I'm getting random status as well now.
Time to pull out the USB analyzer :D

from controller.

tmk avatar tmk commented on May 19, 2024

I think Set report should read "data" for led status instead of wdata.

from controller.

9ary avatar 9ary commented on May 19, 2024

Well I just checked with usbmon, the computer is indeed sending bogus data to the keyboard and not always, while my Logitech keyboard is getting proper reports.

from controller.

haata avatar haata commented on May 19, 2024

I've been messing with the code. Something larger is wrong, should have a fix soon.

from controller.

haata avatar haata commented on May 19, 2024

Fixed. Tested under both 6KRO and NKRO modes and seems to be working.
f4da256

Let me know if you still have issues.

from controller.

9ary avatar 9ary commented on May 19, 2024

Seems to work fine here, thanks a lot. Time to grab the soldering iron again. By the way, is the SET_REPORT function the right place to set my physical LEDs up ? Or is there a facility for that ?

from controller.

haata avatar haata commented on May 19, 2024

There isn't a facility (yet) unfortunately. But I'll be adding somewhere around here: https://github.com/kiibohd/controller/blob/master/Output/pjrcUSB/arm/usb_dev.c#L692

from controller.

9ary avatar 9ary commented on May 19, 2024

Thanks, I'll see what I can do with that.

from controller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.