Chinaunix首页 | 论坛 | 博客
  • 博客访问: 463395
  • 博文数量: 153
  • 博客积分: 3010
  • 博客等级: 中校
  • 技术积分: 1724
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-08 11:55
文章分类

全部博文(153)

文章存档

2011年(1)

2010年(55)

2009年(88)

2008年(9)

我的朋友

分类: LINUX

2008-12-31 10:58:04


USB, as general purpose host-to-device (master-to-slave) I/O bus protocol, can easily carry network traffic, multiplexing it along with all the other bus traffic. This can be done directly, or with one of the many widely available USB-to-network adapter products for networks like Ethernet, ATM, DSL, POTS, ISDN, and cable TV. There are several USB class standards for such adapters, and many proprietary approaches too.

This web page describes how to use the Linux usbnet driver, CONFIG_USB_USBNET in most Linux 2.4 (or later) kernels. This driver originally (2.4.early) focussed only on supporting less conventional types of USB networking devices. In current Linux it's now a generalized core, supporting several kinds of network devices running under Linux with "minidrivers", which are separate modules that can be as small as a pair of static data tables.

  • One type is a . Those are good to understand, since some other devices described here need to be administered like those cables; Linux is a useful tool to make those two-node networks more manageable, and Windows XP includes this functionality too.
  • , and other embedded systems like DOCSIS cable modems, are much the same. They act as Hosts in the networking sense while they are "devices" in the USB sense, so they behave like the other end of a host-to-host cable. All that's needed is the USB-IF Communications Device Class (CDC) "Ethernet" class, or a simplified variant if the hardware can't implement CDC to spec. (Unless you listen to Microsoft, who will tell you not to use such vendor-neutral protocols. They think a complex and poorly documented protocol they defined, RNDIS, is better for them.)
  • Traditional such as the high-speed (USB 2.0) ASIX 8817x based products.

It makes sense to have a common driver core because only a handful of control and setup operations really need product- or class-specific code. Most of the driver handles i/o queues and USB faults, which can easily be product-neutral. And for some reason, vendors seem to dislike using standard framing in their Windows drivers, so many minidrivers need to wrap a technically-unnecessary layer of headers around Ethernet packets for better interoperability.

Another approach to using IP over USB is to make the device look like a serial line or telecommunications modem, and then run PPP over those protocols. This document doesn't address those approaches, used sometimes with USB drivers such as cdc_acm, usb-serial, and with adapters to IRDA or BlueTooth stacks.


Details about usbnet mechanism, chipset, cable, drivers, connecting with XP, etc. on

阅读(1140) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~