Update - this post was mentioned by the Hackaday website
I had this little project in a drawer for almost two years, but as it happens life, always crossed the way with other stuff. I have bought PocketBook e-reader back in 2014 and used if for a few years to read some really interesting books, then I went back to a paper ones and e-reader took its place next to an old phones, ready to be used somewhen in the future again. Last year I found out there is this thing called #inktober & #drawtober, where people come together virtually on the fediverse and challenge themselves to deliver drawings every day. I don’t know the rules or if there are any, but I decided to spend few October evenings working on my own #inktober, or better #einktober version. Drawing be damned, I want to create a digital picture frame out of this old e-reader.
The official product name is PocketBook Basic Touch, the exact model number is PocketBook 624. It’s a Linux based e-reader. According to device manual, display dimensions are 174,4×114,6×8,3mm (6 inch display). It has 256 MB RAM and runs on the Allwinner A13 ARM powered system-on-chip.
I have started my exploration by searching online for applications I can use for a task. I found a terminal software called pbterm which helped me to orient myself a little bit. I could run commands such as:
$ cat /etc/info
Linux version 3.0.8-dirty (jenkins@redbool) (gcc version 4.4.4 (4.4.4_09.06.2010) ) #1 PREEMPT Mon Jun 13 10:58:22 EEST 2016
That’s how I found that BusyBox v1.22.1 is used and what commands are available. It has Netcat which I have used for moving new versions of my application between the computer and e-reader while I was developing it, instead of plugging and unplugging the cable every time I fixed something in my code. All this because it seems you can’t have a device mounted as a storage and use it at the same time.
I have also found Pocketbook related repositories on GitHub, one of them correlating with my CPU model. The GitHub profile also contains u-boot repository which I later verified as being used by the device, as I was dumping the content of the internal SD card and explored it’s filesystem. There are few critical vulnerabilities in older u-boot versions, maybe getting root is possible as the device could be network connected, however I decided to not go down this path as I don’t think higher privileges are really needed for the picture frame functionality. The least, but most interesting find on GitHub was an actual SDK! If I fail to find any reasonable gallery application, I can try to use SDK instead.
At this point, the goals I set for myself were roughly:
- Search for an application or library that is available and can display full screen images.
- Create the shell script that will call that application with my pictures and display them in sequence, with some sleep in between. The reasoning behind the shell script is that it’s available.
- Find a way how to make it more energy efficient by using deep sleep or other functionality if there is any.
I found a
mediaexplorer.app application on a device. It can be found under the name Photo in the Applications directory. It works nice for viewing pictures and as a filesystem explorer, but I could not find a way to automate it by using shell into a desired photo frame functionality. To my rescue, around the same time, I found PocketBookSDK.pdf SDK documentation with a practical C++ code example. I tested
Stretch functions and succeed. That changed the direction towards writing application of my own. The PhotoFrame application is a simple loop that reads image files from a hardcoded directory and show them with some sleep involved in between. You can find the source code on GitHub..
Once the proof-of-concept application was finished, I wanted to create frame stand from a piece of wood. I was unable to progress as I was short on woodworking tools, but I got an idea to use older book as a stand instead, so I cut a e-reader sized hole in it.
You can see the final result below.Demo with a time set to 5 seconds per picture.
I have spent way too much time trying to do a fancy stuff. Once I found there is no SSL support on device, I downloaded statically linked
curl and later also
wget and played with the idea of downloading images over the network. Target was to scrape Archillect images. In the end I came down to Earth and did the bare minimum.
I have also read about the rootfs and tempfs, but that’s all what I did. Just reading.
There is much more to do. I haven’t found a way to use deep sleep yet. That can make battery consumption more efficient. And then there is a whole rabbit hole around the internet connection and downloading possibility. But life is short and it’s not October anymore.