Model 01 works on OSX but not Win7 after flashing latest firmware (NKRO-related?)

TL;DR: My Model 01 doesn’t work on Win7 when in NKRO mode.

I primarily use my Model 01 on a Win7 machine, but I flash firmware for it on my Mac because Unixy toolchains are just easier to deal with.

I just wiped my Mac and got the tools for flashing set up again. Steps taken:

  • Installed Arduino IDE

  • Cloned Kaleidoscope into ~/Documents/Arduino
    mkdir -p ~/Documents/Arduino cd ~/Documents/Arduino
    $ git clone --recursive https://github.com/keyboardio/Kaleidoscope-Bundle-Keyboardio.git hardware/keyboardio

  • Cloned Model 01 firmware
    cd ~/code git clone git@github.com:keyboardio/Model01-Firmware.git
    $ cd Model01-Firmware

  • Flashed firmware
    $ make flash
    BOARD_HARDWARE_PATH="/Users/gregsm/Documents/Arduino/hardware" /Users/gregsm/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/bin//kaleidoscope-builder flash
    Building ./Model01-Firmware 0.0.0-g
    v1.22-67-g4299 into /var/folders/ps/0ng409xd4g3d6gyr5zdtv5hwv42nwh/T//kaleidoscope-gregsm/sketch/2678476-Model01-Firmware.ino/output…

    • Size: firmware/Model01-Firmware/Model01-Firmware-0.0.0-g
      v1.22-67-g4299.elf
      • Program: 25010 bytes (87.2% Full)
      • Data: 1338 bytes (52.3% Full)

    To update your keyboard’s firmware, hold down the ‘Prog’ key on your keyboard,
    and then press ‘Enter’.

    When the ‘Prog’ key glows red, you can release it.

    Connecting to programmer: .
    Found programmer: Id = “CATERIN”; type = S
    Software Version = 1.0; No Hardware Version given.
    Programmer supports auto addr increment.
    Programmer supports buffered memory access with buffersize=128 bytes.

    Programmer supports the following devices:
    Device code: 0x44

So, everything looks normal, no problems flashing or anything. And after flashing the keyboard works just fine on the machine I’m flashing it on. But when I plug the keyboard into my Win7 machine… no typing! The hardware seems to be working just fine, e.g. the stalker LED effect works, just no actual keys being sent.

When I plug the keyboard in to the Win7 machine, it locks it up for a few seconds while the device registers. Device Manager shows two additional “HID Keyboard Devices” and two additional "HID-compliant mouse"s, with one mouse having the yellow triangle exclamation point. Device status on that mouse device is: “This device cannot start. (Code 10)” I don’t actually use mouse control on my preferred keymap so I don’t know whether that is a symptom of anything that matters. No idea whether it looks like this when the firmware is working as expected.

I seem to recall at one point that I was unable to flash the latest firmware and that I had to roll back to some earlier version of both Kaleidoscope and the Model 01 firmware. Unfortunately, I have no idea at all what version I had rolled back to-- it was certainly multiple years old.

So, my gut instinct is that something about the NKRO HID report isn’t working on Win7. I’ve been bitten by this in the past: I have another keyboard I built myself and wrote the firmware for, USB stack and all, and getting NKRO to work specifically on Windows was problematic.

Actually, I just had an idea and tried it out: I tried the magic combo to switch to the boot keyboard report (LFn+Esc+LShift) and after a few seconds, Windows registered a device plugging in and now the keyboard works, albeit without NKRO. So as far as I can tell, that seems to confirm that there’s a problem with the NKRO report at least on Win7.