Quote:
Originally Posted by imode
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.