<em><a href="Non-Sumou.html">Other Nokia N900</a></em></p>
To share internet connections and files between a GNU PC and a Nokia N900 GNU mobile phone, you need to setup USB networking, and take care that Networking Manager on your PC is not gonna mess up the connection after plugging in the USB cable. Do this as per the following steps.</p>
<ul>
<li><i>On the N900:</i>
Quote out the <i>gateway 192.168.2.14</i> in <b>/etc/network/interfaces<b>, unless you automatically want the N900 to use the PC's internet connection. Sometimes I want to use the N900's internet connection as the internet connection gateway on the PC, and sometimes not, so it's necessary to set up the proper gateway on the respective end, and not have the N900 automatically use the PC as a gateway:
<table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b># sed 's/ gateway 192\.168\.2\.14/# gateway 192\.168\.2\.14/' -i /etc/network/interfaces</b></td></tr></table></li>
<li><i>On the N900:</i>
To automatically setup usb0 when entering PC suite mode change the last few lines of /usr/sbin/pcsuite-enable.sh by adding <b>ifup usb0</b> to:
<table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>logger "$0: sent SIGUSR1 to syncd"
ifup usb0
exit 0</b></td></tr></table></li>
<li><i>On the PC, running Debian unstable:</i>
Create the file <b>/etc/udev/rules.d/99-nokia-n900.rules</b> and put in the following lines:
<table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>SUBSYSTEM=="net", ACTION=="add", DEVPATH=="/devices/pci0000:00/0000:00:1a.7/usb1/1-2/1-2:1.8/net/usb0", ATTRS{idVendor}=="0421", ATTRS{idProduct}=="01c8", ATTRS{manufacturer}=="Nokia", ATTRS{product}=="N900 (PC-Suite Mode)", NAME="n900"
SUBSYSTEM=="net", ACTION=="add", DEVPATH=="/devices/pci0000:00/0000:00:1a.7/usb1/1-2/1-2:1.0/net/usbpn0", ATTRS{idVendor}=="0421", ATTRS{idProduct}=="01c8", ATTRS{manufacturer}=="Nokia", ATTRS{product}=="N900 (PC-Suite Mode)", NAME="n900p"</b></td></tr></table>
Your DEVPATH may be different though, depending on which USB port is used on the host computer etc. You can use:
<table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>$ udevadm monitor —kernel</b></td></tr></table>
while plugging in the N900 to see what is the correct path.</li>
<li><i>On the PC, running Debian unstable:</i>
After adding the udev rules, you have to reload them with:
<table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b># udevadm control —reload-rules</b></td></tr></table></li>
<li><i>On the PC, running Debian unstable:</i>
Edit <b>/etc/network/interfaces</b> and add:
allow-hotplug n900
auto n900
iface n900 inet static
address 192.168.2.14
netmask 255.255.255.0
up iptables -A POSTROUTING -t nat -s 192.168.2.15/32 -j MASQUERADE
up echo 1 > /proc/sys/net/ipv4/ip_forward
down iptables -D POSTROUTING -t nat -s 192.168.2.15/32 -j MASQUERADE
down echo 0 > /proc/sys/net/ipv4/ip_forward
</li>
<li>Now put your usb cable in the pc and in the n900 and on the host. Your PC will be 192.168.2.14, the Nokia N900 192.168.2.15 To check that everything is set up properly you can run (on the PC):
<table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>$ ifconfig n900</b></td></tr></table></li>
</ul>
Now fix the Network Manager. On Debian the Network Manager will try to reconnect the n900 network device shortly after plugging in the USB cable, making the connection to the N900 unuseable. To fix:
<ul> <li>Rightclick the Network Manager applet icon in the gnome panel on the top right side of the screen.</li> <li>Click <b>Edit Connections...</b></li> <li>In the <b>Wired</b> tab select Auto</li> </ul> <!— Page published by Emacs Muse ends here —> </div> <i>To send me feedback about this page, use the below email.</i><br /> <b>© sumoudou.org 2010</b><br /> <img style="border:0" alt="sumoudou.org" src="email.gif" width="129" height="10" /><br /> <a href="http://www.gnu.org/" style="text-decoration: none;"><img style="border:0" alt="GNU" src="powered-by-gnu.png" />]] <a href="http://www.gnu.org/software/emacs/emacs.html" style="text-decoration: none;"><img style="border:0" alt="GNU Emacs" src="made-with-emacs.png" />]] <a href="http://hcoop.net/" style="text-decoration: none;"><img style="border:0" alt="HCoop" src="hcoop-proud-member.png" />]] <a href="http://hcoop.net/" style="text-decoration: none;"><img style="border:0" alt="HCoop" src="hosted-by-hcoop.png" />]] <a href="http://mwolson.org/projects/EmacsMuse.html" style="text-decoration: none;"><img style="border:0" alt="Emacs Muse" src="made-with-muse.png" />]] <a href="http://mwolson.org/projects/EmacsMuse.html" style="text-decoration: none;"><img style="border:0" alt="Emacs Muse" src="powered-by-muse.png" />]] <br /> <a href="http://www.fsf.org/resources/formats/playogg" style="text-decoration: none;"><img style="border:0" alt="Ogg" src="play-ogg.png" />]] <a href="http://www.catb.org/hacker-emblem/" style="text-decoration: none;"><img style="border:0" alt="Glider" src="glider.png" />]] <a href="http://ubuntu.com/" style="text-decoration: none;"><img style="border:0" alt="Ubuntu" src="ubuntu.png" />]] <a href="http://validator.w3.org/check?uri=referer" style="text-decoration: none;"><img style="border:0" alt="Valid XHTML 1.0 Strict!" src="valid-xhtml10-blue.png" />]] <a href="http://jigsaw.w3.org/css-validator/check/referer" style="text-decoration: none;"><img style="border:0" alt="Valid CSS!" src="valid-css-blue.png" />]] <br />Last updated 2010-03-09-061728 </div> <br />. </body> </html>