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 06-19-2009, 10:21 PM   #1
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: 627
Join Date: Jun 2009
Location: California, USA
Device: Kindle DX
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):

Code:
#!/bin/sh

rmmod g_file_storage
modprobe g_ether
ifconfig usb0 192.168.2.2
On my laptop:
Code:
mbp ~ # lsusb | grep RNDIS
Bus 001 Device 038: ID 0525:a4a2 Netchip Technology, Inc. Linux-USB Ethernet/RNDIS Gadget
Code:
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
ebs is offline   Reply With Quote
Old 06-19-2009, 10:37 PM   #2
desertgrandma
Enjoying the show....
desertgrandma ought to be getting tired of karma fortunes by now.desertgrandma ought to be getting tired of karma fortunes by now.desertgrandma ought to be getting tired of karma fortunes by now.desertgrandma ought to be getting tired of karma fortunes by now.desertgrandma ought to be getting tired of karma fortunes by now.desertgrandma ought to be getting tired of karma fortunes by now.desertgrandma ought to be getting tired of karma fortunes by now.desertgrandma ought to be getting tired of karma fortunes by now.desertgrandma ought to be getting tired of karma fortunes by now.desertgrandma ought to be getting tired of karma fortunes by now.desertgrandma ought to be getting tired of karma fortunes by now.
 
desertgrandma's Avatar
 
Posts: 14,277
Karma: 8205255
Join Date: Jun 2008
Location: Arizona
Device: A K1, Kindle Paperwhite, an Ipod, IPad2, Iphone, an Ipad Mini & macAir
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.
desertgrandma is offline   Reply With Quote
Old 06-20-2009, 02:42 AM   #3
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: 627
Join Date: Jun 2009
Location: California, USA
Device: Kindle DX
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

Last edited by ebs; 06-20-2009 at 10:46 PM.
ebs is offline   Reply With Quote
Old 06-20-2009, 04:33 AM   #4
hmemcpy
Member
hmemcpy began at the beginning.
 
hmemcpy's Avatar
 
Posts: 19
Karma: 10
Join Date: Mar 2009
Location: Israel
Device: Kindle 2
Can you perhaps hack up something for the Kindle 2? That'd be awesome!
hmemcpy is offline   Reply With Quote
Old 06-20-2009, 04:45 AM   #5
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: 627
Join Date: Jun 2009
Location: California, USA
Device: Kindle DX
Quote:
Originally Posted by hmemcpy View Post
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).
ebs is offline   Reply With Quote
Old 06-20-2009, 05:50 AM   #6
SalvaG
Enthusiast
SalvaG is on a distinguished road
 
SalvaG's Avatar
 
Posts: 39
Karma: 54
Join Date: May 2009
Location: Spain
Device: Kindle DX
Thank you

What is the use of this?
SalvaG is offline   Reply With Quote
Old 06-20-2009, 05:55 AM   #7
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: 627
Join Date: Jun 2009
Location: California, USA
Device: Kindle DX
KindleDX shell

Code:
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]$
Code:
[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"
Code:
[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
Code:
[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

Last edited by ebs; 06-20-2009 at 05:58 AM.
ebs is offline   Reply With Quote
Old 06-20-2009, 06:54 AM   #8
sirbruce
Provocateur
sirbruce ought to be getting tired of karma fortunes by now.sirbruce ought to be getting tired of karma fortunes by now.sirbruce ought to be getting tired of karma fortunes by now.sirbruce ought to be getting tired of karma fortunes by now.sirbruce ought to be getting tired of karma fortunes by now.sirbruce ought to be getting tired of karma fortunes by now.sirbruce ought to be getting tired of karma fortunes by now.sirbruce ought to be getting tired of karma fortunes by now.sirbruce ought to be getting tired of karma fortunes by now.sirbruce ought to be getting tired of karma fortunes by now.sirbruce ought to be getting tired of karma fortunes by now.
 
sirbruce's Avatar
 
Posts: 1,859
Karma: 505847
Join Date: Feb 2009
Location: Columbus, OH
Device: Kindle Touch, Kindle 2, Kindle DX, iPhone 3GS
Quote:
Originally Posted by ebs View Post
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.
sirbruce is offline   Reply With Quote
Old 06-20-2009, 07:48 AM   #9
porkupan
Fanatic
porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.
 
porkupan's Avatar
 
Posts: 554
Karma: 1057213
Join Date: Sep 2006
Location: North Eastern U.S.
Device: Sony Reader
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.
porkupan is offline   Reply With Quote
Old 06-20-2009, 08:50 AM   #10
sirbruce
Provocateur
sirbruce ought to be getting tired of karma fortunes by now.sirbruce ought to be getting tired of karma fortunes by now.sirbruce ought to be getting tired of karma fortunes by now.sirbruce ought to be getting tired of karma fortunes by now.sirbruce ought to be getting tired of karma fortunes by now.sirbruce ought to be getting tired of karma fortunes by now.sirbruce ought to be getting tired of karma fortunes by now.sirbruce ought to be getting tired of karma fortunes by now.sirbruce ought to be getting tired of karma fortunes by now.sirbruce ought to be getting tired of karma fortunes by now.sirbruce ought to be getting tired of karma fortunes by now.
 
sirbruce's Avatar
 
Posts: 1,859
Karma: 505847
Join Date: Feb 2009
Location: Columbus, OH
Device: Kindle Touch, Kindle 2, Kindle DX, iPhone 3GS
Quote:
Originally Posted by porkupan View Post
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.
sirbruce is offline   Reply With Quote
Old 06-20-2009, 01:02 PM   #11
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: 627
Join Date: Jun 2009
Location: California, USA
Device: Kindle DX
I have updated usbnetwork.tar.gz to include untested k2 version
ebs is offline   Reply With Quote
Old 06-20-2009, 01:33 PM   #12
porkupan
Fanatic
porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.
 
porkupan's Avatar
 
Posts: 554
Karma: 1057213
Join Date: Sep 2006
Location: North Eastern U.S.
Device: Sony Reader
Quote:
Originally Posted by sirbruce View Post
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.
porkupan is offline   Reply With Quote
Old 06-20-2009, 04:59 PM   #13
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: 627
Join Date: Jun 2009
Location: California, USA
Device: Kindle DX
usbnetwork v0.04 (with root telnetd shell)

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 :
Code:
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

Last edited by ebs; 06-20-2009 at 10:45 PM.
ebs is offline   Reply With Quote
Old 06-20-2009, 10:44 PM   #14
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: 627
Join Date: Jun 2009
Location: California, USA
Device: Kindle DX
usbnetwork v0.05 (with root telnetd/sshd)

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.

Code:
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]#
Attached Files
File Type: gz usbnetwork-0.05.tar.gz (320.9 KB, 4191 views)
ebs is offline   Reply With Quote
Old 06-21-2009, 08:18 PM   #15
brteag00
Junior Member
brteag00 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jun 2009
Device: Kindle DX
0.05 works!

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.
brteag00 is offline   Reply With Quote
Reply

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 01:52 AM.


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