This blog post answers a few frequently asked questions and describes the difference between the two firmwares provided as well as outlines the steps to obtain the matrix of a ThinkPad keyboard connected to the computer via a ThinkClamp PCB, for both version 0.6.2 and version 0.6.1 Rev 1.1.
Frequently Asked Questions
- Will the board design and source code be made open-source? No.
- What are the maximum dimensions of a populated board? 50x50x6.5mm.
- Will you be making a case? Yes, but in a very distant future.
- Will there be a Bluetooth version? Yes, the Bluetooth implementation is currently in progress.
- I am only interested in using the TrackPoint as a mouse, how do I use it with your board? If you are only interested in the TrackPoint, there’s no need to get my boards. Grab an Arduino Micro or Leonardo and load in Felix Klee’s TrackPoint example.
- Where can I get the components? Local electronic parts shop, element14, Digikey, RS, Mouser…
- How do I flash the firmware? The steps to flash the firmware is provided on the product page, but here are the steps anyway.
- Download TI MSP430 USB Firmware Upgrade Example
- Start the program, click Next, read and accept the terms
- Unplug USB cable if it’s plugged in
- Hold down BSL button while re-inserting the cable
- Release the BSL button. The software should now detect the device
- Choose ‘Select firmware’ and browse to the firmware downloaded. Difference outlined in Customizing firmware’s keyboard matrix section below.
- Click ‘Upgrade firmware’ to flash the device
- A lot of keys are not showing up, what’s going on? Resolder the MSP430. Make sure all the pins are soldered.
- Some of the pin are not showing up and I’ve made sure all the pins are soldered? You may have a different keyboard matrix. Keep reading this blog post.
Customizing firmware’s keyboard matrix
In the firmware folder on Mediafire, you will find two text files: ThinkClamp_v0.6.txt and ThinkClamp_v0.6_datapipe.txt. These two firmware will send keyboard and mouse reports to the computer and allow the module to function as a normal keyboard. However, beside sending keyboard and mouse to the computer, ThinkClamp_v0.6_datapipe will also send a string consisting of the row and column of the pressed key to the computer via a generic 64-byte report (more information on report format can be found in Texas Instruments’ USB HID Datapipe documentation).
Using ThinkClamp_v0.6_datapipe, matrix of any ThinkPad keyboard can be found, providing the keyboard’s plug fit into the receptacle provided. The steps to get the matrix are as follow:
- Flash the firmware onto the chip via USB BSL or SBW
- Download TI’s Java_HID_Demo. If the link is broken, find the zip from MSP430 USB Developers Package page.
- Extract and run HidDemo.jar
- Click OK as we will be entering a different PID
- Enter 0x0967 into the PID input box and click “Set VID PID”. The window will become:
- Click on the button above “Not Initialized”. The cross icon will become a green tick. The log window will print “Connected to device VID: 8263 PID 2407”.
- Now, as you type, printable and non-printable keys, the row and column pair will be printed (as row,col) in which both row and column starts at 0
You may want to wait a bit between each key presses as there seems to be a small delay between when a key is pressed and when its row and column is displayed. This latency only appears when in used matrix is being found.
To create a new firmware with this newly found matrix, the keys found need to be converted to its corresponding hex value in the USB HID Usage Table’s keyboard values on page 53. For example, this is my ThinkPad US T60 keyboard matrix:
NADA correspond to a 0x00. This means there is no key at this matrix position. After matching the keys to its corresponding key codes, it is then organized into a 8×16 matrix and written into the firmware text file after address F000 as follows.