maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   USB to Ethernet? (https://talk.maemo.org/showthread.php?t=11723)

dblank 2007-11-14 20:00

USB to Ethernet?
 
Has anyone tested any USB to Ethernet devices with OS2008 yet?

Edit: I have! see post below, since I didn't think to just edit this one :)

dblank 2007-12-01 02:48

Re: USB to Ethernet?
 
I've just tested a Hawking HUF11, which is based on the Realtek 8150, and so far things are looking great!

I put the N800 in host mode, plugged the sucker in, brought up the interface and transferred a big file via scp, no problems at all, and no power injection seems to be necessary (phew)

It looks like I'll have to do some more tweaking around though, as at least the web browser tries to bring up the wifi interface, but I don't think that'll be too difficult to fix.

Edit: DUMMY IAP is necessary (thanks rps!!!), run
gconftool -s -t string /system/osso/connectivity/IAP/DEFAULT/type DUMMY
and select DEFAULT from the connection list after bringing up your interface with udhcpd, or whatever.

R-R 2007-12-01 07:34

Re: USB to Ethernet?
 
So you take one of those adapter, a USB to mini (800) or micro (810) USB cable, modprobe a driver, and voilą? :)

dblank 2007-12-01 07:39

Re: USB to Ethernet?
 
Quote:

Originally Posted by R-R (Post 103056)
So you take one of those adapter, a USB to mini (800) or micro (810) USB cable, modprobe a driver, and voilą? :)

no modprobe necessary :)

also needs USB A Female to Female adapter, or soldering, cable splicing, etc.

jonmlee 2007-12-01 09:15

Re: USB to Ethernet?
 
this looks really really interesting!
wait? it's female to female? don't you need a male mini usb to plug into the n800?
http://cgi.ebay.com/USB-A-Female-to-...QQcmdZViewItem

dblank 2007-12-01 09:58

Re: USB to Ethernet?
 
Quote:

Originally Posted by jonmlee (Post 103081)
this looks really really interesting!
wait? it's female to female? don't you need a male mini usb to plug into the n800?
http://cgi.ebay.com/USB-A-Female-to-...QQcmdZViewItem

I have an adapter like that on the way, but for now I'm using a normal male mini usb cable plugged into N800, with the other end, and ethernet adapter plugged into a female to female adapter.

chariscomp 2007-12-01 20:35

Re: USB to Ethernet?
 
Hello,

I am very interested in purchasing a USB to ethernet adapter that will work with my N800. I have been searching for the Hawking HUF11 that was mentioned in this thread, but have not found a place to buy it. If anyone knows where this can be purchased or another usb to ethernet adapter based on the Realtek RTL8150 chipset I would be very interested in it. This is one of the main things I want to use my N800 for: configuring routers with a wired connection. I know I can get a portable router, but I would rather go this route if possible. Thanks for any help anyone can give! I have upgraded my N800 to Beta OS2008.

Thanks!

Joshua

