Connecting to an Android device

Belcarra's USBLAN for Windows USB Class Driver (host) is our recommended alternative to RNDIS for networking over USB with an Android device . Simply ensure the USB Gadget Support is correctly configured to use g_ether and ensure RNDIS is not enabled.  To use Belcarra's demo version of USBLAN on your Windows host system (available from Windows Update) setup the device to use 15EC for the Vendor ID and D001 Product ID.

Basic Testing of CDC-ECM

The current rev of the Gingerbread project uses Version 2.6.32 of the Linux kernel. This version contains EEM support with a small (but fatal) bug which we have already documented in earlier work. The Android kernel is patched to disable EEM even if the EEM option is selected. By this it is meant the module parameter use_eem defaults to 0 (it defaults to 1 in other kernels). Since modules are not used much (see below), this means that EEM is not readily available. However, for test purposes, we fixed the EEM bug and changed the default value of the use_eem parameter.

To do our tests, we disabled the Android gadget and enabled the g_ether gadget with and without the EEM option.
NOTE: a patch is available  for our customers to use to make EEM work.
Benchmarking Tools.

In the Belcarra TestDrive environment, we used 3 main tools:
  • ping
  • wget (HTTP)
  • iperf
None of these were available in the Gingerbread rootfs. Therefore, we used netperf. A netperf client is included in the Gingerbread/Rowboat standard rootfs. Using netperf requires finding a netperf server for

Linux Gadget VID/PID Patch for USBLAN Evaluation

Linux Ethernet Gadget (g_ether) has built-in Vendor/Product ID pairs which are used if the module parameters idVendor and idProduct are not provided. Two of these pairs are used for the CDC protocols (CDC-ECM and CDC-EEM), while the remaining pair is used for RNDIS.

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.

This allows the g_ether (Ethernet) Gadget to be used in conjunction with Belcarra USBLAN without using module parameters (idVendor and idProduct).
Very useful for Android which uses Gadget built into the kernel (module parameters are not available).

Linux Gadget EEM DEADBEEF Fix

Early versions of Gadget EEM (in the Linux 2.6.32 kernel) set BIT 14 (the sentinel bit) in the EEM header of transmitted data packets, falsely signifying that the data frame had a computed CRC instead of the fake 0xDEADBEEF value that SHOULD used when the bit is NOT set. This patch (available here) fixes this by modifying a single line.

Android Gingerbread Rowboat Project - Enable EEM

Download this patch to modify the Overo Android defconfig to enable the EEM protocol .

Applicable to the Gingerbread Rowboat project on the Gumstix Overo using the Linux 2.6.32 kernel. Very similar steps can be used on other Android projects.