Hello all,
in the spirit of
http://xkcd.com/979/ let me share my (permanent, non-invasive) solution for this problem. Only okay if your replacement screen has a EEPROM chip. Scroll down for the TLDR version.
As some of you, I bought a replacement eink panel for my Kindle Keyboard 3G, only to find that the greyscale was messed up. The thing is, I already had thrown the old panel away... So no getting around the problem with the hotswap. Also, that's not the most elegant solution.
In the ENABLE_DIAGS menu, the Misc Diag / Video informationed showed an error, Panel ID mismatch - the waveform present on the device was v110_000_60_m01, the Panel ID was v110_173_60_m06.
In the Device Settings menu, the "Update EINK Waveform" menu seemed promising. Inspired by Nephiel's post, I accessed the Kindle's filesystem (ugh!) and got the *.wbf files out of it to feed to that option (when you select the Update EINK Waveform menu, the kindle enables mass storage via USB and you can put a *.wbf file on it). Only, it showed me an error message - none of the wbf files matched the panel info.
So, two options: 1) Follow the instruction to extract the entire content of the EEPROM on the panel ribbon*, get the waveform data and feed the waveform of the panel itself to the Kindle via the diags menu, since it didn't seem to read it off the eeprom
2) obtain an existing waveform and modify it so that it would pass the compatibility test. the greyscale problem appears because the kindle isn't using ANY waveform, not even the old one, and any waveform would still be better than no waveform.
I was preparing for 1), but then I thought, that's a lot of work, let's try 2) first with one of the wbf files taken from the /opt/eink/images/ folder. This required editing the waveform file so that it would appear as coming from the panel itself. The key find was this piece of sourcecode from the kindle 2:
http://read.pudn.com/downloads186/so...veform.h__.htm
It's from the graphics subsystem of the Kindle and basically is part of the software part of the panel ID check. The #defines show very nicely at which offsets of the wbf file information is stored concerning which panel it is for, as well as some information about the values associated with several fields. So it's all in changing the file at the offsets to make it match the panel I had. Let's look at the ID and info from filenames etc:
V110_B059_60_WJ0105_ED060SC5_BTC.wbf (from Kindle)
v110_000_60_m01 (from Kindle Diags)
For my new Panel, I had only the info that it had ID v110_173_60_m06 and some stuff written on the ribbon.... For example, the string ED060SC7 which was similar to the one mentioned in the filename. But what did it all mean? Another file from the same kindle 2 source code,
http://read.pudn.com/downloads186/so...veform.c__.htm gave some insight.. thank god for programmers commenting their code!
// Build up a waveform version string in the following way:
//
// <FPL PLATFORM>_<RUN TYPE><FPL LOT NUMBER>_<FPL SIZE>_
// <WF TYPE><WF VERSION><WF SUBVERSION> (MFG CODE, S/N XXX)
Looks awfully like... V110_B059_60_WJ0105_ED060SC5_BTC.wbf kind of follows that logic. The Epson document from baidu also confirmed some of this info, although it contained some false tracks as well (AMEPD code is NOT the FPL Lot Number, despite that arrow... I digress)
I'll jump to the point, the only difference between my panel ID and the stored panel ID shown in the Kindle video diag was the 173 vs 000, and that corresponded to the FPL LOT NUMBER, stored at 0x000E (2 bytes, little endian). The wbf had a value that translated to 59 in decimal.. Like V110_B059_etc ... Bingo! The PANEL ID in the Diags menu simply omits the RUN TYPE info in assembling that ID string. So, change 59 to 173.. All the other info was the same (same Platform, which is very general info about what kind of panel it is), Run Type, Panel Size. Also the MFG Code was M01 in the existing waveform, M06 for my Panel and in the wbf file the value for the MFG Code was already 6, so I didn't change it). The whole WF TYPE, Version and Subversion didn't matter.
Changed the value at 0x000E, saved the filed, changed ED060SC5 to ED060SC7 in the filename to match what was written on the ribbon, and... voila. The Diag menu allowed me to update my waveform. It worked very nicely, the greyscale is perfect.
So, two weekends of research ended in one byte changed in the wbf file. That was all it took to match the wbf file to my Panel.
Thanks to all of you who posted for the info that guided my research. Hope it will be useful for somebody!
TL;DR Version:
* Get the V110_B059_60_WJ0105_ED060SC5_BTC.wbf from your kindle (or ask me for it)
* Look at the diags menu in your kindle for your panel ID in Misc Diagnostics / Video. It should be something like v110_YYY_60_mXX
* Convert the YYY to hex, it's the FPL LOT number. Plug it into the wbf file at offset 0x000E
* Take XX, that's your MFG Code. Plug it into the wbf file at offset 0x0015
* Save modified file as V110_BXXX_60_WJ0105_ED060SC5_BTC.wbf and change ED060SC5 with the corresponding strink on your ribbon cable (this might be optional)
* Go to Kindle diags, System Info -> Update eINK Waveform. the Kindle becomes an USB storage device, copy your new wbf file into the root of the drive.
* Be happy!
----------------------------------
* split the dump according to
http://wenku.baidu.com/view/187d5395...5f465e245.html (in the kindle fs, /opt/eink/images/ contains a .bin file which corresponds to the host command interface, and the waveform data as wbf files - in the eeprom dump (from
http://www.electricstuff.co.uk/kindlehack.html ) it's all one file, with the host commands at the beginning, then some padding and then the waveform)