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

Reply
 
Thread Tools Search this Thread
Old 01-27-2010, 02:16 AM   #1
Zorz
Zealot
Zorz began at the beginning.
 
Posts: 134
Karma: 36
Join Date: Nov 2009
Device: Kindle 2i
What am I doing wrong with usbNetwork

I follow these steps

-Download usbNetwork
-Install it and look at log to confirm success.
-Set ip information for host and kindle on the usbNetwork script.
-restart the kindle
-turn on debug mode and confirm with `help
-run`usbnetwork
-plug in kindle
-run modprobe g_ether
-then ifconfig usb0 192.168.0.102
-I then confirm with lsusb | grep RNDIS
- I then ping the kindle and always have success.
- I try to ssh to the kindle as root ssh root@192.168.0.102 and I am prompted for a password which I then press enter. I then get asked again and again.
-I try to log in as framework and get the same problem.
-I try to telnet and get a connection refused,


So does anybody have any clue in what I am doing wrong.
Zorz is offline   Reply With Quote
Old 01-27-2010, 06:11 AM   #2
jft
Enthusiast
jft began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Jan 2010
Location: Germany
Device: Kindle DXi
My friend, you miss ONE critical point:

Quote:
-then ifconfig usb0 192.168.0.102
This assigns an IP to the usb interface of your computer!!

Quote:
I try to ssh to the kindle as root ssh root@192.168.0.102 and I am prompted for a password which I then press enter. I then get asked again and again.
Here you try to access your own computer, not the kindle!!

The IP of the kindle is assigned to the one written in the "usbnetwork" script and should be 192.168.2.2 in the latest versions. So you should assign 192.168.2.1 to your usb0 interface.

Now try "telnet 192.168.2.2".

Last edited by jft; 01-27-2010 at 08:13 AM.
jft is offline   Reply With Quote
Old 01-27-2010, 10:59 AM   #3
Zorz
Zealot
Zorz began at the beginning.
 
Posts: 134
Karma: 36
Join Date: Nov 2009
Device: Kindle 2i
Quote:
Originally Posted by jft View Post
My friend, you miss ONE critical point:



This assigns an IP to the usb interface of your computer!!



Here you try to access your own computer, not the kindle!!

The IP of the kindle is assigned to the one written in the "usbnetwork" script and should be 192.168.2.2 in the latest versions. So you should assign 192.168.2.1 to your usb0 interface.

Now try "telnet 192.168.2.2".

The script of my kindle has the Host ip as 192.168.0.101 and Kindle is 192.168.0.102. I thought the kindle had to be on the same ip class as the host computer. I will go back and try again, Thanks for responding.
Zorz is offline   Reply With Quote
Old 01-28-2010, 12:53 AM   #4
Zorz
Zealot
Zorz began at the beginning.
 
Posts: 134
Karma: 36
Join Date: Nov 2009
Device: Kindle 2i
Here is my config

Quote:
#!/bin/sh

# Tweak these to match your setup
HOST_IP=192.168.0.101
KINDLE_IP=192.168.2.2

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

# 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
/usr/bin/dropbear

exit 0
still cant get in.
Zorz is offline   Reply With Quote
Old 01-28-2010, 03:24 AM   #5
jft
Enthusiast
jft began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Jan 2010
Location: Germany
Device: Kindle DXi
Nope. You misunderstood me. The IPs were just an example. The default values in the script were 192.168.2.1 and 192.168.2.2 and as you said the subnet has to be the same.

Now I assume you have the following configuration:


Quote:
# Tweak these to match your setup
HOST_IP=192.168.0.101
KINDLE_IP=192.168.0.102
Now the steps to access the Kindle:
Code:
;DebugOn 
'usbNetwork
Now you enabled the network module, set the IP of the Kindle to 192.168.0.102 and changed to default network route to the USB network interface.

Now you have to assign an IP to your pc usb interface (just think about it as an ethernet card).
On your PC:

