Giving Back

Posted in Blogroll by projectdp on June 7, 2013

I just wanted to give back to some of the other people who have linked to my blog!

Here are the top links from referring domains:

Most hits are from forums here:

  • Woah pretty cool, someone completed this on a forum in China!

Then we have a bunch of blogs — which I think are the best!:

  • This one is from a blogger, what a cool site! Thank you Pepijn de Vos. Here’s his domain:

  • Hi Furstrated IT Engineer! Thanks for the post about me last year! You run a great tech blog. Lots of Pi info and general technology all around. Here’s his blog:

  • This one was so cool to me, first guy outside of the US to link back and show that he has finished his own Pi project with the Kindle.  Thank you hankjin from Wuhan city, Hubei province, China.
  • Looks like hankjin has another mirror on a small page here:

  • This one is fairly recent, but I was happy to see my link on his WiKiPi blog page for his great project! Jay Zehngebot is the name in those parts!

  • Hello Dianne Gorman! Looks like Dianne has trackbacks to people who link to her page. That’s awesome — I might need to do the same. Here’s Dianne’s blog:
  • This is the great resource of keyboard shortcuts that I listed in my Pi k3w post.

  • dmpop had a link to my page saved at some point, from his domain. Looks like it is gone now. Either way Dmitri Popov has a great personal site that you can check out at the above link! Thanks dmpop!

Lastly check out the little graph below. SPOILERS!🙂


ASCIIpOrtal and aaquake2 (Fail) on Pi

Posted in projects by projectdp on October 1, 2012

Hello again!

I wanted to showcase some games on the Pi over my Kindle after my last project ‘Pi k3w‘, but apparently I’m not able to do so. Let me show you the two games before I go into how I tried to compile the programs:

ASCIIpOrtal by Cymon’s Games:

This game is really cool and I played it a year or two ago on my Windows machine. I just recently bought and beat Portal 2, so I got inspired to play it again on the Pi.

aaquake2 by jfedor:

This is sweet, I heard about it on the mobilereads forum here from a user named twobob:

I’d really like to get this working on the Pi itself, even if I can’t get it on the Pi and Kindle.

ASCIIpOrtal Compile Attempt:

I tried and failed at using the precompiled linux binary on the website. It was built for a different architecture. I went directly to compiling from source. I tried that but ran into several errors. They seemed like serious errors so I approached Sam Heybey for assistance since he built the linux binary. He gave me some preliminary install instructions:

As root, update and get the dependencies:

apt-get update

apt-get install libsdl-mixer1.2 libsdl-mixer1.2-dev libsdl1.2debian-alsa libsdl1.2-dev build-essential

Now I tried this on the Pi and it failed on libsdl1.2debian-alsa giving the following error:

Package libsdl1.2debian-alsa is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:

So I just replaced the name libsdl1.2debian-alsa with libsdl1.2debian.

He gave me some advice and a new Makefile because the one included in the source was bogus and buggy. Here is the new Makefile that Sam sent me:

I made a file in the asciiportal directory: touch Makefile. I then appended the Makefile contents and did a chmod +x Makefile. Sam also mentioned that I should also set the following variables:

 export CC=gcc
export CXX=g++

Then issue the make command: make.

It is still failing, the issue has to do with PDCurses. I’m getting this error:

gcc -O2 -Wall -I..  -o firework ../demos/firework.c libpdcurses.a -L/usr/lib/arm-linux-gnueabihf -lSDL
/usr/bin/ld: libpdcurses.a(initscr.o)(.text+0x320): unresolvable R_ARM_ABS32 relocation against symbol `ttytype’
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make[1]: *** [firework] Error 1
make[1]: Leaving directory `/home/projectdp/asciiportal/PDCurses-3.4/sdl1′
make: *** [PDCurses-3.4/sdl1/libpdcurses.a] Error 2

That’s the end of the line for me, I don’t really know how to go further from this point. Can anyone help get over this PDCurses stumbling block?

aaquake2 Compile Attempt:

I followed the instructions here:

