OpenWrt Forum Archive

Topic: USB to ETHERNET converter.

The content of this topic has been archived on 28 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello all!

I have just started working all of this out, so I am happy to be here!

My question is this:

Has anyone ever thought of using those really cheap USB to ETHERNET converters?

(ex: http://www.tigerdirect.ca/applications/ … CatId=589)
^^ That one is much more expensive, ebay has em at 2 dollars

I understand that it is meant to convert ethernet to usb for people without an ethernet card.

My idea is, why not use it the other way around? Connect the ethernet to a router, then USB to an device.

I know there is (probably) a driver involved, but I/anyone interested could write one.


Failing that, there is the more circuits route:
Use this Ethernet to SPI Host: ENC28J60 Stand-Alone Ethernet Controller with SPI Interface
THen SPI to USB:  MAX3420E    USB Peripheral Controller with SPI Interface

Also probably involves a driver.


My goal is to use a cheap router but add on USB functionality.

I want to keep budget low, but USB is really attractive.

The whole point is to put a router (like WRT54GL) on a robot, then attach all sensors/inputs (including video, hence serial is out of the question)
to transmit to a receiving computer. There, a lot more processing and remote control can take place than on the robot. I will be sure to document it here if anyone wants to know.

Thanks for your time. smile


EDIT: This one might work as well:     LAN9500-ABZJ USB 2.0 ETHER CTRLR

(Last edited by Maeth on 22 Apr 2009, 06:30)

No one is interested?

I guess I will do some work on my own.

I don't really think this is possible. These devices are only made to work one-way.

kupesoft is right, it's a USB network adapter, not a magic USB to ethernet "converter".

I am not so sure.
The adapter must necessarily pass data both ways. Otherwise the intended function would not be possible.

So, if we can send the right Ethernet data to make an attached device think it is communicating with a regular usb, then... I will have to try it out.

Maeth wrote:

I am not so sure.
The adapter must necessarily pass data both ways. Otherwise the intended function would not be possible.

So, if we can send the right Ethernet data to make an attached device think it is communicating with a regular usb, then... I will have to try it out.

This is a regular NIC based on USB, just like others are PCI, PCI express, MiniPCI, PCMCIA.
A computer must have proper drivers (kernel modules) installed to access such a device.
If you e. g. connect this NIC to a digital camera, why do you think it will know how to handle it?
And please, don't mix up a regular USB device and a USB host. Normally a device (better: a USB connector on a device) is designed to be either a USB host or a USB device but not both (there are exceptions).

http://en.wikipedia.org/wiki/Usb

Yup, MMCM is right.  You cannot do this without it costing you $$$, because the moment the word 'USB host' instead
of 'USB device' is used the price goes up significantly. 

USB Hosts involve endpoint descriptors, transfer descriptors, DMA, handling of connection, disconnection events,
figuring out what speed the device is, how much power it takes, enumeration of hubs, and a bunch of other things.

USB devices consist of just endpoint(s) that you can shove data into/out of and can be very basic.

Also putting the words Ethernet and Microcontroller into the same sentence seems to involve rather high costs too,
although I've never understood why.

<shameless plug>
Bifferboard might be a reasonable platform to attempt something like this, but it's a bit more than 2 dollars.
(www.bifferos.com).
</shameless plug>

I've seen some custom devices which simply accept ethernet frames and send them onto USB (used
in conjunction with Windows drivers on the client), but they are not much cheaper than a Bifferboard.

If you are interested in the Bifferboard, for this though, don't order it just yet.  The next firmware version is
due out in about a week and will allow a kind of BIOS extension, so you can program it rather more like a microcontroller, and less like a Linux system.  Maybe useful for robotics.

regards,
Biff.

Hi Maeth, a few thoughts and tradeoffs

I suppose you already went through the list of supported hardware and scanned for those routers with USB 2.0 ports? Wouldn't a simple usb host work for you? Some of those go for ~50 bucks, some have 2 USB ports (options, options!), various brands depending on where you live.

For flexible input/output/timing, maybe scan for devices with mini-PCI inside. Lose the wireless, gain a standard PCI port. This tradeoff presents industrial-grade possibilities.

Usb-ethernet adapters may or may not offer decent throughput, often worse latency/jitter than you'd get from a 1995 10Mbps ISA card... The format factor is cool, if you can tolerate the lousy performance AND have drivers for the chip inside.

