Andrzej Pietrasiewicz | e38eb2c | 2014-12-16 14:56:25 +0100 | [diff] [blame] | 1 | This file summarizes information on basic testing of USB functions |
| 2 | provided by gadgets. |
| 3 | |
| 4 | 1. ACM function |
Andrzej Pietrasiewicz | d5862ca | 2014-12-16 14:56:26 +0100 | [diff] [blame] | 5 | 2. ECM function |
Andrzej Pietrasiewicz | 7bfbc6e | 2014-12-16 14:56:27 +0100 | [diff] [blame] | 6 | 3. ECM subset function |
Andrzej Pietrasiewicz | 4ca560a | 2014-12-16 14:56:28 +0100 | [diff] [blame^] | 7 | 4. EEM function |
Andrzej Pietrasiewicz | e38eb2c | 2014-12-16 14:56:25 +0100 | [diff] [blame] | 8 | |
| 9 | |
| 10 | 1. ACM function |
| 11 | =============== |
| 12 | |
| 13 | The function is provided by usb_f_acm.ko module. |
| 14 | |
| 15 | Function-specific configfs interface |
| 16 | ------------------------------------ |
| 17 | |
| 18 | The function name to use when creating the function directory is "acm". |
| 19 | The ACM function provides just one attribute in its function directory: |
| 20 | |
| 21 | port_num |
| 22 | |
| 23 | The attribute is read-only. |
| 24 | |
| 25 | There can be at most 4 ACM/generic serial/OBEX ports in the system. |
| 26 | |
| 27 | |
| 28 | Testing the ACM function |
| 29 | ------------------------ |
| 30 | |
| 31 | On the host: cat > /dev/ttyACM<X> |
| 32 | On the device : cat /dev/ttyGS<Y> |
| 33 | |
| 34 | then the other way round |
| 35 | |
| 36 | On the device: cat > /dev/ttyGS<Y> |
| 37 | On the host: cat /dev/ttyACM<X> |
Andrzej Pietrasiewicz | d5862ca | 2014-12-16 14:56:26 +0100 | [diff] [blame] | 38 | |
| 39 | 2. ECM function |
| 40 | =============== |
| 41 | |
| 42 | The function is provided by usb_f_ecm.ko module. |
| 43 | |
| 44 | Function-specific configfs interface |
| 45 | ------------------------------------ |
| 46 | |
| 47 | The function name to use when creating the function directory is "ecm". |
| 48 | The ECM function provides these attributes in its function directory: |
| 49 | |
| 50 | ifname - network device interface name associated with this |
| 51 | function instance |
| 52 | qmult - queue length multiplier for high and super speed |
| 53 | host_addr - MAC address of host's end of this |
| 54 | Ethernet over USB link |
| 55 | dev_addr - MAC address of device's end of this |
| 56 | Ethernet over USB link |
| 57 | |
| 58 | and after creating the functions/ecm.<instance name> they contain default |
| 59 | values: qmult is 5, dev_addr and host_addr are randomly selected. |
| 60 | Except for ifname they can be written to until the function is linked to a |
| 61 | configuration. The ifname is read-only and contains the name of the interface |
| 62 | which was assigned by the net core, e. g. usb0. |
| 63 | |
| 64 | Testing the ECM function |
| 65 | ------------------------ |
| 66 | |
| 67 | Configure IP addresses of the device and the host. Then: |
| 68 | |
| 69 | On the device: ping <host's IP> |
| 70 | On the host: ping <device's IP> |
Andrzej Pietrasiewicz | 7bfbc6e | 2014-12-16 14:56:27 +0100 | [diff] [blame] | 71 | |
| 72 | 3. ECM subset function |
| 73 | ====================== |
| 74 | |
| 75 | The function is provided by usb_f_ecm_subset.ko module. |
| 76 | |
| 77 | Function-specific configfs interface |
| 78 | ------------------------------------ |
| 79 | |
| 80 | The function name to use when creating the function directory is "geth". |
| 81 | The ECM subset function provides these attributes in its function directory: |
| 82 | |
| 83 | ifname - network device interface name associated with this |
| 84 | function instance |
| 85 | qmult - queue length multiplier for high and super speed |
| 86 | host_addr - MAC address of host's end of this |
| 87 | Ethernet over USB link |
| 88 | dev_addr - MAC address of device's end of this |
| 89 | Ethernet over USB link |
| 90 | |
| 91 | and after creating the functions/ecm.<instance name> they contain default |
| 92 | values: qmult is 5, dev_addr and host_addr are randomly selected. |
| 93 | Except for ifname they can be written to until the function is linked to a |
| 94 | configuration. The ifname is read-only and contains the name of the interface |
| 95 | which was assigned by the net core, e. g. usb0. |
| 96 | |
| 97 | Testing the ECM subset function |
| 98 | ------------------------------- |
| 99 | |
| 100 | Configure IP addresses of the device and the host. Then: |
| 101 | |
| 102 | On the device: ping <host's IP> |
| 103 | On the host: ping <device's IP> |
Andrzej Pietrasiewicz | 4ca560a | 2014-12-16 14:56:28 +0100 | [diff] [blame^] | 104 | |
| 105 | 4. EEM function |
| 106 | =============== |
| 107 | |
| 108 | The function is provided by usb_f_eem.ko module. |
| 109 | |
| 110 | Function-specific configfs interface |
| 111 | ------------------------------------ |
| 112 | |
| 113 | The function name to use when creating the function directory is "eem". |
| 114 | The EEM function provides these attributes in its function directory: |
| 115 | |
| 116 | ifname - network device interface name associated with this |
| 117 | function instance |
| 118 | qmult - queue length multiplier for high and super speed |
| 119 | host_addr - MAC address of host's end of this |
| 120 | Ethernet over USB link |
| 121 | dev_addr - MAC address of device's end of this |
| 122 | Ethernet over USB link |
| 123 | |
| 124 | and after creating the functions/eem.<instance name> they contain default |
| 125 | values: qmult is 5, dev_addr and host_addr are randomly selected. |
| 126 | Except for ifname they can be written to until the function is linked to a |
| 127 | configuration. The ifname is read-only and contains the name of the interface |
| 128 | which was assigned by the net core, e. g. usb0. |
| 129 | |
| 130 | Testing the EEM function |
| 131 | ------------------------ |
| 132 | |
| 133 | Configure IP addresses of the device and the host. Then: |
| 134 | |
| 135 | On the device: ping <host's IP> |
| 136 | On the host: ping <device's IP> |