Edit: I found this adapter (http://www.newegg.com/Product/Produc...82E16833124146) that I *think* is supposed to be using the RTL8150 chipset. Can anyone confirm this one way or another? Thanks!

dblank 2007-12-01 21:01

Re: USB to Ethernet?
 
Quote:

Originally Posted by chariscomp (Post 103214)
Edit: I found this adapter (http://www.newegg.com/Product/Produc...82E16833124146) that I *think* is supposed to be using the RTL8150 chipset. Can anyone confirm this one way or another? Thanks!

I'm pretty darn sure it is.

I would have bought one myself had it not been for the very poor reviews regarding the connector, which supposedly breaks very easily :(

Love the compact size, too bad they didn't do a very good job with the connector..

Here's a list of adapters that I think use the 8150:
GreenHouse GH-USB100B
Billionton ThumbLAN USBKR2-100B
Billionton ThumbLAN USBKR-100
Chinese adapters: zt168a CA2057
Linksys USB100M
Hawking HUF11
Melco LUA-KTX
BAFO BF-310
NetComm - USB LAN Key
Ztek USB LAN ?
3Com's "Etherfast 10/100 Compact USB Network Adapter", aka model USB100M
SMC 2208
Startech USB1100S
Abocom RTL8151
Compex UE202-B
Longshine LCS-8138TX
Micronet SP128AR
NetComm NP1010
Repotec RP-USB100-A
SMC 2208USB/ETH
TRENDnet TU-ET100C
Zt USB10/100
Z-TEK ZK-R02

dblank 2007-12-03 19:20

Re: USB to Ethernet?
 
Bump for edit to post number 2:
http://internettablettalk.com/forums...88&postcount=2

Looking for a way to get native apps to recognize the available wired connection, and not bring up connection dialog for WLAN/BT.

bexley 2007-12-03 19:30

Re: USB to Ethernet?
 
Thanks for leading this question. If solved it'll help a lot of people, myself included.

dblank 2007-12-03 21:51

Re: USB to Ethernet?
 
Quote:

Originally Posted by bexley (Post 103969)
Thanks for leading this question. If solved it'll help a lot of people, myself included.

No problem.

I've submitted an enhancement request, please add your vote if you'd like to see proper support of wired connections :)

Here's the link:
https://bugs.maemo.org/show_bug.cgi?id=2470

Thanks!

hordeman 2007-12-03 21:55

Re: USB to Ethernet?
 
Quote:

Originally Posted by dblank (Post 103086)
I have an adapter like that on the way, but for now I'm using a normal male mini usb cable plugged into N800, with the other end, and ethernet adapter plugged into a female to female adapter.

Please let us know how it works out. I'm standing by to find out more so I can get an adapter for my n800! :)

Thanks!
H.

Guerol 2007-12-03 23:06

Re: USB to Ethernet?
 
Is the Realtek RTL8150 Chipset the only supported one?

Can't find any of these listed USB-to-Ethernet Adapters with RTL8150 Chipset here in Germany. :-(

dblank 2007-12-03 23:56

Re: USB to Ethernet?
 
Quote:

Originally Posted by Guerol (Post 104072)
Is the Realtek RTL8150 Chipset the only supported one?

Can't find any of these listed USB-to-Ethernet Adapters with RTL8150 Chipset here in Germany. :-(

It's the only driver compiled into the kernel, but it should be possible, and probably not too difficult, to compile modules for other chipsets.

I've been meaning to compile a bunch of modules, just haven't gotten around to it yet. When I do, I'll be sure to share them.

dblank 2007-12-04 21:11

Re: USB to Ethernet?
 
Ok, I finally got around to compiling modules, all of them compiled and load ok, so if anyone would like test them with other USB > Ethernet devices, here they are:

http://maemobox.org/dblank/usbnet.tgz

This should cover all adapters supported in kernel 2.6.21

bexley 2007-12-05 17:55

Re: USB to Ethernet?
 
Thanks! I'll have the N810 in my hands tomorrow and I'll try to find a USB-Ethernet adapter on Friday to test this with. I'll read through to see if it's mentioned earlier,
but what exactly am I to do with the modules? Sorry for the basic question. Any progress on getting native apps to work with the connection? If not, what apps do work with it, and how?

Oh yea, and I still need to find a micro USB adapter. Not even sure which kind yet--A, B, A/B? A little confused there but I'll do some reading to clear it up.

dblank 2007-12-05 18:56

Re: USB to Ethernet?
 
Quote:

Originally Posted by bexley (Post 104830)
what exactly am I to do with the modules? Sorry for the basic question. Any progress on getting native apps to work with the connection? If not, what apps do work with it, and how?

Oh yea, and I still need to find a micro USB adapter. Not even sure which kind yet--A, B, A/B? A little confused there but I'll do some reading to clear it up.

You'll want to load whichever module supports your adapter, that usually requires finding out what chipset the adapter uses, then find out which module, if any, supports that chipset.

Included modules are:
catc
dm9601
kaweth
mcs7830
pegasus

Extract from the .tgz like this:
tar -xzf usbnet.tgz

Load appropriate module, ex:
insmod mcs7830.ko

Then configure your adapter manually or via DHCP, and enjoy using command line utilities and other apps that don't try to bring up a connection dialog :)

No luck getting the browser to work, and no answer to my enhancement request on bugs.maemo.org, I haven't messed around with it for a while, was really hoping someone else would figure it out :)

Easiest way to make the USB connection would be USB-A-Female to Mini-B-Male for the N800, but for the N810 I'm not sure.

If all you want to use are "normal" applications, I don't think I'd bother getting an ethernet adapter until someone figures out how to make them see the connection, but if you want to just mess around, or use commandline apps, etc. go for it!

fpp 2007-12-05 19:07

Re: USB to Ethernet?
 
Have you tried launching the executables (for browser etc.) directly from the command line in xterm ? I seem to remember the icons in the menus start them through some wrapper shell script that brings up the WLAN connection if it isn't already active... maybe the plain binary could work ?

dblank 2007-12-06 00:04

Re: USB to Ethernet?
 
Quote:

Originally Posted by fpp (Post 104876)
Have you tried launching the executables (for browser etc.) directly from the command line in xterm ? I seem to remember the icons in the menus start them through some wrapper shell script that brings up the WLAN connection if it isn't already active... maybe the plain binary could work ?

No luck.. the only way I've managed to get apps like the browser to work over ethernet is by keeping a WIFI or BT association.

I'm gonna try messing with dbus again, I don't remember what I did last time, but I was probably half asleep :)

fpp 2007-12-06 09:56

Re: USB to Ethernet?
 
Sorry for the false lead, was probably only half awake too :-)

