Well I thought it was about time somebody got around to making a wireless M, so behold, the bluetooth IBM Model M (and a messy desk):
And no, I didn't just unplug the SDL:
And no, its not just empty:
Date of birth: 14 June 1989, date of rebirth: 13 June 2010 (whoops, it got an early birthday present!)
Works well (so far! - typing this on it now), and has a range of ~5m, smaller than I'd like but good enough. Not sure about battery life, it uses quite a bit of juice while typing but not much when on standby. I'd guess somewhere in the range of 2-6 months with decent batteries, but time will tell. Can lag a little when its coming out of standby, but seems pretty good when you're typing normally.
Anyway, the details of how it works:
The green board in the picture is a PCB out of cheap chinese bluetooth keyboard I found on our local ebay equivalent - cost me $47 NZD shipped (~32 USD right now). On this is mounted a BCM92042 module like the one available here:
http://russnelson.com/bluetooth-keyboard-controller.htmlUnfortunately this module is programmed with the matrix from the chinese keyboard, and broadcom will not tell you how to change it yourself, as a few other people have discovered when trying to use the ones from Russ Nelson.
I was initally going to try and emulate the matrix of said chinese keyboard using a microcontroller and then interface to the IBM one, but this would have been quite a lot of software work and isn't exactly elegant (if I could get it to work at all!). Before I got to work on that though, I decided to see if I could reverse engineer the broadcom module and save myself the hassle of writing a pile of code.
- The first step of doing this was to decode the existing matrix, which I did by scanning the membranes into the computer and using photoshop to colour each wire separately. From this you write down a list of keys on each row/column, and then you can match up the rows and columns to build the matrix table.
- With the matrix in hand, I attacked the EEPROM chip on the broadcom module, assuming that this would hold the matrix information. This chip is the one at the top left of the module in my photo. As you may be able to see, the pins of this are pretty small, so I needed to use a small soldering iron and a stereo microscope to attach wires to the 2 data pins (this EEPROM uses the I2C protocol, which requires 2 wires). I also had to put the module into reset mode so that it wouldn't interfere while I was working with the EEPROM (this is done by locating the reset pin and shorting it to ground), and disconnected another one of the EEPROM pins from the circuit board to turn off write-protect in the chip (again, tricky!).
- With wires in place, I used a USB to I2C convertor box to talk to the EEPROM, and dumped the memory contents (4KB in total). This was then loaded into a hex editor, and I began searching for a key matrix. This job was made do-able by the knowledge of the existing matrix (which I could match up once I found the correct data), and the fact that the Bluetooth HID spec uses the same scan codes as the USB HID spec. I searched for a few of the HID codes, and found instances of each near eachother in the EEPROM dump - this was the scan matrix!
- With the matrix found, I determined a) which wires on the board corresponded to which row/column in the EEPROM table, b) how the modifier keys worked and c) which rows to avoid, as they had the pairing button and a modifier key hard-coded in elsewhere in the software. I then had enough info to rewrite the table with the IBM matrix (suitably arranged to match the physical board well).
- After testing, the last job was to mount it all on verroboard and chuck it into the case. The soldering here took a while, as you might guess from the photo.
After all this, I have what may be the world's only wireless Model M!
There is a little more work to do (apart from a bit of use to test it) - the pairing button and battery case are not accessible from the outside, so you need to unscrew the case to get at them. This is a pain, and while I might put up with the batteries being inside if they last for long enough, I'd like to have the pairing button accessible, so I might move it to near the SDL hole.
Here is the output from that tester program thing, in the background is the Hex representation of the new matrix I loaded into the module:
Note that I have remapped the caps and scroll lock keys in software - this output is normal.
As you might realise from what I've written, this is a LOT of work. Unfortunately most people here are unlikely to be able to do it themselves, especially given that if you buy a module from Russ Nelson you have to make a PCB as well.
Once I've tested this board a bit more, I
MIGHT be able to make a couple of boards to send out, however even if this happened it would be very limited as it is a lot of work, and shipping to/from New Zealand is expensive. If I did do this, I'd probably be after something rare in trade rather than money.
Edit: Made the pics smaller. See attachments for bigger versions of the first and third pics (confusingly suffixed _4 and _1 respectively).