|
|
View Full Version : Restore KindleDX USB networking
`usbNetwork doesn't work out of the box on Kindle DX - /test/bin/usbnetwork script (this is what actually called when you enter `usbNetwork hidden command) isn't included in the official firmware, however g_ether.ko gadget USB driver is still there :).
So, it's relatively trivial to enable this functionality on DX. Here is a sample script I've just tested succesfully with my Macbook Pro running Linux (just put it into /test/bin/usbnetwork on Kindle rootfs):
#!/bin/sh
rmmod g_file_storage
modprobe g_ether
ifconfig usb0 192.168.2.2
On my laptop:
mbp ~ # lsusb | grep RNDIS
Bus 001 Device 038: ID 0525:a4a2 Netchip Technology, Inc. Linux-USB Ethernet/RNDIS Gadget
mbp ~ # ifconfig usb0 192.168.2.1
mbp ~ # ping 192.168.2.2
PING 192.168.2.2 (192.168.2.2) 56(84) bytes of data.
64 bytes from 192.168.2.2: icmp_seq=1 ttl=64 time=0.835 ms
64 bytes from 192.168.2.2: icmp_seq=2 ttl=64 time=1.18 ms
64 bytes from 192.168.2.2: icmp_seq=3 ttl=64 time=1.19 ms
I'll post firmware update package shortly
desertgrandma 06-19-2009, 11:37 PM Well............welcome to MobileRead, ebs.
I'd tell you not to hesitate to ask questions, but somehow I get the feeling you will be answering them instead.
Enjoy. :)
As promissed, firmware update that enables `usbNetwork on DX.
Use on your own risk :)
Updated to include update_usbnetwork-k2.bin. I don't have K2 so this is untested - try it and report your results.
Version with ssh daemon will be posted shortly
Update: use version 0.05 which supports both telnetd and sshd
hmemcpy 06-20-2009, 05:33 AM Can you perhaps hack up something for the Kindle 2? That'd be awesome!
Can you perhaps hack up something for the Kindle 2? That'd be awesome!
Sorry, I don't have Kindle 2 and I'm not even sure I won't return DX before 30 days are up - I'm very disappointed by PDF support. I'm trying to see if DX is hackable enough to remedy this by myself (I'm not optimistic about Amazon doing anything, frankly).
SalvaG 06-20-2009, 06:50 AM Thank you
What is the use of this?
mbp bin # telnet 192.168.2.2
Trying 192.168.2.2...
Connected to 192.168.2.2.
Escape character is '^]'.
kindle login: framework
Password:
#################################################
# N O T I C E * N O T I C E * N O T I C E #
#################################################
Rootfs is mounted read-only. Invoke mntroot rw to
switch back to a writable rootfs.
#################################################
[framework@kindle framework]$ uname -a
Linux kindle 2.6.22.19-lab126 #3 PREEMPT Fri May 8 17:20:04 PDT 2009 armv6l unknown
[framework@kindle framework]$
[framework@kindle framework]$ cat /proc/cpuinfo
Processor : ARMv6-compatible processor rev 4 (v6l)
BogoMIPS : 796.44
Features : swp half thumb fastmult vfp edsp java
CPU implementer : 0x41
CPU architecture: 6TEJ
CPU variant : 0x0
CPU part : 0xb36
CPU revision : 4
Cache type : write-back
Cache clean : cp15 c7 ops
Cache lockdown : format C
Cache format : Harvard
I size : 16384
I assoc : 4
I line length : 32
I sets : 128
D size : 16384
D assoc : 4
D line length : 32
D sets : 128
Hardware : Mario Platform
Revision : 31020
Serial : "XXXXXXXXXXX"
[framework@kindle framework]$ lsmod
Module Size Used by
g_ether 28364 0
mxc_alsa_pmic 36480 1
snd_pcm 84421 1 mxc_alsa_pmic
snd_page_alloc 8520 1 snd_pcm
snd_timer 24740 1 snd_pcm
snd 49188 5 mxc_alsa_pmic,snd_pcm,snd_timer
mma7660F 27472 0
fiveway 20352 0
mxc_keyb 17528 0
ip_queue 11008 0
iptable_filter 2880 0
ip_tables 13288 1 iptable_filter
x_tables 16132 1 ip_tables
uinput 10978 0
fuse 48404 2
arcotg_udc 48264 1 g_ether
charger 26272 1 arcotg_udc
mwan 7636 0
eink_fb_pnlcd 22780 0
eink_fb_shim 131464 0
eink_fb_hal_broads 359724 0
eink_fb_hal 54512 4 eink_fb_shim,eink_fb_hal_broads
[framework@kindle framework]$ ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.4 1484 556 ? Ss 00:22 0:00 init [5]
root 2 0.0 0.0 0 0 ? S< 00:22 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? SN 00:22 0:00 [ksoftirqd/0]
root 4 0.0 0.0 0 0 ? S< 00:22 0:00 [watchdog/0]
root 5 0.0 0.0 0 0 ? S< 00:22 0:00 [events/0]
root 6 0.0 0.0 0 0 ? S< 00:22 0:00 [khelper]
root 37 0.0 0.0 0 0 ? S< 00:22 0:00 [kblockd/0]
root 38 0.0 0.0 0 0 ? S< 00:22 0:00 [cqueue/0]
root 40 0.0 0.0 0 0 ? S< 00:22 0:01 [mxc_spi.1]
root 58 0.0 0.0 0 0 ? S< 00:22 0:00 [kmmcd]
root 76 0.0 0.0 0 0 ? S 00:22 0:00 [pdflush]
root 77 0.0 0.0 0 0 ? S 00:22 0:00 [pdflush]
root 78 0.0 0.0 0 0 ? S< 00:22 0:00 [kswapd0]
root 79 0.0 0.0 0 0 ? S< 00:22 0:00 [aio/0]
root 101 0.0 0.0 0 0 ? S< 00:22 0:04 [mtdblockd]
root 136 0.0 0.0 0 0 ? S< 00:22 0:00 [kondemand/0]
root 146 0.0 0.0 0 0 ? S< 00:22 0:01 [mmcqd]
root 156 0.0 0.0 0 0 ? S< 00:23 0:00 [kjournald]
root 203 0.0 0.4 1520 520 ? S<s 00:23 0:00 udevd --daemon
root 474 0.0 0.0 0 0 ? S< 00:23 0:00 [kjournald]
root 543 0.2 0.0 0 0 ? S< 00:23 0:23 [eink_fb_bt]
root 545 0.0 0.0 0 0 ? S< 00:23 0:00 [eink_fb_pt]
root 549 0.0 0.0 0 0 ? S< 00:23 0:00 [eink_fb_sst]
root 553 0.0 0.0 0 0 ? S< 00:23 0:00 [pnlcd_animate]
root 663 0.0 0.5 1948 752 ? Ss 00:23 0:00 /usr/sbin/syslog-ng
root 734 0.0 0.0 0 0 ? S< 00:23 0:02 [charger/0]
root 1040 0.0 0.0 0 0 ? S< 00:23 0:00 [loop0]
root 1060 0.0 0.7 35248 916 ? Ssl 00:23 0:02 fsp /mnt/base-us /mnt/us -o rw
root 1676 0.0 0.3 1472 492 ? S 00:23 0:00 /usr/sbin/tphserver -f
root 2056 0.0 0.5 2652 720 ? S 00:23 0:00 /bin/sh /opt/eink/scripts/lifeguard
root 2119 0.0 0.2 2652 352 ? S 00:23 0:00 /bin/sh /opt/eink/scripts/lifeguard
root 2211 0.0 0.4 2652 604 ? Ss+ 00:23 0:00 /sbin/getty -L 115200 ttymxc0 -l /bin/login
root 2457 0.0 0.3 1460 484 ? S 00:23 0:00 /usr/sbin/watchdogd -f
92 8912 0.0 0.6 2236 772 ? Ss 01:29 0:00 /usr/bin/dbus-daemon --system
root 8942 0.0 0.7 19016 960 ? Ssl 01:29 0:00 /usr/bin/pmond
root 8955 0.0 3.5 82896 4540 ? Sl 01:29 0:00 /usr/bin/audioServer -I
root 8956 0.0 0.8 19016 1132 ? Sl 01:29 0:00 /usr/sbin/volumd -f
root 8957 0.0 0.9 43844 1216 ? Sl 01:29 0:00 /usr/sbin/wand -f
root 9002 0.0 0.9 19092 1184 ? Sl 01:29 0:00 /usr/bin/powerd -f
root 9110 0.0 1.2 28396 1560 ? Sl 01:29 0:00 /usr/sbin/retryd -f
root 9260 0.0 0.4 2648 564 ? Ss 01:29 0:00 /usr/sbin/crond -c /etc/crontab/
root 9290 0.0 0.7 18964 980 ? Ssl 01:29 0:00 /usr/bin/lipc-daemon -p /etc/lipc-daemon-props.conf -e /etc/lipc-daemon-e
root 9394 0.0 0.5 2652 720 ? S 01:29 0:00 /bin/sh /opt/amazon/ebook/bin/start.sh
root 9493 0.0 0.4 2652 520 ? S 01:29 0:00 /bin/sh /opt/amazon/ebook/bin/start.sh
root 9496 0.6 19.6 313304 25040 ? SLl 01:29 0:34 /usr/java/bin/cvm -Xmx16m -Xbootclasspath/a:/usr/java/lib/localedata.jar:
root 9497 0.0 0.5 2652 636 ? S 01:29 0:00 logger -p local2.debug
root 12248 0.0 0.1 3052 244 ? S<s 02:46 0:00 /mnt/us/bin/telnetd
1001 12273 0.0 0.5 2652 720 pts/0 S<s 02:51 0:00 -sh
1001 12281 0.0 0.7 2584 984 pts/0 R<+ 02:54 0:00 ps aux
sirbruce 06-20-2009, 07:54 AM Sorry, I don't have Kindle 2 and I'm not even sure I won't return DX before 30 days are up - I'm very disappointed by PDF support. I'm trying to see if DX is hackable enough to remedy this by myself (I'm not optimistic about Amazon doing anything, frankly).
ebs,
Whatever needs to be changed on the KDX to enable USB networking is probably also what needs to be changed for the K2. Please try to make your hack work with either firmware and let people here test it.
porkupan 06-20-2009, 08:48 AM All that needs to be done, really, is to repack the update with the -k2 option. If someone is interested, they can recreate it themselves from the published package.
sirbruce 06-20-2009, 09:50 AM All that needs to be done, really, is to repack the update with the -k2 option. If someone is interested, they can recreate it themselves from the published package.
Assuming it works? We've had threads on here of people asking for this since it got disabled in 2.0.3.
I have updated usbnetwork.tar.gz to include untested k2 version
porkupan 06-20-2009, 02:33 PM Assuming it works? We've had threads on here of people asking for this since it got disabled in 2.0.3.
The OS is the same (the same kernel version), all setup is essentially the same. No reason why it shouldn't work on K2.
I've uploaded usbnetwork-0.04.tar.gz package to include hacked telnetd daemon that gives you root shell without any passwords.
Also, I changed the way I install usbnetwork script - now the only modification to the original firmware is a symbolic link /test/bin/usbnetwork which points to /mnt/us/usbnet/usbnetwork. Nothing else is touched.
All custom scripts and executables are installed in 'usbnet' directory on user-accessible mass storage partition. This will simplify any modifications you may want to make - just change script there, no need to perform firmware update every time. Please, refer to README for more details.
Kindle2 version is also included, however I haven't tested it.
Screenshot :):
mbp bin # ifconfig usb0 192.168.2.1
mbp bin # telnet 192.168.2.2
Trying 192.168.2.2...
Connected to 192.168.2.2.
Escape character is '^]'.
#################################################
# N O T I C E * N O T I C E * N O T I C E #
#################################################
Rootfs is mounted read-only. Invoke mntroot rw to
switch back to a writable rootfs.
#################################################
[root@kindle root]# whoami
root
[root@kindle root]# ls -al /test/bin
drwxr-xr-x 2 root root 1024 Jun 20 13:52 .
drwxr-xr-x 9 root root 1024 Jun 20 13:39 ..
lrwxrwxrwx 1 root root 25 Jun 20 13:52 usbnetwork -> /mnt/us/usbnet/usbnetwork
[root@kindle root]#
Update: version 0.04 removed - use 0.05
New version (I think it'll be a final one) adds support for sshd - when asked for a root password, just press enter. I've also rebuilt busybox with shared libs to decrease size.
ebs@mbp ~/linux/kindle/usbnet $ ssh root@192.168.2.2
root@192.168.2.2's password:
#################################################
# N O T I C E * N O T I C E * N O T I C E #
#################################################
Rootfs is mounted read-only. Invoke mntroot rw to
switch back to a writable rootfs.
#################################################
[root@kindle root]#
brteag00 06-21-2009, 09:18 PM I can verify that ver. 0.05 has enabled the USB network device on my DX. Thanks, ebs! I like the idea of symlinking the new code into the root fs, it's going to make testing mods much less dangerous.
Also - I would exhort my fellow forum members that with great power comes great responsibility. Please do not (for example) try to use your Kindle to get free wireless internet on your laptop! Not only will Amazon get pissed off at you, they'll come down hard on the rest of us.
every 06-23-2009, 04:08 AM Thanks ebs for this work.
I am out of USA and cann't connect the Amazon,
So i want to register my kindle dx by this method.
Now i can telnet to DX, and in the shell of DX,
I can ping other IP(such as 72.14.203.99,it's google.com),
the network should be Ok,but I still cann't access the kindle shop,
any other website by the basic web.
So any idea?
I never tried to this kind of stuff - my main goal was to get a convenient access to the Kindle so I can explore it.
I can make some guesses, though - make sure you have resolver configured (/etc/resolv.conf), also, check /opt/amazon/ebook/config/. From quick look firmware seems to be using http proxies, which may not make sense when you are accessing Internet through your ISP...
BTW, tcpdump or wireshark running on your host will tell you everything :)
Thank you Ebs.
At least I've put my two Kindles in hour. :-)
PS: It works in K2. However, it seems bouncing.
every 06-23-2009, 10:50 AM I have add a dns server, and ping the url is correct.
Thought the web application maybe use http proxy,(it can be see in the config file)
it should to send packet to the network,there is only one route in the system.
I try to tcpdump on the usb0,
and open "basic web" of DX,
nothing happen.
Why?
PS: It works in K2. However, it seems bouncing.
Could you elaborate?
Could you elaborate?
If you mistake a command, Kindle interprets as search string, then if you type a command and none occurs, it has been accepted (this assures all commands are correctly typed).
Then I applied patch to KDX and it worked fine. I installed driver with KDX (Patching inf file because my computer runs Vista x64). Then I patched my K2. After configuring IP and so into the K2, I executed the commands an connected it: result was, after detecting, network disabled (it detects the same KDX network adapter whit KDX local IP (my computer, not KDX one). Tried to enable without success at least three times...
Rebooted K2 and repeat newtork activation. Detected in my computer and after a telnet shell connection and typing of "time", it timed out. Close telnet. Unplug and plug K2 and reconnect telnet. This time worked and I could navigate into device and change date.
I've not connected anymore because I'm very busy this days and I prefer read instead to hack my Kindle in my free time. Perhaps this weekend I will do something more like copy al internal data to external partition (and then copy to my computer) and analyze them. :bookworm:
Hmm, so connection is not stable for you. There is one thing lab126 init.d script does that mine doesn't - it forces full speed for OTG controller. I never needed this on DX and Linux host, but maybe it's required for K2 and/or Windows.
I'll post simple update to usbnetwork script you can try shortly
Try this version of usbnetwork script:
#!/bin/sh
# Teweak these to match your setup
HOST_IP=192.168.2.1
KINDLE_IP=192.168.2.2
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
rmmod arcotg_udc || exit 1
modprobe arcotg_udc force_fs=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
recyclebin 06-24-2009, 12:23 AM .....
Well, I woudn't worry about anybody using Kindle for a "free" internet access. First of all it's not really free - you paid for it.
But the real reason - all accesses go through Amazon proxies (yes, Amazon will see everything :)). Sprint is filtering direct accesses on IP level (I get ICMP "Destination unreachable", with "Administratively filtered" code), and DNS doesn't even resolve anything except for Amazon servers.
Try this version of usbnetwork script:
Windows has detected a new interface (I've assigned 92.168.2.1 IP manually) and I've copied etc in /mnt/us without trouble via telnet. No timeouts. No disabled networks. :2thumbsup
:iloveyou::thanks:
Make sure you restart Kindle after you update the script, otherwise changes won't be in effect. I want to make sure it's stable :)
PiAir 06-25-2009, 02:58 PM Hi,
First of all: thank you for providing this script. Since I'm in Europe, this looks like my only possible way to get online with my new Kindle DX.
When I try to use the 0.05 bin however I get an error code 003 and then it stops.
I tried it using the alternative usbnetwork script that ebs posted, but with the same result.
Is there a way that I can make the bin output a more descriptive error message then just the 003 error code provided by the Kindle update program?
And if so, could you please give an suggestion as to where I could do that best?
p.s. since this is my first post, it might be polite to introduce myself: I'm a blogger and live in the Netherlands and write (in Dutch) about IT and Education. I imported the Kindle DX and can't use the whispernet (of course). Being able to use the USBNetwork would be nice, though even now I can buy/download Amazon Kindle books and read them on the Kindle.
However the Settings screen doesn't show anything except "register" if you haven't done that yet.
Thanks,
Pierre
sirbruce 06-25-2009, 04:19 PM How are you "using" the 0.05 bin?
When I try to use the 0.05 bin however I get an error code 003 and then it stops.
Do you get this error when you perform firmware update? That's very unlkely, as I don't return any errors even if something has failed.
Could you post usbnetwork_install.log which is created during firmware update step?
PiAir 06-25-2009, 04:36 PM How are you "using" the 0.05 bin?
I downloaded the .tar.gz file, unpacked it using 7-zip, attached the Kindle DX via USB, copied the update_usbnetwork.bin to the root folder of the Kindle.
Resetting is a bit difficult if the Kindle hasn't been registered, I can't use the option that is apparently available in Menu > Settings
The ALT + SHIFT + R option doesn't work either on my DX, it just brings up the search box.
Sooo, I just hold the slider for 15 seconds so the DX reboots.
It then says it is going to perform an update and not to switch of the device.
After a couple of seconds I get a message that the update failed and I get an error code and the advise to press the R 4 button.
After completing the reboot the .bin file has been deleted.
----
I also tried it with an edited usbnetwork like suggested in the other reply and used kindle_update_tool.py to rebuild the .bin
No luck either with that, exact same results.
PiAir 06-25-2009, 04:54 PM Do you get this error when you perform firmware update? That's very unlkely, as I don't return any errors even if something has failed.
Could you post usbnetwork_install.log which is created during firmware update step?
I couldn't find any install.log but I took pictures:
This is what I see after the reset:
http://www.flickr.com/photos/piair/3660962546/
and then I get this message:
http://www.flickr.com/photos/piair/3660155751/
sirbruce 06-25-2009, 06:28 PM I downloaded the .tar.gz file, unpacked it using 7-zip, attached the Kindle DX via USB, copied the update_usbnetwork.bin to the root folder of the Kindle.
Resetting is a bit difficult if the Kindle hasn't been registered, I can't use the option that is apparently available in Menu > Settings
First, I would try redownloading and recopying the file to make sure your version isn't corrupt.
Second, it's possible that the sleep update doesn't work the same as the Update Your Firmware, but I doubt it. EVEN THOUGH YOUR KINDLE IS NOT REGISTERED, you can still update from the Settings screen. After you copy the .bin file, go to Menu, settings, and then hit Menu AGAIN and you should have the option available.
Sonist 06-25-2009, 08:17 PM I never tried to this kind of stuff - my main goal was to get a convenient access to the Kindle so I can explore it..... :)
So, do you see any non-Amazon way of getting real PDF support :) ?
I couldn't find any install.log but I took pictures:
This is what I see after the reset:
http://www.flickr.com/photos/piair/3660962546/
and then I get this message:
http://www.flickr.com/photos/piair/3660155751/
The most likely problem is corrupted bin file - my install script always returns success regardless of the actual result.
If you don't see usbnetwork_install.log in the root of user partition, then no update was even attempted.
As sirbruce said, try performing update from "Settings" menu - this is how I do it.
Here are MD5 hashes for the correct files:
25491031ec1dc3ee87c598a2a2ae7140 update_usbnetwork-k2.bin
f21f74b1b4b38da4eba2365dbf143c41 update_usbnetwork.bin
PiAir 06-26-2009, 02:06 AM First, I would try redownloading and recopying the file to make sure your version isn't corrupt.
Second, it's possible that the sleep update doesn't work the same as the Update Your Firmware, but I doubt it. EVEN THOUGH YOUR KINDLE IS NOT REGISTERED, you can still update from the Settings screen. After you copy the .bin file, go to Menu, settings, and then hit Menu AGAIN and you should have the option available.
Thank you so much for that tip!
Not only is it much faster than using the power switch it also is an indication of corrupts .bin files.
When I re-downloaded it and copied the unmodified one on, it recognised it and enabled the "Update Your Kindle" option. And then it worked without errors/problems.
http://www.flickr.com/photos/piair/3662091622/
When I tried it with the bin that I had been using, it didn't show that option.
I can now connect to the Kindle using telnet (since I don't know what good I can do there, I'll probably better stay away from that though)
Just forgot what a PIA setting up network sharing in XP is, so no test yet as far as going online with it.
Still, thanks for the help with this first part! :thanks:
PiAir 06-27-2009, 04:18 AM I apologize for asking all these n00b questions here, but I'm very new to Linux and the Mac and even though that would probably make it wiser not to mess with my Kindle in this way, I just can't/couldn't resist.
Here is what I've got:
* I installed the .bin to restore usbNetwork on my DX
* I enable usbNetwork using `usbNetwork and `usbQa
* I connected the Kindle to my DX, set the IP for the new interface to 192.168.2.1 (I left the default settings in usbNetwork), all the other boxes are empty
* I enabled internet sharing for the new interface through the Airport connection of the Macbook
* I opened up a terminal window and used 'ssh root@192.168.2.2' with password 'fiona' to connect to my DX from the Macbook.
* from this SSH session I can ping the Macbook from the Kindle DX using 'ping 192.168.2.1' but if I try to reach any of the other IP's on my local network (which is in the 192.168.1 range) or any IP outside my local network I get a 'Network is unreachable' error.
Of course that also means that the browser on the DX is unable to reach any
Any suggestions on where to look for why that happens, or is there something obvious that I should do to make that routing work?
Thanks!
You need to add default gateway (my script even have it already, but commented out).
PiAir 06-27-2009, 09:32 AM Ah, yes, that helped.
And after putting "nameserver DNS_IP" combinations in /etc/resolv.conf it also resolved domain names.
Other thing I did was set USE_WAN in "/opt/amazon/ebook/config/framework.mario.conf" to false.
Because my Kindle DX wasn't registered yet, it didn't have /var/local/java/prefs/reginfo yet
From this site (http://www.hi-pda.com/forum/redirect.php?tid=495166&goto=lastpost&sid=oUjxan) I inderstood that the structure is like this:
<text>
<user_device_name>Kindle Name</user_device_name>
<name>username@mail.com</name>
<alias>Kindle mail without the @kindle.com part</alias>
</text>
user_device_name = the name of the Kindle as shown by Amazon
name = my Amazon username
alias = the kindle mail address without the @kindle.com part
After creating that file the Kindle DX shows the Kindle name and the Settings and Device Information page shows the info.
Still, it looks as if the info in reginfo as shown here isn't complete. When trying to buy a book it still says that it isn't registered yet.
Even though the info matches the info for the Kindle as shown on http://www.amazon.com/manageyourkindle
Could someone with a properly registered Kindle have a look at the /var/local/java/prefs/reginfo to see if there is any info missing here?
One thing that I find strange is that I haven't added my password anywhere nor am I asked for my password when the Kindle tries to buy/register/deregister.
PiAir 06-27-2009, 12:29 PM Just in case it helps: I've capture a log using Wireshark while I used the Menu > "Sync & Check for Items".
Apparently there is some problem with the certificate that the Kindle receives from Amazon?
No. Time Source Destination Protocol Info
12 8.985401 192.168.2.2 207.171.166.113 TLSv1 Alert (Level: Fatal, Description: Certificate Unknown)
Could it be that the Kindle receives this certificate from Amazon when it registers? And if so, is there another way to get this on the Kindle?
Could someone with a properly registered Kindle have a look at the /var/local/java/prefs/reginfo to see if there is any info missing here?
My reginfo has a slightly different structure, but nothing else of importance:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<user_device_name>My Kindle</user_device_name>
<global_device_name>NOT_USED</global_device_name>
<given_name>My_First_Name</given_name>
<name>My_Full_Name</name>
<alias>Nick</alias>
</response>
PiAir 06-27-2009, 03:38 PM Thanks for checking and posting. It indeed doesn't make any difference.
It still throws the certificate error that I posted in the log.
Puppetmaster 06-29-2009, 09:18 AM I got the script to work, and I am able to SSH to my Kindle DX. I can telnet, FTP, SSH and a lot of other things. But somewhere inside the Kindle my request for port 80 is getting stopped.
I tried to register my kindle but it just tells me that it can't connect. My wireshark does get anything...
I live in europe and I would like to se how the newspapers look.
If you are seriously playing with internal Kindle software (e.g. mucking with java stuff), I recommend making usbnetworking "auto-startable". Otherwise, if you corrupt something in framework, you'd need serial console for recovery.
Add this simple script to /etc/init.d:
[root@kindle init.d]# cat /etc/init.d/usbnet
#!/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
And then make it start-up script:
[root@kindle rcS.d]# ls -al /etc/rcS.d/*usbnet
lrwxrwxrwx 1 root root 16 Jan 2 1970 /etc/rcS.d/S72usbnet -> ../init.d/usbnet
After that, you'll be able to enable usbnetworking automatically by creating file "AUTO" in "usbnet" directory on user partition
whitepaper 07-04-2009, 10:31 PM Great, ebs!
do you have any progress in the web browsing over USB?
Alex.
do you have any progress in the web browsing over USB?
I'm not working on it, nor planning to. I use usbnetworking to access Kindle internals.
Acextreme 07-06-2009, 06:22 AM 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
Acextreme 07-06-2009, 07:13 AM Hmmm, since I can't seem to ping to my Kindle DX, I can't Telnet it either. :blink: 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!
imode 07-06-2009, 11:05 AM 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
imode 07-06-2009, 11:13 AM 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
Acextreme 07-06-2009, 01:24 PM 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?
imode 07-06-2009, 09:42 PM 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.
Acextreme 07-07-2009, 03:52 AM HOST_IP is the IP of your PC network. 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.
Ok, this is so WEIRD, I swear! This is what I have been doing and it makes absolutely no sense. As mentioned earlier, I can connect in usbNetwork mode if I haven't altered anything (i.e. usbnetwork script intact). The moment I changed IP or just remove that # sign within that script, it will NOT work. And the funny part is, even when I removed the changes I made (i.e. copied and paste the original script back in and save), it still will not connect in usbNetwork mode; I literally opened the original script, copied everything, and paste it into the usbnetwork script in my kindle drive and still it does not work.
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!!! :blink: :smack: :chinscratch:
imode 07-07-2009, 04:29 AM 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.
Ok, this is so WEIRD, I swear! This is what I have been doing and it makes absolutely no sense. As mentioned earlier, I can connect in usbNetwork mode if I haven't altered anything (i.e. usbnetwork script intact). The moment I changed IP or just remove that # sign within that script, it will NOT work. And the funny part is, even when I removed the changes I made (i.e. copied and paste the original script back in and save), it still will not connect in usbNetwork mode; I literally opened the original script, copied everything, and paste it into the usbnetwork script in my kindle drive and still it does not work.
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!!! :blink: :smack: :chinscratch:
It's not EXACTLY the same, most likely you have corrupted line endings if you have edited this file with a dumb Windows editor.
5. edit the usbnetwork network script with "vi" or "emacs" eg. "vi usbnet/usbnetwork"
I think you are opening Pandora's box :)
I think you are opening Pandora's box :)
vi? what's that? emacs rules! emacs forever! :D
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 :rofl:]
Acextreme 07-07-2009, 07:50 AM Ok, finally I managed to telnet into kindle. Thanks, imode, for all your help. :thanks:
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! :)
(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.
Yo do not need internet access for that. When you are in terminal you can type
date MMDDHHMMAAAA
And you will get yor K on time.
Acextreme 07-07-2009, 01:20 PM Thanks, rfog, I got that date part down. Now how about the sleep mode thing? :)
poohbear_nc 07-07-2009, 02:04 PM Thanks, rfog, I got that date part down. Now how about the sleep mode thing? :)
Take a look at this thread: http://www.mobileread.com/forums/showthread.php?t=48827
Acextreme 07-08-2009, 03:59 AM 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
Well, I managed to do what you mentioned, as well as reading the past posts but still can't connect. I guess it's due to my lack of understanding, so there is a couple of things that I would like to clarify.
(1) What does USE_WAN do? By setting it to false, my attempts to connect to the Kindle store still prompts me to enable wireless or it will refuse to connect.
(2) I vi /etc/resolv.d/resolv.conf.default and added the line "nameserver xxx.xxx.xxx.xxx" without the quotes, is this format correct or should it be "nameserver <xxx.xxx.xxx.xxx>" without quotes but with the < and >?
And I was also thinking of doing the usbnetwork autostart script found here just to make sure that I am insured against bricking the Kindle since I was thinking of installing ebs's "last page" screensaver hack:
If you are seriously playing with internal Kindle software (e.g. mucking with java stuff), I recommend making usbnetworking "auto-startable". Otherwise, if you corrupt something in framework, you'd need serial console for recovery.
Add this simple script to /etc/init.d:
[root@kindle init.d]# cat /etc/init.d/usbnet
#!/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
And then make it start-up script:
[root@kindle rcS.d]# ls -al /etc/rcS.d/*usbnet
lrwxrwxrwx 1 root root 16 Jan 2 1970 /etc/rcS.d/S72usbnet -> ../init.d/usbnet
After that, you'll be able to enable usbnetworking automatically by creating file "AUTO" in "usbnet" directory on user partition
But unfortunately, I was again unsuccessful. I read up a bit on linux start-up script and symbolic linking but am not sure if I had done right. This is what I did:
(1) vi /etc/init.d/usbnet and since that does not exist, I was allowed to create it. I then typed in the script as so and :w to save and :q to quit:
#!/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
(2) To make the start-up symbolic link, I did this:
root@kindle root]# ln -s /etc/init.d/usbnet /etc/rcS.d/S72usbnet
(3) Next, I restart my Kindle and created a blank content file called AUTO in the usbnet directory of Kindle's mass storage drive; to make sure that the file is unix style, I used EditPadLite (which supports Unix files) and open the usbnetwork file (the one I had problems earlier) and removed all contents within and save it as AUTO so as to ensure that the execution bit if needed is there.
Unfortunately, restarting my Kindle did not automatically start the usbnetwork mode. The symbolic link that I created in (2) was supposed to be the last file to be executed since it's S72 (and ebs used that too) and hence whichever service that it needs prior to its execution should already be up running.
For (3), I also attempted creating an AUTO file with the line AUTO in it but still not successful. When I plug in the usb cable right after restarting, I am still connected via usb mode.
Is there anything I did wrongly or did I miss out something?
You can always try to run /etc/init.d/usbnet script, you have created, from the shell session to make sure it's actually correct. Most likely it's not runnable
imode 07-08-2009, 08:37 AM As for the usbnet script try "chmod +x usbnet".
Anyway, forget about the usbnet startup script for now...
Do this first:
1. open a cmd window on your PC (dos prompt)
2. type "ping google.com", note the IP address
3. telnet onto the kindle
4. on your kindle type "ping <ip from step 2>" e.g. "ping 74.125.45.100"
5. if it is successful then your kindle can access the internet
6. if not, then type this "netstat -r" first afterward "ifconfig -a"
then on your PC cmd window type "ipconfig /all" and post all the results
7. Carefully... reread this entire thread twice
Post whether you are successful or not and we'll proceed from there.
Acextreme 07-09-2009, 12:36 PM As for the usbnet script try "chmod +x usbnet".
Anyway, forget about the usbnet startup script for now...
Do this first:
1. open a cmd window on your PC (dos prompt)
2. type "ping google.com", note the IP address
3. telnet onto the kindle
4. on your kindle type "ping <ip from step 2>" e.g. "ping 74.125.45.100"
5. if it is successful then your kindle can access the internet
6. if not, then type this "netstat -r" first afterward "ifconfig -a"
then on your PC cmd window type "ipconfig /all" and post all the results
7. Carefully... reread this entire thread twice
Post whether you are successful or not and we'll proceed from there.
Oh, thanks to the "chmod +x usbnet" command (if I don't understand wrongly, that command is to make the usbnet file executable), I managed to get it to autostart now. Cool, thank you, imode. I got lots to learn about unix; this is my first time toying around with linux shell.
On the other note, it's still unsuccessful. I tried everything that I could but still can't seem to make Kindle to ping google.com or its IP that I got from pinging from my PC's cmd prompt. Here is the result of netstat and ifconfig:
#################################################
# N O T I C E * N O T I C E * N O T I C E #
#################################################
Rootfs is mounted read-only. Invoke mntroot rw to
switch back to a writable rootfs.
#################################################
[root@kindle root]# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 usb0
default 192.168.1.103 0.0.0.0 UG 0 0 0 usb0
[root@kindle root]# ifconfig -a
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
usb0 Link encap:Ethernet HWaddr EE:19:00:00:00:00
inet addr:192.168.1.104 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:131 errors:0 dropped:0 overruns:0 frame:0
TX packets:182 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7373 (7.2 KiB) TX bytes:23615 (23.0 KiB)
[root@kindle root]#
And here is the "ipconfig /all" info from my PC (I blank out the MAC address of my PC; don't think that would be needed):
Ethernet adapter Kindle DX (USB Network):
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Linux USB Ethernet/RNDIS Gadget
Physical Address. . . . . . . . . : EE-49-00-00-00-00
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::41ae:ffce:6345:ab58%18(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.1.103(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 401492224
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Disabled
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Marvell Yukon 88E8036 PCI-E Fast Ethernet
Controller
Physical Address. . . . . . . . . : xx-xx-xx-xx-xx-xx
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::883a:c739:8639:1fce%9(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.1.101(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Wednesday, July 08, 2009 12:44:13 AM
Lease Expires . . . . . . . . . . : Monday, August 16, 2145 5:42:38 AM
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DHCPv6 IAID . . . . . . . . . . . : 251663273
DNS Servers . . . . . . . . . . . : 192.168.1.1
NetBIOS over Tcpip. . . . . . . . : Enabled
If it's of any help, I put in the usbnetwork script as follows:
#!/bin/sh
# Teweak these to match your setup
HOST_IP=192.168.1.103
KINDLE_IP=192.168.1.104
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
Thanks so much for your helpfulness, imode. :)
If you can ping your host from Kindle, but not anything else, then it's your host not doing IP routing. Look at Internet connection sharing or similar, if you are using Windows. As I mentioned earlier in this thread - running wireshark on host also may help
Acextreme 07-09-2009, 04:31 PM If you can ping your host from Kindle, but not anything else, then it's your host not doing IP routing. Look at Internet connection sharing or similar, if you are using Windows. As I mentioned earlier in this thread - running wireshark on host also may help
I was beginning to suspect that to be the case. Right now I am trying to figure a few things out. I managed on 2 occasions to connect to Kindle store, but there seem to be some kinks that I need to deal with and sort it out. After that, I will post it up here...
EDIT: For some reason, it now works. I guess it must be some Windows Vista ICS kinks. When I redo the ICS in Windows, I now am able us go to the Kindle store...
Acextreme 07-09-2009, 05:19 PM One other thing, though now I can go online, using one of those experimental features such as Basic Web will return a message that says you must first register your Kindle to your Amazon.com user account. But I created a reginfo containing details such as Device's name, alias, my given name, etc, and therefore in my Kindle's setting page, it says registered on dd/mm/yyyy along with other info.
Apparently, there must be something else that needs to be set; the reginfo is simply a file to display the info and has nothing to do with actually registering the device; Kindle must be looking at something else to know if it is registered. The question is - where? :blink:
I've been following this thread with interest, I bought my Kindle DX from my US Amazon account but before registering over there, I came back to the UK.
I got the USB networking to work and can browse the Kindle Store, but can't use the browser or register. ( I know there's no point since I have to sit beside the computer to do it). I originally thought that there was some sort of routing problem keeping the device from registering, but after poking around, I'm guessing it's more like a Whispernet proxy/Sprint IP address that's keeping it from registering.
Has anyone else got anywhere on the registration front?
berend 07-18-2009, 08:11 AM Hello all,
I am new to this forum. I live and work in Holland and as I am a programmer I was as a matter of course attracted to this thread. I write ASP.Net and Windows software though. My unix experience is very long ago, I last worked with it in 1993. So I am supposed that am as big a n00b as anyone concerning embedded linux.
I bought my kindle dx through our US office in Peachtree City, near Atlanta GA and it was registered and downloaded a few freebies while it still was located in the USA. Since then, I have bought some stuff and downloaded it through the "manage your kindle" web page.
I would be very interested in this USB networking stuff, if it would allow me to emulate the whispernet for downloading books. Is that possible at all? (only answer "yes" please if you actually successfully downloaded a book via the usb network). I am not really interested in browsing the kindle shop from my kindle, I do have a browser on my PC, thank you very much ;).
I have a few more technical questions too.
- For starters: there is no official firmware update for the Kindle DX yet. Is an image of the unhacked firmware 2.1.337560062 available for reverting if I would run into trouble with any other firmware that I use?
-What about using the usb networking firmware on an already registered Kindle DX like mine. Do I run the risk of losing the registration?
- I don't really know this, but I am assuming that books I buy through the Kindle store are DRM-protected and will only open on my Kindle. Is that the case? If yes, how does the device check the digital rights? Is that locked to a hardware ID (similar to a mac address) or is there a piece of software like a license file that should remain unaltered?
- Could someone provide a more technical explanation of what exactly is needed for succesfully routing IP through my PC to the internet? I am using Windows XP both at home and in the office. In the office I can configure the dhcp server and -if I absolutely need to- the cisco router at will, but at home I unfortunately have an Alcatel SpeedTouch adsl router that is completely locked down by the provider. It does not allow any use of fixed ip addresses, which is sometimes damned inconvenient.
If there are some adjustments needed to configuration files on the kindle and they could be manipulated from Windows-based software to make the networking function predictably, I would be willing to write a GUI-frontend to do so, to make this stuff more accessible to n00bs like myself. I am a good programmer, I am just not very fond of linux and command line stuff :o. I would prefer to automate things if remotely (pun intended ;)) possible.
LeegleechN 07-18-2009, 10:54 AM To my knowledge this update has not been confirmed working for the kindle 2. I'm leaving for a trip soon, but I'll be testing it out sometime in the next few days. Wish me luck!
LeegleechN 07-22-2009, 09:55 PM Alright, I can confirm that this update works for the Kindle 2. It's much easier to get things working under a linux host. For Windows, I had to install a RNDIS driver for it to handle USB networking. I'll be uploading an image of the file system sometime to help modders. I also plan to poke around to see if there's any interesting opportunities to extend the platform.
I'll be uploading an image of the file system sometime to help modders.
This maybe not a good idea - user-space code is Amazon proprietary and it's unlikely you have rights to distribute it.
Also be careful not to upload your client SSL certificate :)
LeegleechN 07-23-2009, 12:07 AM Well, for now if anyone messed up a file and needs a clean version, please PM me.
I have a few more technical questions too.
- For starters: there is no official firmware update for the Kindle DX yet. Is an image of the unhacked firmware 2.1.337560062 available for reverting if I would run into trouble with any other firmware that I use?
You can always extract firmware contents after installing my usbnetwork update. It's safe - I don't modify any existing code or scripts.
-What about using the usb networking firmware on an already registered Kindle DX like mine. Do I run the risk of losing the registration?
No, my Kindle is registered. I use usb networking only for hacking, not as a replacement for wispernet - it's safe
- I don't really know this, but I am assuming that books I buy through the Kindle store are DRM-protected and will only open on my Kindle. Is that the case? If yes, how does the device check the digital rights? Is that locked to a hardware ID (similar to a mac address) or is there a piece of software like a license file that should remain unaltered?
Google for kindlepid.py - there is plenty of info. In short, book is encrypted by Amazon using a key (PID) which is derived from Kindle serial number
berend 07-25-2009, 08:00 AM Thanks very much for your reply, ebs. It is good to have information of someone who really knows what he is talking about.
I'll give it a try after my holiday (I am leaving for Italy a week from now :)).
mgmueller 07-25-2009, 11:10 PM Yo do not need internet access for that. When you are in terminal you can type
date MMDDHHMMAAAA
And you will get yor K on time.
Anything else we can do directly in terminal?
mobelby 08-03-2009, 09:43 PM A couple of tips for dozy windoze xp sp3 (32 bit) users like myself:
- use google to find and install the windows gumstix usb linux rndis driver - you'll need this for your USB network connection to your kindle
- if your main PC (that you will connect your kindle by usb to) has its main ethernet (or wifi) LAN connection set as eg 192.168.1.x then choose a different subnet for the HOST IP and KINDLE IP referred to above - eg 10.1.0.1 for Kindle and 10.1.0.2 for host (that's right - your main PC will have two network addresses now, 192.168.1.x and 10.1.0.2 and you will need to set 10.1.0.2 manually yourself using windows tcp/ip properties)
- after you have connected your kindle's usb networking connection and got telnet to work then rerun the network setup wizard on your main PC and make sure you choose the connects directly to the internet and other computers access via this computer option. You will then get asked which network connections share the internet connection and you can tick the box for 192.168.1.x and 10.1.0.2. Then ICS should definitely be working for your linux usb connection
Hope this helps someone out there.
NB version 5 (first page of this thread) works as is without any modifications with Kindle 2 and winxp sp3. You only need to customise your IP addresses, nothing else
hippocratesnoah 08-10-2009, 06:16 PM As promissed, firmware update that enables `usbNetwork on DX.
Use on your own risk :)
Updated to include update_usbnetwork-k2.bin. I don't have K2 so this is untested - try it and report your results.
Version with ssh daemon will be posted shortly
Update: use version 0.05 which supports both telnetd and sshd
Hi.
I'm obviously missing something. At least I'm missing a link to the firmware file. Can someone help me here please. Where do I find version 0.5?
TIA
-h
Go to the thread list, find this thread and you'll see small icons, one of them will show you list of files attached to this thread
chucks 08-13-2009, 10:10 PM Hi all,
I've been following this topic keenly. But somehow I cannot get my usbnetwork to work on my Mac for my DX.
My Airport has IP of 180.182.7.31
So I edit Host IP to be 180.182.7.32
And Kindle IP to be 180.182.7.33
And I remove the # as per earlier posts in the script.
After issuing `usbNetwork and connecting to the Mac, an adapter was detected, which I enter IP as 180.182.7.32.
Then I went over Internet Connection Sharing and share my Airport with this new adapter.
Next, I'm stuck. I can ping 180.182.7.32 but not 180.182.7.33 (Kindle IP).
I cannot telnet into the Kindle too. I either get connection refused or timeout.
I'm not sure if I miss any steps. Or if I set the IP addresses wrongly?
Appreciate if any gurus here can advise.
Thanks!
Hi all,
I've been following this topic keenly. But somehow I cannot get my usbnetwork to work on my Mac for my DX.
My Airport has IP of 180.182.7.31
So I edit Host IP to be 180.182.7.32
And Kindle IP to be 180.182.7.33
That's a bad idea - you made all interfaces belong to the same network.
My suggestion, start with unchanged script and use 192.168.2.1 for your host USB adapter.
When you verify that you can access Kindle we can work on setting up NAT on your Mac.
chucks 08-14-2009, 12:23 AM That's a bad idea - you made all interfaces belong to the same network.
My suggestion, start with unchanged script and use 192.168.2.1 for your host USB adapter.
When you verify that you can access Kindle we can work on setting up NAT on your Mac.
Hi ebs,
Thanks much for the advise. Will try later when I got home.
Just a quick question. My router (180.182.7.1) is set to assign DHCP range from 180.182.7.2 to 180.182.7.100. As you can see my Airport IP belong in that range.
So if I use back the unchanged script and use host IP as 192.168.2.1 and Kindle IP as 192.168.2.2(?), do I need to change anything on my router end? I had the impression that 192.168.2.1 is not in the range, so wouldn't be "seen".
Pardon me for the noob questions. And thanks again.
You don't have to change anything on your router if you use some kind of NAT on your Mac, OS X probably use some different name for this (more user friendly), if you stuck, you can send me private message and I'll try to see how it works in OS X (I use Linux on my macbook).
chucks 08-15-2009, 05:13 AM Finally, I'm able to enable telnet into my KDX, and access the Kindle Store.
Thanks all for the help!
a-kon 08-16-2009, 03:32 AM Thanks to all for this thread. Got my Kindle2 back on line in Aus.
Just a couple of queries...
I followed mobelby' s intructions for ip's
Used 10.1.0.1 for KINDLE_IP and 10.1.0.2 for HOST_IP, removed the # from #route add default gw {$HOST_IP}
I also followed imode's instructions
ie the changes shown below
>>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>
So I can now access the kindle store - and purchase sync my books. Great!
However I cant use the experimental web (not a big deal I know) just interesting.
My error is shown below - regardless of the url I try to get to.
HTTP Error: 403
Forbidden+for+Client%3A+amz%5F2010
RequestURL=/
Anyone seen this - anything I need to do or worry about?
Also a quick one on timezone - can I change the kinlde timezone? Or will this upset things?
Cheers
You probably have to modify HTTP_NON_PROXY_HOST and HTTPS_NON_PROXY_HOST in /opt/amazon/ebook/config/framework.mario.conf
Thruth 08-18-2009, 03:50 PM Have to thank you ebs.
My Kindle2 was registered/activiated in the US whisperNET after purchase, with latest firmware 2.0.4. Then it came to China. For the firmware thing I posted a post in the other section, it is FAST, and very amusing when you use Txt-to-speech with Chinese articles.
Following instructions within this thread I got what most remote people want:
- So called working Emulation of WhisperNET: That you could buy and download books directly from your kindle when you are not in the US. It works but not as same as in the real whispernet.
When you click a "buy" button, the book will not be sent directly to your Kindle. You have to go to home - menu - sync and check for items. In this way the download starts. Guess it pretty easy to understand, the emulation in essence gets Kindle connected to the Internet. However, you are not with the Whispernet so that SMS-like services cannot reach you.
Similarly, periodicals will not be sent to your Kindle regularly but you have to manually download them.
gthirkell 08-19-2009, 12:33 AM Hi all, Im in Australia and recently purchased a Kindle DX and setup usbNetwork etc.
Should I be able to register the Kindle via the USB connection and if its registered can I purchase / sync books as if Im on the Whispernet ?
Is there a web reference about registering without Whispernet ?
Thankyou :)
Nifty 08-20-2009, 07:56 PM 2ebs:
Hi! Thank you for your work!
My device isn't registered, because when I ask my friend in USA to buy it and send to me - I don't know about registration restrictions. It's ok because I don't want to buy anything from amazon, but I want to use browser feature. Can you help me find out what I need to do, to make my kindle think that it is registered and let me use browser?
Thank you!
Nifty 08-20-2009, 08:02 PM Should I be able to register the Kindle via the USB connection and if its registered can I purchase / sync books as if Im on the Whispernet ?
As I understand, this is impossible at this moment :(, unless someone establish inet-whispernet proxy server.
A couple of tips for dozy windoze xp sp3 (32 bit) users like myself:
- use google to find and install the windows gumstix usb linux rndis driver - you'll need this for your USB network connection to your kindle
- if your main PC (that you will connect your kindle by usb to) has its main ethernet (or wifi) LAN connection set as eg 192.168.1.x then choose a different subnet for the HOST IP and KINDLE IP referred to above - eg 10.1.0.1 for Kindle and 10.1.0.2 for host (that's right - your main PC will have two network addresses now, 192.168.1.x and 10.1.0.2 and you will need to set 10.1.0.2 manually yourself using windows tcp/ip properties)
- after you have connected your kindle's usb networking connection and got telnet to work then rerun the network setup wizard on your main PC and make sure you choose the connects directly to the internet and other computers access via this computer option. You will then get asked which network connections share the internet connection and you can tick the box for 192.168.1.x and 10.1.0.2. Then ICS should definitely be working for your linux usb connection
Hope this helps someone out there.
NB version 5 (first page of this thread) works as is without any modifications with Kindle 2 and winxp sp3. You only need to customise your IP addresses, nothing else
Thanks for that information - I wasn't having much luck with the OSX-based info.
However, I have tried 6 ways from Sunday to get this to work with my Vista x86 PC, and I simply cannot get it to work. I've tried everything I can think of and I am not having any success.
I have a Kindle2, and I had no problem getting the firmware update done and have gotten the Kindle connected to the PC with usbNetworking. I set the IPs exactly as you suggested, and modified usbNetwork as required.
I tried other IP combinations too just to see.
I can ping the Kindle but that's it. I don't have telnet so I haven't tried that.
I set up the connection sharing on the PC to share my LAN connection (to the internet) with the Kindle connection, but no joy. No data is being transferred as far as I can tell. I also tried "bridging" the connections instead of sharing, but that made no difference.
I've tried it with "Wireless On" and "Wireless Off" on the Kindle, "Wireless Off" of course comes back right away with "Do you want to turn on Wireless".
Wireless bars stay NOT "filled in".
I tried another linux.inf (called 1973 I believe) as well from a forum where they were talking about Vista support. It's another inf for the GumStix RNDIS USB network driver...
Not sure where to go from here or what else I can try???
Help??!!
ectoplasm 08-22-2009, 06:23 PM I got the script to work, and I am able to SSH to my Kindle DX. I can telnet, FTP, SSH and a lot of other things...
Is this right? Is it possible to FTP to the Kindle?
ckanthonyhuz 08-22-2009, 11:09 PM hi everyone, I have followed the whole thread.
1. installed the update.
2. edited the usbnetwork script.
3. issue the command on kindle. ignore the 'usbQa
4. plugged in the usb cable to my Macintosh
5. the Macintosh detected the port
6. turn on the internet sharing
now I can telnet to my Kindle,
I tried ssh to it but it said "bus error"
I can't use my Kindle to go Kindle Store, anything related to the internet is not functional. although I can go to the blank page, it seems to be loading things, but it never come up anything.
I tried ping some ip on the telnet. It come up 0% loss.
what can I do to make it better ?
judib 08-23-2009, 11:57 AM Hi could you please help me and explain how you change the voice from male to female and also the speed, I've tried to push the Alt and aA at the same time and I can only view the start text or stop it. I have a Kindle 2
paulhand 08-25-2009, 11:06 AM Hi - thank you for all your help on this thread. Am I right in thinking that when I go back to the US I need to change the USE_WAN back to true?
Hi could you please help me and explain how you change the voice from male to female and also the speed, I've tried to push the Alt and aA at the same time and I can only view the start text or stop it. I have a Kindle 2
How is this relevant to the topic of USB networking?
ectoplasm 08-28-2009, 02:23 PM 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>
I have a Kindle DX. I setup usbnetworking as outlined in this thread and then did the above. I can telnet to the Kindle, and from the Kindle, I can ping Google.
I'm in the US, but I have poor wireless coverage where I live. It works sometimes, but I often have zero or one bar for wireless. So I'd like to be able to sync with USB if it works consistently.
After setting this up, am I supposed to turn off wireless? If I do, and try to sync or access the store, Kindle asks if I want to turn on wireless. If I turn it on, I can access the Kindle store. I think it's working over USB because the store seems much faster.
Syncing has not worked. It fails with a message that it can't connect. I undid the USE_WAN changes and I can sync wireless again. Does this work for syncing in the US with a Kindle DX?
Egorro 09-03-2009, 11:25 AM As I understand, this is impossible at this moment :(, unless someone establish inet-whispernet proxy server.
As far as I understood - that is just a dream and all readers leaving outside of dreamland have to travel to US to activate their books? :blink:
Hi all,
I have tried this, and it basically worked, but how can I return to the original usb drive mode? (without uninstalling this great patch)
Hi all,
I have tried this, and it basically worked, but how can I return to the original usb drive mode? (without uninstalling this great patch)
Just reboot your device and if you have edited mario.conf or other file, unedit it.
Just reboot your device and if you have edited mario.conf or other file, unedit it.
thanks, but the reboot will also reset my already corrected time back to 1970, I want to keep the correct time (until my next natural reboot, of course), can I just temperately disable it? (like the reverse of "usbNetwork" or ";debugOn" commend)
thanks, but the reboot will also reset my already corrected time back to 1970, I want to keep the correct time (until my next natural reboot, of course), can I just temperately disable it? (like the reverse of "usbNetwork" or ";debugOn" commend)
I do not know how to unload and reload original usb driver, but for me a reboot does not resets the date. Just go to Settings from Content Lister and select Restart in the menu.
I do not know how to unload and reload original usb driver, but for me a reboot does not resets the date. Just go to Settings from Content Lister and select Restart in the menu.
OK, thanks, I resolved it because of your suggestion, I "restart kindle DX by going to settings menu", and it still keep the time, previously I held down the switch to reset, which will set the time to 1970, just let you know.
OK, thanks, I resolved it because of your suggestion, I "restart kindle DX by going to settings menu", and it still keep the time, previously I held down the switch to reset, which will set the time to 1970, just let you know.
If you do it via switch you aren't reseting it: you are full powering off and then powering on. Kindle electronics haven't a time backup battery or uses a timer chip with auto backup.
jyavenard 09-24-2009, 04:32 AM Hi
Great stuff guys.
Got my Kindle 2 to share my macbook connection ; allowing my to browse the Amazon store and access some neat features reserved to the lucky US resident otherwise.
For those not willing to read the whole thread, here is how I did it, hoping it will be useful to others.
Get the binary file to re-enable usb networking there:
http://www.mobileread.com/forums/showpost.php?p=498421&postcount=14
Copied 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:
#!/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
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.
Edit: 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
GRiker 09-24-2009, 12:50 PM jyavenard:
Thanks for organizing the concise writeup, it's very helpful.
Once this has been done, what's involved in having the Kindle be visible as a USB device again? When I plug it in, it's no longer recognized.
jyavenard 09-25-2009, 02:14 AM jyavenard:
Thanks for organizing the concise writeup, it's very helpful.
Once this has been done, what's involved in having the Kindle be visible as a USB device again? When I plug it in, it's no longer recognized.
I've edited my previous post with instructions on how to disable the mode, and activate it again ...
That's a great step-by-step for Mac users.
Would anyone that was successful in making it work under Windows Vista be willing to create a similar step-by-step? I'm still unable to get this to work. :(
jyavenard 09-27-2009, 06:36 AM Getting it to work under Vista is very similar to getting it to work on the mac... though a tad more complicated.
My machine (Windows 7 beta) didn't come with RNDIS driver.
The easiest way to get those is installing the Windows Mobile drivers found here:
http://www.microsoft.com/windowsmobile/en-us/downloads/microsoft/device-center-download.mspx
(if using XP, download ActiveSync 4.5)
For the Kindle.
Get the binary file to re-enable usb networking there:
http://www.mobileread.com/forums/showpost.php?p=498421&postcount=14
Copied 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.
Let Windows install the drivers for the newly found peripheral.
On my machine, the new ethernet connection was created as "Local Area Connection 3" and shows up as "DIRECTV HDPC20". YMMV
Go into Start -> Control Panel -> Network & Sharing Center.
Click on "Change Adapter Settings"
Do a right click on your main network adapter, click on the "Sharing" tab
Check the "Allow other network users to connect through this computer's Internet Connection"
Click "OK"
You will get prompted that the adapter interface will be changed to "192.168.0.1". That's okay, confirm.
Now go and edit the other network adapter "DIRECTV HDPC20" (or whatever it's called on your machine)
Click on the "Internet Protocol Version 4" and "Properties"
change the IP address from 192.168.0.1 to 192.168.2.1 , subnet mask 255.255.255.0.
Validate with OK.
---
Open a command line (windows + R, cmd)
(Note Telnet isn't activated by default in Vista / Windows 7, go into the Control Panel and select "Programs and Features", click "Turn Windows Features on or Off" and check "Telnet Client").
Another alternative is HyperTerminal from Hilgraeve...
telnet 192.168.2.2
[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:
#!/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
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...
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
That's it
hippocratesnoah 10-03-2009, 10:59 AM create the file /etc/init.d/usbnet with:
#!/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
Hi,
please forgive my lacking knowledge of using the terminal. But this command doesn't work for me. Do I need to leave vi mode or stay in vi mode when executing this command?. Or create the file with the code and execute it?
By simply copy/paste the complete code lines no file is created.
Thanks
-noah
hippocratesnoah 10-03-2009, 02:46 PM Hi,
My kindle is unregistered (I'm in Europe.) I tried to register, but get a message "can't connect at this time".
So won't I be able to browse the store etc now?
-Noah
jyavenard 10-06-2009, 12:56 AM Hi,
please forgive my lacking knowledge of using the terminal. But this command doesn't work for me. Do I need to leave vi mode or stay in vi mode when executing this command?. Or create the file with the code and execute it?
By simply copy/paste the complete code lines no file is created.
Thanks
-noah
there are several ways you can create that file....
One is to create the file on your PC (make sure you use LF line-ending, and not Windows CR/LF one). Copy it at the root of the Kindle via USB
Then activate the networking mode, telnet to the device and do :
cp /mnt/us/usbnet /etc/init.d/usbnet
Make it executable with:
chmod +x /etc/init.d/usbnet
Another possibility, is telnet to the device
type:
cat > /etc/init.d/usbnet
then paste the whole content
Press Ctrl-D twice to close the file
chmod +x /etc/init.d/usbnet
etc...
Ideally, the easiest would be for the author of the update_usbnetwork.bin file to have that file directly into the archive...
I'll see if I can update the file myself later today and automatically create all those files.. Would be much easier that way
jyavenard 10-06-2009, 09:27 AM Hi
Was easier than I thought to create the image.
So here is a new version, much easier to setup. No need to edit any files on the device now.
To install:
-----
Copy update_usbnetwork-k2.bin (for Kindle K2) or update_usbnetwork-dx.bin (for Kindle DX) to the root of the Kindle drive.
Menu -> Settings
Menu -> Update your Kindle
Warning: Do not reboot, if you do, you'll need to put the Kindle in recovery mode as explained here :
http://blogkindle.com/2009/03/kindle-2-recovery-mode/
------
To enable USB tethering, two possibilities.
1- Create a file AUTO on the Kindle drive in the usbnet directory.
Reboot the device (Menu -> Settings then Menu -> Reboot)
2- using ;DebugOn ; `usbNetwork. Unplug/Replug USB device
Once either of those option is done, telnet to the device (default IP is 192.168.2.2)
then type:
# /mnt/us/usbnet/bin/usbnet-enable
This command will set the DNS ot use OpenDNS, disable WAN access for browsing the Amazon Store
You'll need to reboot to be able to use the Kindle Store...
-----
To disable USB tethering, and revert to USB disk mode.
telnet to the device
# rm /mnt/us/usbnet/AUTO
# reboot
-----
To re-enable 3G access while keeping USB tethering:
telnet to the device
# /mnt/us/usbnet/bin/usbnet-disable
# reboot
-----
To re-enable 3G access and restore USB disk mode:
telnet to the device
# /mnt/us/usbnet/bin/usbnet-disable
# rm /mnt/us/usbnet/AUTO
# reboot
that's it....
GRiker 10-06-2009, 01:01 PM Nice, thanks for the update.
G
jyavenard 10-07-2009, 07:03 AM Great, a new Kindle working outside the US is available.
Just in time so I can return mine now !
Well, at least that was fun...
Sassapphras 10-15-2009, 08:46 AM Great, a new Kindle working outside the US is available.
Just in time so I can return mine now !
Well, at least that was fun...
No worries. You're still helping out the folks who don't have an international Kindle! :2thumbsup
dpowell7299 10-15-2009, 10:28 AM Has anyone had any luck with RNDIS for XP? I've loaded ActiveSunc 4.5 but it still will not load the drivers so that I can telnet into my Kindle2.
The annoying part is that now my K2 can't do usbnetwork or disk :((
I'm assuming I could reset to factory defaults to fix this but I'm more hoping there is a fix to be able to telnet into the K2 so I can just remove the file to allow disk access again.
Don
dpowell7299 10-15-2009, 03:15 PM I got it to work on XP.
I ended up using the description from here:
http://embedded.seattle.intel-research.net/wiki/index.php?title=Setting_up_USBnet
To do the "Install RNDIS Driver" section and the .inf file they linked to worked like a champ.
Don
Still not available in Canada, and who knows if/when it ever will be, so this is still important information.
Greetings,
I'm trying to get telnet access to my Kindle2. I can enable USB network and ping
the kindle2 (192.168.15.244). After applying the manual update using "update_usbnetwork-k2.bin" (and verifying the "Done"), I still am unable to
connect to the Kindle2. In fact, the IP address does not change from the default (192.168.25.244) value. It looks like the usb startup script is not being invoked.
My kindle2 is running 2.0.2.
Any ideas?
Thank you.
Greetings,
Any ideas?
Thank you.
I forgot to create the "AUTO" file. All is well, thanks!
rera09 10-30-2009, 05:11 AM I am new to this forum when i entered into the forum i got many use full information about the usb i am very thank full to all.
jyavenard 11-01-2009, 03:22 PM Hi there.
I created an uninstaller for the usbnetwork package ; because cleaning up and removing everything it created was a tad complicated...
Available there:
http://www.avenard.org/kindle2/usbnetwork-0.7.tar.gz
Hi there.
I created an uninstaller for the usbnetwork package ; because cleaning up and removing everything it created was a tad complicated...
Available there:
http://www.avenard.org/kindle2/usbnetwork-0.7.tar.gz
Thanks!
BTW, has anyone been able to enable USB networking on the KindleDX running 2.1.1?
BTW, has anyone been able to enable USB networking on the KindleDX running 2.1.1?
Sorry, I've seem to have gotten into the habit of answering my own questions.
However, I'd like to confirm that jyavenard's usbnetwork 0.07 does indeed work on a KindleDX running 2.1.1.
edge777 11-20-2009, 01:16 PM I'm trying to SSH into my Kindle International to change the time zone (it won't move off of GMT). I've installed USBNetwork 0.07, and received the confirmation log file in the root directory, however, no other folders are showing up.
I've tried entering the debug mode, and turning on USB networking, but the Kindle is still being recognized as a mass storage device (I'm using a Mac running Snow Leopard).
I've read something about adding an AUTO file into a certain directory. The directory doesn't yet exist on the Kindle, and I have no clue what this AUTO file is (and unfortunately, no information is given).
I'm not a noob to hacking and stuff, but also don't know a ton about command line and Linux (I have hacked my Kindle and iPhone though, and created custom font packages for the Kindle International, so can usually follow instructions well).
Thanks to anyone who can help me out! :)
I PM'd you, but just create a file called "AUTO" in the usbnet directory.
It can be "auto" or "AUTO" as the filesystem is case-insensitive.
(The start-up script tests for the existence of this file and starts the
networking accordingly).
Cheers.
I've read something about adding an AUTO file into a certain directory. The directory doesn't yet exist on the Kindle, and I have no clue what this AUTO file is (and unfortunately, no information is given).
|