View Single Post
Old 07-06-2009, 10:05 AM   #49
imode
Junior Member
imode began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jul 2009
Device: Kindle 2
When you mount the Kindle as a USB drive there will be a folder "usbnet" which contains the script: usbnetwork. You have to edit this script with your PC or Mac. There is no longer a default "internal" IP address for the Kindle. It can be anything you want (as long as it's on the same subnet as the network you created on your PC or Mac). When you are done editing, save then reboot the kindle. Issue the `usbNetwork command (you no longer need `usbQa) and you should now be able to "telnet 192.168.15.201" to access the kindle.

So in the script, change (in your case):

1. HOST_IP to HOST_IP=192.168.15.200
2. KINDLE_IP to KINDLE_IP=192.168.15.201
3. Remove the "#" character (which is a comment) from the #route add default gw {$HOST_IP}

The script should look like:

#!/bin/sh

# Tweak these to match your setup
HOST_IP=192.168.15.200
KINDLE_IP=192.168.15.201

U=/mnt/us
R=$U/usbnet

# Check if we already have ethernet gadget driver running
lsmod | grep g_ether > /dev/null && exit 2

# Unload mass storage gadget and load ethernet one
rmmod g_file_storage || exit 1
modprobe g_ether host_addr='EE4900000000' dev_addr='EE1900000000' || exit 1
ifconfig usb0 ${KINDLE_IP} || exit 1
route add default gw ${HOST_IP}

# start telnet & ssh daemons
$R/busybox telnetd
$R/dropbear

exit 0

Last edited by imode; 07-06-2009 at 10:25 AM.
imode is offline