USB Networking - Setting up usbnet

If you want to use the USB networking feature, which allows the gumstix to access your network through a USB connection to a host, and you're running Windows XP, then you need to install the Remote NDIS USB Driver. The drivers are included with Windows XP, and all you need is the .inf file. I used the linux.inf from the gumstix linux source tree. It can be found this directory:
gumstix-buildroot/build_arm/linux-2.6.9-rc1-gum/Documentation/usb

Make sure that you convert the line-endings to be DOS line-endings. I've already done it here if you don't have a convenient way to convert the line endings.

This assumes that you've downloaded the source and done the build. You'll need to specify the linux.inf file when you plug the gumstix into the USB port on your Windows XP machine.

Completely disable the Windows Firewall

Do this before you setup your Network Bridge. If you've already setup the bridge, then just remove your connections from the bridge. You can add them back later.

These instructions are for Windows XP with Service Pack 2 installed.

  • Bring up Control Panel->Network Connections
  • Right click on one of the connections and choose Properties
  • Click on the Advanced tab
  • Click on Settings under Windows Firewall
  • Click the Off setting here
  • Click on the Advanced tab
  • Under Network Connection Settings, uncheck all connections (well at least the ones that will be part of the bridge)
  • Click OK a bunch of times on the various open dialogs
  • reboot

Ethernet Bridging (usbnet to wired LAN)

The next step is to get Ethernet Bridging using a wired LAN working. Select the LAN and the usbnet connections (Click on one and control-click on the other), and then right click on one and choose "Bridge Connections".

Ethernet Bridging (usbnet to 802.11g)

Since I normally use an 802.11g wireless link, it seemed logical to me that I should be able to bridge between usbnet and my wireless connection.

By using the steps below, and creating a network bridge with the ubnet and the wireless connection, I can acquire a DHCP address, and can ping my laptop, which is the USB host, but I can't ping anything else. I figured I'd leave these steps documented here, just in case it helps somebody else figures out what's going on.

I did the following:

  • Add %SYSTEMROOT%\System32\Wbem to my path. I use the cygwin bash shell, and my startup scripts overwrite my path. The Wbem directory is needed for the netsh utility to work properly (this is used a couple of steps down the list). Without the path being setup, I got an error about framesyn.dll not being found. Microsoft's knowledge base article 319114 explained the problem.
  • Turn on compatability mode with my wireless card. These last two points are explained quite well in Sharon Crawford's "Building Network Bridges" article (April 22, 2002 - Microsoft's Expert Zone)
  • Add a new entry for MAC filtering on my WRT54g wireless router. I use MAC filtering on my WRT54g wireless router, and creating an Ethernet Bridge creates a new MAC address. In my case, it was the same as my old MAC address but with the first byte changed (which made copy and pasting the MAC address easy).
  • Add an entry for the gumstix MAC address into the WRT54g MAC address filter. You can use the ifconfig command on the gumstix to determine the MAC address. I also tried disabling MAC filtering on the wireless router, but it didn't make any difference.

I think that XP is expecting to bridge to a hard-wired LAN.

Acquiring a DHCP address

For some reason, if I power on the gumstix with the USB cable connected, Windows XP doesn't seem to recognize the USBNet as "connected". If I power on the gumstix and then unplug and replug the USB connector, then it gets recognized as connected. Of course, becasue it was unconnected, the attempt to acquire an IP address using DHCP during boot fails.
  • Boot the gumstix
  • Unplug and replug the USB cable
  • On the gumstix, run:
    /etc/init.d/S40network restart
    

I also found that this sequence works:

  • Boot the gumstix with the USB cable unplugged
  • When you get the login prompt, plug the USB cable in
  • Wait - the IP address will get assigned automatically. I normally run ifconfig to see when the IP address is actually assigned.

I created a shortcut to my Network Connections so I can quickly tell the status of the USB connection.

So, usbent to a wired LAN seems to work fine, and usbnet to a wireless LAN doesn't. This is obviously some type of Windows XP/driver thing and not a problem with the gumstix.


Home - linux - gumstix

Copyright 2010 by Dave Hylands