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 05-26-2013, 06:56 PM   #1
fry@pocketbook
Member
fry@pocketbook began at the beginning.
 
Posts: 21
Karma: 10
Join Date: May 2011
Device: Kindle DXi
Internet over USB networking

After long time I need some help with my Kindle DXG

I like to use USB networking to connect the Kindle to my local network. I have installed v3.2.1 firmware and some (old) Version of usbnetwork hack.

I'm using Ubuntu with this settings:
Code:
auto eth0
iface usb0 inet dhcp

auto usb0
iface usb0 inet static
    address 192.168.2.1
    netmask 255.255.255.0
    up echo 1 > /proc/sys/net/ipv4/ip_forward
    up iptables -P FORWARD ACCEPT
    up iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.2.0/24 
    down echo 0 > /proc/sys/net/ipv4/ip_forward
    down echo 0 > /proc/sys/net/iptables -t nat -F POSTROUTING
But I get no access to any website and Kindle like to always activate 3G. Telnet 192.168.2.2 from Ubuntu to Kindle works fine, ssh ask for a password(?) and ping from Kindle Terminal to IP 192.168.2.1 works.
fry@pocketbook is offline   Reply With Quote
Old 05-26-2013, 07:30 PM   #2
knc1
Helpdesk Junkie
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 7,052
Karma: 6359394
Join Date: Feb 2012
Device: Too many.
What are your settings on the DXG ?
Have you installed the KUAL launcher and the KUAL firewall ?
(Translation: we (or at least I) don't support Amazon's idea of firewall rules here.)
knc1 is offline   Reply With Quote
 
Advertisement
Old 05-27-2013, 05:37 AM   #3
fry@pocketbook
Member
fry@pocketbook began at the beginning.
 
Posts: 21
Karma: 10
Join Date: May 2011
Device: Kindle DXi
I only have this hacks installed some years ago:
- kindle-jailbreak-0.10.N
- kindle-ss-0.25.N
- kindle-usbnetwork-0.35.N
- lpad-pkg-001c
- disable_logging_ini_and_scripts
fry@pocketbook is offline   Reply With Quote
Old 05-27-2013, 06:55 AM   #4
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677559
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by fry@pocketbook View Post
After long time I need some help with my Kindle DXG

I like to use USB networking to connect the Kindle to my local network. I have installed v3.2.1 firmware and some (old) Version of usbnetwork hack.

I'm using Ubuntu with this settings:
Code:
auto eth0
iface usb0 inet dhcp

auto usb0
iface usb0 inet static
    address 192.168.2.1
    netmask 255.255.255.0
    up echo 1 > /proc/sys/net/ipv4/ip_forward
    up iptables -P FORWARD ACCEPT
    up iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.2.0/24 
    down echo 0 > /proc/sys/net/ipv4/ip_forward
    down echo 0 > /proc/sys/net/iptables -t nat -F POSTROUTING
But I get no access to any website and Kindle like to always activate 3G. Telnet 192.168.2.2 from Ubuntu to Kindle works fine, ssh ask for a password(?) and ping from Kindle Terminal to IP 192.168.2.1 works.
The host configuration looks ok, as far as I can see, so it's probably your Kindle that is not configured correctly. Try setting the default route (something like "route add default gw 192.168.2.1"). If it doesn't work, try to understand whether packets are even arriving at the host pc, and what it does with them (e.g. "tcpdump - i any -proto icmp -nX -s 1000" on the host), then ping 8.8.8.8 from the Kindle. Or so.
ixtab is offline   Reply With Quote
Old 05-27-2013, 09:23 AM   #5
knc1
Helpdesk Junkie
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 7,052
Karma: 6359394
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by fry@pocketbook View Post
After long time I need some help with my Kindle DXG

I like to use USB networking to connect the Kindle to my local network. I have installed v3.2.1 firmware and some (old) Version of usbnetwork hack.

I'm using Ubuntu with this settings:
Code:
auto eth0
iface usb0 inet dhcp

auto usb0
iface usb0 inet static
    address 192.168.2.1
    netmask 255.255.255.0
    up echo 1 > /proc/sys/net/ipv4/ip_forward
    up iptables -P FORWARD ACCEPT
    up iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.2.0/24 
    down echo 0 > /proc/sys/net/ipv4/ip_forward
    down echo 0 > /proc/sys/net/iptables -t nat -F POSTROUTING