I can’t even get aalib installed correctly. It fails giving me the following error:

checking host system type… Invalid configuration `armv6l-pc-linux-gnu’: machine `armv6l-pc’ not recognized

That’s as far as I get. I tried compiling quake on it’s own without aalib and I was still getting streams of errors. I just really don’t know what I’m doing with this cross-compiling business.

Can anyone help get aaquake2 and ASCIIpOrtal up and running on the Pi? I’M FAILING HARD❤

Pi k3w – Kindle 3 display for Raspberry Pi

Posted in projects by projectdp on September 24, 2012

Hello, my name is projectdp and I’m here to bring you Pi k3w, my version of the KindleBerry Pi.

I assume you have seen the “KindleBerry Pi” project by Damaru! It was my inspiration for this project, you can read about it here:

If you are looking for a comprehensive guide to getting this to work for you, I hope this post serves as that guide. Let’s get started. As always, RTFM with anything that you’re installing, I am not the source of all knowledge, there are many other things you can do with the software packages.

pi k3w

Pi k3w, in all it’s naked glory.


  1. Kindle 3 Wireless edition (k3w).
  2. Raspberry Pi (rev. B).
  3. USB Keyboard (mechanical Noppoo Choc Mini if you’re curious).
  4. Cable (1/3): Kindle charger USB cable and power adapter.
  5. Cable (2/3): Motorola Droid Bionic USB cable (any ‘male micro USB’ to ‘male USB type A’ should work).
  6. Cable (3/3): Ethernet cable for providing internet to the Pi, you can use wireless if you want in lieu.
  7. Temporary monitor to configure the Pi and do testing (HDMI, or Composite out).
  8. Separate machine to configure Kindle
Pi k3w displaying top via tmux

Pi k3w displaying top via tmux

Kindle requirements:

  1. Jailbreak Kindle
  2. Install USBNetwork
  3. Install Launchpad
  4. Install Terminal emulator (Myts)

1.0 Jailbreak: Get binary – k3w 

Beware you could brick your kindle. You have been warned, take responsibility for what you do on your device.

A huge thanks to the Kindle community at MobileRead! You can download the Jailbreak build here:

At the time of this writing the file is called:  Download and unzip this file.

1.1 Jailbreak: Copy & Install on Kindle – k3w 

Find the proper install binary for your device, see the README.txt for more information but I used: update_jailbreak_0.11.N_k3w_install.bin.

Plug in your Kindle to your desktop, transfer the aforementioned file to the root directory. After you have copied successfully, you may dismount the Kindle. Then navigate here on the Kindle to restart and install the jailbreak app: [HOME] -> [MENU] > Settings -> [MENU] > Restart. This should successfully install the jailbreak software. If it did not work, please thoroughly read the README.txt and if you still don’t get it, ask on the mobileread forum, I didn’t write the software! I will repeatedly refer to this process, it’s simple just remember that it comes up several times.

2.0 USBNetwork: Get binary – k3w 

Go back to the link in section 1.0, download the file: Download and unzip this file.

Find the proper install binary for your device, see the README.txt for more information but I used: update_usbnetwork_0.43.N_k3w_install.bin.

2.1 USBNetwork: Copy & Install on Kindle – k3w 

Plug in your Kindle again, transfer the USBNetwork binary to the root directory. Copy your file successfully and then dismount the Kindle. Basically you will do the same thing as you did in 1.1 to restart and install that USBNetwork binary file.

Note: There is one tricky thing here. This utility will be disabled until you enable it. How do you enable it? You look for the file named: DISABLED_auto and rename that file to simply: auto. IMPORTANT: When you change this to auto, you will no longer be able to plug it into your Windows machine as a normal USB device. You can always reverse this process in a few ways:

  1. Myts: [Recommended] You can rename the file on the Kindle directly by navigating to the same folder /mnt/us/myts and issuing the command: mv auto DISABLED_auto
  2. SSH: You can ssh from your Pi to the Kindle: ssh root@ Username:root Password:[empty password]. You then mount as rw (do this only if you are comfortable, mount it back as read only after you make the change). Navigate to the correct folder: cd /mnt/us/myts issue the command now: mv auto DISABLED_auto
  3. Kindle firmware: You can do a factory restore if you prefer. Follow the Kindle manual.

