Editing N900 USB networking
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
- | This page describes how to enable Networking on the [[Nokia N900|N900]] via [[USB]] | + | This page describes how to enable Networking on the [[Nokia N900|N900]] via [[USB]]. The first part describes how to configure the 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 [[USB networking|Maemo 4.x USB networking article]]. |
- | 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 | + | 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. |
== N900 USB network configuration == | == N900 USB network configuration == | ||
Line 19: | Line 19: | ||
up route del default | up route del default | ||
up route add default gw 192.168.2.14 | up route add default gw 192.168.2.14 | ||
- | |||
- | |||
and | and | ||
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 | 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 | ||
Line 32: | Line 30: | ||
=== Starting USB network mode === | === Starting USB network mode === | ||
- | |||
- | |||
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 'PC Suite mode'. | 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 'PC Suite mode'. | ||
Line 71: | Line 67: | ||
</pre> | </pre> | ||
- | To automatically setup usb0 when entering PC suite mode | + | To automatically setup usb0 when entering PC suite mode change the last few lines of <code>/usr/sbin/pcsuite-enable.sh</code> by adding the "ifup usb0" line. |
+ | <pre> | ||
+ | logger "$0: sent SIGUSR1 to syncd" | ||
+ | ifup usb0 | ||
+ | exit 0 | ||
+ | </pre> | ||
+ | And, to automatically down your usb0 interface when leaving PC suite mode, add to <code>/usr/sbin/pcsuite-disable.sh</code> | ||
<pre> | <pre> | ||
- | + | ifdown usb0 | |
- | + | exit 0 | |
</pre> | </pre> | ||
Line 130: | Line 132: | ||
=== Starting USB network mode with Windows === | === Starting USB network mode with Windows === | ||
- | To use the USB network mode alongside with a | + | To use the USB network mode alongside with a windows host, you must use Mad Developer. Mad developer won't work with just changing the configuration in the /etc/network/interfaces file. Different modification are needed : |
- | + | #Install mad developer package | |
- | + | #Add the following lines to /usr/sbin/pcsuite-enable.sh (Don't forget to change the ip address so it matches the one configured on your host's usb port.) | |
- | + | run-standalone.sh dbus-send --type=method_call --system --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:DUMMY uint32:0 | |
- | Install | + | route del default |
- | + | route add default gw 192.168.2.1 | |
- | + | ||
- | Add the following lines to | + | |
- | + | ||
- | run-standalone.sh dbus-send --type=method_call --system --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:DUMMY uint32:0 | + | |
- | route del default | + | |
- | route add default gw 192.168.2. | + | |
- | + | ||
so it looks like this : | so it looks like this : | ||
- | + | if [ $RC != 0 ]; then | |
- | if [ $RC != 0 ]; then | + | logger "$0: failed to install g_nokia" |
- | + | run-standalone.sh dbus-send --type=method_call --system --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:DUMMY uint32:0 | |
- | + | route del default | |
- | + | route add default gw 192.168.2.1 | |
- | + | exit 1 | |
- | + | else | |
- | else | + | sleep 2 |
- | + | fi | |
- | fi | + | #Add the following lines to /usr/sbin/pcsuite-disable.sh (Don't forget to change the ip...) |
- | + | ||
- | + | ||
- | + | ||
- | Add the following lines to | + | |
- | + | ||
ifdown usb0 | ifdown usb0 | ||
run-standalone.sh dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true | run-standalone.sh dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true | ||
- | route del default netmask 0.0.0.0 gw 192.168.2. | + | route del default netmask 0.0.0.0 gw 192.168.2.1 |
- | + | So it looks like this : | |
- | So it looks like this: | + | |
- | + | ||
logger "$0: do nothing to pass USB certs" | logger "$0: do nothing to pass USB certs" | ||
ifdown usb0 | ifdown usb0 | ||
- | run-standalone.sh dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true | + | run-standalone.sh dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true route del default netmask 0.0.0.0 gw 192.168.2.1 |
- | + | ||
exit 0 | exit 0 | ||
- | + | #This will cause the dummy network to connect when USB networking is used, right after you press the "PC Suite" button in the popup that comes after connecting the USB cable. This will only work if you got MAD Developer installed and configured for "windows network". Also, a route will be added to your host machine, with windows it is very easy to share connections. You should now have network connectivity to your PC + Internet. | |
- | + | #Once you disconnect the USB cable, the dummy network will disconnect and the route will be deleted. | |
- | + | #Add a dns server of your choice to /etc/resolv.conf, for example : | |
- | This will cause the dummy network to connect when USB networking is used, right after you press the "PC Suite" button in the popup that comes after connecting the USB cable. This will only work if you got | + | nameserver 8.8.8.8 |
- | + | nameserver 8.8.4.4 | |
- | + | ||
- | + | ||
- | + | ||
- | Add a | + | |
- | + | ||
- | nameserver 8.8.8.8 | + | |
- | nameserver 8.8.4.4 | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
=== Fixing the MAC address === | === Fixing the MAC address === | ||
Line 206: | Line 176: | ||
== Host USB Network Configuration == | == Host USB Network Configuration == | ||
- | The | + | The Host configuration is detailed in the [[USB networking#Host_USB_Network_Configuration|Maemo 4.x USB Networking article]]. Please refer to it for details. |
+ | ''FIXME, there is no usb host mode on n900'' | ||
=== Host configuration on Debian Lenny === | === Host configuration on Debian Lenny === | ||
Line 229: | Line 200: | ||
while plugging in the N900 to see what is the correct path. | while plugging in the N900 to see what is the correct path. | ||
- | |||
- | |||
- | |||
After adding the udev rules, you have to reload them with: | After adding the udev rules, you have to reload them with: | ||
Line 253: | Line 221: | ||
ifconfig n900 | ifconfig n900 | ||
- | + | === Automatic configuration with Ubuntu 9.10/10.04 === | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | === Automatic configuration with Ubuntu 9.10/10.04 | + | |
Note: this instructions should be fixed/improved: | Note: this instructions should be fixed/improved: | ||
Line 303: | Line 241: | ||
</pre> | </pre> | ||
- | + | For 9.10 (NOT 10.04) you have to fix <code>/etc/init/network-interface.conf</code>, change the line: | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
stop on net-device-removed INTERFACE=$INTERFACE | stop on net-device-removed INTERFACE=$INTERFACE | ||
with: | with: | ||
Line 322: | Line 247: | ||
(Note the difference: net-device-remove'''d''') | (Note the difference: net-device-remove'''d''') | ||
- | + | You have to reload udev rules with: | |
udevadm control --reload-rules | udevadm control --reload-rules | ||
Line 338: | Line 263: | ||
* you should see with <code>ifconfig -a</code> 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. | * you should see with <code>ifconfig -a</code> 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. | ||
* the N900 should be able to use the PC internet connection immediately. | * the N900 should be able to use the PC internet connection immediately. | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
=== Windows === | === Windows === | ||
Line 390: | Line 268: | ||
Windows USB networking does not work out of the box, but the old 770 workaround still works. | Windows USB networking does not work out of the box, but the old 770 workaround still works. | ||
So follow these steps: | So follow these steps: | ||
- | # install the [[MADDE|Mad Developer]] application | + | # install the [[MADDE|Mad Developer]] application and start it and press "Manage USB" -> "Load g_either" -> "close". |
- | # | + | # enter the following IP: 192.168.1.30, then press "configure" (this address will be used for the SCP client as well). |
- | # | + | # connect your N900 via USB and select the older "Nokia770 USB Ethernet RNDIS.inf" driver(32bit only) from the [[USB_networking]] section or [http://appcheck.net.temp.realssl.com/storage/Nokia900%20USB%20Ethernet%20RNDIS.inf the newer(32 and 64bit) driver.] |
- | + | # then change the IP, Gateway and DNS of the newly created network connection to 192.168.1.31. | |
- | + | # when you have finished USB networking, re-enable mass storage mode by pressing: "Manage USB" -> "Load g_nokia" -> "close". | |
- | + | ||
- | + | ||
- | # | + | |
=== Mac OS X === | === Mac OS X === | ||
Line 404: | Line 279: | ||
To use the Internet connection of your Mac via USB networking make sure to enable System Preferences -> Sharing -> Internet sharing for the N900 interface [http://docs.info.apple.com/article.html?path=Mac/10.5/en/8156.html Howto] | To use the Internet connection of your Mac via USB networking make sure to enable System Preferences -> Sharing -> Internet sharing for the N900 interface [http://docs.info.apple.com/article.html?path=Mac/10.5/en/8156.html Howto] | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
== Using USB networking for Maemo applications == | == Using USB networking for Maemo applications == | ||
Line 443: | Line 284: | ||
By default, standard network applications works well with USB networking, while Maemo-specific applications do not. | By default, standard network applications works well with USB networking, while Maemo-specific applications do not. | ||
- | Install <code>libicd-network-dummy</code> from Fremantle Nokia-binaries repository or better <code>libicd-network-null</code> from [[extras-devel]], and when USB networking is up pickup "Dummy network" from the connection manager. | + | Install <code>libicd-network-dummy</code> from Fremantle Nokia-binaries repository or better <code>libicd-network-null</code> from [[extras-devel]], and when USB networking is up pickup "Dummy network" from the connection manager. |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
If the dummy network does not show up in the network manager you could run | If the dummy network does not show up in the network manager you could run | ||
the following commands in xterm: | the following commands in xterm: |
Learn more about Contributing to the wiki.