LeapFrog Pollux Platform: Internet Access

This page includes steps that describe how to use routing on your host to enable your Didj to access to the wider Internet via the USB connection.

They have been tested in Ubuntu 8.04 Hardy Heron (2.6.24-26 kernel), and are based on similar instructions for other handheld devices.

Prerequisites

Enable Networking

Configuring the Host

In this example, we assume that the host has an ethernet connection on eth0. (your own config may be different; for example, you may be using a Wifi adapter. In theory, aside from your LAN specific configuration, the steps outlined below should still work.)

For this example we establish the following assumptions:

The gateway between the local network and the Internet is 192.168.0.1

The host is connected to the gateway as 192.168.0.116 (assigned by DHCP on eth0)

The host is connected to the Didj as 192.168.2.1 (assigned statically to usb0 on host)

The Didj is connected to the host as 192.168.2.100 (assigned statically to usb0 on Didj)

Configure the host machine's /etc/network/interfaces file as follows:

To apply these new settings:

On the Host: (of course, rebooting the host will also work)

Configuring the Didj

If you are using a standard Didj configuration and you have not yet done so, rmmod the g_file_storage kernel module and insmod the g_ether/ko module. (see http://elinux.org/Didj_Networking_HOWTO#Installing_g_ether.ko)

With the USB cable connected to your host, configure an IP address on a different subnet from the rest of your LAN

On the Didj:

Next, add a route from your Didj to the host (making it the gateway) using the ip address of the host's usb0 device.

On the Didj:

Finally, add nameservers to your Didj's /etc/resolv.conf file (you can add the lines from this example which uses the OpenDNS servers)

At this point, your Didj is connected to the outside world - and a ping or a wget to yahoo or google should work.

Todo

Routing packets from the gateway to the Didj.

References http://wiki.openmoko.org/wiki/USB_Networking

http://wiki.openzaurus.org/HowTos/USB_Networking_Without_Bridging

Acknowledgments

Thanks to losinggeneration for useful input on this!