Commit | Line | Data |
---|---|---|
e38eb2c8 AP |
1 | This file summarizes information on basic testing of USB functions |
2 | provided by gadgets. | |
3 | ||
4 | 1. ACM function | |
d5862ca6 | 5 | 2. ECM function |
7bfbc6e3 | 6 | 3. ECM subset function |
e38eb2c8 AP |
7 | |
8 | ||
9 | 1. ACM function | |
10 | =============== | |
11 | ||
12 | The function is provided by usb_f_acm.ko module. | |
13 | ||
14 | Function-specific configfs interface | |
15 | ------------------------------------ | |
16 | ||
17 | The function name to use when creating the function directory is "acm". | |
18 | The ACM function provides just one attribute in its function directory: | |
19 | ||
20 | port_num | |
21 | ||
22 | The attribute is read-only. | |
23 | ||
24 | There can be at most 4 ACM/generic serial/OBEX ports in the system. | |
25 | ||
26 | ||
27 | Testing the ACM function | |
28 | ------------------------ | |
29 | ||
30 | On the host: cat > /dev/ttyACM<X> | |
31 | On the device : cat /dev/ttyGS<Y> | |
32 | ||
33 | then the other way round | |
34 | ||
35 | On the device: cat > /dev/ttyGS<Y> | |
36 | On the host: cat /dev/ttyACM<X> | |
d5862ca6 AP |
37 | |
38 | 2. ECM function | |
39 | =============== | |
40 | ||
41 | The function is provided by usb_f_ecm.ko module. | |
42 | ||
43 | Function-specific configfs interface | |
44 | ------------------------------------ | |
45 | ||
46 | The function name to use when creating the function directory is "ecm". | |
47 | The 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 | ||
57 | and after creating the functions/ecm.<instance name> they contain default | |
58 | values: qmult is 5, dev_addr and host_addr are randomly selected. | |
59 | Except for ifname they can be written to until the function is linked to a | |
60 | configuration. The ifname is read-only and contains the name of the interface | |
61 | which was assigned by the net core, e. g. usb0. | |
62 | ||
63 | Testing the ECM function | |
64 | ------------------------ | |
65 | ||
66 | Configure IP addresses of the device and the host. Then: | |
67 | ||
68 | On the device: ping <host's IP> | |
69 | On the host: ping <device's IP> | |
7bfbc6e3 AP |
70 | |
71 | 3. ECM subset function | |
72 | ====================== | |
73 | ||
74 | The function is provided by usb_f_ecm_subset.ko module. | |
75 | ||
76 | Function-specific configfs interface | |
77 | ------------------------------------ | |
78 | ||
79 | The function name to use when creating the function directory is "geth". | |
80 | The 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 | ||
90 | and after creating the functions/ecm.<instance name> they contain default | |
91 | values: qmult is 5, dev_addr and host_addr are randomly selected. | |
92 | Except for ifname they can be written to until the function is linked to a | |
93 | configuration. The ifname is read-only and contains the name of the interface | |
94 | which was assigned by the net core, e. g. usb0. | |
95 | ||
96 | Testing the ECM subset function | |
97 | ------------------------------- | |
98 | ||
99 | Configure IP addresses of the device and the host. Then: | |
100 | ||
101 | On the device: ping <host's IP> | |
102 | On the host: ping <device's IP> |