My third generation Amazon Kindle

In mid-September I was given a third generation Amazon “Kindle (Wi-Fi)” (“Kindle 3” or K3) running firmware version 3.2.1. This is my first foray into e-Books, and it seems like a nice little gadget — light weight, pages ‘turn’ promptly and the E-ink “Pearl” display is actually rather easy on the eyes. Oh, and it can be jail-broken to expose the underlying Linux-based firmware. Here are some of my initial observations on using the device with my PC-BSD 8.2 desktop.

The unit itself

Here it is, in all its glory. Really quite simple.  (Edit: In late 2011 the K3 was re-named “Kindle Keyboard“)

USB mass storage

Plug the K3 into your computer and it pops up as an ~3.1Gbyte FAT-formatted USB mass storage device. You can add e-books direct from the Amazon online store (via WiFi and internet connection) or by copying them over to the Kindle-as-USB-storage. Content added over USB will be recognised by the K3 when you eject the Kindle from your PC. The ‘3G’ Kindle variant can download e-books over any available 3G cellular phone network, but that doesn’t apply to me.

K3 as mass storage under PC-BSD 8.2 (FreeBSD 8.2)

When plugged into my PC-BSD 8.2 desktop’s USB port we see the following in /var/log/messages:

[gja@gjadesktop]/home/gja/Documents(101)% tail -f /var/log/messages
 [..]
