View Single Post
Old 07-06-2009, 12:24 PM   #51
Acextreme
Enthusiast
Acextreme began at the beginning.
 
Posts: 40
Karma: 10
Join Date: Jun 2009
Device: none
Quote:
Originally Posted by imode View Post
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
This is a big problem. I did exactly as you said; changed the HOST_IP and KINDLE_IP and also removed the # sign at route add default gw ${HOST_IP}.

Here's the problem. After making the changes, I eject the kindle mass storage device and restarted. Then I enter debug mode on the kindle via ;debugOn command, upon which I enter 'usbNetwork. Next, I plugged in the USB cable but it switched to USB mode. I tried a few times, even copied the code exactly as you had posted and saved it, restart, on debug mode via ;debugOn, as well as entering 'usbNetwork command but plugging in the USB cable still goes to USB drive mode. Even using the 'usbQa command does not work as well. What have I not done?

When patching, I simply copied the update_usbnetwork.bin over to the root folder in USB mode. To which, I proceeded to update my kindle and my kindle restarted after that. Everything went well. When I change the IPs in the usbnetwork script, it will only allow me to connect via USB mode. Replacing the altered script with original script enables me to connect via usbNetwork mode again. Weird...

By the way, what do HOST_IP mean? From my understanding, it means the IP of my PC to which the Kindle is connected to and which the Internet connection is to be shared, or am I wrong?
Acextreme is offline