Author Topic: Howto Configure A Usb Ethernet Adaptor  (Read 12170 times)

desertrat

  • Hero Member
  • *****
  • Posts: 743
    • View Profile
    • http://
Howto Configure A Usb Ethernet Adaptor
« on: November 23, 2005, 01:56:21 am »
As USB ethernet adaptors doesn't work out of the box (for me at least) and when I first researched the subject I found nothing, I decided to do something about.

pdaXrom already has driver support for pegasus and rtl8150 based usb ethernet adatptors. Others may or may not be supported, but as those 2 were the only ones I had at my disposal they were the only 2 tested.

To get this working you need 2 new files:

Code: [Select]
/etc/hotplug/eth.conf
/etc/hotplug/eth.func

these are based on:

Code: [Select]
/etc/hotplug/usbdnet.conf
/etc/hotplug/usbd.func

respectively. However eth.func fixes several typos in the original usbd.func which prevents it from working properly (the process for shutting down an interface hangs).


And 1 modified file:

Code: [Select]
/etc/hotplug/net.agent
Basically the original net.agent didn't look for ethX devices, and as both my adaptors appear as eth0 net.agent just ignored them. I essentially duplicated the code which handled the usbdX devices and modified it slightly to work with ethX devices.

The 3 files are in the attachment (remove the .txt extension). Make a backup of the original /etc/hotplug/net.agent (just in case!), then extract the 3 files and copy them into /etc/hotplug/. Modify /etc/hotplug/eth.conf to your liking then plugin your adaptor and enjoy

PS If there are easier/better ways to achieve this please let me know!


-- cheers
SL-C3100 / Ambicon WL1100C-CF / pdaXrom 1.1.0beta3 / IceWM

Antikx

  • Hero Member
  • *****
  • Posts: 1147
    • View Profile
    • http://tyrannozaurus.com
Howto Configure A Usb Ethernet Adaptor
« Reply #1 on: January 10, 2006, 11:20:11 am »
Thank you sooooo much! This is great. I can now use a mouse, kbd and network by plugging in one cable! (I have them plugged into a hub).
Kanpai,
-Antikx (Twitter, Mugshot and PodNova)
C1000 - pdaXrom R198 (Celestial Environment)
tyrannozaurus.com
[img]http://www.tyrannozaurus.com/files/category_pictures/general_1.png\" border=\"0\" class=\"linked-sig-image\" /]
Zaurus news/blogs feed from Zaurus users
Free Windows, Linux, or Web RSS readers.
Featured pages at tyrannozaurus:
Sharp Petition, ScummVM, Cacko, pdaXii13, and Celestial Environment

anunakin

  • Sr. Member
  • ****
  • Posts: 340
    • View Profile
    • http://vivaphp.net
Howto Configure A Usb Ethernet Adaptor
« Reply #2 on: January 10, 2006, 12:47:36 pm »
My USB Ethernet Adaptor is a "DM8511 Pegasus II Ethernet"

This works fine on my pdaXrom 1.10beta1

next connect this on ZHost OTG.... this create eth0 interface and I go up with:

Code: [Select]
$dhcpcd eth0
this works fine here!
[img]http://www.vivaphp.net/imagens/rev2.jpg\" border=\"0\" class=\"linked-sig-image\" /]
Anunakin (Marcus Fazzi)

Nokia N900 32GB + microSD 2GB
Nokia N810 w/ microSD 8GB
Nokia 5310 XpressMusic w/ microSD 1GB
HP48GX->Psion Sienna->Palm m130->Tungsten T->Zaurus SL-5500->C3000->C3100 ALL SOLD

My FEED(On Line AGAIN!!!)

desertrat

  • Hero Member
  • *****
  • Posts: 743
    • View Profile
    • http://
Howto Configure A Usb Ethernet Adaptor
« Reply #3 on: January 10, 2006, 02:04:17 pm »
Quote
Code: [Select]
$dhcpcd eth0
this works fine here!

The whole idea was to automate the thing. Just plugin your adaptor, plugin a cat 5 cable and off you go. No more fiddling with terminals and arcane command line wotsits

For those like me who are annoyed that after suspend/resume all your USB stuff stays sleeping here's a quick and dirty fix (my favourite kind of fix   )

Create the file /etc/apm/scripts.d/usb with the following contents:

Code: [Select]
#! /bin/bash
#
# usb
#
# description: restart the usb subsystem upon resume
#



# See how we were called.

suspend() {
  return 0
}

resume() {
  /etc/rc.d/init.d/usb restart
  return 0
}


case "$1" in
  suspend)
        suspend
       ;;
  resume)
        resume
       ;;
  *)
        echo "Usage: $0 {suspend|resume}"
        exit 1
esac

exit $?

Then:
Code: [Select]
chmod 0744 /etc/apm/scripts.d/usb
ln -s /etc/apm/scripts.d/usb /etc/apm/resume.d/400usb

Now when you resume all your USB should be reinitialised.

