I've been lurking here for quite a while, and actually followed resources from this forum to bolt-mod one of my Ms ; but this is not about that. It is, however, a good time to say 'thanks' to the community.
I'm kind of a fan of Sun hardware ; incidentally I've grown to like the Sun keyboard layout. Coming from buckling springs, the actual typing experience is... different. The Type 6 is (widely known as) pure crap. The Type 5 is actually rather decent for a rubber dome. Finally, I got my hands on a Type 4, which I found suprisingly good (enough to quickly switch between the Type 4 and the Model M without any trouble or annoyance). The Type 4 is also rare as it is an ISO-Enter US/Unix layout.
So came the project to actually use the Type 4 as a daily driver and convert it to USB. I bought an Arduino Micro, delved into their libs and came up with a converter of my own. Very simple stuff : USB HID over the main 'Serial' port via the Keyboard lib, SoftwareSerial over 'Serial1' aka RX/TX aka pins 0 and 1, through a 7404 inverter on to the mini-din8 port. Read an input from the keyboard, transpose to the appropriate HID key code, pass on to a lightly-hacked arduino 'Keyboard' library, as to allow sending raw keycode (without ASCII translation).
It works like a charm (I'm using the sun keyboard to type part of this message), but it has the same limitation as the arduino's Keyboard library : no support for boot mode, and I don't know/understand enough of the lib to implement it.
That's when I discovered the LUFA library, which does support boot mode, and from there the TMK firmware, which already includes a Sun converter ; so let's try it. It compiles without errors (both on Debian, and on FreeBSD with gmake), loads with avrdude (original arduino bootloader) and... obviously, nothing ; the Arduino does not even come up as an USB device, at all.
The solution, of course, lies within config.h :
Code: Select all
#define SERIAL_SOFT_RXD_BIT 1
#define SERIAL_SOFT_TXD_BIT 0
(comment out)
Code: Select all
/* #define SERIAL_SOFT_LOGIC_NEGATIVE */
So, obviously, something isn't right with the serial communication between keyboard and arduino, but that's as far as I'm able to figure out. I'd welcome any pointers.