User-agent: * Allow: /
Belcarra Technologies has been a leader in the evolution of USB and it’s use for connecting network peripherals of all types. As a pioneer in the provision of driver software both for smart peripherals as well as for the desktop operating systems that support them, Belcarra’s solutions enable devices to share data across the USB fabric as if they were connected to an otherwise normal TCP/IP network via Ethernet.

CDC-EEM for a microcontroller

Basics

A USB device presents various descriptors to the host in one or more configurations.  If the first configuration matches an\ driver information (INF) file on Windows, then a matching driver in Windows will be loaded. The driver will then examine additional descriptors from the device, and if it is satisfied, it will issue a Set Configuration request to the device, and the device will now be enumerated.

All of the major microcontrollers have libraries that implement the foregoing for simple cases.  To implement a custom protocol, such as CDC-EEM, you need to do the following

  • Modify the Device Descriptor to conform to the requirements of the protocol.  Specifically, you need to set the following values:
    • Class --0x2 = networking device
    • Subclass - 0xc
    • Protocol- 0x7
    • Vendor ID
    • Product ID
  • Modify the Configuration Descriptor and supplementary descriptors (interface, endpoint, string descriptors) to match
  • Modify your network subsystem transmit to fill EEM frames. Your code fills EEM buffers with one or more network frames, and when a buffer is deemed ready, start transmitting it
  • The USB OUT (receive) subsystem will receive 1 EEM frame in a USB transfer, consisting of 1 or more USB packets of maximum length (64 bytes for full speed, 512 bytes for high speed USB) followed by a short or ZLP (zero-length packet). We assume there already support for low-level USB operations.  In particular, at interrupt time we can be informed that a packet of data has been received.  If we are in the process of building an EEM frame, the a full-speed packet is copied to the frame. The EEM standard doesn’t say how big an EEM frame is but USBLAN provides a way for both sides to agree on the maximum size.
  • When an incoming EEM frame is complete, a loop should be triggered  that unpacks it into its component parts (1 or more Ethernet frames) which end become incoming frames to the network subsystem.
  • During the time that incoming EEM frame is being unpacked, new OUT (incoming) data needs to be directed to another buffer.  So the system needs at least two EEM frames in each direction, one to feed the network subsystem and the other to feed the USB subsystem.

The EEM Standard

The EEM Standard document not only specifies the frame formats and other technical data in the usual terse language of standards, but contains a number of explanatory appendices which give a lot of guidance on how to implement and use EEM.

Microchip PIC32 Networking over USB

Belcarra’s implementation of Networking over USB for the Microchip PIC32 is a very low cost networking solution for PIC32 projects, eliminating the need to add an Ethernet chip while using less Flash and RAM resources.


Full details and demonstration kit download available here.

PandaBoards

Belcarra's TestDrive environment for USB Networking protocols has been revisited using TI's PandaBoards.

A full description: Installing and using TestDrive-Panda is available here.

USB TestDrive Network Scripts

The TestDrive scripts described here can be used to load the appropriate modules for all of the various network protocols and variants supported by USBLAN. In the case of RNDIS, it is also possible to tell Windows to use the built-in VID/PID values (therefore not using USBLAN). This allows USBLAN/native RNDIS comparison.

The scripts described here are the foundation: they load network protocols. After this has been done, various network tests can be run. These are described elsewhere.

Supported Protocols
The supported protocols are:
  • ECM
  • EEM
  • NCM
  • ECM subset
  • SAFE (another ECM subset)
  • RNDIS
Stacks
All the protocols, can be loaded with the std (Gadget) implementation in the Linux kernel, or the btc (Belcarra) implementation. In particular Belcarra’s implementation of NCM and EEM is more advanced in important ways that are explained below.

Basic invocation modelThe scripts use a uniform invocation model as follows
stack-protocol [-q] VID PID [IP]

USB Device Framework Overview

Belcarra’s USB Device Framework, a comprehensive USB client driver and management system, allows for fast and efficient implementation of both Simple and Composite USB Devices.

Available in two forms:
  • A source-code product as is,
  • A kit customized for a specific platform and operating system.
Belcarra's Framework has the following subsystems:
Kernel tools
  1. USB InterfaceFunctions -
  2. Composite Support
  3. USB Core Layer
  4. Peripheral Control Drivers - hardware specific
Admin Tools - Provided as extensible API’s to select different runtime configurations; control the mass-storage subsystem.

USB TestDrive Setup

Overo Setup and Testing Overview

This document is an overview of the setup for USB Device testing using Belcarra’s USB TestDrive Environment (download available here), a Linux test system based on the Gumstix Overo board. The Overo board is a low cost hardware development system using TI’s Omap 3530 SOC that supports USB 2.0 for both host and client implementations.

Introduction
The TestDrive system can be used to test and evaluate various USB Networking protocols and implementations:
  • Gadget based network and filestorage function drivers
  • Belcarra based network and mass storage function drivers
  • Belcarra Windows USBLAN class driver
Preparing to Install
This requires an SD card with at least 4GB of space. A page at gumstix.org shows how to create a basic 2-partition SD card. For our demo kit, follow the same procedure, but create three partitions. See Preparing a Micro-SD Memory Card for use with Gumstix COM for further detail.
  • Partition 1 FAT32 (per manufacturer’s page), but allow at least 250MB to allow for kernel backups
  • Partition 2 ext3, about 2GB (use for the ROOTFS)
  • Partition 3 FAT32, remainder of the disk, used for a mass storage volume.
Installation of the TestDrive Kit
The following is an example of how to install the kit. We have made a few assumptions:

Belcarra Overo DEMO Project

Preparing a Micro-SD Memory Card for use with Gumstix COM

This document describes how to partition, format, and copy files to a 4GB Micro-SD memory card for use in a Gumstix for the Belcarra Overo DEMO project.

Network Control Model Protocol

Network Control Model

Belcarra USB Composite Device Framework now supports Network Control Model a multi-frame protocol designed and developed that will allow for much higher throughput (150-250Mbits) than either the CDC  Ethernet Control Model or the Ethernet Emulation Model by allowing for multiple frames per transfer and for the device to optimally specify frame alignment on transfers. (for more information)

USB Support for Gumstix Overo and Verdex Pro COM's

Belcarra is pleased to announce Composite USB Client support is available for both Gumstix products

  • Texas Instruments  OMAP based
  • Marvell X-Scale Verdex

Composite Solution for TI OMAP 3430 Architecture

Belcarra's Composite Device Framework allows an OMAP34xx embedded device to utilize multiple different types of USB Functions, composite configuration combinations of Networking, Mass Storage , Serial emulation, and vendor-specific USB Functions. Each of these would appear to a Windows system as a USB Device separate and independent from the others. (more ... )

Popular Posts