How can I connect a serial port to a Kindle?

How can I connect a serial port to a Kindle?

The first question to answer is:

What is a serial port?

A serial port is a simple communication interface or connection on your device which sends information (data) one bit at a time. It’s a very common interface on all sorts of devices from modems to big mainframe computers and these days small electronics devices like mobile phones and e-readers often have them or support them with some tinkering. The serial port is used to access a text based interface of the device which runs before the main operating system starts up.
 

Why should i connect a serial port to a Kindle?

Troubleshooting a Kindle that has some sort of hardware or software problem is a lot easier if you can connect a serial port to it and see what the operating system is doing in the background. Access to the command line will give you valuable insight as to what errors are being reported and guidance as to what your most likely path to fixing your Kindle will be. Whether that is something as simple as needing a new battery or a more complicated problem like file system corruption or firmware issues. 

Even if you don’t have an immediate problem to fix, perhaps you are just curios to see what your Kindle does when it boots up or run some diagnostics on it to discover what state it is in.

What voltage does a Kindle run at?

The most important point to consider before you connect a serial cable to your Kindle is the voltage level the Kindle runs at, which is 1.8 volts. The serial port you connect must run at this voltage or you risk damaging your Kindle’s board and components. This presents a problem because almost all the serial connectors you’ll find for sale run at 3.3 volts or 5 volts (due to the popularity of Arduino projects at the moment). If you can find a 1.8v version they tend to be pretty expensive. In this post I’ll walk you through how to make your own inexpensive 1.8v serial cable with a jumper so you can use it for all 3 of the common voltages and use cases.

How to make a cheap 1.8v USB to Serial cable 

I found it difficult to find a 1.8v USB to Serial and the ones I did find were expensive so I made one myself for under $10. I used the following components:

Supplies and tools:

  • USB to Serial TTY running an FTDI chip FT232RL. I know the PL2303 chip will also work as I have seen others use that one.
  • 1.8v LDO Regulator (Low Dropout Voltage Regulator)
  • Soldering Iron with fine tip. I am in Australia so I picked mine up from JayCar, doesn’t need to be expensive a basic one will do.
  • Solder, I used a solder wire that was 60/40 alloy, 0.71mm diameter, 2.2% flux, 15 gram weight. 
  • Small guage wire to solder the connections from the LDO to the serial adapter, something like speaker wire or USB wire from an old computer.
  • Superglue to glue the LDO chip onto the serial connector
  • “Helping Hands” (optional) Particularly useful is the magnifier with a light. In Australia you can get them from JayCar, I use this one.
  • Multimeter (optional) to test the voltage has been dropped to 1.8v.

Which serial adapter should I use?

 I used a serial adapater based on an FTDI 232 chip as i knew this would work. The one I use looks like this:

For convenience, here’s a link to this serial adapter on Amazon.com  FT232RL FTDI Mini USB to TTL Serial Converter and on Ebay Australia  FT232RL FTDI USB 3.3V 5.5V to TTL Serial Adapter Module. However it’s a very common part and can be purchased from all sorts of places for a few dollars. You can also use a PL2303 chip, I have seen other people use that with success. 

Out of the box this adapter will only support 3.3v and 5v connections. The voltage is changed by moving the black jumper between the upright pins. 

To add 1.8v support to the adapter we will add an extra component to the board called an LDO regulator. 

What is an LDO Regulator?

 An LDO Regulator is a small chip which is placed inline of a current and is used to adjust the voltage being output. LDO stands for Low Dropout.

The practical use for an LDO in the Kindle world (and also in some mobile phones and other small electronics) is to reduce the voltage from 3.3v or 5v down to 1.8v.

Most of the popular Arduino components run at 3.3v or 5v, 1.8v components are hard to find or expensive so using your own cheap LDO to reduce the voltage yourself is a very cost effective way to get a 1.8v circuit.

The LDO I used for my Kindle Serial to USB connectors was an AMS1117. You can find the datasheet for it here:  AMS1117 LDO Datasheet. It can be ordered in different package types and voltages. The one I use is the LM1117 1.8V 1A SOT-223 Voltage Regulator. 

The pins from left to right are Ground, Voltage Out and Voltage In. The way the regulator works is you have an input current (e.g. 3.3v) that flows through a wire you solder onto pin 3, the LDO reduces the voltage to 1.8v and sends it out through a wire you solder onto pin 2. The LDO is pretty tiny so it can be a challenge to solder but a beginner can do it with some practice. 

The important thing is to get an AMS1117 1.8, the other 4 digit number is just the manufacturer code and not important. 

Connecting an LDO regulator to a USB to Serial device

The next step is to glue the LDO onto the serial adapter, I used good old superglue for this, cheap and readily available from kmart for example. I glued my LDO onto the back of the adapter. It looks like this:

As you can see, not my finest work when it comes to the soldering! This was my first soldering project and I found it quite a challenge but a good learning experience and despite it being a little ugly it works fine. You might notice I have soldered the white voltage out cable to the large flat pin on the rear of the LDO, this pin also acts as a voltage out and makes the soldering a bit easier. I recommend using a magnifying glass with a light for this, the LDO is very small.

If I put a top view and bottom view together you can see the pins have been connected to the holes on the board with the matching capability. i.e. ground to ground and 3.3v hole connected to the input pin. On the board the Ground is labelled GND and the 3.3 volt as 3.3V

On the top of the adapter you can see I have used a piece of wire with a connector on it. These are quite common from electronics stores but the time I didn’t have one so i cut one of the cables connecting a USB port to the motherboard in an old PC I had lying around. 

With the LDO in place, now all we need to do to change the voltage on the USB to Serial Adapter is remove the jumper and connect the cable to one of the 3 ports. If we choose the middle port as pictured above that will give us 1.8v. If you select the pin on the right that will be 3.3V and the one on the left will be 5v. 

We have made a multi-purpose 1.8v/3.3v/5v USB to Serial adapter for under $10. 

Where can i buy a 1.8v USB to Serial adapter? 

If you think the soldering might be too challenging for you or you don’t want to buy the equipment there are a couple of alternatives. The main reason I made my own board was because the only 1.8v one I could find does not ship to Australia (where I live!). If you are in the USA you can order this one from Amazon which is 1.8v out of the box and doesn’t need the LDO fitted to it, there is one built in.

It looks like this:

The other alternative is to buy a pre-made 1.8v cable. These are quite expensive, around $40 USD but offer the easiest solution as the only soldering you’ll need to do is to connect them to the Kindle’s board and even then there is a no solder method you can use for that connection too (I’ll detail this below). 

The only pre-made 1.8v cable I have been able to find is the FTDI one with model number TTL-232RG-VREG1V8-WE, available from Amazon US or local sites in other countries. Mouser carry them as well as Digikey or you can order directly from FTDI. This cable comes in different versions, make sure you order the 1.8v version if you are using it for a Kindle. 

The pre-made cable looks like this:

How to add a serial port to a Kindle?

The next step is to connect the USB to serial adapter to the Kindle. In order to do this you’ll need to remove the case from the Kindle to get to the main board. The method for this varies depending which model of Kindle you have, however the high level steps are:

  • Use a hair dryer to warm up the glue under the bezel
  • Use a plastic prying tool or similar (guitar pick, fine needle) to pry the front bezel off
  • Undo the phillips or torx screws to remove the kindle from the case
  • Locate the serial port pads on the board
  • Solder the cables from the serial port pads to the USB to Serial adapter. 

I’ll demonstrate this with a repair I’m doing at the moment on a Kindle Basic 2 (SY68JL) from July 2016. I bought this one broken on the classifieds from a Spanish guy to try to fix, I’ll be doing a post on it in my project series.

 

First warm up the front bezel a little with a hair dryer to help ease the glue, it’s not totally necessary but can make it easier to remove. 

Next remove the front Bezel by prying it up with a plastic prying tool or a guitar pick. Be careful not to scratch the screen. It does take quite a bit of force but be gentle at the same time so you don’t crack the frame. 

On this model there’s a second Bezel to remove, this is more brittle plastic and also needs quite a bit of force to remove. 

Remove the screws in the locations marked in red circles, lift the screen and board out of the case and turn over. 

I’ve already fitted the serial connections to this one which you can see in the picture and I will zoom in on them in the photo. 

Before you solder the connections on make sure you disconnect the battery to prevent any damage to the circuits from the soldering iron’s heat. 

Notice also that the battery is pretty easy to replace. On this model the battery has been stuck down with glue and needs a lot of force to remove, particularly if you don’t heat it up first. 

 I used a heat shield for the Ground cable, it makes for an easy attachment point and is a good ground. The serial connections do have a ground available but it’s fine soldering all close together so it’s much easier to use a heat shield. 

A bit of tape to hold the cables in place while you solder makes for an easier job.

Here you can see the 3 pads for serial connections, as I mentioned before I don’t use GND pad, rather connect that to a heat shield on the board but you can solder to this pad as well if you prefer. 

You need to match the TX to the RX pin on the USB to serial adapter and the RX to TX. In other words cross them over. 

This is the serial adapter end, if you compare the colours of the wires you can see we crossover RX and TX. 

I find it helpful to see the whole connection, end to end which is something I often don’t see on other sites. Here is the end to end view:

How to access the serial port on a Kindle?