rps 2007-12-11 17:22

Re: USB to Ethernet?
 
Quote:

Originally Posted by dblank (Post 105008)
No luck.. the only way I've managed to get apps like the browser to work over ethernet is by keeping a WIFI or BT association.

I'm gonna try messing with dbus again, I don't remember what I did last time, but I was probably half asleep :)

I use dummyiap when using usbnet (works like a charm with my linux box - no need for an ethernet-adaptor, simply connect the usb cable - but has issues with WinXP).

dblank 2007-12-11 19:29

Re: USB to Ethernet?
 
Quote:

Originally Posted by rps (Post 107220)
I use dummyiap when using usbnet (works like a charm with my linux box - no need for an ethernet-adaptor, simply connect the usb cable - but has issues with WinXP).

Wow, I can't believe I've never come across that :)

I'm guessing that will do the trick!

Big fat thank you.. will report back in a few if it works for me.

Edit: it's official, rps is my hero.. still can't believe I missed the dummy setting :D

pearl62 2007-12-13 05:34

Re: USB to Ethernet?
 
So I have the Trendnet TU-ET100C (one of the listed RT8150 adapters) plugged in, but it doesnt seem to work. When I do an ifconfig -a, I dont see any USB or Eth interface listed. only loopback and wlan0. lsmod also doesnt seem to show g_ether.ko which I guess I would have expected.

Is there some to check if the driver is loaded? Is there some step I am missing?

You guys mentioned running udhcpd, but maybe I dont have this installed, as it doesnt seem to be recognized? Where can I get udhcpd?

pearl62 2007-12-13 05:42

Re: USB to Ethernet?
 
Actually thereś no link light on the router, so I am pretty sure the driver is not being loaded on the N800 (OS2008). How can I start the driver?

dblank 2007-12-13 06:40

Re: USB to Ethernet?
 
Quote:

Originally Posted by pearl62 (Post 108058)
Actually thereś no link light on the router, so I am pretty sure the driver is not being loaded on the N800 (OS2008). How can I start the driver?

Have you enabled host mode?

pearl62 2007-12-13 07:04

Re: USB to Ethernet?
 
Yes, and I am using a powered hub. A usb flash dongle works fine...

dblank 2007-12-13 07:27

Re: USB to Ethernet?
 
Open up a terminal, type, as root: cat /proc/kmsg

plug in your adapter, any messages?

try connecting without the hub too.

