NSLU2-Linux
view · edit · print · history

(redirected from HowTo.AddEthernetAdapter)

Introduction

It is possible to add a number of external USB Ethernet adapters to the slug and make it act like a router. This is a brief HowTo on connecting one directly to the slug, but via a hub one can connect many.

If you do want to connect a USB ethernet adapter, there are various chipsets available:

  • Pegasus based (e.g. Philips CPWUE01/00) (kernel-module-pegasus)
  • AX8817X based (e.g. Netgear FA120, LINKSYS USB200M-DE (Version 1 only)) (kernel-module-usbnet)
    • (July 2006 - D-Link DUB-E100 upto rev A4 also use this chipset the newer Rev B1 is not working due to chipset changes - see details here http://www.uwsg.iu.edu/hypermail/linux/kernel/0607.0/0738.html)
    • (February 2008 - D-Link DUB-E100 rev B1 confirmed working in Debian/lenny with kernel version: 2.6.22-3. Rev B1 is based on AX8877X chipset. The modules "asix.ko" and "usbnet.ko" have to be built from the kernel-source. (manually build module, see below). E-mail: gamanakis_at_hotmail.com)
    • (January 2010 - Linksys USB200M? has been revised, version 2.0 and 2.1 (version number appears on the back of the device) use the AX88772? chipset, for which no Linux 2.4 drivers are available (a backport from 2.6 exists for the TiVo? but doesn't compile for Unslung on my setup). Got myself an old Sitecom LN-013 using RTL8150? instead, works fine.)
  • kaweth based (e.g. 3Com 3C19250 USB) (kernel-module-kaweth)
  • RTL8150 based (e.g. Sitecom LN-013, Linksys USB100M?) (kernel-module-rtl8150)
  • MCS7830 based (e.g. delock) (manually build module, see below)

Instructions for most chipsets are similar to the pegasus example below.

specific chipset instructions

Basic example: Pegasus chipset

  1. Getting the software: ipkg install kernel-module-pegasus
  2. Hook up you USB Ethernet adapter to your slug
  3. Go to /opt/lib/modules (Unslung) or /lib/modules (other OSes) (exact: /lib/modules/2.4.22-xfs/kernel/drivers/usb/pegasus.o)
  4. find pegasus.o or pegasus.ko in this directory; Do "insmod pegasus.o" or "insmod pegasus.ko" (as appropriate)
  5. Now the device eth1 should be created. Do "ifconfig -a" to verify the presence of an inactive network adapter. (eth0 is the built-in network controller)
  6. Now you can do things like "ifconfig eth1 up 10.0.1.114" and so on - it is an active Ethernet device.
  7. update your routing tables as you see fit
  8. Unslung: add a line in /opt/etc/modules : pegasus alias eth1
  9. SlugOS: add a line in /etc/modutils/modules (creating the file if needed: pegasus alias eth1; then run update-modules

AX8817X

Debianslug

for debianslug and AX8817X based devices you might also need the "asix" module.

ipkg install kernel-module-ax8817x

Also some of the above modules may complain re mii errors on loading. So type

ipkg install kernel-module-mii

AX8877X

Debian

On a Debian system do the following as root on the nslu2 (be patient, it has a slow processor): The "linux-source" has to be in accordance with "uname -r".

Getting the linux kernel source:

  1. apt-get install linux-source
  2. tar xjvf /usr/src/linux-source

Configuring the kernel to match the one currently installed:

  1. cp /boot/config-$(uname -r) .config
  2. cp /lib/modules/$(uname -r)/build/Module.symvers /usr/src/linux
  3. cd /usr/src/linux
  4. make clean
  5. make oldconfig
  6. make modules_prepare
  7. make scripts

Compiling the asix.ko and usbnet.ko modules:

  1. cd /usr/src/linux/drivers/net/usb/
  2. make -C /usr/src/linux SUBDIRS=$PWD modules

Installing the modules and loading them:

  1. cp asix.ko /lib/modules/$(uname -r)/kernel/drivers/net/usb/asix.ko
  2. modprobe asix

delock usb 2.0 ethernet adapter: MCS7830

I got a "delock usb 2.0 ethernet adapter" working on debianslug (http://delock.de/produkte/gruppen/USB+Adapter/USB_20_Ethernet_Adapter_61147.html)

I thought it used the asix chipset when I bought it. But it turns out it doesn't. lsusb shows "ID 9710:7830 MosChip Semiconductor". The chip is a mcs7830 (see http://www.moschip.com/html/MCS7830.html). The moschip site has linux drivers. You need to compile or crosscompile them yourself.

  1. You need to have "gcc" and "glibc6-dev" installed on debianslug, as well as the kernel source.
  2. Extract the driver downloaded from the moschip site
  3. Edit the Makefile that comes with it: change "KDIR := /lib/modules/$(shell uname -r)/build" to "KDIR := /usr/src/<your kernel tree>"
  4. Compile the driver: make
  5. Load it: insmod mcs7830.ko
  6. "ifconfig -a" should show your device appears as "usb0"

Davcom DM9601? USB to Ethernet bridge

This chipset is used in some Chinese "USB LAN" adapters. On Debian etch, I did apt-get install linux-headers-2.6.18-4-ixp4xx and then downloaded www.silencio.ro/DM9601?.GZ (which is actually a .tar.gz file), typed make, and then typed insmod dm9601.ko (while the dm9601.ko file was in the current directory) and it worked.

Page last modified on April 10, 2011, at 10:41 PM