Quote:
ifconfig usb0 192.168.0.101
Now your pc has IP 192.168.0.101 and your Kindle 192.168.0.102.

Code:
telnet 192.168.0.102
Now you can access your Kindle.

As I said in the above post you tried to telnet to your pc and not to the kindle, so you got a password prompt (root user of YOUR pc and not of the Kindle).

Last edited by jft; 01-28-2010 at 03:28 AM.
jft is offline   Reply With Quote
Old 01-28-2010, 10:23 AM   #6
jyavenard
Zealot
jyavenard has a complete set of Star Wars action figures.jyavenard has a complete set of Star Wars action figures.jyavenard has a complete set of Star Wars action figures.jyavenard has a complete set of Star Wars action figures.
 
Posts: 141
Karma: 383
Join Date: Sep 2009
Device: Kindle 2
Quote:
Originally Posted by LlamaZorz View Post
So does anybody have any clue in what I am doing wrong.
It pays to read the documentation ...
jyavenard is offline   Reply With Quote
Old 01-28-2010, 03:34 PM   #7
Zorz
Zealot
Zorz began at the beginning.
 
Posts: 134
Karma: 36
Join Date: Nov 2009
Device: Kindle 2i
Quote:
Originally Posted by jyavenard View Post
It pays to read the documentation ...
Ive read practically everything, maybe theres documentation Im not aware of. Ive even gone deep into gumstix documentation and it simply wont work

Last edited by Zorz; 01-28-2010 at 05:22 PM.
Zorz is offline   Reply With Quote
Old 01-28-2010, 04:02 PM   #8
Zorz
Zealot
Zorz began at the beginning.
 
Posts: 134
Karma: 36
Join Date: Nov 2009
Device: Kindle 2i
Quote:
Originally Posted by jft View Post
Nope. You misunderstood me. The IPs were just an example. The default values in the script were 192.168.2.1 and 192.168.2.2 and as you said the subnet has to be the same.

Now I assume you have the following configuration:




Now the steps to access the Kindle:
Code:
;DebugOn 
'usbNetwork
Now you enabled the network module, set the IP of the Kindle to 192.168.0.102 and changed to default network route to the USB network interface.

Now you have to assign an IP to your pc usb interface (just think about it as an ethernet card).
On your PC:



Now your pc has IP 192.168.0.101 and your Kindle 192.168.0.102.

Code:
telnet 192.168.0.102
Now you can access your Kindle.

As I said in the above post you tried to telnet to your pc and not to the kindle, so you got a password prompt (root user of YOUR pc and not of the Kindle).
I followed your instructions exactly 3 times and I only get this

Trying 192.168.0.102...
telnet: Unable to connect to remote host: No route to host

I also tried to change route with this

route add -host 192.168.0.101 usb0

Last edited by Zorz; 01-28-2010 at 04:29 PM.
Zorz is offline   Reply With Quote
Old 01-29-2010, 02:18 AM   #9
jft
Enthusiast
jft began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Jan 2010
Location: Germany
Device: Kindle DXi
Quote:
I also tried to change route with this

route add -host 192.168.0.101 usb0
That's nonsense. That will route packages destined for your pc out over the usb0 interface.WTF.

What would make sense:

route add -host 192.168.0.102 usb0

What is the subnet of your home network? Most likely it is 192.168.0.0/24. That is the reason most of us use another subnet (192.168.2.0/24).

Just use another subnet or add the right route.

You have to admit: you don't know what you are doing. Why try to access the shell? You will inevitable brick your device if you just toy with the file system.

Last edited by jft; 01-29-2010 at 02:36 AM.
jft is offline   Reply With Quote
Old 01-29-2010, 04:34 AM   #10
Zorz
Zealot
Zorz began at the beginning.
 
Posts: 134
Karma: 36
Join Date: Nov 2009
Device: Kindle 2i
well you can claim I dont know what I am doing all you want, but obviously something else is going wrong, if I follow the exact steps provided and it still doesn't work.