Same caution on usb-wireless (eg: http://kakaku.com/item/00776011142/ ), convenience vs. performance.

OTOH, tiny-footprint large-storage is easy for personal use, up to at least 32GB eg. with RMUM / ?BSCRMSDCBK. Thanks to generic storage class, no driver issues under any OS.
(eg. http://portablemonkey.com/article/got-m … mum-2g-bk/ )
8GB works for me smile Would even qualify for certain industrial scenarios!

Typical consumer routers (target OpenWRT platform) as of 2008 handle decent video flow, but not quite video processing.  Consider many mini-ITX boards, where the CPU is an order of magnitude "faster" than your typical OpenWRT box, still choke on video display, let alone arbitrary video processing.

Depending on your constraints, you could also consider prototyping with
- low-power industrial Soekris gear (http://www.soekris.com/)
- hobby-oriented Via mini-ITX format? (eg. http://www.mini-box.com/)
- or maybe even eee/umpc
If your goal is up to double-digit quantities (as opposed to mass-production 10k+ units), generic devices could be much easier and possibly cheaper to work with than more specialised+optimised gear.

hapy hacking smile

Maeth

I would be interested if you come up with a reasonable cost board. I would like to see something that has a USB device interface and an ethernet port. I want it to be programmable as a SMB or NFS client and intelligent enough to run a decent speed OS, and Memory (and maybe an SD card slot? )

Such a device may be diverse enough to generate quite a following based on what I have read. In fact it may be what I have been looking for.

I do not profess to be a linux expert but over the years I have learned that I can do just about anything I put my mind to , or at least be of some useful assistance.

Zen

I strongly disagree with you on the USB to ethernet performance. I have seen some that work VERY well. Of course the basic units such as The Pegasus II unit I have here is only USB 1.x , and it does suffer from some of what you mention.

I know this well, believbe me I have my reasons for knowing specifically about jitter and latency .

Of course you get what you pay for. 

Bifferos
Hello again!







NEVER say NEVER

Instead of adding a USB port via the LAN port, why not add a USB host controller through the gpio pins?

zen wrote:

I suppose you already went through the list of supported hardware and scanned for those routers with USB 2.0 ports? Wouldn't a simple usb host work for you? Some of those go for ~50 bucks, some have 2 USB ports (options, options!), various brands depending on where you live.

Sorry to keep on, but if this is for a robot you want something small.  The Bifferboard isn't much larger than an SD card:

SD Card size comparison:
http://4736066909565596522-a-1802744773 … pshot1.png

The IO board makes it slightly larger, but still far smaller than a router. Someone's already got it working with the Quickcam Pro 9000:  http://www.sunspot.co.uk/Projects/Biffe … ro9000.jpg  You can also pay a bit more and use an NSLU2 if you want two USB ports on-board, although the Bifferboard works well with most hubs.

The fact that Bifferboard works from 5v means you can use one of the cheap 12v->5v USB vehicle adapters http://www.sunspot.co.uk/Projects/Biffe … erter.html giving you an easy way to power from the same batteries as the robot motor.

All for 44 Bucks (40 Bucks each if you want to buy five of 'em).

regards,
Biff.

markosjal wrote:

I would be interested if you come up with a reasonable cost board. I would like to see something that has a USB device interface and an ethernet port. I want it to be programmable as a SMB or NFS client and intelligent enough to run a decent speed OS, and Memory (and maybe an SD card slot?)

Have to agree with bifferos here: sounds like you just specced the Bifferboard :-) I just discovered it through this forum, this little devil could work for some of my projects ;-)

markosjal wrote:

I strongly disagree with you on the USB to ethernet performance. I have seen some that work VERY well. Of course the basic units such as The Pegasus II unit I have here is only USB 1.x , and it does suffer from some of what you mention.

Mind recommending any usb 2.0=>Ethernet models with some measured specs (self-latency/jitter, external latency/jitter, best if measured differentially)?
My experience is decent-to-good throughput (60-85% of theoretical max 12.5MB/s), but unfortunately avg. latency 10x higher and jitter 30x higher than vanilla 100M

I know this well, believbe me I have my reasons for knowing specifically about jitter and latency.

all the more curious! I did work with real-time systems for entertainment, what's your angle?

bifferos
Could you post some Bifferboard OpenWRT benchmarks (or links if posted before), some suggestions:
- openssl ( http://oldwiki.openwrt.org/OpenWrtDocs( … enSSL.html )
- nbench ( http://forum.openwrt.org/viewtopic.php?id=5526 )
- time (i=0; while [ $i -lt 100000 ]; do let i=i+1; done)
- ssh-keygen -N "" -t dsa; cd ~/.ssh/; cp -i id_dsa.pub authorized_keys; chmod 600 authorized_keys
     (generate self-trusted ssh key, then ssh into itself with null shell command ":")
   time (i=0; while [ $i -lt 1000 ]; do let i=i+1; ssh 127.0.0.1 : ; done)
- the series "fping -p X -r 0 -c 10000 -q -s 127.0.0.1"
      where X=1,2,5,10,20,50,100,200,500,1000
- same ping series with with -b 1460, -b 9000, -b 14600, -b 64000
- same against a fast external box instead of 127.0.0.1, over a crossover cable

That would give us a nice data matrix!

The discussion might have continued from here.