That wraps up USBNetwork, just remember you need to have this utility enabled in order to connect to it via ssh on the Pi.

3.0 Launchpad: Get binary – k3w 

Follow this link: to get the Launchpad software which is required to run the terminal emulator later. Download the file: and unzip.

Find the correct install binary for your device. I used: update_launchpad_0.0.1c_k3w_install.bin

3.1 Launchpad: Copy & Install on Kindle – k3w 

Plug in your Kindle yet again, transfer the binary to the root directory. Same steps as 1.1. Look for a successful install.

4.0 Myts terminal emulator: Get Binary – k3w 

This one was a little tricky as the version (6) listed on Damaru’s site did not work for me. I had to use a newer version (8) which I found on this page:

I will list the download link here too: Extract this zip file.

4.1 Myts terminal emulator: Copy & Install on Kindle – k3w 

Plug in the kindle again. When you extract the file you’ll be greeted by two folders: launchpad, and myts. Copy the myts folder to the root of your Kindle. Next you’re going to need to grab the extracted file in the launchpad folder called: myts.l.ini. You will put this file on the Kindle in the folder named launchpad. This will allow you to use Launchpad’s hotkeys on the Kindle to launch myts later. To make sure that this new ini configuration file is read, safely disconnect the Kindle and issue this hotkey sequence: [Shift] [Shift] [Space]. You should see a command ‘Success!’ notification on the Kindle when you issue this command. If it doesn’t work the first time do it slowly and deliberately.

To verify that the Myts emulator was installed, you should then be able to press: [Shift] T T. Again slow and deliberate. This should drop you into the Terminal. Success! You can hit the left back arrow (the Kindle’s page turning buttons) to exit temporarily. Or you can do [Shift] T A to kill sessions. Check the myts README file in the myts directory you extracted earlier. Also a good reference is: about.txt.

This concludes the Kindle software required.

Raspberry Pi Requirements:

  1. USBNetwork
  2. Terminal Multiplexer (tmux)

1.0 USBNetwork: Install script – Pi

This part is directly copied from Damaru, it works great. Use your favorite editor to edit the file /etc/network/interfaces on your Pi. Add the following lines:

allow-hotplug usb0
mapping hotplug
script grep
map usb0
iface usb0 inet static
up iptables -I INPUT 1 -s -j ACCEPT

This means that your USB port on your Raspberry Pi, is turned into an ethernet addressed port. This way you can access the Pi from your Kindle.

1.1 USBNetwork: Test Pi to Kindle – Pi

Plug in your Kindle to your Pi. So you don’t have to restart or toggle your entire network service you can issue this simple command from the Pi to test: ifconfig usb0

Once you have done that you should be able to ping your Kindle: ping Success! (?)

This should be all you really need to ensure USBNetwork is working properly. If it isn’t working, make sure to read the note in this section above: 2.1 USBNetwork: Copy & Install on Kindle – k3w.

2.0 Terminal Multiplexer: Install and Intro to tmux – Pi

Well this is where I differ from Damaru. I like tmux better than the popular screen program. I’ll show you how to get it set up nicely. Here we go! On your Pi, make sure you’re connected to the internet and issue the command:

apt-get install tmux

Let aptitude do its thing and install tmux for you. It’s a beautiful thing. Really there aren’t other steps to installing your multiplexer. Here are a few some simple things that will help to get you started: man tmux. You can start tmux by simply typing that command: tmux, you can tell the terminal changes slightly, now to detatch the session, press Ctrl+b then press d. Now that you’re back at a normal terminal window, you probably want to attach to that window again. Where is it though? Find it with tmux ls. You will likely see 0: 1 windows (created blah blah blah)… So actually the name is going to be “0”. To attach to that particular window again you can do this: tmux attach -t 0. Magic! Now get out of there: exit. I’ll show you later how to name your tmux sessions, it’s pretty basic. There’s a lot to learn here. Read the man pages. Note: C-b-d is the syntax for: Ctrl+b then press d. Got it? Cake!


  1. Overview
  2. Test Kindle as the Pi display!
  3. Users and Passwords
  4. Kindle
  5. Pi
  6. Testing