pearl62 2007-12-13 07:49

Re: USB to Ethernet?
 
Thanks. I can see that the usb ethernet adapter is being reported as an ADMtek device...

I guess I still need to keep looking for a RT8150 device.

dblank 2007-12-13 08:30

Re: USB to Ethernet?
 
Don't give up yet! :)

Grab http://maemobox.org/dblank/usbnet.tgz

Extract and load pegasus driver
tar -xzf usbnet.tgz pegasus.ko
insmod pegasus.ko

then cat /proc/kmsg again and plug in your card.

pearl62 2007-12-13 17:22

Re: USB to Ethernet?
 
Awesome! It works!

I just had to run udhcpc in xterm after plugging the adapter in. Is there a way to automate this, or have a script executed from a button in the UI?

pearl62 2007-12-13 17:35

Re: USB to Ethernet?
 
Oh yeah, it's also working without the powered hub too!

dblank 2007-12-13 19:12

Re: USB to Ethernet?
 
Quote:

Originally Posted by pearl62 (Post 108240)
Awesome! It works!

I just had to run udhcpc in xterm after plugging the adapter in. Is there a way to automate this, or have a script executed from a button in the UI?

Easiest way would probably be to dump all the commands in a shell script, and write a .desktop file that loads the shell script.

qole 2007-12-18 23:56

Re: USB to Ethernet?
 
Quote:

Originally Posted by dblank (Post 104870)
You'll want to load whichever module supports your adapter, that usually requires finding out what chipset the adapter uses, then find out which module, if any, supports that chipset.

Included modules are:
catc
dm9601
kaweth
mcs7830
pegasus

How do you determine which modules support which chipsets? Is there a table online somewhere?

I found a cheap adapter that uses the ADM Tek 8511 chipset; any ideas?

dblank 2007-12-19 00:23

Re: USB to Ethernet?
 
Quote:

Originally Posted by qole (Post 110766)
How do you determine which modules support which chipsets? Is there a table online somewhere?

I found a cheap adapter that uses the ADM Tek 8511 chipset; any ideas?

I'm not aware of any big list or anything.. but a quick search for admtek 8511 linux makes it sound like you'd want the pegasus module.

It's a good idea to search for the datasheet for the chipset as well (which can sometimes be a massive pain :) ) to look up power consumption; it has to consume less than 200mA to be powered by the tablets, and the less the better!

bioroid 2008-01-17 02:19

Re: USB to Ethernet?
 
Quote:

Originally Posted by dblank (Post 108295)
Easiest way would probably be to dump all the commands in a shell script, and write a .desktop file that loads the shell script.

Has anyone done this? I got my USB network adapter working but I haven't had any luck trying to make scripts and .desktop files to automate the process.

ripl 2008-02-13 16:48

Re: USB to Ethernet?
 
A quick note to let folks know that this adapter works well with the N800.

HE130R Network Adapter

Power from the N800 and use the dm9601.ko module.

Price is about $10.

chariscomp 2008-02-21 17:48

Re: USB to Ethernet?
 
Hello,

