Windows XP USB Network Setup
This document describes how to setup USB networking using an iPAQ and Windows XP. You should have Familiar 0.8.2 or later installed and working and have a USB cradle or cable.
New USB Ethernet Gadget Driver (iPAQ h39xx / h5xxx only)
For pxa-based iPAQs running the 2.4 kernel (h39xx and h5xxx series), there is a new USB driver based on the USB ethernet gadget driver from 2.6 backported to 2.4. It is not guaranteed to work, but several users have had success using it with Windows XP. To set it up, follow these instructions:
iPAQ side (Familiar < 0.8.3)
-
Remove the old usbnet driver:
ipkg remove kernel-module-usb-eth
-
Download the new drivers from http://patrick.newedorf.net/ipaq/ and install them onto the iPAQ. You need kernel-module-g-ether and kernel-module-pxa2xx-udc. If you have internet working from the iPAQ, you can use ipkg install http://url to install each one, otherwise copy them onto the iPAQ and install them as normal.
-
Delete /etc/modutils/usbnet and add /etc/modutils/g_ether with the following contents:
g_ether
-
Download
this file and put it on your iPAQ as /etc/apm/scripts.d/usbnet.
-
Reboot your iPAQ.
iPAQ side (Familiar >= 0.8.3)
Starting with Familiar 0.8.3 both the old and the new USB module should already be installed in the standard images. If not or you are upgrading, kernel-module-g-ether and kernel-module-pxa2xx-udc should be installable via ipkg from the normal feeds.
However, the new module is not the default yet because it is incompatible with older Linux kernels (more on that below). To switch from the old module to the new one, make the following changes to your configuration (identical to the changes needed for Familiar <0.8.3):
-
Delete /etc/modutils/usb-eth so that the old driver doesn't get loaded anymore
-
Create the file /etc/modutils/g_ether containing the following contents only:
g_ether
-
If your host machine (desktop) is running Linux with a 2.6.8 kernel or earlier, create a file /etc/modutils/g_ether.conf containing the following contents:
options g_ether compat_mode=1
If you are using a Windows host or Linux with a newer kernel, you should skip this step (see below for a full explanation). -
In /etc/apm/scripts.d/usbnet and /etc/network/interfaces replace: usbf with usb0, usb-eth with g_ether, sa1100usb_core with pxa2xx_udc
-
Reboot your iPAQ.
/etc/apm/scripts.d/usbnet should now contain exactly this:
#!/bin/sh
# Unloads/loads usb0 so it always works
. /etc/default/usbd
if [ "$1" = suspend ]; then
ifconfig usb0 down
rmmod g_ether
rmmod pxa2xx_udc
elif [ "$1" = resume ] && [ "$2" != standby ]; then
modprobe g_ether
modprobe -r $usbdmodule
modprobe $usbdmodule
fi
/etc/network/interfaces should have one entry like this (actual IP addresses may differ depending on your network configuration):
...
iface usb0 inet static
address 192.168.0.202
netmask 255.255.255.0
network 192.168.0.0
gateway 192.168.0.200
...
The new g_ether module announces itself as a standard RNDIS device which is compatible with Windows. Linux hosts with kernels <= 2.6.8 cannot recognize it in that mode, whereas later ones can. Those who want to have g_ether without updating from an old kernel can turn on a compatibility mode. However, this renders it incompatible with Windows. To enable that mode, create the /etc/modutils/g_ether.conf file as described above.
Thanks to Patrick Ohly for building and tweaking these drivers!
Windows XP side
Note: if you are already using 192.168.0.x on your own internal network, you will need to change the addresses used on both ends to some other subnet eg. 192.168.1.x, 192.168.2.x etc.
-
Download
linux.inf to somewhere convenient on your Windows machine.
-
Make sure the USB lead for your cradle is plugged in, and then plug your iPAQ into the cradle.
-
Assuming the new drivers have been installed as above, Windows should detect the iPAQ and prompt you for a driver for the USB device. Select to specify your own driver, and then choose the linux.inf file you downloaded earlier. This file tells Windows XP to use its own built-in RNDIS driver for the device.
-
Windows may complain of "reduced network connectivity". This is because it expects to be able to get an address automatically from the iPAQ and it doesn't provide one in the default setup. To fix this, see the next step.
-
Go into the Windows network configuration for the new USB networking adapter and set the IP address of the interface to 192.168.0.200.
You should now be able to connect to your iPAQ on 192.168.0.202.
Old (Bahia) driver
| Note: the Bahia USB driver available for Windows does not seem to work anymore for various reasons beyond our control (mainly because it is closed source). When Familiar moves to the 2.6 kernel for all models we may have a working solution (or see above for pxa-based iPAQs). For now, it is recommended you use PPP over serial, WiFi or another connection method when connecting to Windows. - PaulEggleton |
Note: I believe this will not work if you are on a 192.168.X.X network, seeing as it sets your main nic to a forced ip, and it would be out side of a 192.168.1.X's network - hunterkll
-
Install the Bahia Network driver on XP
-
Do not connect the iPaq to the XP box yet
-
Download the driver from http://www.bahia21.com/download.htm (see bottom of page for new download location)
-
Unzip the driver package into a temporary directory
-
On the iPaq, issue the following command: modprobe usb-eth
-
Connect the iPaq to the XP box
-
The Found new hardware dialog will appear. Follow the steps to install the driver, specifiying the path to the unzipped driver files
-
Edit the iPaq Network Configuration
Edit /etc/network/interfaces and add (or modify) the usbf interface:
iface usbf inet static netmask 255.255.255.0 address 192.168.0.11
-
Setup ICS (Internet Connection Sharing) on XP
-
Open the Network Connections panel
-
Right click on your Internet connection. This can be a direct connection to the internet or a connection via a router or firewall.
-
Click on Properties
-
Click on the Advanced tab
-
Check the box that says *Allow other network users to connect through this computer's Internet connection*
-
In the *Home networking connection* drop-down, choose the Bahia network connection. If you didn't rename it, it will probably be named something like Local Area Connection 2
-
Click OK
-
Add the Default Route on the iPaq
route add default gw 192.168.0.1 usbf
-
Setup Nameserver on iPaq
Create and/or edit /etc/resolv.conf and add the following:
nameserver aaa.bbb.ccc.ddd
Replace aaa.bbb.ccc.ddd with the IP address of the nameserver used on your XP box. You can find the DNS IP address by right clicking on the Internet connection and choosing Status. Click on the *Support* tab and then click the *Details* button. The IP address of your DNS server is listed under DNS Servers (there may be more than one).
At this point, you should be able to ping the iPaq from XP and vice versa.
You should now have access to the Internet from the iPaq.
If at any time you have difficulty initializing usbf interface:
-
Make sure the usb-eth module is loaded (using modprobe usb-eth)
-
Remove the iPaq from the cradle and reinsert it
Happy Networking - sherman at mrcc.com
I've followed the instructions above and have got to the stage where I can ping my ipaq from my XP machine and vice versa. However, I am currently using an analog modem to log onto the internet so the instructions for the DNS name server don't work as I don't get a support tab on the status window. What happens instead is I get a details tab which doesn't contain a DNS IP...
It appears that the bahia driver has expired and will not work. I have checked the website and still no update from what I can see. Anybody else have any luck with this? 12/08/03 Silent Coyote
For the bahia driver expiration I find a solution:
-
Download the bahia driver and uzip the file
-
Go to the yopy web site and download the file OS Installer and driver
-
Unzip this yopy file and you will find a file named YopyUSB.sys
-
Rename this file to TacTop.sys
-
Copy the new TacTop.sys file in place of the bahia original file
-
Start the installation of the USB driver
31/12/03
Added by
tvjames on 22/02/2004
Here is my experience with usb networking
Bugs:
-
Familiar 0.7.2 built in usbnet driver is buggered and will crash the ipaq if used. First things first download the latest 2.4.19 kernel and modules ( make sure it ends in at least hh36 ).
-
Use the built in serial port (windows: hyperterminal, linux: minicom) and upload the two files to the ipaq, using zmodem (rz). First use ipgk to install the modules and then the kernel, now reboot the ipaq.
-
Download the Bahia Network driver (for windows XP, provides usbnet access) from
here they are updated and dont expire (and not yopy drivers).
-
Plug in the usb cable to the ipaq and computer, windows will ask for the driver location, enter the directory where you unzipped the Bahia drivers. Once they are installed configure an ip address for the windows interface and then go to the ipaq and do the same (make sure they are on the same subnet) and once you can ping the ipaq form the desktop enable internet connection sharing and you have an ipaq on the internet over usb.