Replace:
Code:
    down echo 0 > /proc/sys/net/iptables -t nat -F POSTROUTING
With:
Code:
    down iptables -D POSTROUTING -t nat -j MASQUERADE -s 192.168.2.0/24
ixtab has already spotted your routing problem on the Kindle.
most likely the wrong (or a missing) default route and gateway entry.
you may also want to set the dns name service resolution on the Kindle to that which your lan is using.

Your questions would be easier to answer if you posted your Kindle's networking setup, like I requested.
Otherwise we are in the same boat as you are - guessing in the dark.
knc1 is offline   Reply With Quote
Old 05-27-2013, 11:29 AM   #6
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,219
Karma: 2124593
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
IIRC, I was once there and trying to do this. I may be completely wrong, but as far as I can remember (sold my DX over a year ago!) the Kindle's software (user interface level) will never enable its "Online" features (Browser and others) for a USB network connection and will always try to enable 3G networking instead. It doesn't really check for a "generic" connection but rather checks the 3G network connections and finds that this isn't established. So I guess that making it use the USB network connection is a bit harder, since it would also need intercepting/replicating the 3G network connection.

I may be a bit off track here and mix my experiences with the K3, but I'm somewhat sure.

The question is: what should the network connection be used for? If that is outside the scope of Amazon's software, then of course a "generic" connection via USB networking is just fine. Like e.g. for using software in a terminal application or similar.
hawhill is offline   Reply With Quote
Old 05-27-2013, 11:44 AM   #7
knc1
Helpdesk Junkie
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 7,052
Karma: 6359394
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by hawhill View Post
IIRC, I was once there and trying to do this. I may be completely wrong, but as far as I can remember (sold my DX over a year ago!) the Kindle's software (user interface level) will never enable its "Online" features (Browser and others) for a USB network connection and will always try to enable 3G networking instead. It doesn't really check for a "generic" connection but rather checks the 3G network connections and finds that this isn't established. So I guess that making it use the USB network connection is a bit harder, since it would also need intercepting/replicating the 3G network connection.

I may be a bit off track here and mix my experiences with the K3, but I'm somewhat sure.

The question is: what should the network connection be used for? If that is outside the scope of Amazon's software, then of course a "generic" connection via USB networking is just fine. Like e.g. for using software in a terminal application or similar.
Ah, this question is about using the Kindle as the client, not the connection router.
I.E:
Kindle -> Lan (via usb networking)
NOT:
Lan -> Kindle -> 3G connection

If the Kindle DX needs its 3G networking over-ridden to keep it "out of the way" - - then look at what sets up ppp0 interface (which is the 3G network connection).

(I do have a DXG - but no time to mess with this myself.)
knc1 is offline   Reply With Quote
Old 05-27-2013, 01:17 PM   #8
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,219
Karma: 2124593
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
Yep, Kindle as client. And you are right, most probably, the ppp0 interface setup must be overridden. The problem lies within Amazon's (Java) software stack. It doesn't check whether there is an actual internet connection (i.e. checking route/ip setup), but rather checks whether the 3G interface is set up and running (there's some Amazon daemon caring for that, I think it was "wand" or something like that, the Java software would connect to it using their LIPC inter process communication). They check the state of this for going into "connected" mode - and that again is the condition checked for the online features (like browser, social sharing etc).

In the first place, I'd be interested in what problem the OP tries to solve. "Access to website" indicates it's about using the Browser - however, I would suggest it's too much a hassle to make that running. The browser is actually not that good - I guess vncviewer on the Kindle is much more fun here (and doesn't need a route to the internet).

Not mentioned as of now are the Amazon proxy servers. I think I remember that these are used by default by the browser and that was pretty much hardcoded (IIRC, you could change the proxy addresses, though, they were in a dedicated config file).
hawhill is offline   Reply With Quote
Old 05-27-2013, 02:23 PM   #9
knc1
Helpdesk Junkie
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 7,052
Karma: 6359394
Join Date: Feb 2012
Device: Too many.
I agree -
This device is a bit old to start reverse engineering its network resources.

It would have to be a real "available time" sort of project.
I don't have any of that for at least the next six weeks. Probably longer, "life" has a habit of springing surprises.

The members of the KUAL development team (at least most of them) do have the DX hardware. But they are currently swamped supporting the KUAL project and its new infrastructure.
knc1 is offline   Reply With Quote
Old 05-27-2013, 03:42 PM   #10
fry@pocketbook
Member
fry@pocketbook began at the beginning.
 
