Nokia N900 as USB WiFi router

If you want to use just 3G then you might be better with Mobile Hotspot.

Here's how to share your N900 WLAN connection through USB-port.

First, you'll need kernel-power, usb-networking-modules, rootsh and udhcpd packages installed to make this work. Once installed, open up terminal and create file routerup.sh with the following content:

ifup usb0
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A POSTROUTING -t nat -s -j MASQUERADE
iptables -I INPUT -s -j ACCEPT

Next, make routerup.sh executable

chmod ugo+x routerup.sh

Now, create file /etc/udhcpd.conf with following content:

interface usb0
opt router
opt dns

Create routerdown.sh

killall udhcpd
ifdown usb0
echo 0 > /proc/sys/net/ipv4/ip_forward
iptables -F
iptables -t nat -F

and make it executable too.

You can use these scripts manually by plugging USB-cord (choose PC Suite mode) and then executing routerup.sh (and routerdown.sh when you're done) as root. Scripts wont work as normal user. Any modern linux system should now be able to get ip from N900 dhcp-server and have network.

If you need this connectivity often, you can put routerup.sh into N900's /usr/sbin/pcsuite-enable.sh before last line which reads exit 0, and routerdown.sh to /usr/sbin/pcsuite-disable.sh to use scripts automatically on PC Suite connection.

Windows users need  http://tablets-dev.nokia.com/MADDE.php to make this work, can't write more specific instructions because the lack of windows ;)

Post a Comment