Documentation: usb: ECM subset function testing
[deliverable/linux.git] / Documentation / usb / gadget-testing.txt
CommitLineData
e38eb2c8
AP
1This file summarizes information on basic testing of USB functions
2provided by gadgets.
3
41. ACM function
d5862ca6 52. ECM function
7bfbc6e3 63. ECM subset function
e38eb2c8
AP
7
8
91. ACM function
10===============
11
12The function is provided by usb_f_acm.ko module.
13
14Function-specific configfs interface
15------------------------------------
16
17The function name to use when creating the function directory is "acm".
18The ACM function provides just one attribute in its function directory:
19
20 port_num
21
22The attribute is read-only.
23
24There can be at most 4 ACM/generic serial/OBEX ports in the system.
25
26
27Testing the ACM function
28------------------------
29
30On the host: cat > /dev/ttyACM<X>
31On the device : cat /dev/ttyGS<Y>
32
33then the other way round
34
35On the device: cat > /dev/ttyGS<Y>
36On the host: cat /dev/ttyACM<X>
d5862ca6
AP
37
382. ECM function
39===============
40
41The function is provided by usb_f_ecm.ko module.
42
43Function-specific configfs interface
44------------------------------------
45
46The function name to use when creating the function directory is "ecm".
47The ECM function provides these attributes in its function directory:
48
49 ifname - network device interface name associated with this
50 function instance
51 qmult - queue length multiplier for high and super speed
52 host_addr - MAC address of host's end of this
53 Ethernet over USB link
54 dev_addr - MAC address of device's end of this
55 Ethernet over USB link
56
57and after creating the functions/ecm.<instance name> they contain default
58values: qmult is 5, dev_addr and host_addr are randomly selected.
59Except for ifname they can be written to until the function is linked to a
60configuration. The ifname is read-only and contains the name of the interface
61which was assigned by the net core, e. g. usb0.
62
63Testing the ECM function
64------------------------
65
66Configure IP addresses of the device and the host. Then:
67
68On the device: ping <host's IP>
69On the host: ping <device's IP>
7bfbc6e3
AP
70
713. ECM subset function
72======================
73
74The function is provided by usb_f_ecm_subset.ko module.
75
76Function-specific configfs interface
77------------------------------------
78
79The function name to use when creating the function directory is "geth".
80The ECM subset function provides these attributes in its function directory:
81
82 ifname - network device interface name associated with this
83 function instance
84 qmult - queue length multiplier for high and super speed
85 host_addr - MAC address of host's end of this
86 Ethernet over USB link
87 dev_addr - MAC address of device's end of this
88 Ethernet over USB link
89
90and after creating the functions/ecm.<instance name> they contain default
91values: qmult is 5, dev_addr and host_addr are randomly selected.
92Except for ifname they can be written to until the function is linked to a
93configuration. The ifname is read-only and contains the name of the interface
94which was assigned by the net core, e. g. usb0.
95
96Testing the ECM subset function
97-------------------------------
98
99Configure IP addresses of the device and the host. Then:
100
101On the device: ping <host's IP>
102On the host: ping <device's IP>
This page took 0.028454 seconds and 5 git commands to generate.