| 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 |
| | 166 | On 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 | |
| | 170 | Module 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 | |
| | 172 | On a host device (ie PC) a USB Composite Gadget device will enumerate. |
| | 173 | |
| | 174 | A 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 | |
| | 180 | For 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 | |
| | 183 | Example: |
| | 184 | * on target device (Gateworks board with OTG controller): |
| | 185 | {{{#!bash |
| | 186 | # create a backing store file (or use a physical blkdev) |
| | 187 | dd bs=1M count=64 if=/dev/zero of=/backing_file |
| | 188 | # load the module |
| | 189 | modprobe g_multi file=/backing_file |
| | 190 | }}} |
| | 191 | |