Sunday, September 27, 2009

Kindle USB network tethering

I got a Kindle last week.

So sweet, that unit alone made me wish I lived in the US... They have some pretty cool stuff over there.

If like me you live outside the US, you will miss some of the great features provided by the Kindle and its "Whispernet" wireless network.
I then read that there was a debugging option on the Kindle 2 letting you share the internet connection of your PC using the USB cable.
Unfortunately, I had upgraded my Kindle to firmware 2.03 which removed the ability to tether over USB.

Luckily, some bright people were at work and created a work around it...
I merely collected information found in forums into one easy (well I hope) tutorial.
Most of it came from this forum:
http://www.mobileread.com/forums/showthread.php?t=49350

So here are the steps for Mac OS (10.5 and 10.6).. Instructions for Windows Vista/7 to follow.

Get the binary file to re-enable usb networking there:
[url]http://www.mobileread.com/forums/showpost.php?p=498421&postcount=14[/url]

Copy the file update_usbnetwork-k2.bin to the root of the Kindle mounted disk.

Then:
Home -> Menu -> Settings
Menu -> Update your Kindle

After the reboot, I edited the file usbnet/usbnetwork uncommenting the line:
route add default gw ${HOST_IP}
(remove the # in front of it).

Eject the kindle, and unplug the USB cable.

Put the Kindle in debug mode:
Home
Type any letter on the keyboard to start the Search mode.
Press DEL to blank the line.
type:
;debugOn
(you get the ; character in the SYM menu).

Type any letter on the keyboard to start the Search mode.
Press DEL to blank the line.
type:
`usbNetwork
(you get the ` character in the SYM menu, 2nd last character on the 3rd line).

Plug the USB cable.

I'm on a Mac, using 10.6 (snow Leopard)
The interface wasn't added automatically, so I went into the System Preferences -> Network

I press the + button just above the lock
Selected the Interface "RNDIS/Ethernet Gadget" , I named it "Kindle"

I set the interface as follow:
Configure IPv4: Manually
IP Address: 192.168.2.1
Subnet mask: 255.255.255.0
Click Apply.

Then I went in Network Preferences -> Sharing
Configured the Internet Sharing
To share my Airport connection to "RNDIS/Ethernet Gadget" (I had two listed there, for me the first one worked)

Then I opened a Terminal (use in the Finder Command-Shift-U to get to the utility folder)
telnet 192.168.2.2
I was welcomed by the friendly prompt:
[root@kindle root]#

Remount the root partition in read-write mode:
# mntroot rw

I configured the default DNS to use the OpenDNS servers:
# vi /etc/resolv.d/resolv.conf.default

nameserver 208.67.222.222
nameserver 208.67.220.220

(to enter edit mode in vi, press 'i', to save and quit: ':wq!')

# vi /opt/amazon/ebook/config/framework.mario.conf
change the line:
USE_WAN : true
into:
USE_WAN : false

create the file /etc/init.d/usbnet with:
--- cut below
#!/bin/sh

_FUNCTIONS=/etc/rc.d/functions
[ -f ${_FUNCTIONS} ] && . ${_FUNCTIONS}

US_ENABLE=/mnt/us/usbnet/AUTO

case "$1" in

start)
if [ -f ${US_ENABLE} ]; then
/mnt/us/usbnet/usbnetwork
else
msg "not usbnet" I
fi
;;

stop)
;;
*)
msg "Usage: $0 {start|stop}" W >&2
exit 1
;;
esac

exit 0
--- cut above

Make the file executable
# chmod +x /etc/init.d/usbnet


Create the link to active the init script
# ln -s /etc/init.d/usbnet /etc/rcS.d/S72usbnet

Now create the file AUTO in the usbnet folder:
# touch /mnt/us/usbnet/AUTO

reboot your Kindle (either using the reboot command, or by doing Menu -> Settings -> Restart.

That's it...
Now whenever I plug my Kindle to my mac, I enjoy all the internet goodness.

To revert the changes and make the Kindle seen as a USB storage device once again do the following:
telnet 192.168.2.2
# rm /mnt/us/usbnet/AUTO
# reboot

To activate it again, simply create a file AUTO in the usbnet folder. The file system is case insensitive. So AUTO or auto for the name of the file doesn't matter.
Then either reboot ; or enter debug mode (see above); and start `usbNetwork again

7 comments:

  1. That's pretty cool, is that still working on latest firmware ?

    ReplyDelete
  2. I have been some problem with my connection and I thought could be my network card, how ever i wasn´t sure. So, I decided to looking for information by internet and try to understand the network problem. I am happy because all the solution which advice this blog are very useful and interesting.
    costa rica investment opportunities gave me another alternatives to do the best investment, but of course i always will need a good network.

    ReplyDelete
  3. I'd love the Windows version of this :) Thanks

    ReplyDelete
  4. This whole information is absolutely useful and interesting. i like this blog because is easily understandable, and that is invaluable to the readers. I wanted to buy viagra online, and i saw this blog. I think this information will be useful for me specially because i have had some inconvenient with my network.

    ReplyDelete
  5. hi,You have a very good blog that the main thing a lot of interesting and useful! usb protection , thanks

    ReplyDelete
  6. Wow, you really should check your comments for spam!

    ReplyDelete