Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 07-07-2009, 01:04 PM   #61
poohbear_nc
Now what?
poohbear_nc ought to be getting tired of karma fortunes by now.poohbear_nc ought to be getting tired of karma fortunes by now.poohbear_nc ought to be getting tired of karma fortunes by now.poohbear_nc ought to be getting tired of karma fortunes by now.poohbear_nc ought to be getting tired of karma fortunes by now.poohbear_nc ought to be getting tired of karma fortunes by now.poohbear_nc ought to be getting tired of karma fortunes by now.poohbear_nc ought to be getting tired of karma fortunes by now.poohbear_nc ought to be getting tired of karma fortunes by now.poohbear_nc ought to be getting tired of karma fortunes by now.poohbear_nc ought to be getting tired of karma fortunes by now.
 
poohbear_nc's Avatar
 
Posts: 58,578
Karma: 134882998
Join Date: Feb 2009
Location: Durham, NC
Device: Every Kindle Ever Made & To Be Made!
Quote:
Originally Posted by Acextreme View Post
Thanks, rfog, I got that date part down. Now how about the sleep mode thing?
Take a look at this thread: https://www.mobileread.com/forums/showthread.php?t=48827
poohbear_nc is offline  
Old 07-08-2009, 02:59 AM   #62
Acextreme
Enthusiast
Acextreme began at the beginning.
 
Posts: 40
Karma: 10
Join Date: Jun 2009
Device: none
Quote:
Originally Posted by imode View Post
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:
Quote:
Originally Posted by ebs View Post
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:

Code:
[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:
Code:
[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:
Code:
#!/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:
Code:
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?
Acextreme is offline  
Advert
Old 07-08-2009, 03:34 AM   #63
ebs
Zealot
ebs will become famous soon enoughebs will become famous soon enoughebs will become famous soon enoughebs will become famous soon enoughebs will become famous soon enoughebs will become famous soon enough
 
Posts: 100
Karma: 629
Join Date: Jun 2009
Location: California, USA
Device: Kindle DX
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
ebs is offline  
Old 07-08-2009, 07:37 AM   #64
imode
Junior Member
imode began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jul 2009
Device: Kindle 2
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.

Last edited by imode; 07-08-2009 at 07:13 PM.
imode is offline  
Old 07-09-2009, 11:36 AM   #65
Acextreme
Enthusiast
Acextreme began at the beginning.
 
Posts: 40
Karma: 10
Join Date: Jun 2009
Device: none
Quote:
Originally Posted by imode View Post
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:
Code:
#################################################
#  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):
Code:
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:
Code:
#!/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.

Last edited by Acextreme; 07-09-2009 at 11:43 AM.
Acextreme is offline  
Advert
Old 07-09-2009, 01:45 PM   #66
ebs
Zealot
ebs will become famous soon enoughebs will become famous soon enoughebs will become famous soon enoughebs will become famous soon enoughebs will become famous soon enoughebs will become famous soon enough
 
Posts: 100
Karma: 629
Join Date: Jun 2009
Location: California, USA
Device: Kindle DX
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
ebs is offline  
Old 07-09-2009, 03:31 PM   #67
Acextreme
Enthusiast
Acextreme began at the beginning.
 
Posts: 40
Karma: 10
Join Date: Jun 2009
Device: none
Quote:
Originally Posted by ebs View Post
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...

Last edited by Acextreme; 07-09-2009 at 04:12 PM.
Acextreme is offline  
Old 07-09-2009, 04:19 PM   #68
Acextreme
Enthusiast
Acextreme began at the beginning.
 
Posts: 40
Karma: 10
Join Date: Jun 2009
Device: none
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?
Acextreme is offline  
Old 07-15-2009, 04:17 AM   #69
grib
Junior Member
grib began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jul 2009
Device: Kindle DX
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?
grib is offline  
Old 07-18-2009, 07:11 AM   #70
berend
Junior Member
berend began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2009
Device: Amazon Kindle DX
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 . I would prefer to automate things if remotely (pun intended ) possible.
berend is offline  
Old 07-18-2009, 09:54 AM   #71
LeegleechN
Junior Member
LeegleechN began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jul 2009
Device: Kindle 2
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 is offline  
Old 07-22-2009, 08:55 PM   #72
LeegleechN
Junior Member
LeegleechN began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jul 2009
Device: Kindle 2
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.
LeegleechN is offline  
Old 07-22-2009, 10:50 PM   #73
ebs
Zealot
ebs will become famous soon enoughebs will become famous soon enoughebs will become famous soon enoughebs will become famous soon enoughebs will become famous soon enoughebs will become famous soon enough
 
Posts: 100
Karma: 629
Join Date: Jun 2009
Location: California, USA
Device: Kindle DX
Quote:
Originally Posted by LeegleechN View Post
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

Last edited by ebs; 07-22-2009 at 10:57 PM.
ebs is offline  
Old 07-22-2009, 11:07 PM   #74
LeegleechN
Junior Member
LeegleechN began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jul 2009
Device: Kindle 2
Well, for now if anyone messed up a file and needs a clean version, please PM me.
LeegleechN is offline  
Old 07-24-2009, 01:02 AM   #75
ebs
Zealot
ebs will become famous soon enoughebs will become famous soon enoughebs will become famous soon enoughebs will become famous soon enoughebs will become famous soon enoughebs will become famous soon enough
 
Posts: 100
Karma: 629
Join Date: Jun 2009
Location: California, USA
Device: Kindle DX
Quote:
Originally Posted by berend View Post
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.

Quote:
Originally Posted by berend View Post
-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

Quote:
Originally Posted by berend View Post
- 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
ebs is offline  
Closed Thread

Tags
kindle usb network

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 07:56 AM.


MobileRead.com is a privately owned, operated and funded community.