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 |
e38eb2c8 AP |
6 | |
7 | ||
8 | 1. ACM function | |
9 | =============== | |
10 | ||
11 | The function is provided by usb_f_acm.ko module. | |
12 | ||
13 | Function-specific configfs interface | |
14 | ------------------------------------ | |
15 | ||
16 | The function name to use when creating the function directory is "acm". | |
17 | The ACM function provides just one attribute in its function directory: | |
18 | ||
19 | port_num | |
20 | ||
21 | The attribute is read-only. | |
22 | ||
23 | There can be at most 4 ACM/generic serial/OBEX ports in the system. | |
24 | ||
25 | ||
26 | Testing the ACM function | |
27 | ------------------------ | |
28 | ||
29 | On the host: cat > /dev/ttyACM<X> | |
30 | On the device : cat /dev/ttyGS<Y> | |
31 | ||
32 | then the other way round | |
33 | ||
34 | On the device: cat > /dev/ttyGS<Y> | |
35 | On the host: cat /dev/ttyACM<X> | |
d5862ca6 AP |
36 | |
37 | 2. ECM function | |
38 | =============== | |
39 | ||
40 | The function is provided by usb_f_ecm.ko module. | |
41 | ||
42 | Function-specific configfs interface | |
43 | ------------------------------------ | |
44 | ||
45 | The function name to use when creating the function directory is "ecm". | |
46 | The ECM function provides these attributes in its function directory: | |
47 | ||
48 | ifname - network device interface name associated with this | |
49 | function instance | |
50 | qmult - queue length multiplier for high and super speed | |
51 | host_addr - MAC address of host's end of this | |
52 | Ethernet over USB link | |
53 | dev_addr - MAC address of device's end of this | |
54 | Ethernet over USB link | |
55 | ||
56 | and after creating the functions/ecm.<instance name> they contain default | |
57 | values: qmult is 5, dev_addr and host_addr are randomly selected. | |
58 | Except for ifname they can be written to until the function is linked to a | |
59 | configuration. The ifname is read-only and contains the name of the interface | |
60 | which was assigned by the net core, e. g. usb0. | |
61 | ||
62 | Testing the ECM function | |
63 | ------------------------ | |
64 | ||
65 | Configure IP addresses of the device and the host. Then: | |
66 | ||
67 | On the device: ping <host's IP> | |
68 | On the host: ping <device's IP> |