OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [io/] [usb/] [eth/] [slave/] [v2_0/] [doc/] [usbseth-intro.html] - Diff between revs 27 and 174

Only display areas with differences | Details | Blame | View Log

Rev 27 Rev 174
<!-- Copyright (C) 2001 Red Hat, Inc.                                -->
<!-- Copyright (C) 2001 Red Hat, Inc.                                -->
<!-- This material may be distributed only subject to the terms      -->
<!-- This material may be distributed only subject to the terms      -->
<!-- and conditions set forth in the Open Publication License, v1.0  -->
<!-- and conditions set forth in the Open Publication License, v1.0  -->
<!-- or later (the latest version is presently available at          -->
<!-- or later (the latest version is presently available at          -->
<!-- http://www.opencontent.org/openpub/).                           -->
<!-- http://www.opencontent.org/openpub/).                           -->
<!-- Distribution of substantively modified versions of this         -->
<!-- Distribution of substantively modified versions of this         -->
<!-- document is prohibited without the explicit permission of the   -->
<!-- document is prohibited without the explicit permission of the   -->
<!-- copyright holder.                                               -->
<!-- copyright holder.                                               -->
<!-- Distribution of the work or derivative of the work in any       -->
<!-- Distribution of the work or derivative of the work in any       -->
<!-- standard (paper) book form is prohibited unless prior           -->
<!-- standard (paper) book form is prohibited unless prior           -->
<!-- permission is obtained from the copyright holder.               -->
<!-- permission is obtained from the copyright holder.               -->
<HTML
<HTML
><HEAD
><HEAD
><TITLE
><TITLE
>Introduction</TITLE
>Introduction</TITLE
><META
><META
NAME="GENERATOR"
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.64
CONTENT="Modular DocBook HTML Stylesheet Version 1.64
"><LINK
"><LINK
REL="HOME"
REL="HOME"
TITLE="eCos Support for Developing USB-ethernet Peripherals"
TITLE="eCos Support for Developing USB-ethernet Peripherals"
HREF="io-usb-slave-eth.html"><LINK
HREF="io-usb-slave-eth.html"><LINK
REL="PREVIOUS"
REL="PREVIOUS"
TITLE="eCos Support for Developing USB-ethernet Peripherals"
TITLE="eCos Support for Developing USB-ethernet Peripherals"
HREF="io-usb-slave-eth.html"><LINK
HREF="io-usb-slave-eth.html"><LINK
REL="NEXT"
REL="NEXT"
TITLE="Initializing the USB-ethernet Package"
TITLE="Initializing the USB-ethernet Package"
HREF="usbseth-init.html"></HEAD
HREF="usbseth-init.html"></HEAD
><BODY
><BODY
CLASS="REFENTRY"
CLASS="REFENTRY"
BGCOLOR="#FFFFFF"
BGCOLOR="#FFFFFF"
TEXT="#000000"
TEXT="#000000"
LINK="#0000FF"
LINK="#0000FF"
VLINK="#840084"
VLINK="#840084"
ALINK="#0000FF"
ALINK="#0000FF"
><DIV
><DIV
CLASS="NAVHEADER"
CLASS="NAVHEADER"
><TABLE
><TABLE
WIDTH="100%"
WIDTH="100%"
BORDER="0"
BORDER="0"
CELLPADDING="0"
CELLPADDING="0"
CELLSPACING="0"
CELLSPACING="0"
><TR
><TR
><TH
><TH
COLSPAN="3"
COLSPAN="3"
ALIGN="center"
ALIGN="center"
>eCos Support for Developing USB-ethernet Peripherals</TH
>eCos Support for Developing USB-ethernet Peripherals</TH
></TR
></TR
><TR
><TR
><TD
><TD
WIDTH="10%"
WIDTH="10%"
ALIGN="left"
ALIGN="left"
VALIGN="bottom"
VALIGN="bottom"
><A
><A
HREF="io-usb-slave-eth.html"
HREF="io-usb-slave-eth.html"
>Prev</A
>Prev</A
></TD
></TD
><TD
><TD
WIDTH="80%"
WIDTH="80%"
ALIGN="center"
ALIGN="center"
VALIGN="bottom"
VALIGN="bottom"
></TD
></TD
><TD
><TD
WIDTH="10%"
WIDTH="10%"
ALIGN="right"
ALIGN="right"
VALIGN="bottom"
VALIGN="bottom"
><A
><A
HREF="usbseth-init.html"
HREF="usbseth-init.html"
>Next</A
>Next</A
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><HR
><HR
ALIGN="LEFT"
ALIGN="LEFT"
WIDTH="100%"></DIV
WIDTH="100%"></DIV
><H1
><H1
><A
><A
NAME="USBSETH-INTRO"
NAME="USBSETH-INTRO"
>Introduction</A
>Introduction</A
></H1
></H1
><DIV
><DIV
CLASS="REFNAMEDIV"
CLASS="REFNAMEDIV"
><A
><A
NAME="AEN6"
NAME="AEN6"
></A
></A
><H2
><H2
>Name</H2
>Name</H2
>Introduction&nbsp;--&nbsp;eCos support for developing USB ethernet peripherals</DIV
>Introduction&nbsp;--&nbsp;eCos support for developing USB ethernet peripherals</DIV
><DIV
><DIV
CLASS="REFSECT1"
CLASS="REFSECT1"
><A
><A
NAME="AEN9"
NAME="AEN9"
></A
></A
><H2
><H2
>Introduction</H2
>Introduction</H2
><P
><P
>The eCos USB-ethernet package provides additional support for USB
>The eCos USB-ethernet package provides additional support for USB
peripherals that involve some sort of ethernet-style network. This can
peripherals that involve some sort of ethernet-style network. This can
be a traditional ethernet, or it can involve some other networking
be a traditional ethernet, or it can involve some other networking
technology that uses ethernet frames as a unit of transfer. It
technology that uses ethernet frames as a unit of transfer. It
provides functions to transfer ethernet frames over the USB bus,
provides functions to transfer ethernet frames over the USB bus,
handles certain control messages from the host, and optionally it can
handles certain control messages from the host, and optionally it can
provide a network device driver for use by the eCos TCP/IP stack.
provide a network device driver for use by the eCos TCP/IP stack.
The package comes with an example host-side device driver.</P
The package comes with an example host-side device driver.</P
><P
><P
>The USB-ethernet package is not tied to any specific hardware. It
>The USB-ethernet package is not tied to any specific hardware. It
requires the presence of USB hardware and a suitable device driver,
requires the presence of USB hardware and a suitable device driver,
but not all USB peripherals involve ethernet communications. Hence the
but not all USB peripherals involve ethernet communications. Hence the
configuration system cannot load the package automatically for
configuration system cannot load the package automatically for
specific targets, in the way that a USB device driver or an ethernet
specific targets, in the way that a USB device driver or an ethernet
driver can be loaded automatically. Instead, the package has to be
driver can be loaded automatically. Instead, the package has to be
added explicitly. When using the command line tools this will involve
added explicitly. When using the command line tools this will involve
an operation like the following:</P
an operation like the following:</P
><TABLE
><TABLE
BORDER="0"
BORDER="0"
BGCOLOR="#E0E0E0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
WIDTH="100%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="SCREEN"
CLASS="SCREEN"
>$ ecosconfig add usbs_eth</PRE
>$ ecosconfig add usbs_eth</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>Typically, this will automatically cause the USB device driver to
>Typically, this will automatically cause the USB device driver to
become active. Loading the USB-ethernet package automatically provides
become active. Loading the USB-ethernet package automatically provides
functionality for <A
functionality for <A
HREF="usbseth-init.html"
HREF="usbseth-init.html"
>initialization</A
>initialization</A
>,
>,
<A
<A
HREF="usbseth-data.html"
HREF="usbseth-data.html"
>data transfer</A
>data transfer</A
>, and the handling of
>, and the handling of
<A
<A
HREF="usbseth-control.html"
HREF="usbseth-control.html"
>control messages</A
>control messages</A
> and state
> and state
changes. If the current configuration includes the eCos TCP/IP stack
changes. If the current configuration includes the eCos TCP/IP stack
then the <A
then the <A
HREF="usbseth-netdev.html"
HREF="usbseth-netdev.html"
>network device driver</A
>network device driver</A
>
>
support will be enabled as well by default, allowing the stack to
support will be enabled as well by default, allowing the stack to
exchange ethernet frames over the USB bus.</P
exchange ethernet frames over the USB bus.</P
><P
><P
>There is a USB standard for a class of communication devices including
>There is a USB standard for a class of communication devices including
ethernet. The package does not implement this standard, due to
ethernet. The package does not implement this standard, due to
limitations in the hardware for which the package was first developed.
limitations in the hardware for which the package was first developed.
Instead, the package uses its own <A
Instead, the package uses its own <A
HREF="usbseth-protocol.html"
HREF="usbseth-protocol.html"
>protocol</A
>protocol</A
> between USB
> between USB
<A
<A
HREF="usbseth-host.html"
HREF="usbseth-host.html"
>host device driver</A
>host device driver</A
> and the
> and the
peripheral. </P
peripheral. </P
></DIV
></DIV
><DIV
><DIV
CLASS="REFSECT1"
CLASS="REFSECT1"
><A
><A
NAME="AEN22"
NAME="AEN22"
></A
></A
><H2
><H2
>Usage Scenarios</H2
>Usage Scenarios</H2
><P
><P
>The USB-ethernet package can be used several different scenarios. In
>The USB-ethernet package can be used several different scenarios. In
a simple scenario, the peripheral serves only to connect the USB host
a simple scenario, the peripheral serves only to connect the USB host
to a suitable network:</P
to a suitable network:</P
><DIV
><DIV
CLASS="INFORMALFIGURE"
CLASS="INFORMALFIGURE"
><A
><A
NAME="AEN25"
NAME="AEN25"
></A
></A
><P
><P
></P
></P
><DIV
><DIV
CLASS="MEDIAOBJECT"
CLASS="MEDIAOBJECT"
><P
><P
><IMG
><IMG
SRC="simple.gif"
SRC="simple.gif"
></IMG
></IMG
></P
></P
></DIV
></DIV
><P
><P
></P
></P
></DIV
></DIV
><P
><P
>After initialization, and once the USB connection between host and
>After initialization, and once the USB connection between host and
peripheral has been established, higher-level code needs to detect
peripheral has been established, higher-level code needs to detect
packets that are intended for the host, and to forward these. This can
packets that are intended for the host, and to forward these. This can
be achieved by the low-level <TT
be achieved by the low-level <TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>usbs_eth_start_tx</TT
>usbs_eth_start_tx</TT
>
>
function. Similarly, higher-level code needs to detect packets coming
function. Similarly, higher-level code needs to detect packets coming
from the host, using <TT
from the host, using <TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>usbs_eth_start_rx</TT
>usbs_eth_start_rx</TT
>, and to
>, and to
forward these using the real network. As far as the host is concerned
forward these using the real network. As far as the host is concerned
it is connected directly to the network. In this scenario there is no
it is connected directly to the network. In this scenario there is no
confusion about addresses: there is a single MAC address for the
confusion about addresses: there is a single MAC address for the
host/peripheral combination, corresponding to the connection to the
host/peripheral combination, corresponding to the connection to the
real network, and it is this address which should be supplied during
real network, and it is this address which should be supplied during
<A
<A
HREF="usbseth-init.html"
HREF="usbseth-init.html"
>initialization</A
>initialization</A
>.</P
>.</P
><P
><P
>In a more complicated scenario, there is a TCP/IP stack running inside
>In a more complicated scenario, there is a TCP/IP stack running inside
the peripheral.</P
the peripheral.</P
><DIV
><DIV
CLASS="INFORMALFIGURE"
CLASS="INFORMALFIGURE"
><A
><A
NAME="AEN36"
NAME="AEN36"
></A
></A
><P
><P
></P
></P
><DIV
><DIV
CLASS="MEDIAOBJECT"
CLASS="MEDIAOBJECT"
><P
><P
><IMG
><IMG
SRC="tcpip.gif"
SRC="tcpip.gif"
></IMG
></IMG
></P
></P
></DIV
></DIV
><P
><P
></P
></P
></DIV
></DIV
><P
><P
>This involves the USB-ethernet package providing a service both to the
>This involves the USB-ethernet package providing a service both to the
host and to the eCos TCP/IP stack. It achieves the latter by acting as
host and to the eCos TCP/IP stack. It achieves the latter by acting as
an eCos network device. Typically, the TCP/IP stack will be configured
an eCos network device. Typically, the TCP/IP stack will be configured
to act as a network bridge. The USB peripheral needs to examine the
to act as a network bridge. The USB peripheral needs to examine the
packets arriving over the real network. Some of these packets will be
packets arriving over the real network. Some of these packets will be
intended for the host, while others will be intended for the
intended for the host, while others will be intended for the
peripheral itself. To distinguish between these two scenarios, two
peripheral itself. To distinguish between these two scenarios, two
distinct MAC addresses are needed: one for the host, and one for the
distinct MAC addresses are needed: one for the host, and one for the
peripheral. Similarly, packets sent by the host may have to be
peripheral. Similarly, packets sent by the host may have to be
forwarded via the real network, or they may be intended for the TCP/IP
forwarded via the real network, or they may be intended for the TCP/IP
stack inside the peripheral. Packets generated inside the peripheral's
stack inside the peripheral. Packets generated inside the peripheral's
TCP/IP stack may need to be sent via the real network or over the USB
TCP/IP stack may need to be sent via the real network or over the USB
bus. The network bridge software will have to take care of all these
bus. The network bridge software will have to take care of all these
possibilities. Unusually for a network bridge, one of the network
possibilities. Unusually for a network bridge, one of the network
segments being bridged will only ever have one machine attached.</P
segments being bridged will only ever have one machine attached.</P
><P
><P
>There are other possible usage scenarios. For example, the peripheral
>There are other possible usage scenarios. For example, the peripheral
might not be attached to a real network at all. Instead it could be
might not be attached to a real network at all. Instead it could be
the USB host that acts as a network bridge, allowing a TCP/IP stack
the USB host that acts as a network bridge, allowing a TCP/IP stack
inside the peripheral to communicate with the outside world. The
inside the peripheral to communicate with the outside world. The
various details will depend on the exact type of peripheral being
various details will depend on the exact type of peripheral being
developed. </P
developed. </P
></DIV
></DIV
><DIV
><DIV
CLASS="NAVFOOTER"
CLASS="NAVFOOTER"
><HR
><HR
ALIGN="LEFT"
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"><TABLE
WIDTH="100%"
WIDTH="100%"
BORDER="0"
BORDER="0"
CELLPADDING="0"
CELLPADDING="0"
CELLSPACING="0"
CELLSPACING="0"
><TR
><TR
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="left"
ALIGN="left"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="io-usb-slave-eth.html"
HREF="io-usb-slave-eth.html"
>Prev</A
>Prev</A
></TD
></TD
><TD
><TD
WIDTH="34%"
WIDTH="34%"
ALIGN="center"
ALIGN="center"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="io-usb-slave-eth.html"
HREF="io-usb-slave-eth.html"
>Home</A
>Home</A
></TD
></TD
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="right"
ALIGN="right"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="usbseth-init.html"
HREF="usbseth-init.html"
>Next</A
>Next</A
></TD
></TD
></TR
></TR
><TR
><TR
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="left"
ALIGN="left"
VALIGN="top"
VALIGN="top"
>eCos Support for Developing USB-ethernet Peripherals</TD
>eCos Support for Developing USB-ethernet Peripherals</TD
><TD
><TD
WIDTH="34%"
WIDTH="34%"
ALIGN="center"
ALIGN="center"
VALIGN="top"
VALIGN="top"
>&nbsp;</TD
>&nbsp;</TD
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="right"
ALIGN="right"
VALIGN="top"
VALIGN="top"
>Initializing the USB-ethernet Package</TD
>Initializing the USB-ethernet Package</TD
></TR
></TR
></TABLE
></TABLE
></DIV
></DIV
></BODY
></BODY
></HTML
></HTML
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.