-- cheers
SL-C3100 / Ambicon WL1100C-CF / pdaXrom 1.1.0beta3 / IceWM

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Howto Configure A Usb Ethernet Adaptor
« Reply #4 on: January 11, 2006, 04:16:36 am »
Quote
Quote
Code: [Select]
$dhcpcd eth0
this works fine here!

The whole idea was to automate the thing. Just plugin your adaptor, plugin a cat 5 cable and off you go. No more fiddling with terminals and arcane command line wotsits

For those like me who are annoyed that after suspend/resume all your USB stuff stays sleeping here's a quick and dirty fix (my favourite kind of fix   )

Create the file /etc/apm/scripts.d/usb with the following contents:

Code: [Select]
#! /bin/bash
#
# usb
#
# description: restart the usb subsystem upon resume
#



# See how we were called.

suspend() {
  return 0
}

resume() {
  /etc/rc.d/init.d/usb restart
  return 0
}


case "$1" in
  suspend)
        suspend
      ;;
  resume)
        resume
      ;;
  *)
        echo "Usage: $0 {suspend|resume}"
        exit 1
esac

exit $?

Then:
Code: [Select]
chmod 0744 /etc/apm/scripts.d/usb
ln -s /etc/apm/scripts.d/usb /etc/apm/resume.d/400usb

Now when you resume all your USB should be reinitialised.

-- cheers
[div align=\"right\"][a href=\"index.php?act=findpost&pid=110313\"][{POST_SNAPBACK}][/a][/div]

I have a similar script for the Sharp ROM. The only difference is that I resume via the hotplug agent script rather than the apm script directly. Maybe you might want to consider doing that as well since you do update the agent script, might as well make it do the suspend and resume as well
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

desertrat

  • Hero Member
  • *****
  • Posts: 743
    • View Profile
    • http://
Howto Configure A Usb Ethernet Adaptor
« Reply #5 on: January 11, 2006, 05:20:19 am »
Quote
I have a similar script for the Sharp ROM. The only difference is that I resume via the hotplug agent script rather than the apm script directly. Maybe you might want to consider doing that as well since you do update the agent script, might as well make it do the suspend and resume as well

Please elaborate  AFAICS it can't be done from /etc/hotplug/net.agent.

BTW I really enjoyed your installation guide -- hurry up and upgrade to pdaXrom so you can write a similar guide for it

-- cheers
SL-C3100 / Ambicon WL1100C-CF / pdaXrom 1.1.0beta3 / IceWM

Antikx

  • Hero Member
  • *****
  • Posts: 1147
    • View Profile
    • http://tyrannozaurus.com
Howto Configure A Usb Ethernet Adaptor
« Reply #6 on: January 12, 2006, 10:07:10 am »
Quote
Thank you sooooo much! This is great. I can now use a mouse, kbd and network by plugging in one cable! (I have them plugged into a hub).
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]

I'm using a D-Link DSB-650TX in case anyone is looking for a cheap USB ethernet adaptor that works under Cacko and pdaXrom.

