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: | ||
- | + | == Setting up USB networking == | |
- | 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 | + | 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. | ||
'''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 | + | === Tablet USB network configuration === |
- | + | ==== USB statusbar plugin ==== | |
- | + | ||
- | = | + | |
- | + | ||
- | === USB statusbar plugin === | + | |
The [http://garage.maemo.org/projects/usb-otg-plugin/ usb-otg-plugin] applet lets you set up USB networking tablet-side, and switch between host and client mode. This is the easy way to do things and no other tablet-side configuration is required. | The [http://garage.maemo.org/projects/usb-otg-plugin/ usb-otg-plugin] applet lets you set up USB networking tablet-side, and switch between host and client mode. This is the easy way to do things and no other tablet-side configuration is required. | ||
- | + | ==== Behind the scenes ==== | |
- | + | ||
- | + | ||
- | === Behind the scenes === | + | |
In normal circumstances, the USB Mass storage driver had control of the USB hardware. USBNet allows the g_ether network driver to take control of the USB interface. | In normal circumstances, the USB Mass storage driver had control of the USB hardware. USBNet allows the g_ether network driver to take control of the USB interface. | ||
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 | + | gconftool -s -t string /system/osso/connectivity/IAP/DEFAULT/type DUMMY |
- | + | ||
- | + | ||
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 | + | 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 ==== |
To easily start & stop USB network mode, place the following script in /etc/init.d/usbnet on your tablet. To do this, you will need [[root access]] to the device. | To easily start & stop USB network mode, place the following script in /etc/init.d/usbnet on your tablet. To do this, you will need [[root access]] to the device. | ||
Line 84: | Line 77: | ||
exit 0 | exit 0 | ||
</pre> | </pre> | ||
- | + | This 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 104: | Line 94: | ||
== Host USB Network Configuration == | == Host USB Network Configuration == | ||
- | === Windows === | + | === Windows=== |
====Requirements==== | ====Requirements==== | ||
Line 110: | Line 100: | ||
* 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. | ||
- | |||
* 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. | ||
- | ==== Preparing the Windows host ==== | + | ====Preparing the Windows host==== |
On Windows 2000, dowload & unpack RNDIS-USB-Kit_05.exe [http://www.microsoft.com/whdc/device/network/NDIS/rndis.mspx on the Microsoft web site]. You need to copy rndismpy.sys (30 KB) and usb8023y.sys (14 KB) from | On Windows 2000, dowload & unpack RNDIS-USB-Kit_05.exe [http://www.microsoft.com/whdc/device/network/NDIS/rndis.mspx on the Microsoft web site]. You need to copy rndismpy.sys (30 KB) and usb8023y.sys (14 KB) from | ||
Line 123: | Line 112: | ||
A new network card with this name will become visible afterwards, which you can configure normally. Set the IP address to 192.168.2.14. Optionally activate ICS (Internet Connection Sharing) on your network adapter to share the outside world with your little Nokia. | A new network card with this name will become visible afterwards, which you can configure normally. Set the IP address to 192.168.2.14. Optionally activate ICS (Internet Connection Sharing) on your network adapter to share the outside world with your little Nokia. | ||
- | === Linux === | + | ===Linux=== |
- | ==== Kernel Configuration ==== | + | ====Kernel Configuration==== |
You should have the usbnet module available for your Linux kernel. On most distributions, this is the case by default. If this is not the case for your distribution, you will need to enable USB networking support in the kernel. | You should have the usbnet module available for your Linux kernel. On most distributions, this is the case by default. If this is not the case for your distribution, you will need to enable USB networking support in the kernel. | ||
- | |||
<pre> | <pre> | ||
Line 135: | Line 123: | ||
... | ... | ||
CONFIG_USB_USBNET=m | CONFIG_USB_USBNET=m | ||
- | |||
- | |||
- | |||
</pre> | </pre> | ||
- | ==== | + | ====Fedora==== |
- | + | 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 | + | * 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 159: | Line 138: | ||
Now reconnect the tablet to PC and the interface should automatically configure. | Now reconnect the tablet to PC and the interface should automatically configure. | ||
- | ==== Debian ==== | + | ====Debian==== |
Ensure that the usbnet module is available to your kernel (try ''modprobe usbnet'', then ''lsmod'' to check). | Ensure that the usbnet module is available to your kernel (try ''modprobe usbnet'', then ''lsmod'' to check). | ||
Line 200: | Line 179: | ||
Perhaps iptables or your kernel needs to be upgraded. | Perhaps iptables or your kernel needs to be upgraded. | ||
</pre> | </pre> | ||
- | You need verify that your kernel has the relevant iptables modules included, and hotplug or udev is set up properly on your computer. | + | You need verify that your kernel has the relevant iptables modules included, and hotplug or udev is set up properly on your computer. |
- | + | ===Testing the connection=== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | === Testing the connection === | + | |
To test the connection, you can either type ''ping 192.168.2.15'' on your PC or ''ping 192.168.2.14'' in an xterm on your tablet. | To test the connection, you can either type ''ping 192.168.2.15'' on your PC or ''ping 192.168.2.14'' in an xterm on your tablet. | ||
For troubleshooting, use ''ifconfig -a'' and ''route'' to verify on the Nokia and on a Linux or Unix PC, and ''ipconfig /all'' and ''route print'' on Windows. | For troubleshooting, use ''ifconfig -a'' and ''route'' to verify on the Nokia and on a Linux or Unix PC, and ''ipconfig /all'' and ''route print'' on Windows. | ||
- | === 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. | ||
- | + | ===Frequently asked questions=== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | === Frequently asked questions === | + | |
# So if we have already plugged in our 770 into XP, and it recognized it as a drive, do we need to remove the driver software that makes it appear as a USB drive, and replace it with the USBNet drivers? | # So if we have already plugged in our 770 into XP, and it recognized it as a drive, do we need to remove the driver software that makes it appear as a USB drive, and replace it with the USBNet drivers? | ||
#* No, windows registers the tablet in network mode as a different device. | #* No, windows registers the tablet in network mode as a different device. | ||
Line 258: | Line 196: | ||
#* 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]. | |
# 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? | ||
- | #* | + | #* 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. |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
[[Category:Users]] | [[Category:Users]] | ||
[[Category:Wiki page of the day]] | [[Category:Wiki page of the day]] | ||
- | |||
- | |||
- | |||
- |
Learn more about Contributing to the wiki.