Sep 18 14:31:52 gjadesktop kernel: usb_alloc_device: set address 3 failed (USB_ERR_TIMEOUT, ignored)
Sep 18 14:31:55 gjadesktop kernel: usbd_req_re_enumerate: addr=3, set address failed! (USB_ERR_TIMEOUT, ignored)
Sep 18 14:31:57 gjadesktop root: Unknown USB device: vendor 0x1949 product 0x0004 bus uhub4
Sep 18 14:31:57 gjadesktop kernel: ugen4.3: <Amazon> at usbus4
Sep 18 14:31:57 gjadesktop kernel: umass0: <Mass Storage> on usbus4
Sep 18 14:31:57 gjadesktop kernel: umass0: SCSI over Bulk-Only; quirks = 0x0000
Sep 18 14:31:58 gjadesktop kernel: umass0:3:0:-1: Attached to scbus3
Sep 18 14:31:58 gjadesktop kernel: ugen4.3: <Amazon> at usbus4 (disconnected)
Sep 18 14:31:58 gjadesktop kernel: umass0: at uhub4, port 2, addr 3 (disconnected)
Sep 18 14:31:58 gjadesktop kernel: (probe0:umass-sim0:0:0:0): AutoSense failed
Sep 18 14:31:59 gjadesktop root: Unknown USB device: vendor 0x1949 product 0x0004 bus uhub4
Sep 18 14:31:59 gjadesktop kernel: ugen4.3: <Amazon> at usbus4
Sep 18 14:31:59 gjadesktop kernel: umass0: <Mass Storage> on usbus4
Sep 18 14:31:59 gjadesktop kernel: umass0: SCSI over Bulk-Only; quirks = 0x0000
Sep 18 14:32:00 gjadesktop kernel: umass0:3:0:-1: Attached to scbus3
Sep 18 14:32:01 gjadesktop kernel: (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
Sep 18 14:32:01 gjadesktop kernel: (probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error
Sep 18 14:32:01 gjadesktop kernel: (probe0:umass-sim0:0:0:0): SCSI status: Check Condition
Sep 18 14:32:01 gjadesktop kernel: (probe0:umass-sim0:0:0:0): SCSI sense: UNIT ATTENTION asc:29,0 (Power on, reset, or bus device reset occurred)
Sep 18 14:32:01 gjadesktop kernel: da0 at umass-sim0 bus 0 scbus3 target 0 lun 0
Sep 18 14:32:01 gjadesktop kernel: da0: <Kindle Internal Storage 0100> Removable Direct Access SCSI-2 device
Sep 18 14:32:01 gjadesktop kernel: da0: 40.000MB/s transfers
Sep 18 14:32:01 gjadesktop kernel: da0: 3130MB (6410688 512 byte sectors: 255H 63S/T 399C)
Sep 18 14:32:01 gjadesktop kernel: GEOM: da0: partition 1 does not start on a track boundary.
Sep 18 14:32:01 gjadesktop kernel: GEOM: da0: partition 1 does not end on a track boundary.
Sep 18 14:32:26 gjadesktop kernel: smb_iod_recvall: drop resp with mid 67[gja@gjadesktop]
/home/gja/Documents(101)%

fdisk reveals a single, 3.1G FAT partition:

[gja@gjadesktop]/home/gja/Documents(102)%
[gja@gjadesktop]/home/gja/Documents(102)% fdisk /dev/da0
******* Working on device /dev/da0 *******
parameters extracted from in-core disklabel are:
cylinders=399 heads=255 sectors/track=63 (16065 blks/cyl)
parameters to be used for BIOS calculations are:
cylinders=399 heads=255 sectors/track=63 (16065 blks/cyl)
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 11 (0x0b),(DOS or Windows 95 with 32 bit FAT)
    start 16, size 6410672 (3130 Meg), flag 0
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 1023/ head 3/ sector 16
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
[gja@gjadesktop]/home/gja/Documents(103)%

KDE will also notify you that a new FAT file system has become available. When mounted, the K3 appears as a 3.1G drive (note in the numbers below there’s space in use because I’ve already copied over some mp3 and pdf content onto the Kindle from a Win7 laptop, also using it as a mass storage device).

[gja@gjadesktop]/home/gja/Documents(101)% df -h
Filesystem Size Used Avail Capacity Mounted on
[..]
/dev/msdosfs/Kindle 3.1G 95M 3.0G 3% /media/Kindle
[gja@gjadesktop]/home/gja/Documents(102)%
[gja@gjadesktop]/home/gja/Documents(103)% ll /media/Kindle/
total 40
drwxr-xr-x 1 gja gja 8192 Nov 1 2010 .active-content-data
drwxr-xr-x 1 gja gja 8192 Nov 1 2010 audible
drwxr-xr-x 1 gja gja 8192 Nov 1 2010 documents
drwxr-xr-x 1 gja gja 8192 Nov 1 2010 music
drwxr-xr-x 1 gja gja 8192 Nov 1 2010 system
[gja@gjadesktop]/home/gja/Documents(104)%
[gja@gjadesktop]/home/gja/Documents(105)% du -hc /media/Kindle/
 24K    /media/Kindle/system/com.amazon.ebook.booklet.reader/sidecar
 40K    /media/Kindle/system/com.amazon.ebook.booklet.reader
240K    /media/Kindle/system/Search Indexes
296K    /media/Kindle/system
2.9M    /media/Kindle/documents
 91M    /media/Kindle/music/Taking The Long Way
 91M    /media/Kindle/music
8.0K    /media/Kindle/audible
8.0K    /media/Kindle/.active-content-data
 95M    /media/Kindle/
 95M    total
[gja@gjadesktop]/home/gja/Documents(106)%

And when physically pulling device from USB port:

Sep 18 14:43:26 gjadesktop kernel: ugen4.3: <Amazon> at usbus4 (disconnected)
Sep 18 14:43:26 gjadesktop kernel: umass0: at uhub4, port 2, addr 3 (disconnected)
Sep 18 14:43:26 gjadesktop kernel: (da0:umass-sim0:0:0:0): lost device
Sep 18 14:43:26 gjadesktop kernel: (da0:umass-sim0:0:0:0): removing device entry

With my K3 plugged into my PC-BSD 8.2 desktop I was able to navigate to, and copy files to and from, the K3 using KDE’s Dolphin file manager.

Proper unmount and eject/disconnect under FreeBSD 8.2

Doing an ‘unmount’ of the K3’s FAT filesystem is easy (I did it from the KDE Dolphin GUI). However, before the K3 reverts from its “mass storage” mode back to e-reader mode, you need to ‘eject’/’disconnect’ the K3 from the PC’s USB port.

This can be done simply by pulling out the USB lead (once the file system’s dismounted, of course). But if you want to read/use the K3 while it remains plugged into the USB port (to continue charging the battery), you need to eject the K3 via software control of the USB port. Doing this properly under FreeBSD/PC-BSD requires usbconfig (http://forums.freebsd.org/showpost.php?p=42817&postcount=3) . For example, if the the K3 is usb device 3 on ugen bus 4 the command is as follows:

[gja@gjadesktop] /home/gja/papers# usbconfig -d 4.3 power_off

In /var/log/messages we see:

Sep 19 17:57:39 gjadesktop kernel: umass0: at uhub4, port 2, addr 3 (disconnected)
Sep 19 17:57:39 gjadesktop kernel: (da0:umass-sim0:0:0:0): lost device
Sep 19 17:57:39 gjadesktop kernel: (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0xa, scsi status == 0x0
Sep 19 17:57:39 gjadesktop kernel: (da0:umass-sim0:0:0:0): removing device entry
Sep 19 17:57:40 gjadesktop kernel: deget(): pcbmap returned 6
Sep 19 17:57:40 gjadesktop kernel: deget(): pcbmap returned 6

This achieved the desired result of causing the Kindle to revert to its interactive mode onscreen, no longer appearing as a USB Mass Storage device.

See later posts under this category for details on K3 jailbreaking, 802.11 and using various internal commands.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: