From 56fecfd69aaac0188156196d1e4e89428e460c3e Mon Sep 17 00:00:00 2001 From: Yannick Gicquel Date: Wed, 12 Oct 2016 15:11:52 +0200 Subject: gen2: add README for usbgadget Change-Id: If629ee6edf7a24dd582f3c34a12dea76b84d7388 Signed-off-by: Yannick Gicquel --- meta-rcar-gen2/README-usbgadget.md | 57 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 meta-rcar-gen2/README-usbgadget.md diff --git a/meta-rcar-gen2/README-usbgadget.md b/meta-rcar-gen2/README-usbgadget.md new file mode 100644 index 0000000..58299f7 --- /dev/null +++ b/meta-rcar-gen2/README-usbgadget.md @@ -0,0 +1,57 @@ +USB Gadget +========== + +# Introduction + +This README describes a way the USB Gadget feature can be used on Renesas Porter boards. + +## Hardware setup + +To use the USB Gadget feature, you need an extra micro-USB cable. +The proposed setup is based on the selection of USB OTG feature by configuring the jumper JP13 between 1-2 ("Host"). Then, you can plug the cable in CN22 connector ("USB Channel 0"). + +## Software setup + +Be sure you have the "usbgadget" feature in the DISTRO_FEATURES bitbake environment variable. + +# Usage + +## Manual configuration + +Example to uses Ethernet over USB feature: + + # modprobe g_ether + # ip a | grep -A 2 usb0 + 5: usb0: mtu 1500 qdisc noop state DOWN group default qlen 1000 + link/ether 4e:bc:d4:ab:7e:e5 brd ff:ff:ff:ff:ff:ff + # ip address add 192.168.0.10 dev usb0 + +Now, from your host computer you can check connectivity: + + $ ping 192.168.0.10 + PING 192.168.0.10 (192.168.0.10) 56(84) bytes of data. + 64 bytes from 192.168.0.10: icmp_seq=1 ttl=64 time=0.370 ms + 64 bytes from 192.168.0.10: icmp_seq=2 ttl=64 time=0.406 ms + ... + +## Persistent configuration + +We can load the module at startup, by creating a file `/etc/modules-load.d/g_ether.conf`. + +The file content should be as below: + + # Load g_ether at boot + g_ether + +Connman can handle the Ethernet over USB link. First, we create the directory which +contain the configuration file: + + # mkdir /etc/connman + +Then we can edit a `/etc/connman/main.conf` file: + + [General] + PreferredTechnologies=ethernet,wifi,cellular + PersistentTetheringMode=true + TetheringTechnologies=gadget + -- cgit 1.2.3-korg