Now that we have the serial port pads connected to the serial adapter how do we use it? You will need some software that supports a serial connection. A lot of people use a program called Putty for this type of access, however I prefer TeraTerm. It’s Open Source (free) software and I prefer it over putty because it detects the name of the COM ports easily and if you are using more than one serial connector it’s much better at giving you hints about which one is which. Any terminal software will do though so use whatever you like best. If you want to use Teraterm it’s available from this link https://osdn.net/projects/ttssh2/releases/

 

When you open Teraterm click on the Serial radio button and pick out the COM port with your adapter on it. In most cases you will only have one choice. 

Before you can see the Kindle’s command line interface you need to set the speed of the serial connection. For a Kindle this needs to be set to 115200. 

Turn your Kindle on and watch the console, you will see it boot up. You can watch what is going on and check for errors. 

If you don’t get any output in Teraterm when you turn on then check you have set the speed correctly for the serial port and check you have connected the serial cables correctly. 

 

How do I find out the Root password for my Kindle?
If you want to go a step further and actually login to your Kindle’s command line interface (CLI) to try to troubleshoot a problem or run diagnostics yourself then you will need the root password for your device. 
 
Kindle’s run a version of the Android Operating System. It is possible to discover the root password by using some Python code. Python is a popular modern programming language.

You first need to download Python, this is free and if not already on your PC can be downloaded from here: https://www.python.org/downloads/

You also need to know the serial number of your kindle. If it’s still working and you log in to it then you can find the serial number., it’s listed under Settings, then Device Info. You can also find the serial number if you login to your Amazon account, then click the Account & Lists drop down menu and choose “Your Content and Devices”. This can be a bit tricky to find, you have to click on device info first and then click on the burger menu (three lines) again to see the Device Info menu item.

Alternatively, if you have been following this guide and have a serial port connected to your kindle you will see it on the command line output, listed as S/N. Be careful what you do with your serial number, never publish it on any public sites, if someone spoofs it they can get access to buy books with your account or get your Kindle banned by misbehaving with your serial number so keep it private! 

Once you have installed Python and know your serial number, use the following steps to determine the root password:

Windows Method to discover kindle root password:

1. Open a command prompt by clicking on Start/Run and typing in cmd

2. At the prompt type in Python then use the following lines of code to discover your root password:

(replace the license number in red below with your kindle’s serial number)

3. >>> import hashlib

4. >>> print(“fiona%s”%hashlib.md5(“90171111111111G1\n”.encode(‘utf-8’)).hexdigest()[13:16])

    fiona123

In this example the output shows the root password is fiona123. The password is specific to the serial number yours will be different but you can find it out with this method. 

 

How to login to Kindle as root?
Now you have the root password to your Kindle and a Serial port connected you can interrupt the boot and login as root. WIth your serial port connected and your terminal software (Teraterm or Putty) connected turn the Kindle on and watch the boot sequence, as it boots up repeatedly press the Enter key. This will escape the boot sequence and you’ll be left at the uboot prompt. 

Press enter key to interrupt boot sequence

At this prompt type in “bootm 0xE41000″ this tells the Kindle to boot up into Diagnostics mode and show the Diagnostics menu. 

Press D

Press L

Press Q

Press L (again)

At the login prompt enter the username as root and the password you got from the Python prompt in the earlier steps on this page. 

(note that the password doesn’t show as you type it in)

Now you are logged in to your Kindle as root, cool 🙂 

Where are the serial port connections on different Kindle models?

The location of the serial ports varies between Kindle models, here I’ll show you the various locations:
 

Kindle 1 serial port

The original Kindle 1 has a port you can plug a 20-pin ribbon cable into. You need to then figure out which parts of the ribbon cable are TX,RX and GND and connect them to your serial adapter. 

The pins are:

  • GND = 3,7 or 10
  • TX = (can’t find which pin, pls comment if you know)
  • RX = (can’t find which pin, pls comment if you know)

I’ve never done this model before but you can see a video of it being done on Youtube at this link 

Kindle 2 serial port

I haven’t found a serial port connection yet for this model, please comment if you know where the serial port is on it. 

 

Kindle 3 serial port

The serial port is in the bottom right corner

Kindle 4 (not Touch) serial port

 

KIndle 4 Touch / Kindle 5 serial port

You can get special Molex connectors for this model, or solder.

The Molex connector parts you need are as below:

Left to Right: GND, RX, TX

Kindle Paperwhite 1 serial port

Top to Bottom: GND, RX, TX

Kindle Paperwhite 2 serial port

Top to Bottom: GND, TX, RX

KIndle Basic 7th Generation serial port

Left to right: TX, RX, GND

Kindle 8th Generation serial port

Top to Bottom: TX, RX, GND