I am able to use a SMC 2208USB usb to ethernet adapter with the pegasus.ko module that is in this thread. Someone earlier in the thread wanted to know how to make this easier to use. I was able to take the instructions in this wiki entry (http://www.internettablettalk.com/wi..._using_OS_2008) using the status bar switch method and modify them a little bit. I copied the pegasus.ko file to the /home/user/MyDocs folder. I then added the line insmod /home/user/MyDocs to the end of the Host.sh file. I then copied the Host.sh file and named it Ethup. I removed everything after the fi line and replaced it with this line: udhcpc. I followed the wiki instructions to add an entry to the Status bar and named it Wired Up. This allows me to easily start my ethernet. First, I set the default access point to DEFAULT as specified earlier. Next, I tap on Host mode. I plug in my adapter and then tap on Wired up. This connects me using DHCP. I hope this description helps someone!

The one thing I have not been able to figure out is how to manually set an IP address that works. I have opened up Xterm, run sudo gainroot and then run ifconfig eth0 down followed by ifconfig eth0 192.168.2.50 netmask 255.255.255.0 up. If I then run ifconfig eth0 it has changed to the manually specified IP. However, if I then attempt to ping my router (192.168.2.1) it always times out. I have even tried adding a route using route add default gw 192.168.2.1 but this doesn't seem to make a difference. One of the main "justifications" for my purchase of the N800 is to configure routers. I am most of the way there now, with the ability to automatically obtain an IP. All I need now is to be able to manually set an IP address. If anyone has any suggestions on how to manully set IP address with this setup, it would most appreciated.

Thanks for all the help that has already been provided!

Joshua

jolouis 2008-02-22 23:48

Re: USB to Ethernet?
 
I accidentally stumbled across somewhere that had stock on the Linksys USB100M (I tried a 200M before but it required more power than the tablet was willing to give) and gave it a shot today. It's definately possible, but there's some work required.

I wanted to try and make things as easy as possible, so here's what I've got so far:
I created two scripts: usbEthUp and usbEthDown. The first one uses gconf to add a "WIRED" dummy connection to the list of available connections for the tablet, then calls udhcpc to run in the background and try to bring up eth0.
The second one does the exact opposite: removes the dummy "WIRED" connection from the connection list and calls udhcpc to run in the background again for a few seconds so that the old routes for eth0 get dumped from the routing table (that way wifi works correctly once more).
I then created a new udev rules file and set it up so that when the USB ethernet adapter is connected, the usbEthUp is automatically launched, and when it's removed, usbEthdown is launched.

The end result is that with the tablet offline/out of range of wifi connections:
1) Plug in USB Ethernet adapter using handy-dandy USB OTG adapter
2) I launch a web browser/whatever, and the connect dialog pops up with WIRED selected. I hit OK.
3) Internet/network works just as you'd expect.

When I'm done, simply disconnect the USB adapter and *theoretically* reconnect to wifi at a later point in time (the WIRED connection no longer appears in the list of possible choices).

I say theoretically because the one catch that I've run into seems to be that for some reason UDEV won't fire off a "Remove" event until you do something else with USB (i.e. plug in a different USB device, etc). So at the moment I have to manually call the usbEthDown (or restart the tablet) to get the wifi back up and running.

None the less, pretty sweet. My two sticking points for further work right now are 1) Figure out why on earth udev won't fire a remove event and 2) try to figure out if there's an easy way to automatically select/have the tablet select by default the WIRED connection instead of popping up the select connection box. I've been through a lot of D-BUS and maemo documentation this afternoon, and I thought I was getting close, but in 2008 they changed things around a bit and I can't find a straightforward way of doing it...

Also btw for your static IP problem, it might be worth trying:
run udhcpc -n -q -i eth0
then do an ifconfig eth0 IP/etc
then add static/default gateway.

My bet would be the reason it doesn't work is that you still have other routes left in the routing table that are over-riding your default gateway (keep in mind default gw is the last resort); calling udhcpc will clean those out for you when it fails. (alternatively just flush the whole routing table manually).

bluesubaru 2008-02-29 19:49

Re: USB to Ethernet?
 
Would you care to share the scripts with us? This is just what I have been looking for.

oldskool 2008-03-07 08:02

Re: USB to Ethernet?
 
I purchased the TRENDNET TU-ET100C USB to Ehernet adapter at Fry's, and I discovered that it uses the Admtek ADM8511 chip instead of the Realtek RTL8150. However, with the pegasus driver posted by dblank earlier, it seems to work fine with my Nokia N810. You just have to "insmod pegasus.ko" before bringing up the link.

The following script seems to work. I just sudo to run it:

echo host> /sys/devices/platform/musb_hdrc/mode
gconftool -s -t string /system/osso/connectivity/IAP/DEFAULT/type DUMMY
insmod /home/worker/pegasus.ko
echo 'plug in adapter and hit return'
read ans
ifup eth0

- oldskool


All times are GMT. The time now is 18:41.

vBulletin® Version 3.8.8