Project

General

Profile

Actions

Android USB Gadget » History » Revision 1

Revision 1/7 | Next »
laforge, 12/17/2016 11:27 AM


Android USB Gadget

'struct android_usb_function' implements a given function

Gadgets

ffs (function FS)

  • userspace process can implement USB functions
  • used e.g. by adbd

acm (CDC "astract control model")

  • USB-IF standardized version of serial-type ports
  • exposed via /dev/ttyGS* device

rmnet

usb gadget driver to implement a rmnet gadget, f_rmnet.c
Documentation/usb/gadget_rmnet.txt

  • drivers/net/ethernet/msm/msm_rmnet_mhi.c
  • interface descriptor: class/subclass/proto = 0xff, numEP=3
    • stringdescriptor en-us, string 0 == "RmNet"
    • full speed descriptors (notify/in/out)
    • high speed descriptors (notify/in/out)
    • super speed descriptors (notify/in/out + comp)
  • rmnet has ports
  • control ports can map to SMD, QTY, HSIC,HSUART
  • data ports can map to BAM2BAM, BAM_DMUX, BAM2BAM_IPA, HSIC, HSUART, ETHER
    • BAM2BAM is normal case?
    • ETHER exposes the data pipe as usb_rmnet%d device on Linux (EC25 only)
  • frmnet_init_port() establishes connections

gps

  • IF class/sub/proto = 0xff
  • only one endpoint (notify)
  • string0 (en-us) is "GPS"

ncm (CDC Netowrk (NCM) link function)

ecm_qc (CDC Ethernet)

usb_mbim (Mobile Broadband Interface Model)

audio (uac1?)

diag

  • class/sub/proto = 0xff
  • num-ep 2
  • max-packet 512
  • some special assumption only if bInterfaceNumber==0

qdss (Qualcomm Debug Sub-System)

  • has QDSS DATA / QDSS CTRL string descriptor
  • somehow connects to BAM

serial

  • class=0xff, sub/proto = 0
  • num_endpoints = 3
  • string descroptor "Generic Serial"
  • transports
    • tty (-> gserial)
    • smd (shared memory)
    • char_bridge (?)
    • hsic

ccid (chipcard reader)

  • /dev/ccid_ctrl
  • /dev/ccid_bulk
  • probably intended to be used with userspace progam translating USB CCID requests into QMI requests to access SIM card(s)

charging

  • usb charger support

mtp

ptp

rndis

rndis_qc

ecm

mass_storage

accessory

audio_source

midi

rndis_gsi

rmnet_gsi

ecm_gsi

mbim_gsi

dpl_gsi

modem detection / EC20 re-using same usb device id / interface numbers

The idea here is to dynamically detect which interface number exposes a certain interface,
regardless what order / qty / interface number

  • ADB: 255/66/1, 2 EP
  • Diag: 255/255/255, 2 EP
  • TTY: 255/0/0, 3 EP, unrecognized descriptors
  • RMNET: 255/255/255, 3EP
Files (0)

Updated by laforge over 7 years ago · 1 revisions

Add picture from clipboard (Maximum size: 48.8 MB)