I changed my subnet, now my ip is 192.168.2.1 and I set everything up and still get the following

> telnet 192.168.2.2
Trying 192.168.2.2...
telnet: Unable to connect to remote host: No route to host

Il take the chance at briking the unit, if I do il just buy another one. But thank you for you help and I hope you reply.


Here is my ifconfig maybe that can ched some light


Quote:
ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:8d:b6:e0:e3
inet addr:192.168.2.1 Bcast:192.168.255.255 Mask:255.255.0.0
inet6 addr: fe80::250:8dff:feb6:e0e3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1688406 errors:0 dropped:0 overruns:0 frame:0
TX packets:981107 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2311261506 (2.3 GB) TX bytes:87544035 (87.5 MB)
Interrupt:23 Base address:0x4000

eth1 Link encap:Ethernet HWaddr 00:50:8d:b6:e0:e4
UP BROADCAST MULTICAST MTU:1500 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:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:22 Base address:0x8000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:451 errors:0 dropped:0 overruns:0 frame:0
TX packets:451 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:48373 (48.3 KB) TX bytes:48373 (48.3 KB)

usb0 Link encap:Ethernet HWaddr ee:0a:96:97:21:91
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::ec0a:96ff:fe97:2191/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7 errors:0 dropped:0 overruns:0 frame:0
TX packets:209 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1780 (1.7 KB) TX bytes:22736 (22.7 KB)

usb1 Link encap:Ethernet HWaddr 4a:ef:e5:92:67:8f
inet6 addr: fe80::48ef:e5ff:fe92:678f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:209 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19810 (19.8 KB) TX bytes:1878 (1.8 KB)
Zorz is offline   Reply With Quote
Old 01-29-2010, 04:56 AM   #11
jft
Enthusiast
jft began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Jan 2010
Location: Germany
Device: Kindle DXi
Just change the ip of your usb0 interface!! Now both your ethernet card eth0 and your usb interface usb0 have the same ip. That's not what I said.

These two interfaces should reside in different networks. Your eth0 is connected to your home network, your usb0 ist connected to your "Kindle-Network". You have to assign a home network ip to your eth0 interface and a "Kindle-Network" ip to your usb0 interface.

Edit: And most likely you have an dhcp server that assigns an ip address to your eth0 interface - just don't touch that interface. We ware always talking about usb0 and nothing else!

And also make sure you restarted your kindle after you edited the usbnetwork file (change of ip address).

The result should look like this:

Code:
ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:8d:b6:e0:e3
inet addr:192.168.0.41 Bcast:192.168.255.255 Mask:255.255.0.0
inet6 addr: fe80::250:8dff:feb6:e0e3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1688406 errors:0 dropped:0 overruns:0 frame:0
TX packets:981107 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2311261506 (2.3 GB) TX bytes:87544035 (87.5 MB)
Interrupt:23 Base address:0x4000

usb0 Link encap:Ethernet HWaddr ee:0a:96:97:21:91
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::ec0a:96ff:fe97:2191/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7 errors:0 dropped:0 overruns:0 frame:0
TX packets:209 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1780 (1.7 KB) TX bytes:22736 (22.7 KB)

Last edited by jft; 01-29-2010 at 05:08 AM.
jft is offline   Reply With Quote
Old 01-29-2010, 05:17 AM   #12
jft
Enthusiast
jft began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Jan 2010
Location: Germany
Device: Kindle DXi
Just noticed something wired and important:

You checked the subnet of your eth0 interface? It is 255.255.0.0. . That means your computer thinks the ip range 192.168.0.0 - 192.168.255.255 is behind your eth0 interface.

Now I would recommend using ip address like 10.0.0.* for your "Kindle" Network.

