The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)


Nemo/USBNetworking

From Mer Wiki
< Nemo
Revision as of 10:46, 18 July 2012 by Tanuk2 (Talk | contribs)

Jump to: navigation, search

Here is script that is tested on Fedora 15/16 and OpenSUSE 12.1 with Nokia N900/N950/N9.

Connect the device with usb cable to your host pc and run following commands

sudo /sbin/ifconfig usb0 up 192.168.2.14
sudo /usr/sbin/iptables -A POSTROUTING -t nat -s 192.168.2.15/32 -j MASQUERADE
sudo /usr/sbin/iptables -P FORWARD ACCEPT
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
# Rest of these are here just to print something that is needed for the device to get routing work.
NAME_SERVER=`cat /etc/resolv.conf | grep "nameserver" | head -1`
echo "echo $NAME_SERVER > /etc/resolv.conf"
echo "route add default gw 192.168.2.14"


Making NetworkManager Ignore the Device

At least on my Ubuntu 12.04 machine, NetworkManager seems to get a bit confused when I insert the USB cable (it tries, and retries, without success, to automatically to set up the network connection to N900). This is how to make NetworkManager ignore the device:

Plug in the USB cable, and check the MAC address (HWAddr) of usb0:

/sbin/ifconfig

Write this to /etc/NetworkManager/nm-system-settings.conf (replace the address with your device's address):

[keyfile]
unmanaged-devices=mac:FA:B5:04:7D:39:2B

Restart NetworkManager (this command works on Ubuntu 12.04, restarting services may be done differently on different systems):

sudo service network-manager restart
Personal tools