1.0 Overview: – auto

This section is going to be pretty hefty. I’ll try to segment it as nicely for you as possible. I hope you’re doing alright so far. Leave a comment about your progress, or lack of progress so I can make fun of you.🙂

In the Automation section we’re going to make the most out of this project. We’ll take a lot of the meaningless effort out of the loop. We’ll make it fast to connect and use. We’re going to make it a mainstay on the Pi for an easy portable screen in a pinch.

2.0 Test Kindle as the Pi display! ssh login – auto

Up to this point you have pretty much everything you need to now ssh from your Kindle to your Pi. Go ahead and do it, make sure your Kindle is still hooked up to your Pi. Grab your Kindle and get into myts: [Shift] T T. Steady. Now ssh to your Pi: ssh Are you failing at entering the IP? Probably. Ok here’s where a specific file comes in handy. It’s called about.txt. I referenced it in Section 4.1. Read it. You can read it on your Kindle: cd myts then the command: cat about.txt. Basically you have to do some annoying stuff like this: ssh [Alt] q [Alt] o [Alt] w . [Alt] q… And so on. You’ll figure it out. I’m telling you, about.txt helps.  Success? Good. I’ll continue while you remember your passwords and such.

Pi k3w ssh login. Success!

Pi k3w ssh login. Success!

2.1 Test Kindle as the Pi display! use tmux – auto

You should be logged into your Pi now from your Kindle. That’s called a milestone. Start tmux from your Kindle: tmux. Now with the Pi keyboard issue the command: tmux ls. Connect to the one your Kindle is on, it should just show 0: 1 windows (…etc.), by issuing the command: tmux attach -t 0. Now you should be able to type on your Pi keyboard, and it should appear on your Kindle. Sexy. You can pretend that you have everything working properly by turning off your monitor, but you have a long way to go if you want the Pi to boot automatically displaying the Pi on the Kindle! Let’s get to it!

3.0 Users and Passwords: Introduction – auto

Alright let’s get our notes straight on user access. So far you have some user account on your Pi, you’re probably doing it wrong and using username: root password: root, or some other silly defaults. You’re all set with the Pi, how about the Kindle? Same thing. username: root password: [empty]. You really don’t want this, especially on the Pi, I leave the defaults on the Kindle myself. Login as root and issue: passwd to change the password.

What I recommend is creating a separate user for the Kindle instance. I was not very creative and I made the user: kindle. Issue the command: adduser kindle. Temporarily make the password extremely easy to type for testing on the Kindle (I used the password: aaa). Oh right to change the Kindle username’s password: passwd kindle. Test it from your kindle: ssh kindle@ Note: the @ symbol is [Back] w, if you didn’t read about.txt.If you’re too lazy to even type this, you can hold off testing until you automate your login, but I suggest making sure this is working first.

4.0 Kindle: fast ssh to Pi – auto

Let’s make a simple script to login to the Pi from the Kindle over ssh. On your Pi (because it has that nice keyboard that makes typing convenient — Smart!) make a file named something really easy to type. I used the filename: aa. To create the file issue: touch aa. Then use your favorite editor to edit the file and append:


ssh kindle@

Save it. Now you need to make sure that you can execute the script once it is on the Kindle. Issue: chmod +x aa. Good now the only thing remaining is getting it to your Kindle. This takes some ninja tricks but let’s go for it: scp aa root@ Remember: You’ll be entering a blank password for root on the Kindle. Now try it out. On the Kindle type: ./aa. How do you do the slash? [Back] v. Later on in the article I’ll make it even easier, but let’s test with this for now. Enter your password: aaa. There you go, all set for faster logins.

5.0 Pi: Boot into your kindle user’s account on tty1 -auto

