<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://maemo.octonezd.me/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=192.33.126.162</id>
	<title>Maemo Wiki Mirror - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://maemo.octonezd.me/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=192.33.126.162"/>
	<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php/Special:Contributions/192.33.126.162"/>
	<updated>2026-04-22T04:40:08Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=N900_USB_networking&amp;diff=28424</id>
		<title>N900 USB networking</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=N900_USB_networking&amp;diff=28424"/>
		<updated>2010-02-18T19:09:07Z</updated>

		<summary type="html">&lt;p&gt;192.33.126.162: /* Host configuration on Debian Lenny */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to enable Networking on the [[N900]] via [[USB]]. The first part describes how to configure the Nokia N900 as a USB pluggable network device. The second part describes how to configure various platforms to use the Nokia N900 as a network device. This article is based on the Maemo 4.x [http://wiki.maemo.org/USB_networking wiki] for configuring USB networking.&lt;br /&gt;
&lt;br /&gt;
You might want to use the N900 as a USB network device to log into your N900 remotely, or to transfer data from your N900 to another computer, in a situation where wifi or bluetooth are not an option. If you wish to connect your N900 to a Linux machine over TCP/IP, the [http://maemo.org/development/documentation/pc_connectivity/ PC connectivity] section in the Maemo SDK documentation also contains useful information.&lt;br /&gt;
&lt;br /&gt;
== N900 USB network configuration ==&lt;br /&gt;
There is a default USB network interface configuration on Nokia N900. In the file /etc/network/interfaces, you should see a section which looks like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto usb0&lt;br /&gt;
iface usb0 inet static&lt;br /&gt;
       address 192.168.2.15&lt;br /&gt;
       netmask 255.255.255.0&lt;br /&gt;
       gateway 192.168.2.14&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also add the following lines to set the default route correctly&lt;br /&gt;
       up route del default&lt;br /&gt;
       up route add default gw  192.168.2.14&lt;br /&gt;
and&lt;br /&gt;
       up run-standalone.sh dbus-send --type=method_call --system --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:DUMMY uint32:0&lt;br /&gt;
&lt;br /&gt;
       down run-standalone.sh dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true&lt;br /&gt;
&lt;br /&gt;
to properly set/reset the connection manager on connection/disconnection&lt;br /&gt;
especially if you have set up a DUMMY network as decribed later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With this default configuration, the N900 USB interface will have the IP address 192.168.2.15, and the remote end will have the IP address 192.168.2.14.&lt;br /&gt;
By default, the USB network interface on the N900 is configured.&lt;br /&gt;
You need to install the package usb-network-modules. &lt;br /&gt;
&lt;br /&gt;
=== Starting USB network mode ===&lt;br /&gt;
Plug one end of the USB cable on the host and the other end into the N900. The N900 will bring up the mode-selection dialog. Select &#039;PC Suite mode&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Mode-selection.png|center|alt=USB Mode-Selection dialog|USB Mode-Selection dialog]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open a root shell in &#039;X Terminal&#039; on the N900 and activate the interface by executing the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo gainroot&lt;br /&gt;
ifup usb0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If all went well, no errors will be displayed. The command &#039;ifconfig usb0&#039; will give the following output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Nokia-N900-42-11:~# ifconfig usb0&lt;br /&gt;
usb0      Link encap:Ethernet  HWaddr F2:50:8F:04:1D:8B  &lt;br /&gt;
          inet addr:192.168.2.15  Bcast:192.168.2.255  Mask:255.255.255.0&lt;br /&gt;
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1&lt;br /&gt;
          RX packets:1021 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
          TX packets:2003 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
          collisions:0 txqueuelen:1000 &lt;br /&gt;
          RX bytes:86091 (84.0 KiB)  TX bytes:2556598 (2.4 MiB)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should also be able to ping 192.168.2.15&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Nokia-N900-42-11:~# ping 192.168.2.15&lt;br /&gt;
PING 192.168.2.15 (192.168.2.15): 56 data bytes&lt;br /&gt;
64 bytes from 192.168.2.15: seq=0 ttl=64 time=0.367 ms&lt;br /&gt;
64 bytes from 192.168.2.15: seq=1 ttl=64 time=0.214 ms&lt;br /&gt;
^C&lt;br /&gt;
--- 192.168.2.15 ping statistics ---&lt;br /&gt;
2 packets transmitted, 2 packets received, 0% packet loss&lt;br /&gt;
round-trip min/avg/max = 0.214/0.290/0.367 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
If you can not ping the outside world (for example: local network works but Google does not), check your routing tables.&lt;br /&gt;
&amp;lt;pre&amp;gt;/home/user # route&lt;br /&gt;
Kernel IP routing table&lt;br /&gt;
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface&lt;br /&gt;
192.168.2.0     *               255.255.255.0   U     0      0        0 usb0&lt;br /&gt;
default         192.168.2.14    0.0.0.0         UG    0      0        0 usb0&lt;br /&gt;
default         *               0.0.0.0         U     0      0        0 gprs0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have a situation like above where the cell network&#039;s packets are at a lower default priority, you might have to run the following to fix it:&lt;br /&gt;
&amp;lt;pre&amp;gt;/home/user # route del default&lt;br /&gt;
/home/user # route&lt;br /&gt;
Kernel IP routing table&lt;br /&gt;
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface&lt;br /&gt;
192.168.2.0     *               255.255.255.0   U     0      0        0 usb0&lt;br /&gt;
default         *               0.0.0.0         U     0      0        0 gprs0&lt;br /&gt;
/home/user # ping google.com&lt;br /&gt;
PING google.com (74.125.45.103): 56 data bytes&lt;br /&gt;
64 bytes from 74.125.45.103: seq=0 ttl=51 time=257.081 ms&lt;br /&gt;
64 bytes from 74.125.45.103: seq=1 ttl=51 time=236.481 ms&lt;br /&gt;
64 bytes from 74.125.45.103: seq=2 ttl=51 time=256.226 ms&lt;br /&gt;
^C&lt;br /&gt;
--- google.com ping statistics ---&lt;br /&gt;
3 packets transmitted, 3 packets received, 0% packet loss&lt;br /&gt;
round-trip min/avg/max = 236.481/249.929/257.081 ms&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If after having fixed the routing table you still are not able to ping&lt;br /&gt;
the outside world try to add a nameserver to /etc/resolv.conf&lt;br /&gt;
&lt;br /&gt;
 nameserver 127.0.0.1&lt;br /&gt;
 # added Google DNS&lt;br /&gt;
 nameserver 8.8.8.8&lt;br /&gt;
 nameserver 8.8.4.4&lt;br /&gt;
&lt;br /&gt;
=== Stopping USB network mode ===&lt;br /&gt;
This is optional. It is not necessary to stop the interface after unplugging the USB cable. &lt;br /&gt;
&lt;br /&gt;
However, to stop the USB interface, unplug the USB cable and execute the following in &#039;X Terminal&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo gainroot&lt;br /&gt;
ifdown usb0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Host USB Network Configuration ==&lt;br /&gt;
The Host configuration is detailed in the Maemo 4.x [http://wiki.maemo.org/USB_networking#Host_USB_Network_Configuration USB Networking wiki]. Please refer to it for details.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;FIXME, there is no usb host mode on n900&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Host configuration on Debian Lenny ==&lt;br /&gt;
&lt;br /&gt;
Create the file in /etc/udev/rules.d/99-nokia-n900.rules and put in the following lines: &lt;br /&gt;
 SUBSYSTEM==&amp;quot;net&amp;quot;, ACTION==&amp;quot;add&amp;quot;, ATTRS{idVendor}==&amp;quot;0421&amp;quot;, ATTRS{idProduct}==&amp;quot;01c8&amp;quot;, ATTRS{manufacturer}==&amp;quot;Nokia&amp;quot;, ATTRS{product}==&amp;quot;N900 (PC-Suite Mode)&amp;quot;, NAME=&amp;quot;n900&amp;quot;&lt;br /&gt;
 #SUBSYSTEM==&amp;quot;net&amp;quot;, ACTION==&amp;quot;add&amp;quot;, ATTRS{idVendor}==&amp;quot;0421&amp;quot;, ATTRS{idProduct}==&amp;quot;01c8&amp;quot;, ATTRS{manufacturer}==&amp;quot;Nokia&amp;quot;, ATTRS{product}==&amp;quot;N900 (PC-Suite Mode)&amp;quot;, NAME=&amp;quot;n900p&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that the udev configuration above may not work in Debian squeeze. This rule renames either the usb network interface (usb0) or the usb phone net interface (usbpn0) to interface called n900. Since the two rules above are identical, the choice is made seemingly at random. Making the rules more accurate by adding a DEVPATH key helps:&lt;br /&gt;
&lt;br /&gt;
 SUBSYSTEM==&amp;quot;net&amp;quot;, ACTION==&amp;quot;add&amp;quot;, DEVPATH==&amp;quot;/devices/pci0000:00/0000:00:1a.7/usb1/1-2/1-2:1.8/net/usb0&amp;quot;, ATTRS{idVendor}==&amp;quot;0421&amp;quot;, ATTRS{idProduct}==&amp;quot;01c8&amp;quot;, ATTRS{manufacturer}==&amp;quot;Nokia&amp;quot;, ATTRS{product}==&amp;quot;N900 (PC-Suite Mode)&amp;quot;, NAME=&amp;quot;n900&amp;quot;&lt;br /&gt;
 SUBSYSTEM==&amp;quot;net&amp;quot;, ACTION==&amp;quot;add&amp;quot;, DEVPATH==&amp;quot;/devices/pci0000:00/0000:00:1a.7/usb1/1-2/1-2:1.0/net/usbpn0&amp;quot;, ATTRS{idVendor}==&amp;quot;0421&amp;quot;, ATTRS{idProduct}==&amp;quot;01c8&amp;quot;, ATTRS{manufacturer}==&amp;quot;Nokia&amp;quot;, ATTRS{product}==&amp;quot;N900 (PC-Suite Mode)&amp;quot;, NAME=&amp;quot;n900p&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Your DEVPATH may be different though, depending on which USB port is used on the host computer etc. You can use &lt;br /&gt;
&lt;br /&gt;
 udevadm --monitor --kernel&lt;br /&gt;
&lt;br /&gt;
while plugging in the N900 to see what is the correct path.&lt;br /&gt;
&lt;br /&gt;
After adding the udev rules, you have to reload them with:&lt;br /&gt;
 udevadm control --reload-rules&lt;br /&gt;
&lt;br /&gt;
Then edit /etc/network/interfaces and add:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
allow-hotplug n900&lt;br /&gt;
auto n900&lt;br /&gt;
iface n900 inet static&lt;br /&gt;
	address 192.168.2.14&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
	up iptables -A POSTROUTING -t nat -s 192.168.2.15/32 -j MASQUERADE&lt;br /&gt;
	up echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
        down iptables -D POSTROUTING -t nat -s 192.168.2.15/32 -j MASQUERADE&lt;br /&gt;
	down echo 0 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now put your usb cable in the pc and in the n900 and on the host.&lt;br /&gt;
To check that everything is set up properly you can run:&lt;br /&gt;
&lt;br /&gt;
 ifconfig n900&lt;br /&gt;
&lt;br /&gt;
== Automatic configuration with ubuntu 9.10 ==&lt;br /&gt;
Note: this instructions should be fixed/improved:&lt;br /&gt;
&lt;br /&gt;
Create the file in /etc/udev/rules.d/99-nokia-n900.rules and put in the following lines:&lt;br /&gt;
 SUBSYSTEM==&amp;quot;net&amp;quot;, ACTION==&amp;quot;add&amp;quot;, ENV{ID_USB_DRIVER}==&amp;quot;cdc_ether&amp;quot;, ENV{ID_MODEL}=&amp;quot;N900__PC-Suite_Mode&amp;quot;, ENV{ID_VENDOR}==&amp;quot;Nokia&amp;quot;, NAME=&amp;quot;n900&amp;quot;&lt;br /&gt;
 SUBSYSTEM==&amp;quot;net&amp;quot;, ACTION==&amp;quot;add&amp;quot;, ENV{ID_USB_DRIVER}==&amp;quot;cdc_phonet&amp;quot;, ENV{ID_MODEL}=&amp;quot;N900__PC-Suite_Mode&amp;quot;, ENV{ID_VENDOR}==&amp;quot;Nokia&amp;quot;, NAME=&amp;quot;n900pn&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Then edit /etc/network/interfaces and add:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto n900&lt;br /&gt;
iface n900 inet static&lt;br /&gt;
	address 192.168.2.14&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
	up iptables -A POSTROUTING -t nat -s 192.168.2.15/32 -j MASQUERADE&lt;br /&gt;
	up echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
        down iptables -D POSTROUTING -t nat -s 192.168.2.15/32 -j MASQUERADE&lt;br /&gt;
	down echo 0 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
finally you have to fix /etc/init/network-interface.conf, change the line:&lt;br /&gt;
 stop on net-device-removed INTERFACE=$INTERFACE&lt;br /&gt;
with:&lt;br /&gt;
 stop on net-device-remove INTERFACE=$INTERFACE&lt;br /&gt;
(Note the difference: net-device-remove&#039;&#039;&#039;d&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You have to reload udev rules with:&lt;br /&gt;
 udevadm control --reload-rules&lt;br /&gt;
&lt;br /&gt;
Now put your usb cable in the pc and in the n900.&lt;br /&gt;
&lt;br /&gt;
If all went fine:&lt;br /&gt;
* you should see with ifconfig -a two new network interfaces, n900 and n900pn, the first one configured with the proper ip address 192.168.2.15, and should be able to ping the n900.&lt;br /&gt;
&lt;br /&gt;
* the n900 should be able to use the pc internet connection immediately.&lt;br /&gt;
&lt;br /&gt;
== Windows XP ==&lt;br /&gt;
Windows XP USB networking does not work out of the box, but the old 770 workaround still works.&lt;br /&gt;
So follow these steps:&lt;br /&gt;
* install the Mad Developer application and start it.&lt;br /&gt;
* click on &amp;quot;Manage Usb&amp;quot; and then on &amp;quot;Load g_ether&amp;quot;&lt;br /&gt;
* plug the device into the USB port. Windows will ask you to name a device driver for the RNDIS gadget. Select a device driver by hand and choose the linux.inf from the [[USB_networking]] page.&lt;br /&gt;
* open a terminal on the N900 and get root e.g. via &amp;quot;sudo gainroot&amp;quot;. Type &amp;quot;ifconfig usb0 192.168.0.1&amp;quot;&lt;br /&gt;
* Now windows should display the network as connected. Set the PC ip address in the windows connections dialog.&lt;br /&gt;
* Now you should be able to ping the device but not the other way round as Windows still filters the traffic. However everything else should work, e.g. MADDE&lt;br /&gt;
&lt;br /&gt;
== Using the usb networking for maemo apps ==&lt;br /&gt;
By default standard network apps works well with usb networking, while maemo specific apps not.&lt;br /&gt;
&lt;br /&gt;
Install libicd-network-dummy from Fremantle Nokia-binaries repository or better libicd-network-null from extras-devel, and when&lt;br /&gt;
usb networking is up pickup &amp;quot;Dummy network&amp;quot; from the connection manager.&lt;br /&gt;
If the dummy network does not show up in the network manager you could run&lt;br /&gt;
the following commands in xterm:&lt;br /&gt;
 gconftool-2 -s -t string /system/osso/connectivity/IAP/DUMMY/type DUMMY&lt;br /&gt;
 gconftool-2 -s -t string /system/osso/connectivity/IAP/DUMMY/name &amp;quot;Dummy network&amp;quot;&lt;br /&gt;
&lt;br /&gt;
and maybe&lt;br /&gt;
&lt;br /&gt;
 gconftool-2 -s -t string /system/osso/connectivity/IAP/DUMMY/autoconnect false&lt;br /&gt;
&lt;br /&gt;
Then restart icd2:&lt;br /&gt;
 killall icd2&lt;br /&gt;
&lt;br /&gt;
or reboot the device.&lt;br /&gt;
&lt;br /&gt;
[[Category:Wiki page of the day]]&lt;br /&gt;
[[Category:Connectivity]]&lt;br /&gt;
[[Category:N900]]&lt;br /&gt;
[[Category:USB]]&lt;br /&gt;
[[Category:Power users]]&lt;/div&gt;</summary>
		<author><name>192.33.126.162</name></author>
	</entry>
</feed>