Changes between Version 12 and Version 13 of linux/OTG


Ignore:
Timestamp:
06/13/2025 07:21:12 PM (4 days ago)
Author:
Tim Harvey
Comment:

updated g_multi

Legend:

Unmodified
Added
Removed
Modified
  • linux/OTG

    v12 v13  
    101101The Serial Gadget supports CDC-ACM and CDC-OBEX which can inter-operate with the MS-Windows hosts or with Linux hosts using the 'cdc-acm' driver to create a 'USB-to-Serial' connection.
    102102
    103 On the target a serial device will be created as {{{/dev/ttyGS0}}} (or the next avaialble ttyGS device).
     103On the target a serial device will be created as {{{/dev/ttyGS0}}} (or the next available ttyGS device).
    104104
    105105On a host device (ie PC) a USB CDC ACM device (VID:PID 0525:a4a7 by default) will appear and behave as a serial device. Module parameters can specify the VID, PID, device version, manufacturer string, product string, serialnumber and whether or not to use CDC ACM, CDC OBEX, and the number of ports to create.
     
    158158
    159159[=#g_multi]
    160 === g_multi - Composite Ethernet + Serial + Mass Storage Gadget ===
     160=== g_multi - Composite Ethernet + Serial + Mass Storage Gadget
    161161The g_multi gadget supports multiple functions in one configuration:
    162162 * a CDC Ethernet (ECM) link
     
    164164 * a USB Mass Storage device
    165165
    166 Example:
    167  * on target device (Gateworks board with OTG controller):
    168 {{{#!bash
    169 modprobe g_cdc
    170 }}}
    171  * on host device (ie PC) a USB CDC ACM device (VID:PID 1d6b:0104 by default) will appear
    172  * module parameters can specify the VID, PID, device version, manufacturer string, product string, serialnumber
    173  * module parameters can specify the ethernet device and host address and queue length multiplier at high speed
    174 
    175 Linux USB Host notes:
    176  * the cdc_acm driver will enumerate this device as '/dev/ttyACM<n>'
    177  * the cdc_ether driver will enumerate this device as a 'usb<n>' network device
    178  * the usb-storage driver will provide the USB Mass Storage feature
    179 
    180 Windows USB Host notes:
    181  * A Multifunction Composite Gadget device will appear in Device Manager
    182  * see [https://www.kernel.org/doc/Documentation/usb/gadget_multi.txt ​here] for details on Windows configuration
     166On the target the following devices will be created:
     167 * serial device {{{/dev/ttyGS0}}} (or the next available ttyGS device)
     168 * usb network device {{{/sys/class/net/usb0}}} (or the next available usb network device)
     169
     170Module parameters can specify the VID, PID, device version, manufacturer string, product string, serialnumber and a range of other options (use '{{{modinfo g_multi}}}' to examine).
     171
     172On a host device (ie PC) a USB Composite Gadget device will enumerate.
     173
     174A Linux USB Host supports this with:
     175 * the {{{cdc_ether}}} driver which will create a {{{/sys/class/net/usb0}}} device (or the next available usb netdev)
     176 * the {{{usb_storage}}} driver which will create a {{{/dev/sdc}}} device (or the next available sd device letter)
     177 * the {{{cdc_acm}}} driver which will create a {{{/dev/ttyACM0}}} device (or the next available ttyACM).
     178
     179
     180For a Windows host a Multifunction Composite Gadget device will appear in Device Manager. See [https://www.kernel.org/doc/Documentation/usb/gadget_multi.txt ​here] for details on Windows configuration
     181
     182
     183Example:
     184 * on target device (Gateworks board with OTG controller):
     185{{{#!bash
     186# create a backing store file (or use a physical blkdev)
     187dd bs=1M count=64 if=/dev/zero of=/backing_file
     188# load the module
     189modprobe g_multi file=/backing_file
     190}}}
     191
    183192
    184193References: