MUSBLAN Customer Kit Configuration

September 1, 2020

Belcarra’s MUSBLAN for MacOS is a Driverkit Extension that implements Networking over USB.

Installation of the MUSBLAN Driverkit Extension is done from the MUSBLAN Installation program. The Application bundle for the installation program contains the Driver Extensions required to implement the driver.

The configuration of the installation program requires:
1.    Customer Name for the installation program
2.    The customer USB Vendor ID and list of Product ID’s to match
3.    Two provisioning profiles.
a.    Installation application
b.    DriverKit extension

Provisioning profiles are generated by using an Apple Developer Account. They contain the Team Identifier for the Developer Account, the public keys for the codesigning certificate that will be used to codesign bundles that use the provisioning profile, and the specific entitlements that the bundle is requesting.

Belcarra can provide the profiles and codesign the resulting Application Bundle.

Optionally if the customer needs to codesign the Application Bundle, they must provide the provisioning profiles because the certificate that will be used for codesigning is specified in the provisioning profile.

Entitlements

The creation of the required provisioning profiles requires specific entitlements and certificates.

Customers that need to generate their own provisioning profiles will need to request these entitlements from Apple, and approved by Apple for the specific Developer account they will be using:
     System Extension - used by the Installation application
     DriverKit USB Transport - VendorID - used by the DriverKit extensions

N.B. The USB Transport entitlement will be granted for a specific USB Vendor ID. The DriverKit extension cannot be used for any Vendor ID not specifically called out in the provisioning file.

N.B. It is not clear at this time if Application Bundles containing DriverKit Extensions can be distributed in the Mac App Store.

 Entitlements can be requested from Apple at this page: https://developer.apple.com/contact/request/system-extension/

Tools for configuring and working with Linux Gadget available on GitHub



https://github.com/Belcarra/gadgetconfig

We have made the above available as part of our ongoing efforts to assist developers who want to implement USB devices. This package contains tools for configuring Gadget USB Devices and integrating with systemd.
It relies on the Gadget ConfigFS module libcomposite to create and manage Gadget USB Devices.

Microchip PIC32MZ Network over USB Demo Kit available on GitHub

https://github.com/Belcarra/pic32mz_usblan_harmony3_demo


This is a demonstration kit for the Belcarra PIC32MZ USBLAN Driver using either of Microchip's PIC32MZ EF Starter Kit or PIC32MZ EF Curiosity Board.

The kit demonstrates how Networking over USB can be used as an alternative to Ethernet or WiFi and provide lower cost networking to a Microchip PIC32MZ based board with performance that is close to Ethernet at over 80Mbps per second.

Networking over USB allows a point to point network connection to be used between the PIC32MZ board and a Windows, Mac or Linux host.

This kit is based on the Microchip Harmony 3 Framework demonstration project however it is not necessary to have the Harmony 3 Framework or the MPLAB Code Configurator installed.

MUSBLAN: USBLAN for MacOS

Introduction

MUSBLAN is an adaptation of Belcarra Technologies USBLAN for Windows to the MacOS (10.11.1 and later) environment.

MUSBLAN focuses on three protocols for networking over USB: Microsoft RNDIS, CDC-EEM and CDC-ECM subset. Kits are protocol-specific.

Parameters of a kit

An MUSBLAN kit has the following parameters:

  • USB Vendor/Product ID/Interface triples (driver personality information). 
  • IP address of a Virtual Network Interface in MacOS which is bridged to the attached USB device(s). 
  • Protocol: CDC-ECM subset, EEM or RNDIS. Other protocols (ECM, NCM) on request.

Automatic system configuration

The MUSBLAN system offers a DHCP service to both the MacOS host and one or more attached devices, forming a network segment of those network nodes.  The host IP address is a kit parameter, always ending in 1, e.g. 192.168.200.1.  This address is mapped to a Virtual Network Interface in the System Preferences Network pane on the Mac. Attached devices take sequential positions, e.g. 192.168.200.2, 192.168.200.3.  In this way both ends of the link can be DHCP clients and yet know the IP address of the remote end of the link.

