Editing 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 the maemo platform can be turned into a [[USB]] network device. The first part describes how to configure the Nokia tablet as a USB pluggable network device. The second part describes how to configure various platforms to use the Nokia tablet as a network device. This article is based loosely on the Maemo 3.x [http://maemo.org/development/documentation/manuals/3-x/howto_usb_networking_bora/ configuring USB networking HOWTO].
+
This page describes how the maemo platform can be turned into a [[USB]] network device. The first part describes how to configure the Nokia tablet as a USB pluggable network device. The second part describes how to configure various platforms to use the Nokia tablet as a network device.
You might want to use the tablet as a USB network device to log into your tablet remotely, or to transfer data from your tablet to another computer, in a situation where wifi or bluetooth are not an option. If you wish to connect your tablet 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.
You might want to use the tablet as a USB network device to log into your tablet remotely, or to transfer data from your tablet to another computer, in a situation where wifi or bluetooth are not an option. If you wish to connect your tablet 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.
Line 5: Line 5:
'''WARNING'''
'''WARNING'''
Currently there is a bug in the g_ether.ko driver of OS2008 (both 4.0.1 and 4.1) which prevents USB networking from working correctly with Windows machines (but not with Linux machines). See [https://bugs.maemo.org/show_bug.cgi?id=3243 bug #3243] for details. The bug was introduced somewhere between kernels 2.6.18 and 2.6.21, so Maemo versions based on 2.6.18 kernels (e.g. OS2007 and earlier) will work.
Currently there is a bug in the g_ether.ko driver of OS2008 (both 4.0.1 and 4.1) which prevents USB networking from working correctly with Windows machines (but not with Linux machines). See [https://bugs.maemo.org/show_bug.cgi?id=3243 bug #3243] for details. The bug was introduced somewhere between kernels 2.6.18 and 2.6.21, so Maemo versions based on 2.6.18 kernels (e.g. OS2007 and earlier) will work.
-
 
-
== USB networking for N900 ==
 
-
 
-
Please visit [[N900 USB networking]].
 
== Tablet USB network configuration ==
== Tablet USB network configuration ==
Line 24: Line 20:
After installing USB networking, set up a dummy access point by running the following:
After installing USB networking, set up a dummy access point by running the following:
-
  gconftool-2 -s -t string /system/osso/connectivity/IAP/DUMMY/type DUMMY
+
  gconftool -s -t string /system/osso/connectivity/IAP/DEFAULT/type DUMMY
-
gconftool-2 -s -t string /system/osso/connectivity/IAP/DUMMY/name 'Dummy network'
+
-
gconftool-2 -s -t boolean /system/osso/connectivity/IAP/DUMMY/autoconnect true
+
You should see a "DEFAULT" connection appear in the connection manager.
You should see a "DEFAULT" connection appear in the connection manager.
'''WARNING'''
'''WARNING'''
-
Currently there is a bug in Diablo that causes DUMMY connections not to show up in connection manager, a semi-official fix is outlined in [https://bugs.maemo.org/show_bug.cgi?id=3306#c23 bug #3306].
+
Currently there is a bug in Diablo OS2008, DUMMY connections do not show up in connection manager.
=== Starting and stopping USB network mode ===
=== Starting and stopping USB network mode ===
Line 84: Line 78:
exit 0
exit 0
</pre>
</pre>
-
The script needs to have executable permissions, which you can give with
+
This script is quite basic, but can be run automatically at start-up, or manually using the command:
-
sudo chmod a+x /etc/init.d/usbnet
+
-
 
+
-
The script is quite basic, but can be run automatically at start-up, or manually using the command:
+
  sudo /etc/init.d/usbnet [start|stop]
  sudo /etc/init.d/usbnet [start|stop]
to activate or deactivate USB networking.
to activate or deactivate USB networking.
Line 110: Line 101:
* For Windows 2000, you will need to download [ RNDIS drivers] from Microsoft.
* For Windows 2000, you will need to download [ RNDIS drivers] from Microsoft.
* Download the file "Nokia770 USB Ethernet RNDIS.inf" from [http://homepage.hispeed.ch/mlivoncic/Nokia770%20USB%20Ethernet%20RNDIS.inf here] or [http://homepage.sunrise.ch/mysunrise/mlivoncic/Nokia770%20USB%20Ethernet%20RNDIS.inf here]. This allows to recognise that the RNDIS driver can be used with the Nokia device, and other Linux USB devices.
* Download the file "Nokia770 USB Ethernet RNDIS.inf" from [http://homepage.hispeed.ch/mlivoncic/Nokia770%20USB%20Ethernet%20RNDIS.inf here] or [http://homepage.sunrise.ch/mysunrise/mlivoncic/Nokia770%20USB%20Ethernet%20RNDIS.inf here]. This allows to recognise that the RNDIS driver can be used with the Nokia device, and other Linux USB devices.
-
* [http://appcheck.net.temp.realssl.com/storage/Nokia900%20USB%20Ethernet%20RNDIS.inf Here] is an updated inf that should work on newer (32 or 64) bit Windows. It's not really tested much so please report results on the talk page!
 
* If you are using an N800, skip all the steps below which apply to the N770; the bora distribution supplies a control panel applet called "maemo-statusbar-usbnet". Once installed, the control panel "Maemo-DM" will allow you to change the function of the USB port from "MMC emulation" to a RNDIS emulation of a USB ethernet interface. You will also need to set the WinXP side's IP address to be fixed at 192.168.2.14.
* If you are using an N800, skip all the steps below which apply to the N770; the bora distribution supplies a control panel applet called "maemo-statusbar-usbnet". Once installed, the control panel "Maemo-DM" will allow you to change the function of the USB port from "MMC emulation" to a RNDIS emulation of a USB ethernet interface. You will also need to set the WinXP side's IP address to be fixed at 192.168.2.14.
Line 139: Line 129:
...
...
</pre>
</pre>
-
 
-
==== NetworkManager based ====
 
-
 
-
A recent NetworkManager (at in least Fedora 12 and Ubuntu Karmic Koala) supports Ethernet USB gadgets out-of-the-box. However the 'auto usb0' entry that it creates amongst your connection list is configured for DHCP and the tablet will not provide that, so it will time out.
 
-
 
-
The easiest/cleanest way to get it to work is probably to create a new connection using the same MAC address as 'auto usb0' has, and then providing a fixed IP address: 192.168.2.14/255.255.255.0 for example, or change settings on the connection created by network-manager.
 
==== Fedora ====
==== Fedora ====
-
Older Fedora versions also supports Ethernet USB gadgets out-of-the-box. To configure the USB networking:
+
Fedora supports Ethernet USB gadgets out-of-the-box. To configure the USB networking:
* Connect the tablet with g_ether.ko loaded to your Linux PC
* Connect the tablet with g_ether.ko loaded to your Linux PC
* Open System -> Administrate -> Network (or run system-config-network from command line).
* Open System -> Administrate -> Network (or run system-config-network from command line).
* Press the "New" button to create a new network interface. Select "Ethernet" network card type.
* Press the "New" button to create a new network interface. Select "Ethernet" network card type.
-
* On the next screen, select the "Netchip Technology, Inc. Linux-USB Ethernet/RNDIS Gadget (usb0)" or "Nokia Mobile Phones N900 (PC-Suite Mode)".
+
* On the next screen, select the "Netchip Technology, Inc. Linux-USB Ethernet/RNDIS Gadget (usb0)".
* Choose "Static IP address" and enter the IP address 192.168.2.15 for your PC, if you are using the default usb0 configuration on your tablet. Don't fill the gateway field on the Fedora side.
* Choose "Static IP address" and enter the IP address 192.168.2.15 for your PC, if you are using the default usb0 configuration on your tablet. Don't fill the gateway field on the Fedora side.
* Fill other settings (DNS etc) if you want to, then press "Finish".
* Fill other settings (DNS etc) if you want to, then press "Finish".
Line 223: Line 207:
And the tablet is then on the LAN.
And the tablet is then on the LAN.
-
 
-
==== Configuring the host firewall ====
 
-
 
-
If you have your Linux host configured with a strict firewall, you may need to modify your iptables to allow the tablet to access the internet over USB networking.
 
-
 
-
To allow access both to & from the tablet, the following iptables rules are required:
 
-
 
-
  iptables -A OUTPUT -o usb0 -j ACCEPT
 
-
  iptables -A INPUT -i usb0 -j ACCEPT
 
=== Testing the connection ===
=== Testing the connection ===
Line 240: Line 215:
=== Known issues ===
=== Known issues ===
When unplugging and replugging the USB cable between the two devices, Windows will indicate a code 10-error indicating that the device could not start properly. The problem appears to be with the Nokia tablet, since after rebooting the device, networking works again. Remember to first initialize g_ether before plugging your tablet into the USB host.
When unplugging and replugging the USB cable between the two devices, Windows will indicate a code 10-error indicating that the device could not start properly. The problem appears to be with the Nokia tablet, since after rebooting the device, networking works again. Remember to first initialize g_ether before plugging your tablet into the USB host.
-
 
-
This seems to be the case with Ubuntu too. Replugging causes following messages appear in the kernel log:
 
-
 
-
<pre>
 
-
[182104.412082] usb 3-1: new full speed USB device using uhci_hcd and address 29
 
-
[182104.824071] usb 3-1: device not accepting address 29, error -71
 
-
[182104.824100] hub 3-0:1.0: unable to enumerate USB device on port 1
 
-
</pre>
 
-
 
-
Rebooting the tablet seems to work.
 
=== Frequently asked questions ===
=== Frequently asked questions ===
Line 258: Line 223:
#* Make sure you have activated USB networking on the Nokia side correctly.
#* Make sure you have activated USB networking on the Nokia side correctly.
# My tablet can now talk to my XP machine, but how do I get out to the rest of the network?
# My tablet can now talk to my XP machine, but how do I get out to the rest of the network?
-
#:First, set up a dummy access point, as described above, so that you can configure the network settings in connection manager for your usbnet connection. This will allow you to configure proxy server access. Secondly, install a proxy on your local machine. Examples include [http://www.proxomitron.info/ proxomitron] or [http://www.handcraftedsoftware.org/ freeproxy].
+
First, set up a dummy access point, as described above, so that you can configure the network settings in connection manager for your usbnet connection. This will allow you to configure proxy server access. Secondly, install a proxy on your local machine. Examples include [http://www.proxomitron.info/ proxomitron] or [http://www.handcraftedsoftware.org/ freeproxy].
# How do I set up DNS once I have connected the tablet and the host?
# How do I set up DNS once I have connected the tablet and the host?
-
#* Install and configure pdnsd on your host computer, and add nameserver 192.168.2.14 to the file /etc/resolv.conf on your tablet.
+
#* Either configure the host as a gateway, and use the same DNS servers as your host (see above), or install and configure pdnsd on your host computer, and add nameserver 192.168.2.14 to the file /etc/resolv.conf on your tablet.
-
#* or configure the host as a gateway, and use the same DNS servers as your host (without messing up /etc/resolv.conf and the dnsmasq server):
+
 
-
#::echo "nameserver xxx.xxx.xxx.xxx" >> /tmp/resolv.conf.ppp0
+
-
#::where xxx.xxx.xxx.xxx is the dns server of the host (  as found in /etc/resolv.conf on the host linux box )
+
-
#::echo again the second address if required.
+
-
#::Don't forget to choose "dummy" from the wireless connection manager on the tablet and do 'ifup usb0' on the Linux box.
+
-
#How do I keep my SD memory cards from being unmounted?
+
-
#* Before you plug in the usb cable; open two xterminals and cd one to /media/mmc1 and the other to /media/mmc2 and leave them there. By keeping a foot in the door the cards are kept available ... the usbnet will still succeed.
+
[[Category:Users]]
[[Category:Users]]
[[Category:Wiki page of the day]]
[[Category:Wiki page of the day]]
-
[[Category:Connectivity]]
 
-
[[Category:USB]]
 
-
 
-
[[Category:Power users]]
 

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)