Application Note: AN00131 USB CDC-ECM Class for Ethernet over USB
|
|
|
- Bethany Eustacia Henderson
- 9 years ago
- Views:
Transcription
1 Application Note: AN00131 USB CDC-ECM Class for Ethernet over USB This application note shows how to create a USB device compliant to the standard USB Communications Device Class (CDC) and the Ethernet Control Model (ECM) Subclass on an XMOS multicore microcontroller. The code associated with this application note provides an example of using the XMOS USB Device Library (XUD) and associated USB class descriptors to provide a framework for the creation of a USB device emulating Ethernet. This example USB CDC-ECM implementation provides an emulated Ethernet interface running over high speed USB. It supports the standard requests associated with ECM model of the USB CDC specification. The demo application handles the Ethernet frames received from the USB endpoitns and hosts a HTTP web server acting as another virtual network device. A standard web browser from host PC can open the web page served from the USB device. The web page provides a statistics of different packets like ICMP, TCP, UDP etc received through the Ethernet frames from the host PC. This demonstrates a simple way in which Ethernet over USB applications can easily be deployed using an xcore-usb device. The demo application code can be extended to bridge an actual Ethernet interface by adding MAC and MII software layers. This enables you to create USB to Ethernet Adaptors using xcore-usb device. Note: This application note provides a standard USB CDC-ECM class device and as a result does not require external drivers to run on Linux and Mac. Windows doesn t support USB ECM model natively and thus requires third party drivers. Required tools and libraries xtimecomposer Tools - Version XMOS USB library - Version Required hardware This application note is designed to run on an XMOS xcore-usb series device. The example code provided with the application has been implemented and tested on the xcore-usb slicekit (XK-SK-U16-ST) but there is no dependancy on this board and it can be modified to run on any development board which uses an xcore-usb series device. Prerequisites This document assumes familiarity with the XMOS xcore architecture, the Universal Serial Bus 2.0 Specification and related specifications, the XMOS tool chain and the xc language. Documentation related to these aspects which are not specific to this application note are linked to in the references appendix. For descriptions of XMOS related terms found in this document please see the XMOS Glossary 1. For the full API listing of the XMOS USB Device (XUD) Library please see the document XMOS USB Device (XUD) Library 2. For information on designing USB devices using the XUD library please see the XMOS USB Device Design Guide for reference Copyright 2016 XMOS Ltd. 1
2 1 Overview 1.1 Introduction USB Communications Class is a USB standard that defines mechanism for connecting Networking devices to host machines. USB CDC has specified multiple Subclass standards to support different networking devices. For Ethernet-style networking over USB, one of the following Subclass specifications is used: 1. Ethernet Control Model (ECM). 2. Ethernet Emulation Model (EEM). 3. Network Control Model (NCM). Microsoft s RNDIS is also a famous Ethernet over USB standard that is not only supported in Windows but also in other OS platorms through thrid party drivers. Ethernet over USB provides the following advantages: Application independent exchange of data over USB. Leverage the networking protocol stack present in operating systems. Abstraction for USB application developers at network level like sockets, HTTP (web pages) etc. USB-to-Ethernet Adaptors etc. In this application note, the USB CDC-ECM class is chosen for the implementation of Ethernet emulation of USB device and it is discussed in detail which will help you to develop your own USB CDC-ECM product using xcore-usb device or acts as a reference to implement other Ethernet supporting subclass on xcore- USB device. The standard USB CDC-ECM class is specified in a document ECM 120.pdf which can be found in the USB-IF website. ( 1.2 Block diagram XMOS XS1-U6A-64 Ethernet PHY XMOS XS1-U6A-64 USB-to-Ethernet Adapter Router Webserver on USB Device Application 1 Application 2 (Discussed in this App note) Figure 1: Block diagram of USB CDC-ECM applications Copyright 2016 XMOS Ltd. 2
3 2 USB CDC-ECM Class application note The example in this application note uses the XMOS USB device library and shows a simple program that enumerates a USB CDC-ECM Class device. The host side driver of this device will emulate an Ethernet interface that seamlessly connects with the network stack of host s operating system. The USB device runs a very simple web server and acts like another device on Ethernet network i.e. the USB device imitates a network interface card of the host machine and a server connected to the host machine through Ethernet network. For this USB CDC-ECM device application example, the system comprises four tasks running on separate logical cores of an xcore-usb multicore microcontroller. The tasks perform the following operations. A task containing the USB library functionality to communicate over USB. A task implementing Endpoint0 responding to both standard and CDC-ECM class-specific USB requests. A task implementing the data endpoints and notification endpoint of the CDC-ECM class. It handles tx and rx buffers and provides APIs for applications to receive and transmit Ethernet frames. A task containing Ethernet frame handler and simple HTTP server. These tasks communicate via the use of xconnect channels which allow data to be passed between application code running on separate logical cores. In this example, XC interfaces are used, which abstracts out the channel communication details with function level interface. The following diagram shows the task and communication structure for this USB CDC-ECM class application example. c_ep_out[0] c_ep_in[0] Endpoint 0 Handler USB USB PHY I/O XUD Manager c_ep_out[1] c_ep_in[1] c_ep_in[2] CDC-ECM Endpoints Handler usb_cdc_ecm_if Ethernet Frames Handler XS1-U8A-64 Figure 2: Task diagram of the USB CDC-ECM example Copyright 2016 XMOS Ltd. 3
4 2.1 Makefile additions for this example To start using the USB library, you need to add lib_usb to your makefile: USED_MODULES =... lib_usb... You can then access the USB functions in your source code via the usb.h header file: #include <usb.h> 2.2 Source code files The example application consists of several source code files and the following list provides an overview of how the source code is organized. xud_ecm.xc, xud_ecm.h - Contains the USB CDC-ECM implementation which includes the USB descriptors, endpoints handler tasks (functions), class-specific defines, xc interface to read/write Ethernet frames. main.xc - Contains main() function and some USB defines. packet_buffer.xc, queue.xc - Buffer implementation to hold Ethernet frames (Max of 1514 bytes) and to allocate and deallocate dynamically from buffer pool. Queue implementation to queue up the tx and rx frame buffers in a FIFO fashion. ethernet.xc - Contains implementation of application handling the Ethernet frames and upper layer protocols like ICMP, DNS etc eth_tcp - This folder has TCP/IP and HTTP server implementation source files. Note: This is not a complete TCP/IP stack. 2.3 Declaring resource and setting up the USB components main.xc has some defines in it that are used to configure the XMOS USB device library. These are displayed below. /* USB Endpoint Defines */ #define XUD_EP_COUNT_OUT 2 //Includes EP0 (1 OUT EP0 + 1 BULK OUT EP) #define XUD_EP_COUNT_IN 3 //Includes EP0 (1 IN EP0 + 1 INTERRUPT IN EP + 1 BULK IN EP) The above set of defines describe the endpoints configuration for this device. This example has bidirectional communication with the host machine via the standard endpoint0 and three other endpoints for implementing the part of our CDC-ECM class. All these defines are passed to the setup function for the USB library which is called from main(). 2.4 The application main() function Below is the source code for the main function of this application, which is taken from the source file main.xc Copyright 2016 XMOS Ltd. 4
5 int main() chan c_ep_out[xud_ep_count_out], c_ep_in[xud_ep_count_in]; interface usb_cdc_ecm_if cdc_ecm; /* 'Par' statement to run the following tasks in parallel */ par on USB_TILE: xud(c_ep_out, XUD_EP_COUNT_OUT, c_ep_in, XUD_EP_COUNT_IN, null, XUD_SPEED_HS, XUD_PWR_SELF); on USB_TILE: Endpoint0(c_ep_out[0], c_ep_in[0]); on USB_TILE: CdcEcmEndpointsHandler(c_ep_in[1], c_ep_out[1], c_ep_in[2], cdc_ecm); on USB_TILE: EthernetFrameHandler(cdc_ecm); return 0; Looking at this in a more detail you can see the following: The par statement starts four separate tasks in parallel. There is a task to configure and execute the USB library: xud(). This library call runs in an infinite loop and handles all the underlying USB communications and provides abstraction at the endpoints level. There is a task to startup and run the Endpoint0 code: Endpoint0(). It handles the control endpoint zero and must be run in a separate logical core inorder to promptly respond to the control requests from host. There is a task to handle all the other three endpoints required for the CDC-ECM class: CdcEcmEnpointsHandler(). This function handles one bulk OUT and one bulk IN endpoints for Ethernet frame transmissions and one interrupt IN endpoint for sending notifications to host. There is a task to handle the Ethernet frames received from the host: EthernetFrameHandler(). This task implements network stack and hosts the HTTP server. It also handles DNS queries, DHCP requests and ICMP pings. The define USB_TILE describes the tile on which the individual tasks will run. In this example all tasks run on the same tile as the USB PHY although this is only a requirement of xud(). The xconnect communication channels and the xc interface cdc_ecm used for inter-task communication are setup at the beginning of main() and passed on to respective tasks. The USB defines discussed earlier are passed into the function xud(). Copyright 2016 XMOS Ltd. 5
6 2.5 Configuring the USB Device ID The USB ID values used for vendor ID, product ID and device version number are defined in the file xud_ecm.xc. These are used by the host machine to determine the vendor of the device (in this case XMOS) and the product plus the firmware version. /* USB CDC device product defines */ #define BCD_DEVICE 0x0100 #define VENDOR_ID 0x20B1 #define PRODUCT_ID 0x0402 Copyright 2016 XMOS Ltd. 6
7 2.6 USB Descriptors USB CDC class device has to support class-specific descriptors apart from the standard descriptors defined in the USB specifications. These class specific descriptors are customized according to the need of the USB CDC device. In the example application code, the descriptors implement the ECM model of the CDC class to support Ethernet emulation at the host machine. The following figure shows the descriptors used in the example code. Device - Supported USB version, Device version, - Max packet size of control endpoint, - Product & Vendor IDs, - Manufacturer, Product name, Serial number - Device class (USB CDC), Configuration - Number of interfaces, - Device power requirements, - Configuration identification. Communication Interface - Interface class (CDC communications), - Subclass (Ethernet Control Model), - No Interface protocol, - Number of endpoints (One). Data Interface - Interface class (CDC Data) - No subclass and protocol, - Number of endpoints (Two). Header Functional - Supported CDC version (1.1). Data OUT Endpoint - Bulk OUT endpoint, - Max packet size (512 bytes) Union Functional - Union of interfaces, - Master interface and Subordinate interface numbers. Data IN Endpoint - Bulk IN endpoint. - Max packet size (512 bytes). Ethernet Networking Functional - MAC ID index, - Supported Ethernet statistics, - Maximum Segment (Frame) size, - Number of Multicast filters, - Number of Power filters (for Wake-up) Notification Endpoint - Interrupt IN endpoint, - Polling interval (255) - Max packet size (64 bytes) Figure 3: USB descriptors hierarchical structure of CDC-ECM example Copyright 2016 XMOS Ltd. 7
8 2.6.1 USB Device Descriptor xud_ecm.xc is where the standard USB device descriptor is declared for the CDC-ECM class device. Below is the structure which contains this descriptor. This will be requested by the host when the device is enumerated on the USB bus. /* USB Device Descriptor */ static unsigned char devdesc[] = 0x12, /* 0 blength */ USB_DESCTYPE_DEVICE, /* 1 bdescriptortype - Device*/ 0x00, /* 2 bcdusb version */ 0x02, /* 3 bcdusb version */ USB_CLASS_COMMUNICATIONS,/* 4 bdeviceclass - USB CDC Class */ 0x00, /* 5 bdevicesubclass - Specified by interface */ 0x00, /* 6 bdeviceprotocol - Specified by interface */ 0x40, /* 7 bmaxpacketsize for EP0 - max = 64*/ (VENDOR_ID & 0xFF), /* 8 idvendor */ (VENDOR_ID >> 8), /* 9 idvendor */ (PRODUCT_ID & 0xFF), /* 10 idproduct */ (PRODUCT_ID >> 8), /* 11 idproduct */ (BCD_DEVICE & 0xFF), /* 12 bcddevice */ (BCD_DEVICE >> 8), /* 13 bcddevice */ 0x01, /* 14 imanufacturer - index of string*/ 0x02, /* 15 iproduct - index of string*/ 0x00, /* 16 iserialnumber - index of string*/ 0x01 /* 17 bnumconfigurations */ ; From this descriptor you can see that product, vendor and device firmware revision are all coded into this structure. This will allow the host machine to recognise the CDC device when it is connected to the USB bus. Copyright 2016 XMOS Ltd. 8
9 2.6.2 USB Configuration Descriptor The USB configuration descriptor is used to configure the device in terms of the device class and the endpoints setup. The hierarchy of descriptors under a configuration includes interfaces descriptors, class-specific descriptors and endpoints descriptors. when a host requests a configuration descriptor, the entire configuration hierarchy including all the related descriptors are returned to the host. The following code shows the configuration hierarchy of the demo application. /* USB Configuration Descriptor */ static unsigned char cfgdesc[] = 0x09, /* 0 blength */ USB_DESCTYPE_CONFIGURATION, /* 1 bdescriptortype - Configuration*/ 0x47,00, /* 2 wtotallength */ 0x02, /* 4 bnuminterfaces */ 0x01, /* 5 bconfigurationvalue */ 0x04, /* 6 iconfiguration - index of string */ 0x80, /* 7 bmattributes - Bus powered */ 0xC8, /* 8 bmaxpower - 400mA */ /* CDC Communication interface */ 0x09, /* 0 blength */ USB_DESCTYPE_INTERFACE, /* 1 bdescriptortype - Interface */ 0x00, /* 2 binterfacenumber - Interface 0 */ 0x00, /* 3 balternatesetting */ 0x01, /* 4 bnumendpoints */ USB_CLASS_COMMUNICATIONS, /* 5 binterfaceclass */ USB_CDC_ECM_SUBCLASS, /* 6 binterfacesubclass - Ethernet Control Model */ 0x00, /* 7 binterfaceprotocol - No specific protocol */ 0x00, /* 8 iinterface - No string descriptor */ /* Header Functional descriptor */ 0x05, /* 0 blength */ USB_DESCTYPE_CS_INTERFACE, /* 1 bdescriptortype, CS_INTERFACE */ 0x00, /* 2 bdescriptorsubtype, HEADER */ 0x10, 0x01, /* 3 bcdcdc */ /* Union Functional descriptor */ 0x05, /* 0 blength */ USB_DESCTYPE_CS_INTERFACE,/* 1 bdescriptortype, CS_INTERFACE */ 0x06, /* 2 bdescriptorsubtype, UNION */ 0x00, /* 3 bcontrolinterface - Interface 0 */ 0x01, /* 4 bsubordinateinterface0 - Interface 1 */ /* Ethernet Networking Functional descriptor */ 0x0D, /* 0 blength - 13 bytes */ USB_DESCTYPE_CS_INTERFACE,/* 1 bdescriptortype, CS_INTERFACE */ 0x0F, /* 2 bdescriptorsubtype, ETHERNET NETWORKING */ 0x03, /* 3 imacaddress, Index of MAC address string */ 0x00,0x00,0x00,0x00, /* 4 bmethernetstatistics - Handles None */ 0xEA,05, /* 8 wmaxsegmentsize bytes */ 0x00,0x00, /* 10 wnumbermcfilters - No multicast filters */ 0x00, /* 12 bnumberpowerfilters - No wake-up feature */ /* Notification Endpoint descriptor */ 0x07, /* 0 blength */ USB_DESCTYPE_ENDPOINT, /* 1 bdescriptortype */ (CDC_NOTIFICATION_EP_NUM 0x80),/* 2 bendpointaddress - IN endpoint*/ 0x03, /* 3 bmattributes - Interrupt type */ 0x40, /* 4 wmaxpacketsize - Low */ 0x00, /* 5 wmaxpacketsize - High */ 0xFF, /* 6 binterval */ /* CDC Data interface */ 0x09, /* 0 blength */ USB_DESCTYPE_INTERFACE, /* 1 bdescriptortype */ 0x01, /* 2 binterfacecnumber */ 0x00, /* 3 balternatesetting */ 0x02, /* 4 bnumendpoints */ USB_CLASS_CDC_DATA, /* 5 binterfaceclass */ 0x00, /* 6 binterfacesubclass */ Copyright 2016 XMOS Ltd. 9
10 0x00, /* 7 binterfaceprotocol*/ 0x00, /* 8 iinterface - No string descriptor*/ /* Data OUT Endpoint descriptor */ 0x07, /* 0 blength */ USB_DESCTYPE_ENDPOINT, /* 1 bdescriptortype */ CDC_DATA_RX_EP_NUM, /* 2 bendpointaddress - OUT endpoint */ 0x02, /* 3 bmattributes - Bulk type */ 0x00, /* 4 wmaxpacketsize - Low */ 0x02, /* 5 wmaxpacketsize - High */ 0x00, /* 6 binterval */ /* Data IN Endpoint descriptor */ 0x07, /* 0 blength */ USB_DESCTYPE_ENDPOINT, /* 1 bdescriptortype */ (CDC_DATA_TX_EP_NUM 0x80),/* 2 bendpointaddress - IN endpoint */ 0x02, /* 3 bmattributes - Bulk type */ 0x00, /* 4 wmaxpacketsize - Low byte */ 0x02, /* 5 wmaxpacketsize - High byte */ 0x01 /* 6 binterval */ ; The configuration descriptor tells host about the power requirements of the device and the number of interfaces it supports. The interface descriptors describe on how the host should communicate with the device in the class level. There are two interface descriptors in a USB CDC-ECM device. The CDC Communication interface descriptor is for device management. You can see from the code that the device uses Etherner Control Model as the interface subclass, this will make hosts to load default driver for CDC Ethernet. This interface has subordinate descriptors like CDC functional descriptors and a notification endpoint descriptor. The class-specific functional descriptors are discussed in detail in the next section. The notification endpoint is an interrupt IN endpoint and is used to report device s network connection state to the host. This endpoint is not used in this example application but will be employed when bridging an Ethernet interface to the USB-ECM device. The CDC Data interface descriptor defines the interface for Ethernet frames transmission and reception between host and device. This interface has two endpoints, one bulk OUT endpoint for data transmissions from host to device and one bulk IN endpoint for data transmissions from device to host. /* String table - unsafe as accessed via shared memory */ static char * unsafe stringdescriptors[]= The above code from the endpoint descriptors shows that the maximum packet size of these endpoints to be 512 bytes (0x200) which is suited for handling Ethernet frames in less number of transactions. Copyright 2016 XMOS Ltd. 10
11 2.6.3 USB CDC-ECM Functional Descriptors Functional descriptors describe the content of class-specific information within the Communication Class interface. The USB_DESCTYPE_CS_INTERFACE define is used in the descriptor structures to identify them. There are three functional descriptors used in this CDC-ECM example. They are: 1. Header Functional Descriptor. 2. Union Functional Descriptor. 3. Ethernet Networking Functional Descriptor. The Header and Union functional descriptors are generally used in all CDC subclasses and the Ethernet Networking functional descriptor is meant for the ECM subclass. Header functional descriptor mentions the version of the CDC specification the interface comply with and it is shown below as found in the cfgdesc[] structure. 0x00,0x00,0x00,0x00, /* 4 bmethernetstatistics - Handles None */ 0xEA,05, /* 8 wmaxsegmentsize bytes */ 0x00,0x00, /* 10 wnumbermcfilters - No multicast filters */ Note: The CDC version number (1.10) is mentioned as BCD in little endian format. Union functional descriptor groups the interfaces that forms a CDC functional unit. It specifies one of the interfaces as master to handle control messages of the unit. Following code from the CDC-ECM example shows that the the Communication Class interface 0 acts as master and the Data Class interface 1 acts as subordinate and together forming a single functional unit. 0x07, /* 0 blength */ USB_DESCTYPE_ENDPOINT, /* 1 bdescriptortype */ (CDC_NOTIFICATION_EP_NUM 0x80),/* 2 bendpointaddress - IN endpoint*/ 0x03, /* 3 bmattributes - Interrupt type */ Ethernet networking functional descriptor provides the Ethernet related capabilities and parameters to the host. Following code shows the fields of the descriptor. /* CDC Data interface */ 0x09, /* 0 blength */ USB_DESCTYPE_INTERFACE, /* 1 bdescriptortype */ 0x01, /* 2 binterfacecnumber */ 0x00, /* 3 balternatesetting */ 0x02, /* 4 bnumendpoints */ The above code shows the followings: 48-bit MAC address is provided through the string descriptor index, the string descriptor will carry the MAC address in a Unicode string format (example: A003). Ethernet statistics which the device collects. All bits are set to 0 in this example denoting that the device will not collect any Ethernet statistics. Maximum segment size of 1514 bytes for handling Ethernet frames. Ethernet multicast filters and power filters are not supported in this USB-ECM example USB String Descriptors String descriptors provide human readable information for your device and you can configure them with your USB product information. In CDC-ECM class it also provides the 48-bit MAC address of the device. The descriptors are placed in an array as shown in the below code. Copyright 2016 XMOS Ltd. 11
12 /* String table - unsafe as accessed via shared memory */ static char * unsafe stringdescriptors[]= "\x09\x04", /* Language ID string (US English) */ "XMOS", /* imanufacturer */ "XMOS USB CDC Ethernet Device",/* iproduct */ " ", /* imacaddress */ "Config", /* iconfiguration string */ ; The XMOS USB library will take care of encoding the strings into Unicode and structures the content into USB string descriptor format. Copyright 2016 XMOS Ltd. 12
13 2.7 USB Standard and Class-Specific requests In xud_ecm.xc there is a function Endpoint0() which handles all the USB control requests sent by host to control endpoint 0. USB control requests includes both standard USB requests and the CDC-ECM classspecific requests. In Endpoint0() function, a USB request is received as a setup packet by calling USB_GetSetupPacket() library function. The setup packet structure is then examined to distinguish between standard and class-specific requests. The XMOS USB library provides a function USB_StandardRequests() to handle all the standard USB requests. This function is called with setup packet and descriptors structures as shown below /* Returns XUD_RES_OKAY if handled okay, * XUD_RES_ERR if request was not handled (STALLed), * XUD_RES_RST for USB Reset */ unsafe result = USB_StandardRequests(ep0_out, ep0_in, devdesc, sizeof(devdesc), cfgdesc, sizeof(cfgdesc), null, 0, null, 0, stringdescriptors, sizeof(stringdescriptors)/sizeof(stringdescriptors[0]), sp, usbbusspeed); The CDC Communication interface uses endpoint 0 as management element and receives class-specific control requests on it. The following code shows how the ECM class-specific requests are filtered and passed to a function ControlInterfaceClassRequests() for further handling. switch(bmrequesttype) /* Direction: Device-to-host and Host-to-device * Type: Class * Recipient: Interface */ case USB_BMREQ_H2D_CLASS_INT: case USB_BMREQ_D2H_CLASS_INT: /* Inspect for CDC Communications Class interface num */ if(sp.windex == 0) /* Returns XUD_RES_OKAY if handled, * XUD_RES_ERR if not handled, * XUD_RES_RST for bus reset */ result = ControlInterfaceClassRequests(ep0_out, ep0_in, sp); break; The ControlInterfaceClassRequests() function is the place to handle all CDC-ECM requests, These requests are defined in the xud_ecm.xc as follows: /* CDC ECM Class requests Section 6.2 in CDC ECM spec */ #define SET_ETHERNET_MULTICAST_FILTERS 0x40 #define SET_ETHERNET_POWER_MANAGEMENT_PATTERN_FILTER 0x41 #define GET_ETHERNET_POWER_MANAGEMENT_PATTERN_FILTER 0x42 #define SET_ETHERNET_PACKET_FILTER 0x43 #define GET_ETHERNET_STATISTIC 0x44 /* 45h-4Fh RESERVED (future use) */ According to ECM specification, except SET_ETHERNET_PACKET_FILTER all the other requests are optional. These requests are not used in this example application but will be used when bridging an Ethernet Copyright 2016 XMOS Ltd. 13
14 interface to the USB device. In case of bridging an Ethernet interface, the Ethernet MAC software layer and PHY software layer will be employed and the MAC API functions can be directly used to perform the actions requested by the class-specific requests. 2.8 Ethernet frame handling The Data Class interface containing the bulk endpoints is used for exchanging Ethernet frames between the device and host. The Ethernet frame includes everything starting from the destination MAC address to the end of the data field, but excludes the CRC. This frame structure is shown below: Destination MAC Address (6 bytes) Source MAC Address (6 bytes) Type (2 bytes) Data ( bytes) Figure 4: Ethernet frame exchanged over the USB endpoints To handle asynchronous communication over two endpoints, events are used by means of select statements as shown in the following piece of code from CdcEcmEndpointsHandler() task. select case XUD_GetData_Select(c_epbulk_out, epbulk_out, length, result): if(result == XUD_RES_OKAY) /* Received some data */ if(length < MAX_EP_SIZE) /* USB Short packet or Zero length packet is received */ outlen += length; /* Ethernet packet is received completely */ qput(todevq, outbufid, outlen); if(qisfull(todevq)) devwaiting = 1; else outbufid = packetbufferalloc(); outlen = 0; XUD_SetReady_Out(epbulk_out, (packetbuffer[outbufid], unsigned char[])); else /* USB Full packet */ outlen += MAX_EP_SIZE; XUD_SetReady_Out(epbulk_out, (packetbuffer[outbufid], unsigned char[])+outlen); else XUD_SetReady_Out(epbulk_out, (packetbuffer[outbufid], unsigned char[])+outlen); break; case XUD_SetData_Select(c_epbulk_in, epbulk_in, result): /* USB Packet sent successfully when result is XUD_RES_OKAY */ int index = qpeek(tohostq); int bytessent = tohostq.data[index].from - inindex; inindex = tohostq.data[index].from; int bytestosend = tohostq.data[index].len - tohostq.data[index].from; if(bytestosend) if (bytestosend > MAX_EP_SIZE) /* Still Large packet, split the transfer */ bytestosend = MAX_EP_SIZE; Copyright 2016 XMOS Ltd. 14
15 XUD_SetReady_In(epbulk_in, (packetbuffer[inbufid], unsigned char[])+inindex, bytestosend); tohostq.data[index].from += bytestosend; else if (bytessent == MAX_EP_SIZE) /* Send a Zero Length Packet to indicate completion of transfer */ XUD_SetReady_In(epbulk_in, (packetbuffer[inbufid], unsigned char[]), 0); inindex += bytessent; else /* Ethernet frame transfer is over */ packetbufferfree(tohostq.data[index].packet); /* Remove packet out of queue */ qget(tohostq); /* Check if other packet is waiting to be sent to host */ if(!qisempty(tohostq)) index = qpeek(tohostq); inbufid = tohostq.data[index].packet; inindex = tohostq.data[index].from; bytestosend = tohostq.data[index].len; if(bytestosend > MAX_EP_SIZE) bytestosend = MAX_EP_SIZE; XUD_SetReady_In(epbulk_in, (packetbuffer[inbufid], unsigned char[])+inindex, bytestosend); tohostq.data[index].from += bytestosend; else /* No packets are available to send */ hostwaiting = 1; break; When OUT endpoint receives data, an event is triggered and the XUD_GetData_Select() case is executed. Similary, when IN endpoint completes sending data to host the XUD_SetData_Select() case is executed. The maximum size of an Ethernet frame (1514 bytes) is greater than the maximum packet size (512 bytes) of the USB endpoints, therefore an Ethernet frame may be split into multiple USB packet transfers. A USB short packet notifies the end of an Ethernet frame, if the frame size is exactly a multiple of the maximum packet size of USB then a zero length packet is used to notify the end of frame. You can see from the above code that a free buffer is allocated using packetbufferalloc(), which is used to receive an Ethernet frame. Once the frame is completely received the qput() function is used to add the frame into a queue. The QUEUE_LENGTH (four) defined in queue.h determines the maximum number of ethernet frames buffered up in the queue. There is also a separate queue to handle the Ethernet frames that are transmitted to the host from the device. 2.9 Application interface The application interface is the set of functions defined as xc interface that enables application tasks to send/receive Ethernet frames over the ECM data endpoints. The API functions abstracts out all the buffering implementation details done at the endpoint level. This xc interface is declared in xud_ecm.h file as shown below. interface usb_cdc_ecm_if ; int is_frame_available(); [[guarded]] void read_frame(unsigned char buf[], REFERENCE_PARAM(unsigned, length)); [[guarded]] void send_frame(unsigned char buf[], REFERENCE_PARAM(unsigned, length)); In the above code, the read_frame() function gets an Ethernet frame which is waiting in the reception queue, Similarly, the write_frame() function adds the Ethernet frame to the transmission queue. Copyright 2016 XMOS Ltd. 15
16 These interface functions pass arguments and return values over xconnect channels and provide well defined inter-task communication. The server side of these functions are defined under select case statements in the CdcEcmEndpointsHandler() task Demo application In this USB CDC-ECM example, the Ethernet frames received from the host are handled by the Ethernet- FrameHandler() task. This application task runs a simple HTTP server acting as a virtual network device. This task performs the following: Handles DHCP requests from the host PC to provide an IP address to it. The IP addresses are defined in the ethernet.xc file as shown below /* IP Addresses of the USB device (Server) and the Host PC (Client) */ int ipaddressserver = 0xA9FE5555; int ipaddressclient = 0xA9FEAAAA; unsigned char ipaddressserverarray[4] = 169, 254, 85, 85; unsigned char ipaddressclientarray[4] = 169, 254, 170, 170; The client IP address corresponds to the host PC and the server IP address belongs to the USB device. Handles DNS queries containing the server name defined in the ethernet.xc file. The server name is as shown below. /* Server name as found in the DNS query */ unsigned char localname[] = "\x08xmos-cdc\x05local"; The localname[] is initialized in DNS name format and it corresponds to xmos-cdc.local Handles HTTP webpage requests and ICMP control ping requests. Collects a statistics of the different packets received from the host PC and embeds the information in the web page. Copyright 2016 XMOS Ltd. 16
17 AN00131 (2.0.2) APPENDIX A - Demo Hardware Setup To setup the demo hardware the following boards are required. xcore-usb slicekit (XK-SK-U16-ST) xcore-usb Core board. USB A/B slicecard. xtag-2 debug adaptor Power supply Connect xcoreusb board power cable Connect xcoreusb board to host machine with a USB cable Set xscope Switch to ON position Connect XTAG to XSYS connector Connect XTAG USB to host PC Figure 5: XMOS xcore-usb slicekit Copyright 2016 XMOS Ltd. 17
18 The hardware should be configured as displayed above for this demo: The XTAG debug adapter should be connected to the XSYS connector and the XTAG USB should be connected to the host machine. The USB slicecard should be connected to the U slot (J4 header) of the xcore-usb Core board and the other end of USB slicecard should be connected to host machine using a USB cable. The XLINK switch on the core board should be set on ON position. The xcore-usb core board should have the power cable connected. Note: The XLINK switch is set to ON position to enable xscope to function. The use of xscope is required in this application so that the print messages that are generated on the device as part of the demo do not interfere with the real-time behavior of the USB device. Copyright 2016 XMOS Ltd. 18
19 APPENDIX B - Launching the demo application Once the demo example has been built either from the command line using xmake or via the build mechanism of xtimecomposer studio we can execute the application on the xcore-usb slicekit. Once built there will be a bin directory within the project which contains the binary for the xcore device. The xcore binary has a XMOS standard.xe extension. B.1 Launching from the command line From the command line the xrun tool is used to download code to both the xcore devices. Changing into the bin directory of the project we can execute the code on the xcore microcontroller as follows: > xrun --xscope app_usb_ecm.xe <-- Download and execute the xcore code Once this command has executed the CDC Ethernet device should have enumerated on your machine and you will see the following text in the console window: --XMOS USB CDC-ECM Class demo-- Server IP Address: Server URL: B.2 Launching from xtimecomposer Studio From xtimecomposer Studio the run mechanism is used to download code to xcore device. Select the xcore binary from the bin directory, right click and then follow the instructions below. Select Run As. Select Run Configurations. Double click on xcore application**. Enable xscope in Target I/O options: Figure 6: xtimecomposer xscope configuration Click Apply and then Run. Once the application is launched the CDC Ethernet device should have enumerated on your machine and you will see the following text in the console window: --XMOS USB CDC-ECM Class demo-- Server IP Address: Server URL: Copyright 2016 XMOS Ltd. 19
20 B.3 Running the demo This demo works right away on platforms that have native support for USB CDC-ECM class. Most of the Linux OS have native support for this CDC Ethernet. The demo application is tested on Ubuntu 12.04LTS version. B.3.1 Running on Linux Once the USB device is enumerated in the host machine, the default CDC Ethernet driver will be loaded. This host driver emulates the virtual Ethernet interface. Run the command ifconfig in a terminal to view the emulated Ethernet interface as shown in the following figure. Figure 7: Emulated Ethernet interface in the host PC Run ping command to ping the server running in the USB device. This ping command sends ICMP request packets to the server and it is shown in the following figure Figure 8: Pinging server from host PC Copyright 2016 XMOS Ltd. 20
21 Open the URL in a standard web browser like Mozilla or Chrome to see the web page hosted by the USB device. The web page provides a statistics of the packets handled by the USB device and it is shown below: Figure 9: Webpage hosted by USB CDC-ECM device Refresh the opened webpage to see the packets count updated. Also note the number of ICMP packets is same as the number of ping requests sent out previously. Copyright 2016 XMOS Ltd. 21
22 APPENDIX C - References XMOS Tools User Guide XMOS xcore Programming Guide XMOS xcore-usb Device Library XMOS USB Device Design Guide USB CDC Class Specification, USB.org: USB 2.0 Specification Ethernet Frame Format Copyright 2016 XMOS Ltd. 22
23 APPENDIX D - Full source code listing D.1 Source code for main.xc // Copyright (c) 2016, XMOS Ltd, All rights reserved #include <platform.h> #include <xs1.h> #include <xscope.h> #include <string.h> #include <stdio.h> #include <timer.h> #include "usb.h" #include "ethernet.h" /* xscope Setup Function */ #if (USE_XSCOPE == 1) void xscope_user_init(void) xscope_register(0, 0, "", 0, ""); xscope_config_io(xscope_io_basic); /* Enable fast printing over XTAG */ #endif /* USB Endpoint Defines */ #define XUD_EP_COUNT_OUT 2 //Includes EP0 (1 OUT EP0 + 1 BULK OUT EP) #define XUD_EP_COUNT_IN 3 //Includes EP0 (1 IN EP0 + 1 INTERRUPT IN EP + 1 BULK IN EP) int main() chan c_ep_out[xud_ep_count_out], c_ep_in[xud_ep_count_in]; interface usb_cdc_ecm_if cdc_ecm; /* 'Par' statement to run the following tasks in parallel */ par on USB_TILE: xud(c_ep_out, XUD_EP_COUNT_OUT, c_ep_in, XUD_EP_COUNT_IN, null, XUD_SPEED_HS, XUD_PWR_SELF); on USB_TILE: Endpoint0(c_ep_out[0], c_ep_in[0]); on USB_TILE: CdcEcmEndpointsHandler(c_ep_in[1], c_ep_out[1], c_ep_in[2], cdc_ecm); on USB_TILE: EthernetFrameHandler(cdc_ecm); return 0; D.2 Source code for xud_ecm.xc // Copyright (c) 2016, XMOS Ltd, All rights reserved #include <xs1.h> #include <stdio.h> #include <string.h> #include "packet_buffer.h" #include "queue.h" #include "usb.h" #include "xud_ecm.h" #include "ethernet.h" /* USB CDC device product defines */ #define BCD_DEVICE 0x0100 #define VENDOR_ID 0x20B1 #define PRODUCT_ID 0x0402 /* USB Sub class and protocol codes */ #define USB_CDC_ECM_SUBCLASS 0x06 /* CDC interface descriptor type */ #define USB_DESCTYPE_CS_INTERFACE 0x24 Copyright 2016 XMOS Ltd. 23
24 #define USB_DESCTYPE_CS_ENDPOINT 0x25 /* Endpoint Addresses for CDC device */ #define CDC_NOTIFICATION_EP_NUM 1 /* (0x81) */ #define CDC_DATA_RX_EP_NUM 1 /* (0x01) */ #define CDC_DATA_TX_EP_NUM 2 /* (0x82) */ /* Data endpoint packet size */ #define MAX_EP_SIZE 512 /* CDC ECM Class requests Section 6.2 in CDC ECM spec */ #define SET_ETHERNET_MULTICAST_FILTERS 0x40 #define SET_ETHERNET_POWER_MANAGEMENT_PATTERN_FILTER 0x41 #define GET_ETHERNET_POWER_MANAGEMENT_PATTERN_FILTER 0x42 #define SET_ETHERNET_PACKET_FILTER 0x43 #define GET_ETHERNET_STATISTIC 0x44 /* 45h-4Fh RESERVED (future use) */ /* CDC ECM Class notification codes - Section 6.3 in CDC ECM spec */ #define NETWORK_CONNECTION 0x00 #define RESPONSE_AVAILABLE 0x01 #define CONNECTION_SPEED_CHANGE 0x2A /* Definition of Descriptors */ /* USB Device Descriptor */ static unsigned char devdesc[] = 0x12, /* 0 blength */ USB_DESCTYPE_DEVICE, /* 1 bdescriptortype - Device*/ 0x00, /* 2 bcdusb version */ 0x02, /* 3 bcdusb version */ USB_CLASS_COMMUNICATIONS,/* 4 bdeviceclass - USB CDC Class */ 0x00, /* 5 bdevicesubclass - Specified by interface */ 0x00, /* 6 bdeviceprotocol - Specified by interface */ 0x40, /* 7 bmaxpacketsize for EP0 - max = 64*/ (VENDOR_ID & 0xFF), /* 8 idvendor */ (VENDOR_ID >> 8), /* 9 idvendor */ (PRODUCT_ID & 0xFF), /* 10 idproduct */ (PRODUCT_ID >> 8), /* 11 idproduct */ (BCD_DEVICE & 0xFF), /* 12 bcddevice */ (BCD_DEVICE >> 8), /* 13 bcddevice */ 0x01, /* 14 imanufacturer - index of string*/ 0x02, /* 15 iproduct - index of string*/ 0x00, /* 16 iserialnumber - index of string*/ 0x01 /* 17 bnumconfigurations */ ; /* USB Configuration Descriptor */ static unsigned char cfgdesc[] = 0x09, /* 0 blength */ USB_DESCTYPE_CONFIGURATION, /* 1 bdescriptortype - Configuration*/ 0x47,00, /* 2 wtotallength */ 0x02, /* 4 bnuminterfaces */ 0x01, /* 5 bconfigurationvalue */ 0x04, /* 6 iconfiguration - index of string */ 0x80, /* 7 bmattributes - Bus powered */ 0xC8, /* 8 bmaxpower - 400mA */ /* CDC Communication interface */ 0x09, /* 0 blength */ USB_DESCTYPE_INTERFACE, /* 1 bdescriptortype - Interface */ 0x00, /* 2 binterfacenumber - Interface 0 */ 0x00, /* 3 balternatesetting */ 0x01, /* 4 bnumendpoints */ USB_CLASS_COMMUNICATIONS, /* 5 binterfaceclass */ USB_CDC_ECM_SUBCLASS, /* 6 binterfacesubclass - Ethernet Control Model */ 0x00, /* 7 binterfaceprotocol - No specific protocol */ 0x00, /* 8 iinterface - No string descriptor */ /* Header Functional descriptor */ 0x05, /* 0 blength */ USB_DESCTYPE_CS_INTERFACE, /* 1 bdescriptortype, CS_INTERFACE */ 0x00, /* 2 bdescriptorsubtype, HEADER */ Copyright 2016 XMOS Ltd. 24
25 0x10, 0x01, /* 3 bcdcdc */ /* Union Functional descriptor */ 0x05, /* 0 blength */ USB_DESCTYPE_CS_INTERFACE,/* 1 bdescriptortype, CS_INTERFACE */ 0x06, /* 2 bdescriptorsubtype, UNION */ 0x00, /* 3 bcontrolinterface - Interface 0 */ 0x01, /* 4 bsubordinateinterface0 - Interface 1 */ /* Ethernet Networking Functional descriptor */ 0x0D, /* 0 blength - 13 bytes */ USB_DESCTYPE_CS_INTERFACE,/* 1 bdescriptortype, CS_INTERFACE */ 0x0F, /* 2 bdescriptorsubtype, ETHERNET NETWORKING */ 0x03, /* 3 imacaddress, Index of MAC address string */ 0x00,0x00,0x00,0x00, /* 4 bmethernetstatistics - Handles None */ 0xEA,05, /* 8 wmaxsegmentsize bytes */ 0x00,0x00, /* 10 wnumbermcfilters - No multicast filters */ 0x00, /* 12 bnumberpowerfilters - No wake-up feature */ /* Notification Endpoint descriptor */ 0x07, /* 0 blength */ USB_DESCTYPE_ENDPOINT, /* 1 bdescriptortype */ (CDC_NOTIFICATION_EP_NUM 0x80),/* 2 bendpointaddress - IN endpoint*/ 0x03, /* 3 bmattributes - Interrupt type */ 0x40, /* 4 wmaxpacketsize - Low */ 0x00, /* 5 wmaxpacketsize - High */ 0xFF, /* 6 binterval */ /* CDC Data interface */ 0x09, /* 0 blength */ USB_DESCTYPE_INTERFACE, /* 1 bdescriptortype */ 0x01, /* 2 binterfacecnumber */ 0x00, /* 3 balternatesetting */ 0x02, /* 4 bnumendpoints */ USB_CLASS_CDC_DATA, /* 5 binterfaceclass */ 0x00, /* 6 binterfacesubclass */ 0x00, /* 7 binterfaceprotocol*/ 0x00, /* 8 iinterface - No string descriptor*/ /* Data OUT Endpoint descriptor */ 0x07, /* 0 blength */ USB_DESCTYPE_ENDPOINT, /* 1 bdescriptortype */ CDC_DATA_RX_EP_NUM, /* 2 bendpointaddress - OUT endpoint */ 0x02, /* 3 bmattributes - Bulk type */ 0x00, /* 4 wmaxpacketsize - Low */ 0x02, /* 5 wmaxpacketsize - High */ 0x00, /* 6 binterval */ /* Data IN Endpoint descriptor */ 0x07, /* 0 blength */ USB_DESCTYPE_ENDPOINT, /* 1 bdescriptortype */ (CDC_DATA_TX_EP_NUM 0x80),/* 2 bendpointaddress - IN endpoint */ 0x02, /* 3 bmattributes - Bulk type */ 0x00, /* 4 wmaxpacketsize - Low byte */ 0x02, /* 5 wmaxpacketsize - High byte */ 0x01 /* 6 binterval */ ; unsafe /* String table - unsafe as accessed via shared memory */ static char * unsafe stringdescriptors[]= "\x09\x04", /* Language ID string (US English) */ "XMOS", /* imanufacturer */ "XMOS USB CDC Ethernet Device",/* iproduct */ " ", /* imacaddress */ "Config", /* iconfiguration string */ ; #define MAC_ID_INDEX 3 /* Queues for handling Ethernet frame buffers */ Queue_t tohostq; Queue_t todevq; Copyright 2016 XMOS Ltd. 25
26 /* CDC Class-specific requests handler function */ XUD_Result_t ControlInterfaceClassRequests(XUD_ep ep_out, XUD_ep ep_in, USB_SetupPacket_t sp) XUD_Result_t result = XUD_RES_ERR; #if defined (DEBUG) && (DEBUG == 1) printhexln(sp.brequest); #endif switch(sp.brequest) case SET_ETHERNET_MULTICAST_FILTERS: /* Not supported now */ /*if((result = XUD_GetBuffer(ep_out, (buffer, unsigned char[]), 0))!= XUD_RES_OKAY) return result; result = XUD_DoSetRequestStatus(ep_in);*/ return result; break; case SET_ETHERNET_POWER_MANAGEMENT_PATTERN_FILTER: /* Not supported now */ /*if((result = XUD_GetBuffer(ep_out, (buffer, unsigned char[]), length))!= XUD_RES_OKAY) return result; result = XUD_DoSetRequestStatus(ep_in);*/ return result; break; case GET_ETHERNET_POWER_MANAGEMENT_PATTERN_FILTER: /* Not supported now */ /* return XUD_DoGetRequest(ep_out, ep_in, (buffer, unsigned char[]), 0, sp.wlength); */ return result; break; case SET_ETHERNET_PACKET_FILTER: /* TODO: Handle this required command */ return XUD_DoSetRequestStatus(ep_in); break; case GET_ETHERNET_STATISTIC: /* Not supported now */ /* return XUD_DoGetRequest(ep_out, ep_in, (buffer, unsigned char[]), 0, sp.wlength); */ break; default: // Error case printhexln(sp.brequest); break; return XUD_RES_ERR; /* Endpoint 0 handling both std USB requests and CDC class specific requests */ void Endpoint0(chanend chan_ep0_out, chanend chan_ep0_in) USB_SetupPacket_t sp; unsigned bmrequesttype; XUD_BusSpeed_t usbbusspeed; Copyright 2016 XMOS Ltd. 26
27 XUD_ep ep0_out = XUD_InitEp(chan_ep0_out, XUD_EPTYPE_CTL XUD_STATUS_ENABLE); XUD_ep ep0_in = XUD_InitEp(chan_ep0_in, XUD_EPTYPE_CTL XUD_STATUS_ENABLE); /* Get MAC ID from a global variable */ getmacaddressstring(stringdescriptors[mac_id_index]); while(1) /* Returns XUD_RES_OKAY on success */ XUD_Result_t result = USB_GetSetupPacket(ep0_out, ep0_in, sp); if(result == XUD_RES_OKAY) /* Set result to ERR, we expect it to get set to OKAY if a request is handled */ result = XUD_RES_ERR; /* Stick bmrequest type back together for an easier parse... */ bmrequesttype = (sp.bmrequesttype.direction<<7) (sp.bmrequesttype.type<<5) (sp.bmrequesttype.recipient); if ((bmrequesttype == USB_BMREQ_H2D_STANDARD_DEV) && (sp.brequest == USB_SET_ADDRESS)) // Host has set device address, value contained in sp.wvalue switch(bmrequesttype) /* Direction: Device-to-host and Host-to-device * Type: Class * Recipient: Interface */ case USB_BMREQ_H2D_CLASS_INT: case USB_BMREQ_D2H_CLASS_INT: /* Inspect for CDC Communications Class interface num */ if(sp.windex == 0) /* Returns XUD_RES_OKAY if handled, * XUD_RES_ERR if not handled, * XUD_RES_RST for bus reset */ result = ControlInterfaceClassRequests(ep0_out, ep0_in, sp); break; /* if ends */ /* If we haven't handled the request about then do standard enumeration requests */ if(result == XUD_RES_ERR ) /* Returns XUD_RES_OKAY if handled okay, * XUD_RES_ERR if request was not handled (STALLed), * XUD_RES_RST for USB Reset */ unsafe result = USB_StandardRequests(ep0_out, ep0_in, devdesc, sizeof(devdesc), cfgdesc, sizeof(cfgdesc), null, 0, null, 0, stringdescriptors, sizeof(stringdescriptors)/sizeof( stringdescriptors[0]), sp, usbbusspeed); /* USB bus reset detected, reset EP and get new bus speed */ if(result == XUD_RES_RST) usbbusspeed = XUD_ResetEndpoint(ep0_out, ep0_in); /* Function to handle all endpoints of the CDC class excluding control endpoint0 */ void CdcEcmEndpointsHandler(chanend c_epint_in, chanend c_epbulk_out, chanend c_epbulk_in, SERVER_INTERFACE( usb_cdc_ecm_if, cdc_ecm)) Copyright 2016 XMOS Ltd. 27
28 int inbufid = 0, outbufid = 0; int inindex = 0, outlen = 0; int hostwaiting = 1, devwaiting = 0; unsigned length; XUD_Result_t result; // used to identify buffer read/write by device // Used for flow control with IN and OUT endpoints respectively /* Initialize all endpoints */ XUD_ep epint_in = XUD_InitEp(c_epint_in, XUD_EPTYPE_INT); XUD_ep epbulk_out = XUD_InitEp(c_epbulk_out, XUD_EPTYPE_BUL); XUD_ep epbulk_in = XUD_InitEp(c_epbulk_in, XUD_EPTYPE_BUL); /* XUD will NAK if the endpoint is not ready to communicate with XUD */ /* TODO: Interrupt endpoint to report network state (if required) */ /* Just to keep compiler happy */ epint_in = epint_in; /* Initialize the Queues and Buffers */ qinit(tohostq); qinit(todevq); packetbufferinit(); /* Get a free buffer to set OUT endpoint ready for receiving data */ outbufid = packetbufferalloc(); outlen = 0; XUD_SetReady_Out(epbulk_out, (packetbuffer[outbufid], unsigned char[])); // Re-interpret int buffer to char buffer while(1) select case XUD_GetData_Select(c_epbulk_out, epbulk_out, length, result): if(result == XUD_RES_OKAY) /* Received some data */ if(length < MAX_EP_SIZE) /* USB Short packet or Zero length packet is received */ outlen += length; /* Ethernet packet is received completely */ qput(todevq, outbufid, outlen); if(qisfull(todevq)) devwaiting = 1; else outbufid = packetbufferalloc(); outlen = 0; XUD_SetReady_Out(epbulk_out, (packetbuffer[outbufid], unsigned char[])); else /* USB Full packet */ outlen += MAX_EP_SIZE; XUD_SetReady_Out(epbulk_out, (packetbuffer[outbufid], unsigned char[])+outlen); else XUD_SetReady_Out(epbulk_out, (packetbuffer[outbufid], unsigned char[])+outlen); break; case XUD_SetData_Select(c_epbulk_in, epbulk_in, result): /* USB Packet sent successfully when result is XUD_RES_OKAY */ int index = qpeek(tohostq); int bytessent = tohostq.data[index].from - inindex; inindex = tohostq.data[index].from; int bytestosend = tohostq.data[index].len - tohostq.data[index].from; if(bytestosend) if (bytestosend > MAX_EP_SIZE) /* Still Large packet, split the transfer */ bytestosend = MAX_EP_SIZE; Copyright 2016 XMOS Ltd. 28
29 XUD_SetReady_In(epbulk_in, (packetbuffer[inbufid], unsigned char[])+inindex, bytestosend); tohostq.data[index].from += bytestosend; else if (bytessent == MAX_EP_SIZE) /* Send a Zero Length Packet to indicate completion of transfer */ XUD_SetReady_In(epbulk_in, (packetbuffer[inbufid], unsigned char[]), 0); inindex += bytessent; else /* Ethernet frame transfer is over */ packetbufferfree(tohostq.data[index].packet); /* Remove packet out of queue */ qget(tohostq); /* Check if other packet is waiting to be sent to host */ if(!qisempty(tohostq)) index = qpeek(tohostq); inbufid = tohostq.data[index].packet; inindex = tohostq.data[index].from; bytestosend = tohostq.data[index].len; if(bytestosend > MAX_EP_SIZE) bytestosend = MAX_EP_SIZE; XUD_SetReady_In(epbulk_in, (packetbuffer[inbufid], unsigned char[])+inindex, bytestosend); tohostq.data[index].from += bytestosend; else /* No packets are available to send */ hostwaiting = 1; break; /* Case handlers for CDC ECM interface functions */ case (!qisempty(todevq)) => cdc_ecm.read_frame(unsigned char frame_buf[], REFERENCE_PARAM(unsigned, frame_len)): /* A packet waiting in queue to be handled */ int index = qpeek(todevq); int packetnum = todevq.data[index].packet; int offset = todevq.data[index].from; frame_len = todevq.data[index].len; /* Copy the whole Ethernet frame */ memcpy(frame_buf, (packetbuffer[packetnum], unsigned char[])+offset, frame_len); packetbufferfree(packetnum); qget(todevq); /* Make a buffer ready for OUT endpoint */ if(devwaiting) outbufid = packetbufferalloc(); XUD_SetReady_Out(epbulk_out, (packetbuffer[outbufid], unsigned char[])); devwaiting = 0; break; case (!qisfull(tohostq)) => cdc_ecm.send_frame(unsigned char frame_buf[], REFERENCE_PARAM(unsigned, frame_len)): /* Get a free buffer to write the frame */ int buf_id = packetbufferalloc(); memcpy((packetbuffer[buf_id],unsigned char[]), frame_buf, frame_len); qput(tohostq, buf_id, frame_len); /* Send the packet if host is waiting */ if(hostwaiting) int index = qpeek(tohostq); inbufid = tohostq.data[index].packet; inindex = tohostq.data[index].from; int bytestosend = tohostq.data[index].len; hostwaiting = 0; if(bytestosend > MAX_EP_SIZE ) /* Large packet, split the transfers */ Copyright 2016 XMOS Ltd. 29
30 bytestosend = MAX_EP_SIZE; XUD_SetReady_In(epbulk_in, (packetbuffer[inbufid], unsigned char[])+inindex, bytestosend); tohostq.data[index].from += bytestosend; break; case cdc_ecm.is_frame_available() -> int val: val =!qisempty(todevq); break; Copyright 2016 XMOS Ltd. 30
31 Copyright 2016, All Rights Reserved. Xmos Ltd. is the owner or licensee of this design, code, or Information (collectively, the Information ) and is providing it to you AS IS with no warranty of any kind, express or implied and shall have no liability in relation to its use. Xmos Ltd. makes no representation that the Information, or any particular implementation thereof, is or will be free from any claims of infringement and again, shall have no liability in relation to any such claims. Copyright 2016 XMOS Ltd. 31
AN249 HUMAN INTERFACE DEVICE TUTORIAL. Relevant Devices This application note applies to all Silicon Labs USB MCUs. 1.
HUMAN INTERFACE DEVICE TUTORIAL Relevant Devices This application note applies to all Silicon Labs USB MCUs. 1. Introduction The Human Interface Device (HID) class specification allows designers to create
AN295 USB AUDIO CLASS TUTORIAL. 1. Introduction. 2. USB, Isochronous Transfers, and the Audio Class. 1.1. Overview. 2.1. USB Operational Overview
USB AUDIO CLASS TUTORIAL 1. Introduction Isochronous data transfers can be used by universal serial bus (USB) devices designed to transfer data to or from a host at a constant rate. Systems streaming audio
AN1164. USB CDC Class on an Embedded Device INTRODUCTION ASSUMPTIONS FEATURES LIMITATIONS
USB CDC Class on an Embedded Device AN1164 Author: Bud Caldwell Microchip Technology Inc. INTRODUCTION The Universal Serial Bus (USB) has made it very simple for end users to attach peripheral devices
Simplified Description of USB Device Enumeration
Future Technology Devices International Ltd. Technical Note TN_113 Simplified Description of USB Device Enumeration Document Reference No.: FT_000180 Issue Date: 2009-10-28 USB Enumeration is the process
Application Note: AN00121 Using XMOS TCP/IP Library for UDP-based Networking
Application Note: AN00121 Using XMOS TCP/IP Library for UDP-based Networking This application note demonstrates the use of XMOS TCP/IP stack on an XMOS multicore micro controller to communicate on an ethernet-based
Application Note: AN00141 xcore-xa - Application Development
Application Note: AN00141 xcore-xa - Application Development This application note shows how to create a simple example which targets the XMOS xcore-xa device and demonstrates how to build and run this
Bypassing Endpoint Security for $20 or Less. Philip A. Polstra, Sr. @ppolstra ppolstra.blogspot.com
Bypassing Endpoint Security for $20 or Less Philip A. Polstra, Sr. @ppolstra ppolstra.blogspot.com Roadmap Why this talk? Who is this dude talking at me? Brief history of USB How does USB work? It s all
Universal Serial Bus Device Class Definition for Printing Devices
Universal Serial Bus Device Class Definition for Printing Devices Version 1.1 January 2000 Contributors Axiohn IPB Kevin Butler [email protected] Canon Sadahiko Sano [email protected] Canon Naoki
Universal Serial Bus Mass Storage Class. Bulk-Only Transport
Universal Serial Bus Mass Storage Class Bulk-Only Transport Revision 1.0 Change History Revision Issue Date Comments 0.7 September 23, 1998 Initial draft, pre-release 0.8 October 6, 1998 Revisions made
PL2571 (Chip Rev B) Hi-Speed USB to SATA Bridge Controller Product Datasheet
PL2571 (Chip Rev B) Hi-Speed USB to SATA Bridge Controller Product Datasheet Document Revision: 1.3 Document Release: Prolific Technology Inc. 7F, No. 48, Sec. 3, Nan Kang Rd. Nan Kang, Taipei 115, Taiwan,
USB Overview. This course serves as an introduction to USB.
USB Overview This course serves as an introduction to USB. 1 Agenda USB overview USB low level data transfer USB protocol structure USB chapter 9 structure Enumeration Standard classes Firmware example
AVR32807: Getting Started with the AVR UC3 Software Framework USB Classes. 32-bit Microcontrollers. Application Note. Features.
AVR32807: Getting Started with the AVR UC3 Software Framework USB Classes Features Full Speed (12Mbit/s) and High Speed (480Mbit/s) data rates Control, Bulk, Isochronuous and Interrupt transfer types Device
Exploiting USB Devices with Arduino. Greg Ose [email protected] Black Hat USA 2011
Exploiting USB Devices with Arduino Greg Ose [email protected] Black Hat USA 2011 Abstract Hardware devices are continually relied upon to maintain a bridge between physical and virtual security. From
SMART Modular Small Form Factor USB Key
SMART Modular Small Form Factor USB Key SH9MKxxGQxx Rev E www.smartm.com REVISION HISTORY Date Revision Section(s) Description June 2014 A All Initial release October 2014 B 1.4.1, 1.4.2, 2.2, 4.2, 4.4,
PL-2303HX Edition (Chip Rev A) USB to Serial Bridge Controller Product Datasheet
PL-2303HX Edition (Chip Rev A) USB to Serial Bridge Controller Product Datasheet Document Revision: 1.6 Document Release: Prolific Technology Inc. 7F, No. 48, Sec. 3, Nan Kang Rd. Nan Kang, Taipei 115,
Universal Serial Bus Communications Class Subclass Specification for Ethernet Emulation Model Devices. Revision 1.0
Universal Serial Bus Communications Class Subclass Specification for Ethernet Emulation Model Devices Revision 1.0 February 2, 2005 CDC Ethernet Emulation Model Revision 1.0 Revision History Rev Date Filename
TivaWare USB Library USER S GUIDE SW-TM4C-USBL-UG-2.1.1.71. Copyright 2008-2015 Texas Instruments Incorporated
TivaWare USB Library USER S GUIDE SW-TM4C-USBL-UG-2.1.1.71 Copyright 2008-2015 Texas Instruments Incorporated Copyright Copyright 2008-2015 Texas Instruments Incorporated. All rights reserved. Tiva and
Linux Driver Devices. Why, When, Which, How?
Bertrand Mermet Sylvain Ract Linux Driver Devices. Why, When, Which, How? Since its creation in the early 1990 s Linux has been installed on millions of computers or embedded systems. These systems may
Freescale MQX USB Device User Guide
Freescale MQX USB Device User Guide MQXUSBDEVUG Rev. 4 02/2014 How to Reach Us: Home Page: freescale.com Web Support: freescale.com/support Information in this document is provided solely to enable system
AT12181: ATWINC1500 Wi-Fi Network Controller - AP Provision Mode. Introduction. Features. Atmel SmartConnect APPLICATION NOTE
Atmel SmartConnect AT12181: ATWINC1500 Wi-Fi Network Controller - AP Provision Mode APPLICATION NOTE Introduction This application note explains how to build the state-of-art Internet of Things (IoT) applications
Application Note. 8-bit Microcontrollers. AVR276: USB Software Library for AT90USBxxx Microcontrollers
: USB Software Library for AT90USBxxx Microcontrollers Features Low Speed (1.5Mbit/s) and Full Speed (12Mbit/s) data rates Control, Bulk, Isochronuous and Interrupt transfer types Up to 6 data endpoints/pipes
Objectives of Lecture. Network Architecture. Protocols. Contents
Objectives of Lecture Network Architecture Show how network architecture can be understood using a layered approach. Introduce the OSI seven layer reference model. Introduce the concepts of internetworking
Modbus and ION Technology
70072-0104-14 TECHNICAL 06/2009 Modbus and ION Technology Modicon Modbus is a communications protocol widely used in process control industries such as manufacturing. PowerLogic ION meters are compatible
Addonics T E C H N O L O G I E S. NAS Adapter. Model: NASU2. 1.0 Key Features
1.0 Key Features Addonics T E C H N O L O G I E S NAS Adapter Model: NASU2 User Manual Convert any USB 2.0 / 1.1 mass storage device into a Network Attached Storage device Great for adding Addonics Storage
Ethernet Interface Manual Thermal / Label Printer. Rev. 1.01 Metapace T-1. Metapace T-2 Metapace L-1 Metapace L-2
Ethernet Interface Manual Thermal / Label Printer Rev. 1.01 Metapace T-1 Metapace T-2 Metapace L-1 Metapace L-2 Table of contents 1. Interface setting Guiding...3 2. Manual Information...4 3. Interface
Controlling EIB/KNX Devices from Linux using USB. Heinz W. Werntges. University of Applied Sciences Wiesbaden. Jens Neumann and Vladimir Vinarski
Fachhochschule Wiesbaden - Controlling EIB/KNX Devices from Linux using USB Heinz W. Werntges University of Applied Sciences Wiesbaden Jens Neumann and Vladimir Vinarski Loewe Opta GmbH, Kompetenzzentrum
BASIC ANALYSIS OF TCP/IP NETWORKS
BASIC ANALYSIS OF TCP/IP NETWORKS INTRODUCTION Communication analysis provides powerful tool for maintenance, performance monitoring, attack detection, and problems fixing in computer networks. Today networks
An Analysis of Wireless Device Implementations on Universal Serial Bus
An Analysis of Wireless Device Implementations on Universal Serial Bus 6/3/97 Abstract Universal Serial Bus (USB) is a new personal computer (PC) interconnect that can support simultaneous attachment of
CS 326e F2002 Lab 1. Basic Network Setup & Ethereal Time: 2 hrs
CS 326e F2002 Lab 1. Basic Network Setup & Ethereal Time: 2 hrs Tasks: 1 (10 min) Verify that TCP/IP is installed on each of the computers 2 (10 min) Connect the computers together via a switch 3 (10 min)
Advantech WebAccess Device Driver Guide. BwSNMP Advantech WebAccess to SNMP Agent (Simple Network Management Protocol) Device Driver Guide
BwSNMP Advantech WebAccess to SNMP Agent (Simple Network Management Protocol) Device Driver Guide Version 5.0 rev 1 Advantech Corp., Ltd. Table of Contents BwSNMP Advantech WebAccess to SNMP Agent (Simple
Networking Basics for Automation Engineers
Networking Basics for Automation Engineers Page 1 of 10 mac-solutions.co.uk v1.0 Oct 2014 1. What is Transmission Control Protocol/Internet Protocol (TCP/IP)------------------------------------------------------------
AT91 ARM Thumb Microcontrollers. Application Note. AT91 USB CDC Driver Implementation. 1. Introduction. 2. Related Documents
AT91 USB CDC Driver Implementation 1. Introduction The Communication Device Class (CDC) is a general-purpose way to enable all types of communications on the Universal Serial Bus (USB). This class makes
Application Note. Introduction AN2471/D 3/2003. PC Master Software Communication Protocol Specification
Application Note 3/2003 PC Master Software Communication Protocol Specification By Pavel Kania and Michal Hanak S 3 L Applications Engineerings MCSL Roznov pod Radhostem Introduction The purpose of this
MBP_MSTR: Modbus Plus Master 12
Unity Pro MBP_MSTR 33002527 07/2011 MBP_MSTR: Modbus Plus Master 12 Introduction This chapter describes the MBP_MSTR block. What s in this Chapter? This chapter contains the following topics: Topic Page
USB ENGINEERING CHANGE NOTICE
USB ENGINEERING CHANGE NOTICE Title: Interface Association Descriptors Applies to: Universal Serial Bus Specification, Revision 2.0 Summary of ECN This ECN defines a new standard descriptor and interface
Lecture (02) Networking Model (TCP/IP) Networking Standard (OSI) (I)
Lecture (02) Networking Model (TCP/IP) Networking Standard (OSI) (I) By: Dr. Ahmed ElShafee ١ Dr. Ahmed ElShafee, ACU : Fall 2015, Networks II Agenda Introduction to networking architecture Historical
Data Transfer between Serial Link and TCP/IP Link Using ez80f91 MCU
Application Note Data Transfer between Serial Link and TCP/IP Link Using ez80f91 MCU AN021904 0808 Abstract This application note describes Zilog s ez80 - based Serial-to-TCP and TCP-to-Serial communicator
Different Ways of Connecting to. 3DLevelScanner II. A.P.M Automation Solutions LTD. www.apm-solutions.com Version 3.0
3DLevelScanner II Different Ways of Connecting to 3DLevelScanner II A.P.M Automation Solutions LTD. www.apm-solutions.com Version 3.0 2 Different Ways of Connecting to 3DLevelScanner II Version 3.0 Table
USER MANUAL GUIMGR Graphical User Interface Manager for FRM301/FRM401 Media Racks
USER MANUAL GUIMGR Graphical User Interface Manager for FRM301/FRM401 Media Racks CTC Union Technologies Co., Ltd. Far Eastern Vienna Technology Center (Neihu Technology Park) 8F, No. 60 Zhouzi St. Neihu,
1 Download & Installation... 4. 1 Usernames and... Passwords
Contents I Table of Contents Part I Document Overview 2 Part II Document Details 3 Part III EventSentry Setup 4 1 Download & Installation... 4 Part IV Configuration 4 1 Usernames and... Passwords 5 2 Network...
Architecture and Data Flow Overview. BlackBerry Enterprise Service 10 721-08877-123 Version: 10.2. Quick Reference
Architecture and Data Flow Overview BlackBerry Enterprise Service 10 721-08877-123 Version: Quick Reference Published: 2013-11-28 SWD-20131128130321045 Contents Key components of BlackBerry Enterprise
E-Blocks Easy Internet Bundle
Page 1 Cover Page Page 2 Flowcode Installing Flowcode Instruction for installing Flowcode can be found inside the installation booklet located inside the Flowcode DVD case. Before starting with the course
USING THE XPERT2 / 9210B ON A TCP/IP NETWORK
1 USING THE XPERT2 / 9210B ON A TCP/IP NETWORK Prepared by: R&D January, 2009 Sutron Corporation 21300 Ridgetop Circle Sterling, Virginia 20166 TEL: (703) 406-2800 FAX: (703) 406-2801 WEB: http://www.sutron.com/
A Development Platform for Microcontroller STM32F103
MEE09:49 A Development Platform for Microcontroller STM32F103 This thesis is presented as part of Degree of Master of Science in Electrical Engineering Blekinge Institute of Technology March 2009 By: Ehsan
ProSAFE 8-Port and 16-Port Gigabit Click Switch
ProSAFE 8-Port and 16-Port Gigabit Click Switch Model GSS108E and GSS116E User Manual March 2015 202-11520-01 350 East Plumeria Drive San Jose, CA 95134 USA Support Thank you for selecting NETGEAR products.
Management Software. Web Browser User s Guide AT-S106. For the AT-GS950/48 Gigabit Ethernet Smart Switch. Version 1.0.0. 613-001339 Rev.
Management Software AT-S106 Web Browser User s Guide For the AT-GS950/48 Gigabit Ethernet Smart Switch Version 1.0.0 613-001339 Rev. A Copyright 2010 Allied Telesis, Inc. All rights reserved. No part of
LAB THREE STATIC ROUTING
LAB THREE STATIC ROUTING In this lab you will work with four different network topologies. The topology for Parts 1-4 is shown in Figure 3.1. These parts address router configuration on Linux PCs and a
Networking Test 4 Study Guide
Networking Test 4 Study Guide True/False Indicate whether the statement is true or false. 1. IPX/SPX is considered the protocol suite of the Internet, and it is the most widely used protocol suite in LANs.
RN-131-PICTAIL & RN-171-PICTAIL Evaluation Boards
RN-131-PICTAIL & RN-171-PICTAIL Evaluation Boards 2012 Roving Networks. All rights reserved. Version 1.0 9/7/2012 USER MANUAL OVERVIEW The RN-131 and RN-171 WiFly radio modules are complete, standalone
R&S AFQ100A, R&S AFQ100B I/Q Modulation Generator Supplement
I/Q Modulation Generator Supplement The following description relates to the Operating Manuals, version 03 of R&S AFQ100A, and version 01 of R&S AFQ100B. It encloses the following topics: LXI features,
R&S AFQ100A, R&S AFQ100B I/Q Modulation Generator Supplement
I/Q Modulation Generator Supplement The following description relates to the Operating Manuals, version 03 of R&S AFQ100A, and version 01 of R&S AFQ100B. It encloses the following topics: LXI features,
CCNA Discovery 4.0.3.0 Networking for Homes and Small Businesses Student Packet Tracer Lab Manual
4.0.3.0 Networking for Homes and Small Businesses Student Packet Tracer Lab Manual This document is exclusive property of Cisco Systems, Inc. Permission is granted to print and copy this document for non-commercial
Technical Support Information Belkin internal use only
The fundamentals of TCP/IP networking TCP/IP (Transmission Control Protocol / Internet Protocols) is a set of networking protocols that is used for communication on the Internet and on many other networks.
Network Licensing. White Paper 0-15Apr014ks(WP02_Network) Network Licensing with the CRYPTO-BOX. White Paper
WP2 Subject: with the CRYPTO-BOX Version: Smarx OS PPK 5.90 and higher 0-15Apr014ks(WP02_Network).odt Last Update: 28 April 2014 Target Operating Systems: Windows 8/7/Vista (32 & 64 bit), XP, Linux, OS
BIT COMMANDER. Serial RS232 / RS485 to Ethernet Converter
BIT COMMANDER Serial RS232 / RS485 to Ethernet Converter (Part US2000A) Copyrights U.S. Converters 1 Contents Overview and Features... 3 Functions..5 TCP Server Mode... 5 Httpd Client Mode.5 TCP Auto mode....6
Arduino Wifi shield And reciever. 5V adapter. Connecting wifi module on shield: Make sure the wifi unit is connected the following way on the shield:
the following parts are needed to test the unit: Arduino UNO R3 Arduino Wifi shield And reciever 5V adapter Connecting wifi module on shield: Make sure the wifi unit is connected the following way on the
Apache Thrift and Ruby
Apache Thrift and Ruby By Randy Abernethy In this article, excerpted from The Programmer s Guide to Apache Thrift, we will install Apache Thrift support for Ruby and build a simple Ruby RPC client and
December 2002, ver. 1.0 Application Note 285. This document describes the Excalibur web server demonstration design and includes the following topics:
Excalibur Web Server Demonstration December 2002, ver. 1.0 Application Note 285 Introduction This document describes the Excalibur web server demonstration design and includes the following topics: Design
Useful USB Gadgets on Linux
Useful USB Gadgets on Linux February, 2012 Gary Bisson Adeneo Embedded Embedded Linux Conference 2012 1 Agenda Introduction to USB USB Gadget API Existing Gadgets Design your own Gadget Demo Conclusion
Ethernet. Ethernet. Network Devices
Ethernet Babak Kia Adjunct Professor Boston University College of Engineering ENG SC757 - Advanced Microprocessor Design Ethernet Ethernet is a term used to refer to a diverse set of frame based networking
Chapter 3: Review of Important Networking Concepts. Magda El Zarki Dept. of CS UC Irvine [email protected] http://www.ics.uci.
Chapter 3: Review of Important Networking Concepts Magda El Zarki Dept. of CS UC Irvine [email protected] http://www.ics.uci.edu/~magda 1 Networking Concepts Protocol Architecture Protocol Layers Encapsulation
Setup Manual and Programming Reference. RGA Ethernet Adapter. Stanford Research Systems. Revision 1.05 (11/2010)
Setup Manual and Programming Reference Stanford Research Systems Revision 1.05 (11/2010) Certification Stanford Research Systems certifies that this product met its published specifications at the time
TCP/IP Networking, Part 2: Web-Based Control
TCP/IP Networking, Part 2: Web-Based Control Microchip TCP/IP Stack HTTP2 Module 2007 Microchip Technology Incorporated. All Rights Reserved. Building Embedded Web Applications Slide 1 Welcome to the next
AKD EtherNet/IP Communication
AKD EtherNet/IP Communication Edition August 2012, Revision C Valid for firmware version 1.7 Patents Pending Part Number 903-200008-00 Keep all manuals as a product component during the life span of the
Remote Serial over IP Introduction on serial connections via IP/Ethernet
Remote Serial over IP Introduction on serial connections via IP/Ethernet TABLE OF CONTENT TABLE OF CONTENT... I TABLE OF IMAGES... I INTRODUCTION... 1 Classic Style of Communication... 1 Ethernet and
VLAN for DekTec Network Adapters
Application Note DT-AN-IP-2 VLAN for DekTec Network Adapters 1. Introduction VLAN (Virtual LAN) is a technology to segment a single physical network into multiple independent virtual networks. The VLANs
Interfacing an HTML Form to the ez80f91 MCU
Application Note Interfacing an HTML Form to the ez80f91 MCU AN020803-0708 Abstract This application note demonstrates how to use Zilog s ez80f91 microcontroller unit (MCU) as a web server to send electronic
Freescale MQX RTOS USB Host User s Guide
Freescale MQX RTOS USB Host User s Guide MQXUSBHOSTUG Rev. 7 08/2014 How to Reach Us: Home Page: freescale.com Web Support: freescale.com/support Information in this document is provided solely to enable
CONTROL MICROSYSTEMS DNP3. User and Reference Manual
DNP3 User and Reference Manual CONTROL MICROSYSTEMS SCADA products... for the distance 48 Steacie Drive Telephone: 613-591-1943 Kanata, Ontario Facsimile: 613-591-1022 K2K 2A9 Technical Support: 888-226-6876
Operating Systems Design 16. Networking: Sockets
Operating Systems Design 16. Networking: Sockets Paul Krzyzanowski [email protected] 1 Sockets IP lets us send data between machines TCP & UDP are transport layer protocols Contain port number to identify
ebus Player Quick Start Guide
ebus Player Quick Start Guide This guide provides you with the information you need to efficiently set up and start using the ebus Player software application to control your GigE Vision or USB3 Vision
MEASURING WIRELESS NETWORK CONNECTION QUALITY
Technical Disclosure Commons Defensive Publications Series January 27, 2016 MEASURING WIRELESS NETWORK CONNECTION QUALITY Mike Mu Avery Pennarun Follow this and additional works at: http://www.tdcommons.org/dpubs_series
Wifi Web Server Module w TF Socket User s Guide
Wifi Web Server Module w TF Socket User s Guide 2004-2010 Sure Electronics Inc. MB-CM14117_Ver1.0 WIFI WEB SERVER MODULE W TF SOCKET USER S GUIDE Table of Contents Chapter 1. Overview...1 1.1 Overview...
DE4 NetFPGA Packet Generator Design User Guide
DE4 NetFPGA Packet Generator Design User Guide Revision History Date Comment Author 01/30/2012 Initial draft Harikrishnan Contents 1. Introduction... 4 2. System Requirements... 4 3. Installing DE4 NetFPGA
Introducing the Adafruit Bluefruit LE Sniffer
Introducing the Adafruit Bluefruit LE Sniffer Created by Kevin Townsend Last updated on 2015-06-25 08:40:07 AM EDT Guide Contents Guide Contents Introduction FTDI Driver Requirements Using the Sniffer
User Manual. Onsight Management Suite Version 5.1. Another Innovation by Librestream
User Manual Onsight Management Suite Version 5.1 Another Innovation by Librestream Doc #: 400075-06 May 2012 Information in this document is subject to change without notice. Reproduction in any manner
TYLER JUNIOR COLLEGE School of Continuing Studies 1530 SSW Loop 323 Tyler, TX 75701 1.800.298.5226 www.tjc.edu/continuingstudies/mycaa
TYLER JUNIOR COLLEGE School of Continuing Studies 1530 SSW Loop 323 Tyler, TX 75701 1.800.298.5226 www.tjc.edu/continuingstudies/mycaa Education & Training Plan CompTIA N+ Specialist Program Student Full
Gigabyte Management Console User s Guide (For ASPEED AST 2400 Chipset)
Gigabyte Management Console User s Guide (For ASPEED AST 2400 Chipset) Version: 1.4 Table of Contents Using Your Gigabyte Management Console... 3 Gigabyte Management Console Key Features and Functions...
TSX ETY 110 Module 8
Module 8 Introduction Subject of this chapter What s in this Chapter? This chapter describes the implementation of a TSX ETY 110 module. This chapter contains the following sections: Section Topic Page
TB055. PS/2 to USB Mouse Translator IMPLEMENTATION OVERVIEW. Hardware FIGURE 1: PS/2 TO USB MOUSE TRANSLATOR HARDWARE DIAGRAM (1)
PS/2 to USB Mouse Translator TB55 Author: OVERVIEW Reston Condit Microchip Technology Inc. This Technical Brief details the translation of a PS/2 mouse to a USB mouse using the PIC16C745/765. The PIC16C745/765
CCT vs. CCENT Skill Set Comparison
Operation of IP Data Networks Recognize the purpose and functions of various network devices such as Routers, Switches, Bridges and Hubs Select the components required to meet a given network specification
Lab 7.1.9b Introduction to Fluke Protocol Inspector
Lab 7.1.9b Introduction to Fluke Protocol Inspector DCE SanJose1 S0/0 S0/0 SanJose2 #1 #2 Objective This lab is a tutorial demonstrating how to use the Fluke Networks Protocol Inspector to analyze network
Debugging Network Communications. 1 Check the Network Cabling
Debugging Network Communications Situation: you have a computer and your NetBurner device on a network, but you cannot communicate between the two. This application note provides a set of debugging steps
Caml Virtual Machine File & data formats Document version: 1.4 http://cadmium.x9c.fr
Caml Virtual Machine File & data formats Document version: 1.4 http://cadmium.x9c.fr Copyright c 2007-2010 Xavier Clerc [email protected] Released under the LGPL version 3 February 6, 2010 Abstract: This
Modbus and ION Technology
Modbus and ION Technology Modicon Modbus is a communications protocol widely used in process control industries such as manufacturing. ACCESS meters are compatible with Modbus networks as both slaves and
Internet Control Protocols Reading: Chapter 3
Internet Control Protocols Reading: Chapter 3 ARP - RFC 826, STD 37 DHCP - RFC 2131 ICMP - RFC 0792, STD 05 1 Goals of Today s Lecture Bootstrapping an end host Learning its own configuration parameters
LabelWriter. Print Server. User Guide
LabelWriter Print Server User Guide Copyright 2010 Sanford, L.P. All rights reserved. 08/10 No part of this document or the software may be reproduced or transmitted in any form or by any means or translated
Ethernet 241 (USB/Serial) Quick Start Guide
Ethernet 241 (USB/Serial) Quick Start Guide I. Ethernet 241 Device Overview The Ethernet 241 device is a two port switch that interfaces a networked device (such as a printer) with a networked device server,
User Manual Network Interface
User Manual Network Interface Rev. 1.00 SRP-350plusll SRP-352plusll http://www.bixolon.com Table of Contents 1. Manual Information...3 2. Specifications...3 2-1 Hardware version...3 2-2 Configuration Tool...3
Virtual KNX/EIB devices in IP networks
WEINZIERL ENGINEERING GmbH WEINZIERL ENGINEERING GMBH F. Heiny, Dr. Y. Kyselytsya, Dr. Th. Weinzierl Bahnhofstr. 6 D-84558 Tyrlaching Tel. +49 (0) 8623 / 987 98-03 E-Mail: [email protected] Web: www.weinzierl.de
RN-131-PICTAIL & RN-171-PICTAIL Web-Server Demo Application
RN-131-PICTAIL & RN-171-PICTAIL Web-Server Demo Application 2012 Roving Networks. All rights reserved. RN-131/171-PICTAIL-UM Version 1.0 1/8/2013 OVERVIEW The RN-131 and RN-171 WiFly radio modules are
4m. MONITORING OF ETHERNET/IP NETWORK TRAFFIC.
4m. MONITORING OF ETHERNET/IP NETWORK TRAFFIC. Wireshark (see Section 6) is a network packet analyser. It is used to: troubleshoot network problems, examine security problems, debug protocol implementations,
The Advanced JTAG Bridge. Nathan Yawn [email protected] 05/12/09
The Advanced JTAG Bridge Nathan Yawn [email protected] 05/12/09 Copyright (C) 2008-2009 Nathan Yawn Permission is granted to copy, distribute and/or modify this document under the terms of the
Learning USB by Doing. [email protected]
Learning USB by Doing. [email protected] The question that I am asked most often is how do I start a USB project? There are many alternate starting points for the design of a USB I/O device and this
Wireless-N. User Guide. PCI Adapter WMP300N (EU) WIRELESS. Model No.
2,4 GHz WIRELESS Wireless-N PCI Adapter User Guide Model No. WMP300N (EU) Copyright and Trademarks Specifications are subject to change without notice. Linksys is a registered trademark or trademark of
WIZnet S2E (Serial-to-Ethernet) Device s Configuration Tool Programming Guide
WIZnet S2E (Serial-to-Ethernet) Device s Configuration Tool Programming Guide Rev 0.2 This document describes how to make your own Configuration Tool for WIZ100SR, WIZ105SR and WIZ110SR of WIZnet. And
The full setup includes the server itself, the server control panel, Firebird Database Server, and three sample applications with source code.
Content Introduction... 2 Data Access Server Control Panel... 2 Running the Sample Client Applications... 4 Sample Applications Code... 7 Server Side Objects... 8 Sample Usage of Server Side Objects...
Lab 8.3.2 Conducting a Network Capture with Wireshark
Lab 8.3.2 Conducting a Network Capture with Wireshark Objectives Perform a network traffic capture with Wireshark to become familiar with the Wireshark interface and environment. Analyze traffic to a web
Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages
Part I: The problem specifications NTNU The Norwegian University of Science and Technology Department of Telematics Note! The problem set consists of two parts: Part I: The problem specifications pages
AN833. The Microchip TCP/IP Stack INTRODUCTION STACK ARCHITECTURE REFERENCE MODEL
M AN833 The Microchip TCP/IP Stack Author: INTRODUCTION Nilesh Rajbharti Microchip Technology Inc. There is nothing new about implementing TCP/IP (Transmission Control Protocol/Internet Protocol) on Microchip