Contents of a Kit

MUSBLAN is provided as a "Kext", kernel extension package, including preinstall and postinstall scripts which first remove previous instances, unload possible conflicting extensions, install the new kernel extension, and then load it.

MacOS Security Policy

MacOS security policy now requires that kernel extensions from third parties be approved by the user in the Security&Privacy pane of System Preferences or during system boot immediately after installation.

DemoDriver

An evaluation version of MUSBLAN  is available to OEM's upon request

NDIS 6.3 - InstantGo Developer Notes

Network Device Interface Specification (NDIS) 6.3, included with Windows 8 and newer Microsoft Operating Systems implement new power management capabilities especially for devices such as tablets and 2 in 1 systems..

The following engineering notes (Stuart Lynne) addresses a particular feature known 
variously as:
  • InstantGo
  • AOAC (Always On / Always Connected)
  • Connected Standby
InstantGo capable devices (aka Windows on Tablets) are designed to minimize power consumption and extend battery life. If Windows determines that a connected device is not being actively used it will attempt to suspend it.

Simple CDC-ECM network using Belcarra's USBLAN for Windows

The following information outlines how to configure and load the Linux gadget modules to setup a simple USB CDC-ECM portocol network using Belcarra's freely available evaluation version of USBLAN for Windows.

Firstly,take a Linux kernel and reconfigure it as follows:

- Add the following line if not present
  CONFIG_USB_NET=m
- Remove the following lines if present
  CONFIG_USB_ETH_RNDIS=y
  CONFIG_USB_ETH_EEM=y


Belcarra USBLAN for Microchip PIC32 Networking over USB Demonstration

November 2019 Update

NOW AVAILABLE - High Speed USBLAN PIC32MZ Implementation


Overview

The Microchip PIC32 allows for implementation of a Full Speed USB device.

Implementing a Networking over USB solution allows a PIC32 based design to connect to a Microsoft Windows system and use TCP/IP network connections using the Belcarra Windows USBLAN Class driver.

Microchip makes available a TCP/IP stack and a demonstration application that implements a Web Server. In their demo the Web Server can be accessed via the Ethernet.

Belcarra has created a Networking over USB driver (USBLAN Function Driver) for Microchip that allows the TCP/IP stack to use USB to connect to a Windows system.  A demonstration kit is available to demonstrate this capability.

This demonstration kit is adapted from Microchips Ethernet implementation of  a web server demo. The Belcarra kit uses the v2.9a version of USB from Microchip and has been implemented with the most recent production version v5.42 of the Microchip TCP/IP stack. Belcarra can also on request make available a version of this demo using the Microchip version v6 Beta TCP/IP stack.

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.

Demonstration Kit  [Updated April 4, 2015]

There are three hex project files

Installing USBLAN for Windows Demo on Windows 8

Belcarra’s evaluation version of USBLAN for Windows is not available directly from Windows Update for a Windows 8 user at this time, but it can be installed locally as described here.
First make sure your device is not connected to the PC. This is an optional procedure, but the following instruction screens make that assumption.

Next, run the Desktop

USB TestDrive - Panda

Introduction

For some time now Belcarra has made available a USB test package system for the Gumstix Overo Earth and related boards. This package is ultimately based on the Angstrom system.

The goal of Testdrive Panda (updated 2013-12-13) is to extend the project to newer systems using the TI Pandaboard. The decision was made to use Ubuntu instead of Angstrom because it’s possible to put a complete development system on board the distribution -- so if you want to test with an additional tool -- just load it on the board either with the package manager or in the worst case build it from source, all on the board, no cross-compilation needed.

However, another goal of the effort was to make this mostly unnecessary. For example, the standard network performance tool iperf is not part of the Ubuntu distro that we used, but we added a source for iperf to the package manager’s source list.

