Greenphone-on-LAN HOWTO

From GreenphoneWiki

Jump to: navigation, search

Get your Greenphone connected to your LAN and get fast internet access. To accomplish this we use bridged networking. This HOWTO describes how to do it on a Gentoo GNU/Linux system, but with small modifications you can get it to run on your favourite distro (please update the wiki if you do). You can also do all this manually with brctl and ifconfig.


This works best if you have two network cards on your host computer, but it will probably work with one as well.

Contents

[edit] Install bridge-utils

Use your favourite package manager to install bridge-utils.

emerge bridge-utils

[edit] Configure the kernel module

Make sure that bridge is enabled in your /usr/src/linux/.config.

CONFIG_BRIDGE=m

[edit] Configure the network script

Add the following lines to Gentoos networking configuration. Modify acording to your setup.

bridge_br0="eth1 eth2"
config_eth1=( "null" )
config_eth2=( "null" )
config_br0=( "10.0.0.50 netmask 255.255.255.0 broadcast 10.0.0.255" )
routes_br0=( "default via 10.0.0.1" )
brctl_br0=( "setfd 0" "sethello 0" "stp off" )

Also configure your Greenphone to connect to Ethernet with DHCP.

[edit] Start the bridge

Plug the USB cable in the phone and your host computer. Make sure your second network card is properly connected to your LAN. Make a symlink for your new network service:

ln -s /etc/init.d/net.lo /etc/init.d/net.br0

Start the service:

/etc/init.d/net.br0 start

[edit] Test your new bridge

If you have done everything right, your Greenphone should receive an IP address from your DHCP-server. It should show up as "Online" in your "Internet" settings. Now, find out which IP address you got. This can be hard because we haven't configured the bridge to forward broadcast messages to the Greenphone. There's no way to see which IP address the Greenphone received from the GUI. You may have access to the DHCP server log to see which address it was assigned. Also, you may use the good old brute force method:

for i in `seq 2 254`;
    do ping -c 1 -W 1 10.0.0.$i | grep "64 bytes from"
done

Please update the wiki if you come up with a better method. Thanks!

krukke@snota.no

Personal tools