blob: 7df8785fc70d3171008846b2d1c3ed36cfbf8a0d [file] [log] [blame]
Andrzej Pietrasiewicze38eb2c2014-12-16 14:56:25 +01001This file summarizes information on basic testing of USB functions
2provided by gadgets.
3
41. ACM function
Andrzej Pietrasiewiczd5862ca2014-12-16 14:56:26 +010052. ECM function
Andrzej Pietrasiewicze38eb2c2014-12-16 14:56:25 +01006
7
81. ACM function
9===============
10
11The function is provided by usb_f_acm.ko module.
12
13Function-specific configfs interface
14------------------------------------
15
16The function name to use when creating the function directory is "acm".
17The ACM function provides just one attribute in its function directory:
18
19 port_num
20
21The attribute is read-only.
22
23There can be at most 4 ACM/generic serial/OBEX ports in the system.
24
25
26Testing the ACM function
27------------------------
28
29On the host: cat > /dev/ttyACM<X>
30On the device : cat /dev/ttyGS<Y>
31
32then the other way round
33
34On the device: cat > /dev/ttyGS<Y>
35On the host: cat /dev/ttyACM<X>
Andrzej Pietrasiewiczd5862ca2014-12-16 14:56:26 +010036
372. ECM function
38===============
39
40The function is provided by usb_f_ecm.ko module.
41
42Function-specific configfs interface
43------------------------------------
44
45The function name to use when creating the function directory is "ecm".
46The 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
56and after creating the functions/ecm.<instance name> they contain default
57values: qmult is 5, dev_addr and host_addr are randomly selected.
58Except for ifname they can be written to until the function is linked to a
59configuration. The ifname is read-only and contains the name of the interface
60which was assigned by the net core, e. g. usb0.
61
62Testing the ECM function
63------------------------
64
65Configure IP addresses of the device and the host. Then:
66
67On the device: ping <host's IP>
68On the host: ping <device's IP>