In addition to this, we customized the distro (download here) to use a more recent Linux kernel  with a customized configuration streamlined for USB testing.

Acquiring and Installing TestDrive-Panda

USBLAN for Windows - RNDIS Protocol Support

Belcarra is pleased to announce the addition of the RNDIS protocol to their USBLAN for Windows Network over USB solution (http://usblan.belcarra.com/),

Belcarra’s USB Class Driver is a suite of products which enables networking over the USB link. Belcarra’s RNDIS implementation provides several USBLAN features including faster data transfer abilities. The addition of RNDIS gives Belcarra's USBLAN for Windows the most complete set of USB networking protocols available in a single driver product.

http://www.prweb.com/releases/2012/8/prweb9769681.htm

Contact us to receive your evaluation copy of the  USBLAN 2.4.4 release.

Virtual Driver for USB Network Devices

USBLAN for Mac OS/X

Belcarra’s new Virtual Driver for Networked USB devices greatly improves the end user experience for interfacing smart devices to the Mac OS/X desktop.

Traditional solutions create a network interface for each attached device requiring the user to find and then configure a network service for the interface with the correct operating parameters (IP address etc.)

Belcarra’s solution features a Virtual Network Interface that is created when the system is started. This interface can be configured to a static IP address or simply default to use the normal DHCP configuration.

USBLAN 2.4.1 Available

USBLAN 2.4.0 release provided support for CDC-NCM and Microsoft NDIS 6.

USBLAN 2.4.1 now adds support for the Microsoft RNDIS protocol.

OEM's with with WinCE, embedded Linux or other devices configured to use RNDIS can now simply take advantage of USBLAN's many networking features such as:
  • DHCP Service – DHCP service is not need on target or Windows, USBLAN's built in DHCP server option can be used to co-ordinate and assign address of both the host and device network interfaces 
  • Composite function – the USBLAN driver is fully compatible with the Windows USB composite function support 
  • WHQL – drivers are fully compatible with Microsoft Windows Hardware Quality Labs (WHQL) tests and procedures 
  • Multiple devices can be connected allowing peer to peer networking and to the Windows desktop.
An evaluation version and OEM manual are freely available

Belcarra EEM Configuration Extension Descriptor

The CDC-EEM protocol is capable of aggregating multiple network datagrams into a single Bulk Data transfer.

The standard does not implement a mechanism to allow the host and device to determine an appropriate size for Bulk transfers. While implementing EEM without this information is possible, it complicates the implementation. If the Host and Device know what the capabilities of the other end are (WRT to transfer size especially) then the driver implementations can be significantly simpler and easier to implement.

Multiple Frame Support

Networking over USB protocols can support network frame aggregation. This allows for multiple network frames to be transferred in a single Bulk Data transfer.

USB Bulk Data transfers have overheads. Both at the bus level where individual transfers must be terminated with a short data packet. And at the OS level where the USB controller drivers must setup and tear down each transfer. And finally in the communication between the protocol driver (class driver on host systems and matching function driver on devices) and the low level controller drivers. These add latency to the time it takes for each transfer to take place.

Aggregating multiple network frames into a single Bulk Data transfer allows the overheads and associated latencies to be absorbed across multiple network frames.

Care must be taken in the use of this feature though. Additional latency is induced as the entire Bulk Transfer must be received before any of the network frames it contains can be forwarded. This places a bound on effective number of frames that should be aggregated. The actual number is best determined by using simple heuristics at runtime to ensure that the use of available bandwidth is optimized with only minimal latency added.

Effective multi-frame support can provide close to 100% improvement in throughput.

Evaluation Version 2.4 USBLAN from Windows Update

The new version of Belcarra's USB Class Driver for Windows is available through the Microsoft DDC.  To use the USBLAN 2.4 evaluation driver your device will need to offer Vendor ID 0x15ec (Belcarra) and our Demo Product ID 0xd041. Ensure that your Windows system is connected to the Internet, plug your device in and let Windows search Windows Update.  The protocol (CDC-ECM, CDC-EEM, CDC-NCM and RNDIS) is automatically detected.

The INF file of the USBLAN evaluation driver creates global variables in the registry using Service name BelcarraDemoUSBLAN (see Section 5.2). These parameters can be modified later using Regedit. Alternatively, common operations, like enable or disable DHCP, can be performed by installing the appropriately named INF file in a supplementary package of INF files (available on request). For example, to enable the DHCP feature do the following
right-click on the file dhcpd-enable.inf in Windows Explorer
select the method Install
N.B. the evaluation USBLAN driver is not the debug version of the driver. If you need to debug your USB device contact support@belcarra.com for a debug (CHK) version of the evaluation driver.

This evaluation version will run for 30 minutes at a time. It must be re-plugged to continue use.

USB TestDrive Windows Setup

This document is part of series about Belcarra’s USB Testdrive, a quick and easy system for setting up and testing USB solutions between a Windows host and a Gumstix Overo.

The TestDrive system can be used to test and evaluate various USB networking solutions. This document describes
  • How to prepare a Windows test machine
  • How to obtain Belcarra’s USBLAN Windows driver which transparently supports CDC-ECM, CDC-EEM, CDC-NCM.
  • How to run definitive tests to determine reliability, endurance and speed of network links, using industry standard tools.
A USB system consists of a host and one or more peripherals, also known as targets. The TestDrive system uses Windows (all recent versions) as the host environment, and the Gumstix Overo as the target.

Windows Setup and Testing

Belcarra USB TestDrive


Belcarra supports an environment for testing USB Networking protocols. This paper, is the first in a series and will provide an overview of this environment which includes both USB Host and USB Device side software components.

Belcarra’s Overo USB TestDrive is a Linux based test system based on the Gumstix Overo board. The Overo board is a low cost hardware development system using a Texas Instruments OMAP series of System On Chip (SOC) technology. It 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
The USB TestDrive kit contains:
  • Overo ROOTFS
  • Compiled Linux kernel and modules
  • script to create an SD card to boot an Overo
Network test tools included:
  • wget / wput
  • iperf
  • apache
  • ping and pingall script

Updated USB MSC Function

Belcarra’s USB Device stack includes a Mass Storage (MSC) function. This allows an embedded device using the USB Framework to emulate a Mass Storage device either as a standalone function or as part of a composite configuration.

The Belcarra MSC solution was updated to increase performance and extend its feature set:
  • More efficient use of the Block IO system for higher throughput
  • Support for mulitple LUN’s (storage volumes)
  • Management (API) allowing things like detecting individual LUN changes
  • Virtual CDROM support (map an ISO image)
  • Read-only volume support -- (Management API allows dynamic change)

CDC-EEM Streaming Mode

Support for networking over USB using the Ethernet Emulation Model was originally implemented in 2006 on both the device (Composite Device Framework) and host  (USBLAN) drivers. Current versions of our drivers now include streaming mode  providing for significantly faster data transfer, "EEM throughput is about 50% higher than ECM in an optimal configuration".  For more information, contact us today.

USBLAN Driver available in Windows Update

Year end review of the Windows Update program that enabled end users to simply and silently install Belcarra USBLAN deemed it as a success.
New Belcarra USBLAN customer kits are required to pass Windows Hardware Quality Labs testing review as well as the previous regime of stress tests.
Microsoft signed USBLAN driver from Windows Update no longer requires system restart or user input during installation.
For more information a fairly comprehensive deployment guide is available here.

[UPDATE - July 20,2011 USBLAN Version 2.4 Released Download OEM Manual]

See also: Linux Gadget VID/PID Patch for USBLAN Evaluation
These patches (download here) modify the Linux Ethernet Gadget default CDC Vendor and Product ID to match the Belcarra USBLAN Evaluation kits available from Windows Update.

Favourites