Posts: 21
Karma: 10
Join Date: May 2011
Device: Kindle DXi
I like to do two things:
- get access to filesystem via ssh over my network via a "linux usb-box"
- sometimes use kindle browser with my lan

Shoud I update to kual launcher?

When I try: "route add default gw 192.168.2.1"
I get: "route: SIOCADDRT: file exists"
route gets me: "192.168.0.0 * 255.255.255.0 U 0 0 0 usb0"
fry@pocketbook is offline   Reply With Quote
Old 05-27-2013, 05:00 PM   #11
knc1
Helpdesk Junkie
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 7,052
Karma: 6359394
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by fry@pocketbook View Post
I like to do two things:
- get access to filesystem via ssh over my network via a "linux usb-box"
- sometimes use kindle browser with my lan

Shoud I update to kual launcher?

When I try: "route add default gw 192.168.2.1"
I get: "route: SIOCADDRT: file exists"
route gets me: "192.168.0.0 * 255.255.255.0 U 0 0 0 usb0"
I would expect the command 'route' to generate more than a single line.
Please cut&paste into CODE blocks the entire output.
Also the output of ifconfig -a
knc1 is offline   Reply With Quote
Old 05-27-2013, 05:04 PM   #12
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677559
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
try
Code:
route -n
and post the output.
ixtab is offline   Reply With Quote
Old 05-27-2013, 05:57 PM   #13
fry@pocketbook
Member
fry@pocketbook began at the beginning.
 
Posts: 21
Karma: 10
Join Date: May 2011
Device: Kindle DXi
Sorry,
route -n on Kindle give me:
Code:
Destination   Gateway   Genmask         Flags   Metric   Ref   Use   Iface
192.168.0.0  0.0.0.0     255.255.255.0  U        0          0      0      usb0
after "route add default gw 192.168.2.1"
Code:
Destination   Gateway   Genmask         Flags   Metric   Ref   Use   Iface
192.168.0.0  0.0.0.0     255.255.255.0  U        0          0      0      usb0
0.0.0.0  192.168.2.1     255.255.255.0  UG       0          0      0      usb0
Now I can ping my Router with ping 192.168.1.1
fry@pocketbook is offline   Reply With Quote
Old 05-28-2013, 03:36 AM   #14
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,219
Karma: 2124593
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
and that's it. For solving the problem that the Kindle's browser will still want a 3G connection, see my notes above.

The SSH (file) access thingy isn't yet completely clear to me. What do you want to access from what device? Going from anywhere in your LAN onto your Kindle (SSH server on Kindle, client in LAN) will need proper TCP redirection on the USB host PC. Going from the Kindle to anywhere in your LAN (client on Kindle) should be possible now that the route is set up properly. For file access (client on Kindle) you might want to look out for a FUSE-based SSH file system client like "sshfs" (cross-compiled for the Kindle). Or just use scp/sftp for a start.
hawhill is offline   Reply With Quote
Old 05-28-2013, 01:00 PM   #15
fry@pocketbook
Member
fry@pocketbook began at the beginning.
 
Posts: 21
Karma: 10
Join Date: May 2011
Device: Kindle DXi
@hawhill
I have a small PC that runs Ubuntu and is connected to lan. I like to connect my Kindle DXG with it via usb to it. Now the Kindle should avaible via ssh or telnet over the Network with my Notebook.

For example:
Code:
fry@notebook~: ssh root@kindle-ip
Do nothing with the small PC with Ubuntu it should only be a "Connector".


The other thing, but not so important, is to use Kindle browser and browse via lan in the internet.
fry@pocketbook 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
help setting up usb networking bennyb Kindle Developer's Corner 10 02-22-2013 01:27 PM
Setup USB Networking K3 nathansuchy Kindle Developer's Corner 3 11-14-2012 04:37 PM
USB Networking on Mac OS? DairyKnight Kindle Developer's Corner 19 07-02-2012 05:19 PM
K4 Mac or PC How can I browse the internet in Kindle DX through my PC networking ? meem Amazon Kindle 0 08-04-2010 05:23 AM
Firmware Update USB networking for 2.5? dd_engi Amazon Kindle 9 05-09-2010 07:45 AM


All times are GMT -4. The time now is 06:17 PM.


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