07-05-2009, 12:17 AM | #46 |
Zealot
Posts: 100
Karma: 629
Join Date: Jun 2009
Location: California, USA
Device: Kindle DX
|
|
07-06-2009, 05:22 AM | #47 |
Enthusiast
Posts: 40
Karma: 10
Join Date: Jun 2009
Device: none
|
Hi, ebs, I can't seem to connect to either the kindle store or wiki from the Kindle DX. I installed your patch just fine, and I tried setting up ICS. I suspect I must have done something wrong here; I setup my main Internet connection for sharing, and then configured the static IP for the new LAN (Kindle's) as 192.168.15.200 (found in the guide here: http://blog.jameslick.com/?p=1149). Well, I tried to Ping 192.168.15.200, and it was ok, but my attempt to Ping 192.168.15.244 (which I understand it to be the Kindle's hardcoded IP) failed. Is there anything I missed? I managed to follow the guide all the way till step 9...
Please help, sorry for this noob question... x_x Last edited by Acextreme; 07-06-2009 at 06:15 AM. |
07-06-2009, 06:13 AM | #48 |
Enthusiast
Posts: 40
Karma: 10
Join Date: Jun 2009
Device: none
|
Hmmm, since I can't seem to ping to my Kindle DX, I can't Telnet it either. Any help to do so is greatly appreciated. I just want to change the Screensaver timeout option and also the date and time if possible. Thanks!
Last edited by Acextreme; 07-06-2009 at 09:34 AM. |
07-06-2009, 10:05 AM | #49 |
Junior Member
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. |
07-06-2009, 10:13 AM | #50 |
Junior Member
Posts: 5
Karma: 10
Join Date: Jul 2009
Device: Kindle 2
|
Couple of additional items. Once you are able to get a root shell you need to edit:
/opt/amazon/ebook/config/framework.mario.conf Look for "USE_WAN" and set it to false. Next type the following: 1. mntroot rw 2. vi /etc/resolv.d/resolv.conf.default 3. add the line: nameserver <your DNS IP> Note: You need to use the "vi" editor to edit both files so I suggest reading up on vi commands before you try this (just google search "vi") Then type "reboot" at the command prompt. After that you should now be able to use all of the web services through your PC/Mac network. To verify, after reboot setup usbNetwork (it is NOT necessary to use the `usbQa command anymore, in fact don't). Telnet into the kindle and try: ping google.com If it works then everything is setup. I suggest reading this entire thread a few times, you'll find all the tips you need to get this setup Last edited by imode; 07-06-2009 at 10:41 AM. |
07-06-2009, 12:24 PM | #51 | |
Enthusiast
Posts: 40
Karma: 10
Join Date: Jun 2009
Device: none
|
Quote:
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? |
|
07-06-2009, 08:42 PM | #52 |
Junior Member
Posts: 5
Karma: 10
Join Date: Jul 2009
Device: Kindle 2
|
HOST_IP is the IP of your PC on the network you created. Before enabling `usbNetwork ensure that the cable is plugged in. Also, when issuing the `usbNetwork command ensure the first character is: ` (back tick) and not '. Ignore the `usbQa command, you don't need it. In fact, issuing the `usbQa command is probably what is causing your issue since I suspect it is trying to set the IP address of the kindle to a fixed value, i.e. .204
This works on both the K2 and the DX. Last edited by imode; 07-07-2009 at 04:48 AM. |
07-07-2009, 02:52 AM | #53 | |
Enthusiast
Posts: 40
Karma: 10
Join Date: Jun 2009
Device: none
|
Quote:
Finally, I replaced the altered usbnetwork file in my kindle with the original usbnetwork file found in the .rar archive, and only THEN did it let me connect in usbNetwork mode. Any idea why this peculiar behavior? I even re-patched the firmware, but still the same. What I don't understand is, was there some kind of CRC or MD5 check? Because, for example, when I removed the # sign and save and then added back in the # sign at the same place and save, it will not allow me to connect in usbNetwork mode even though the script content is EXACTLY the same. In other words, the moment an alteration is made (MD5 hash changes), I can't connect to usbNetwork mode anymore. Weird!!! Last edited by Acextreme; 07-07-2009 at 02:55 AM. |
|
07-07-2009, 03:29 AM | #54 |
Junior Member
Posts: 5
Karma: 10
Join Date: Jul 2009
Device: Kindle 2
|
Not weird at all, this is expected behavior when you edit a UNIX file on a PC. The kindle operating system is UNIX (LINUX)
A few things: 1. When you edited the script (probably with windows notepad) it is likely the execution bit got removed. UNIX(LINUX) script files require an execution bit to be set, otherwise they won't execute (sort of...). Anyway, this is most likely missing which is why it didn't work. When you copied back the original file it worked because the execution bit was still set. The script not being executable explains why `usbNetwork didn't behave. 2. The reason the MD5 failed to match is that there is a difference in UNIX and PC text file formats. Editing the file on your PC added a linefeed control character on the end of each line (UNIX requires only a CR). So there is an extra number of invisible bytes added. Therefore, even though you reverted the edits, the invisible LF characters where still there which is why the MD5 hash was different. To get around these issues you can install cygwin or mingw (unix environment for PC) on your PC (or boot from a Linux CD) and edit inside the cygwin terminal window using vi or emacs. This will preserve the file structure and execution permissions. If you have access to a Mac, do the editing there since MacOS is UNIX. Since I don't have a PC I had forgotten that editing UNIX files on a PC is fraught with danger. To properly edit: 1. install cygwin http://www.cygwin.com/ or mingw http://www.mingw.org/ 2. mount kindle 3. start the "cygwin" shell (should be on your desktop) 4. cd k: (or whatever your kindle drive letter is) 5. edit the usbnetwork network script "using the cygwin shell" with "vi" or "emacs" eg. "vi usbnet/usbnetwork" 6. set the execution bit: "chmod +x usbnetwork" 7. reboot kindle This should work... You don't need to keep repatching the firmware. Last edited by imode; 07-07-2009 at 03:52 AM. |
07-07-2009, 03:31 AM | #55 | |
Zealot
Posts: 100
Karma: 629
Join Date: Jun 2009
Location: California, USA
Device: Kindle DX
|
Quote:
|
|
07-07-2009, 03:38 AM | #56 |
Zealot
Posts: 100
Karma: 629
Join Date: Jun 2009
Location: California, USA
Device: Kindle DX
|
|
07-07-2009, 04:40 AM | #57 |
Guru
Posts: 694
Karma: 2383012
Join Date: Aug 2007
Location: Schiedam (The Netherlands)
Device: Lots of eInk devices and iOS stuff
|
vi? what's that? emacs rules! emacs forever!
Now seriously, you can use PSPad in Windoze and it will respect unix line endings if found a file with unix file endings: http://www.pspad.com/en/ It's free, fast and very useful. However, using formal logic, unix format is wrong. To go next line and return to beginning you have two different escape codes: CR and LF. Then if you only uses LF, next line will start at ending of upper one, and if you only uses CR, you will overwrite current line... [And now RFOG has opened another Pandora's Box ] |
07-07-2009, 06:50 AM | #58 |
Enthusiast
Posts: 40
Karma: 10
Join Date: Jun 2009
Device: none
|
Ok, finally I managed to telnet into kindle. Thanks, imode, for all your help.
Now that I managed to get in, I will try to explore around a little. But basically, I wanted to do a couple of things: (1) Connect to the Internet from Kindle DX so that the time and date gets updated; can't stand the date being at 1970...I will try what imode posted above about connecting to the Internet via usbNetwork later; only have enough time to do some cursory look into that /opt/amazon/ebook/config/framework.mario.conf file. (2) Change the timeout before it goes to sleep mode (i.e. goes into screensaver after 10 minutes of idle). I would like to disable that or set it to a very high value. Where is that setting located? Thanks so much! |
07-07-2009, 07:06 AM | #59 | |
Guru
Posts: 694
Karma: 2383012
Join Date: Aug 2007
Location: Schiedam (The Netherlands)
Device: Lots of eInk devices and iOS stuff
|
Quote:
date MMDDHHMMAAAA And you will get yor K on time. |
|
07-07-2009, 12:20 PM | #60 |
Enthusiast
Posts: 40
Karma: 10
Join Date: Jun 2009
Device: none
|
Thanks, rfog, I got that date part down. Now how about the sleep mode thing?
|
Tags |
kindle usb network |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
USB Networking on Mac OS? | DairyKnight | Kindle Developer's Corner | 19 | 07-02-2012 04:19 PM |
Hacks Kindle 3 USB Networking | n10 | Amazon Kindle | 2 | 10-11-2010 09:29 PM |
Firmware Update USB networking for 2.5? | dd_engi | Amazon Kindle | 9 | 05-09-2010 06:45 AM |
Is there any way to remove USB networking hack? | aghazi | Kindle Developer's Corner | 4 | 11-27-2009 07:35 PM |