Electronics and programming interspersed at various levels of difficulty.

Sunday, July 21, 2013

txtr Beagle - card parser

I started playing around with the SD card contents to see how I can parse it and verify the functionality.

The result is a small Java program that is able to read the contents page by page and display it on a little panel. You can type the page number and press <Enter>, you can use arrow keys or mouse wheel to scroll.

A couple of observations:
- building a 3bpp image in Java is a pain or I'm missing something. Perhaps the TYPE_BYTE_INDEXED would be a better choice
- although the images seem to render correctly they display differently than on the device. I think the reason for this is that the eInk gamma curve is different compared to the computer monitor, but perhaps I'm also parsing the buffer incorrectly
- there are a few Easter eggs hidden in the images: an author page, a lolzcat(?) image, a reset screen, font size screen
- at the end of the useful card contents the pages get scrambled. I believe the device might be switching to a different access mode

Next stop would be to build a Java app that parses PDF files (or something else) and is able to pipe the output to the device. Not my priority though, I'd rather study the uC first and see what it does.

Technically, the images below are screenshots taken from my application which should not pose a copyright problem just as posting a picture of the device should not constitute a copyright violation.

4 comments:

Thanks! One immediate use case for your findings: by sending "UTILITYPAGE 6", one can overwrite the standby screen. As long as we cannot disable standby, this is a nice workaround for displaying static content (such as a door plate).I have just tried it out with Florian's code, and it works flawlessly :)Is there any hint of dynamically loaded microcontroller code on the SD card?

I was hoping that the standby screen can be changed. It the first step for a low-power remote display.I'll check the dynamic uC code but I really don't think there will be any. I wish there was a way do download the uC code, I have a lot of tools around but don't know how to use them (scope, logic analyzer, bus pirate, ...) to search for some kind of bootloader or bootstrapper.

Worst case for this would be a 555 circuit or small uC to power on the device and keep the power button pressed from time to time. The computer/phone can check for BT availability and upload the file.

Would love if someone could test the Java code against a known generated file (see python scripts in the comments from the previous post) and see if the artifacts are also visible on the reader or it's just the computer display.

I'm not sure if this was the right way to do it:I took a screenshot of the standby image displayed in CardParser, converted it to pgm and uploaded it to the Beagle. On the Beagle, it looks as blocky as the bitmap in CardParser, i.e. without anti-aliasing. It might be that the conversion to pgm deteriorates the image quality, too.

That's strange then, I'm sure my code is doing something wrong. To be honest, the Android is doing the dithering so that anti-aliasing is built-in by design.However, I'm getting the already rendered data from the card which should not display this aliasing. It looks as if I'm missing some pixel lines causing only incomplete data to be displayed.