[a href=\"http://support.dlink.com/products/view.asp?productid=DSB%2D650TX]http://support.dlink.com/products/view.asp...tid=DSB%2D650TX[/url]

It's ugly but it works.
Kanpai,
-Antikx (Twitter, Mugshot and PodNova)
C1000 - pdaXrom R198 (Celestial Environment)
tyrannozaurus.com
[img]http://www.tyrannozaurus.com/files/category_pictures/general_1.png\" border=\"0\" class=\"linked-sig-image\" /]
Zaurus news/blogs feed from Zaurus users
Free Windows, Linux, or Web RSS readers.
Featured pages at tyrannozaurus:
Sharp Petition, ScummVM, Cacko, pdaXii13, and Celestial Environment

trichmon

  • Full Member
  • ***
  • Posts: 148
    • View Profile
Howto Configure A Usb Ethernet Adaptor
« Reply #7 on: May 01, 2006, 01:53:14 pm »
I have a netgear usb nic that is based on the pegasus chipset.  I was able to get it running on the sharp rom but even with the scripts listed here my 6000 does not even see that i have plugged anything in.  Anyone have a suggestion on where to strat troubleshooting this.?  Or does anyone have a netgear usb nic that is working for them?

As always thanks
Todd
SL-6000l running pdaXrom RC12 icewm + rox
Targus keyboard
Trendnet cf 10/100 ethernet
Linksys CF wireless
Sandisk 256mb SD card
Lexar 1gig SD card
SL-5500 running zynergy rom

desertrat

  • Hero Member
  • *****
  • Posts: 743
    • View Profile
    • http://
Howto Configure A Usb Ethernet Adaptor
« Reply #8 on: May 01, 2006, 02:20:19 pm »
Quote
Anyone have a suggestion on where to strat troubleshooting this.?  Or does anyone have a netgear usb nic that is working for them?
When you plug in the adaptor what does dmesg report? Eg for my pegasus based adaptor I get:
Code: [Select]
...
usb.c: kusbd: /sbin/hotplug add 2
pegasus.c: v0.4.32 (2003/06/06):Pegasus/Pegasus II USB Ethernet driver
usb.c: registered new driver pegasus
pegasus.c: eth0: ADMtek AN986 "Pegasus" USB Ethernet (evaluation board)
usb.c: pegasus driver claimed interface c3b59c60
...

And for my rtl8150 based adaptor:
Code: [Select]
...
usb.c: kusbd: /sbin/hotplug add 3
rtl8150.c: rtl8150 based usb-ethernet driver v0.4.3 (2002/12/31)
usb.c: registered new driver rtl8150
rtl8150.c: eth0: rtl8150 is detected
usb.c: rtl8150 driver claimed interface c3a9a6a0
...

If you do get similar messages, then what does ifconfig -a show?

-- cheers
SL-C3100 / Ambicon WL1100C-CF / pdaXrom 1.1.0beta3 / IceWM

trichmon

  • Full Member
  • ***
  • Posts: 148
    • View Profile
Howto Configure A Usb Ethernet Adaptor
« Reply #9 on: May 01, 2006, 02:34:11 pm »
Sadly i get no messages at all.


Todd
SL-6000l running pdaXrom RC12 icewm + rox
Targus keyboard
Trendnet cf 10/100 ethernet
Linksys CF wireless
Sandisk 256mb SD card
Lexar 1gig SD card
SL-5500 running zynergy rom

desertrat

  • Hero Member
  • *****
  • Posts: 743
    • View Profile
    • http://
Howto Configure A Usb Ethernet Adaptor
« Reply #10 on: May 01, 2006, 02:56:03 pm »
Quote
Sadly i get no messages at all.
With reference to this thread:

https://www.oesf.org/forums/index.php?showtopic=19142

are you using the USB-host cable (you should be)? If you are using a USB-host cable and you're not getting any messages then I'm afraid there's not much I can do to help.

-- cheers
SL-C3100 / Ambicon WL1100C-CF / pdaXrom 1.1.0beta3 / IceWM

Glaive

  • Newbie
  • *
  • Posts: 18
    • View Profile
Howto Configure A Usb Ethernet Adaptor
« Reply #11 on: May 01, 2006, 03:04:00 pm »
I've got a D-link DUB-E100 and it worked out of the box with Beta2. Do all of you connect the ethernet adaptors through a powered hub?
Zaurus C3100 /Pdaxrom 1.1.0beta4  + 1GB CF + D-link 660w
Asus Z71v laptop w/Ubuntu 6.06
Athlon XP desktop w/Freebsd 5.3

desertrat

  • Hero Member
  • *****
  • Posts: 743
    • View Profile
    • http://
Howto Configure A Usb Ethernet Adaptor
« Reply #12 on: May 01, 2006, 03:22:00 pm »
Quote
I've got a D-link DUB-E100 and it worked out of the box with Beta2.
When you say "worked out of the box", do you mean to say that you didn't have to fiddle about with any of the hotplug scripts etc? What does your adaptor appear as, eth0 or something else?

Quote
Do all of you connect the ethernet adaptors through a powered hub?
I don't. I usually only use a single usb device at a time so no need.

-- cheers
SL-C3100 / Ambicon WL1100C-CF / pdaXrom 1.1.0beta3 / IceWM

trichmon

  • Full Member
  • ***
  • Posts: 148
    • View Profile
Howto Configure A Usb Ethernet Adaptor
« Reply #13 on: May 01, 2006, 04:54:53 pm »
Quote
Quote
Sadly i get no messages at all.
With reference to this thread:

https://www.oesf.org/forums/index.php?showtopic=19142

are you using the USB-host cable (you should be)? If you are using a USB-host cable and you're not getting any messages then I'm afraid there's not much I can do to help.

-- cheers
[div align=\"right\"][a href=\"index.php?act=findpost&pid=125317\"][{POST_SNAPBACK}][/a][/div]

Yup i am using the host cable and i can use it for other stuff, and the nic powers up.  I just dont get any messages in dmesg.  Maybe I will try to reflash and see if that makes a difference.

Todd
SL-6000l running pdaXrom RC12 icewm + rox
Targus keyboard
Trendnet cf 10/100 ethernet
Linksys CF wireless
Sandisk 256mb SD card
Lexar 1gig SD card
SL-5500 running zynergy rom

adf

  • Hero Member
  • *****
  • Posts: 2807
    • View Profile
    • http://
Howto Configure A Usb Ethernet Adaptor
« Reply #14 on: May 01, 2006, 06:09:38 pm »
Gee.... I went to a random electronics store near a hotel I was staying at. The only usb ethernet adapter they had was a linksys USB100M. I took it to my hotel room plugged int into the Z host cable and the hotel ethernet cable on my 3100 with (then) beta2 .... and presto I had a connection. No fiddling with anything but the the network gui.  Of course, i have installed all kinds of random stuff on myZ while struggling with usb wifi........
**3100 Zubuntu Jaunty,(working on Cacko dualboot), 16G A-Data internal CF, 4G SD, Ambicom WL-1100C Cf, linksys usb ethernet,  BelkinF8T020 BT card, Belkin F8U1500-E Ir kbd, mini targus usb mouse, rechargeble AC/DC powered USB hub, psp cables and battery extenders.

**6000l  Tetsuized Sharprom, installed on internal flash only 1G sd, 2G cf