So change the addresses in the usbnetwork file to 10.0.0.1 and 10.0.0.2 and assign your usb0 interface the address 10.0.0.1. Now try to telnet to 10.0.0.2.
jft is offline   Reply With Quote
Old 01-29-2010, 03:02 PM   #13
Zorz
Zealot
Zorz began at the beginning.
 
Posts: 134
Karma: 36
Join Date: Nov 2009
Device: Kindle 2i
Quote:
Originally Posted by jft View Post
Just noticed something wired and important:

You checked the subnet of your eth0 interface? It is 255.255.0.0. . That means your computer thinks the ip range 192.168.0.0 - 192.168.255.255 is behind your eth0 interface.

Now I would recommend using ip address like 10.0.0.* for your "Kindle" Network.

So change the addresses in the usbnetwork file to 10.0.0.1 and 10.0.0.2 and assign your usb0 interface the address 10.0.0.1. Now try to telnet to 10.0.0.2.

well the subnet was like that because I thought the HOST had to be 192.168.2.1. In sure you can see my confusion in the documentation and posts on this forum saying HOST should be 192.168.2.x. Why they call it a host i dont know, but its not proper terminology. The host is my computer and if the kindle's config says to enter the name of the Host, I assume it means my computers ip address.

I reverted the subnet back to 255.255.255.0 and tried your suggested method, though I still a no route to host when I try to telnet in to 192.168.2.2.

Quote:

eth0 Link encap:Ethernet HWaddr 00:50:8d:b6:e0:e3
inet addr:192.168.0.5 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::250:8dff:feb6:e0e3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:785 errors:0 dropped:0 overruns:0 frame:0
TX packets:850 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:678065 (678.0 KB) TX bytes:180196 (180.1 KB)
Interrupt:23 Base address:0x2000

eth1 Link encap:Ethernet HWaddr 00:50:8d:b6:e0:e4
UP BROADCAST MULTICAST MTU:1500 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:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:22

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:38 errors:0 dropped:0 overruns:0 frame:0
TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3588 (3.5 KB) TX bytes:3588 (3.5 KB)

usb0 Link encap:Ethernet HWaddr 0e:b7:aa:8c:85:79
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::cb7:aaff:fe8c:8579/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1856 (1.8 KB) TX bytes:5587 (5.5 KB)

usb1 Link encap:Ethernet HWaddr ca:4e:c4:24:26:e5
inet6 addr: fe80::c84e:c4ff:fe24:26e5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:56 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4803 (4.8 KB) TX bytes:1968 (1.9 KB)

usb2 Link encap:Ethernet HWaddr ee:49:00:00:00:00
inet6 addr: fe80::ec49:ff:fe00:0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:2178 (2.1 KB)
Quote:
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 usb0
192.168.0.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
0.0.0.0 192.168.0.100 0.0.0.0 UG 0 0 0 eth0
I am going to try on another linux distro, possibly ubuntu's network manager is messing things up.
Zorz is offline   Reply With Quote
Old 01-30-2010, 01:49 AM   #14
Zorz
Zealot
Zorz began at the beginning.
 
Posts: 134
Karma: 36
Join Date: Nov 2009
Device: Kindle 2i
software.engineer suggested I run `help after 'usbNetwork and now it works fine. Thanks all for the continued help, I truly appreciate it.
Zorz is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle 3.0.1 firmware and usbNetwork bmf Kindle Developer's Corner 15 10-18-2010 06:12 PM
jailbreak and usbnetwork on 2.5.6? pgf Kindle Developer's Corner 4 07-23-2010 01:07 PM
usbNetwork on 2.5.3? Gnewt Kindle Developer's Corner 2 07-12-2010 01:32 PM
Hacks I want usbnetwork for 2.5.2 al3bsi Amazon Kindle 4 06-18-2010 12:55 PM
Firmware Update USBNetwork and 2.3 Update? ChinaLamb Amazon Kindle 4 12-04-2009 06:13 AM


All times are GMT -4. The time now is 05:09 PM.


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