Edit your /etc/inittab on your Pi. Comment out (disable!) the following line, by putting a # symbol in front of it:

1:2345:respawn:/sbin/getty 38400 tty1

Now add the following command beneath the previous line:

1:2345:respawn:/sbin/agetty -a kindle -8 -s tty1 linux

Note: this assumes you are using the kindle user to automatically log in to tty1, your default terminal on the Pi. Alternatively, you can use this other command that is reported to work, but I could not get it to work this way myself: 1:2345:respawn:/bin/login -f kindle tty1</dev/tty1>/dev/tty1 2>&1

Save this file and let’s continue on. You will notice that performing a restart at this point should boot you into the kindle user account directly. Go ahead and test that functionality.

5.1 Pi: Configure .bashrc to handle joining scenarios – auto

Now as the kindle user, you’ll want to modify your .bashrc file. Navigate to your home directory: cd ~.  Edit the file: .bashrc. Append the following script:

if [ -z “$TMUX” ]; then
(tmux attach -t pi || tmux new -s pi )

If you were having trouble with damaru’s script, try this out it works like a charm! If you’re using screen though, just make sure to translate the equivalent screen commands properly. If anyone is using screen and can put the proper environment variable and code in the comments I think people would appreciate it🙂

Now your Pi should boot directly into a tmux session named pi. The cool part is, when your Kindle logs in to the Pi using the kindle username, you will automatically join the pi tmux session.

5.2 Pi: Configure ssh passwordless logins – auto

Here’s how you get to login without entering that aaa password from your Kindle, and using public keys instead. You will be utilizing the USBnetwork toolchain which includes the ssh client dropbear. To generate the proper keys you will need to use dropbearkey, the generator tool for dropbear ssh keys.

First, install the program with: sudo apt-get install dropbear. Now navigate to here: cd /home/kindle/.ssh/. Then issue the command: dropbearkey -t rsa -f id_rsa | grep ssh-rsa >> authorized_keys. You will then copy the public key to the Kindle with this command: scp id_rsa

The very last step is to ssh into your Kindle and update that file we created earlier: aa to make the file look like this (I bolded the change for you below):


ssh kindle@ -i id_rsa

You are basically just specifying the key to join with. Now you can use your Kindle and try the ./aa command again. Are you winning yet? If so, celebrate and get on the Pi again and change your kindle user password.

6.0 Testing: Does it all work?

Now you should be all set. Let’s perform some checks:

Check 0: Try a Pi reboot with your monitor connected to watch the progress. Make sure the Pi logs in completely into the kindle account and begins the tmux session. You should be able to just wait and eventually be able to type on the tmux session command line without any other interaction.

Check 1: On the Kindle, open a myts terminal with [Shift] T T and issue the command ./aa (remember the forward slash is [Back] v). You should be logged in now with the Kindle to the Pi, attached to the same tmux session named pi.

Check 2: Unplug the monitor connected to the Pi’s HDMI or composite out. Reboot the system. Wait a few seconds, in the mean time, get ready on the Kindle to issue the ./aa command again (you should be able to hit up or left depending on your screen orientation to repeat the command). You can try several times blindly to connect, you’ll eventually be able to, and voila, you are ready to attach the Kindle to the Pi in a pinch!

6.1 Testing: Bugs

After performing Check 2, you might have noticed that tmux isn’t starting completely in full screen mode. The reason for this is because the terminal character dimensions was autoset by your monitor’s higher resolution. To combat this issue you can create the file: /boot/config.txt and append this to it:


Note: You can use any resolution you prefer, perhaps the resolution of the pi lapdock?🙂 but these were the dimensions of my test monitor.

If you notice any other bugs, please review the sections that are associated with those checks. If you still have problems drop some information in the comments and we’ll get it sorted.

Pi k3w running the top command over tmux

Pi k3w running the top command over tmux

That concludes the article! I hope you enjoyed this, I had a great time figuring all this out😀 Leave a message with your project or anything relevant in the details!




Forums discussing the original project: