My mac is no longer recognizing my keyboardio

My mac recently stopped recognizing my keyboardio entirely. I’m not sure quite what happened. Some facts (not sure which, if any, are relevant):

  1. Starting a week or two ago, when I was reprogramming the keyboard, Arduino on the mac would occasionally “forget” what port the Keyboardio was on, in that I’d have to manually reselect the right port each time before uploading new code. Once entered, this state of Arduino would persist until next reboot.
  2. Starting a couple days ago, my mac would occasionally “lose” the port, in that the keyboardio would no longer show up on the port list. This state, once entered, would persist until next reboot. I think that the keyboardio would still operate fine when Arduino was in this state, but I’m not very confident of that, because I usually rebooted pretty quickly.
  3. Yesterday I plugged my keyboardio into a linux box (running KDE). Afterwards, my mac no longer recognized this. Note that this is the 2nd time that my keyboardio has been plugged into that linux box, so I don’t think this is super relevant, but w/e.
  4. After that, Arduino is now persistently in the state where it doesn’t list the keyboard among the remaining ports, and also, the mac does not appear to be reading any keystrokes from the keyboard.
  5. The most recent changes that I made to the keyboard’s code involved adding usage of the Unicode and Syster libraries, for whatever that’s worth.
  6. The keyboardio itself still seems to work fine (or, at least, the LED still breathes when the thing is plugged in, all the LED modes still work fine, including numlock and capslock and so on, from which I judge that the arduino board isn’t having any trouble running the code that’s currently on in).

Any ideas for how to recover?

To clarify, can you still type on the keyboard? Is it just that the programmer doesn’t see the port, or is it non-functional?

Furthermore, is it working on your Linux machine, but not on the Mac, or is it failing on every machine?

  • I cannot type on the keyboard (or, well, I can type, but the mac doesn’t hear any keystrokes)
  • It could type fine on the linux machine (before I plugged it back into the mac and couldn’t type on it). I can’t easily access the linux machine at the moment, but will update this post when I next try it on that machine.

Another datapoint that probably isn’t relevant:

  • When the keyboard is plugged in, seemingly-random LEDs flash for an extremely brief time period before they’re turned off and the “breathe” greeting happens. I’ve been assuming that this is unrelated.

I see this on my (working) keyboard too. @jesse says it’s just random garbage data in RAM that the LEDs read before they finish getting set up or something.

For the actual problem, I wonder if the cable is damaged? Have you tried using a different one?

I’ve confirmed that it was a problem with the cable. (Yay!) Apologies for the delay, it took me a while to find another USB -> USB C cable.

3 Likes

Correction: while I can type again under the new cable (ie, the mac is recognizing keypresses again), Arduino is still failing to recognize the board (eg, I still can’t reprogram my keyboard, because Arduino doesn’t list it under the available ports). Perhaps the two issues were independent? Suggestions to address the arduino-doesn’t-see-the-port issue are still much appreciated.

Probably independent. See PR #282 for a possible fix.

1 Like

See also Kaleidoscope issue #280.

1 Like

Thanks! Should I expect those to be merged soon, or should I just go ahead and apply the patches manually?

It should be merged soon, but there is no harm in applying the patches manually, either. You will most likely need KeyboardioHID#27 too:

(Mind you, this one is untested, but I have high hopes…)

I expect @algernon’s fix for mouse functions will get merged very soon, but I don’t know when (and if) my patch for the other issue you’re seeing (at least, I hope Kaleidoscope PR #282 fixes your firmware-uploading problem) will get merged. If you want to try something simpler than merging that whole PR, changing just one line by hand could work:


If you change that line to this:

      DEVICE_PORT="${DEVICE_PORT:-$(ls /dev/cu.usbmodem*kbio* 2> /dev/null || echo '')}"

…that might fix the problem of not being able to flash new firmware.

It’s just a change of Ckbio to *kbio. In my case, the serial port changed to /dev/cu.usbmodemCDkbio01, which wasn’t recognized by the kaleidoscope-builder script. It might be the same for you. To be really thorough, you could try this from a terminal prompt:

ls -l /dev/cu.usbmodem*

If your keyboard is plugged in, I expect it to show up in the output.