<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de-AT">
	<id>https://becomwiki.live.md-websolutions.com/index.php?action=history&amp;feed=atom&amp;title=USB-OTG_%28SBC-i.MX51%29</id>
	<title>USB-OTG (SBC-i.MX51) - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://becomwiki.live.md-websolutions.com/index.php?action=history&amp;feed=atom&amp;title=USB-OTG_%28SBC-i.MX51%29"/>
	<link rel="alternate" type="text/html" href="https://becomwiki.live.md-websolutions.com/index.php?title=USB-OTG_(SBC-i.MX51)&amp;action=history"/>
	<updated>2026-05-13T14:12:48Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in BECOM Systems Support</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://becomwiki.live.md-websolutions.com/index.php?title=USB-OTG_(SBC-i.MX51)&amp;diff=188&amp;oldid=prev</id>
		<title>Peter: 1 Version importiert</title>
		<link rel="alternate" type="text/html" href="https://becomwiki.live.md-websolutions.com/index.php?title=USB-OTG_(SBC-i.MX51)&amp;diff=188&amp;oldid=prev"/>
		<updated>2023-10-31T08:03:07Z</updated>

		<summary type="html">&lt;p&gt;1 Version importiert&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de-AT&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 31. Oktober 2023, 10:03 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;de-AT&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(kein Unterschied)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
	<entry>
		<id>https://becomwiki.live.md-websolutions.com/index.php?title=USB-OTG_(SBC-i.MX51)&amp;diff=187&amp;oldid=prev</id>
		<title>en&gt;Peter: 1 Version importiert</title>
		<link rel="alternate" type="text/html" href="https://becomwiki.live.md-websolutions.com/index.php?title=USB-OTG_(SBC-i.MX51)&amp;diff=187&amp;oldid=prev"/>
		<updated>2023-08-22T19:35:49Z</updated>

		<summary type="html">&lt;p&gt;1 Version importiert&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Generic information ==&lt;br /&gt;
&lt;br /&gt;
The SBC-i.MX51 provides a USB-OTG port (mini-USB-A jack). See [https://en.wikipedia.org/wiki/USB_On-The-Go] for basic information about USB-OTG.&lt;br /&gt;
&lt;br /&gt;
Which mode is actually chosen depends on the state of the ID pin of the USB-OTG cable. If the ID pin is grounded in the cable (mini-USB-A cable), the SBC works in USB host mode. If the ID pin is left open in the cable (mini-USB-B cable), the SBC works as a USB device.&lt;br /&gt;
&lt;br /&gt;
In host mode, this port can source up to 100mA which is provided internally by the MC13892 power management IC (PMIC).&lt;br /&gt;
&lt;br /&gt;
== Kernel configuration ==&lt;br /&gt;
&lt;br /&gt;
The Linux kernel differentiates between HOST mode (SBC is host and supplies current) and GADGET mode (SBC is device and draws current).&lt;br /&gt;
&lt;br /&gt;
Host side configuration:&lt;br /&gt;
&lt;br /&gt;
 Device Drivers  ---&amp;gt;&lt;br /&gt;
   [*] USB support  ---&amp;gt;&lt;br /&gt;
     &amp;lt;*&amp;gt;   Support for Host-side USB&lt;br /&gt;
     [*]     USB Monitor&lt;br /&gt;
     &amp;lt;*&amp;gt;     EHCI HCD (USB 2.0) support&lt;br /&gt;
     [*]       Support for Freescale controller&lt;br /&gt;
     [*]         Support for DR host port on Freescale controller&lt;br /&gt;
     Select transceiver for DR port (Internal UTMI)  ---&amp;gt;&lt;br /&gt;
       (X) Internal UTMI&lt;br /&gt;
     [*]   Root Hub Transaction Translators&lt;br /&gt;
&lt;br /&gt;
For mass storage devices, like USB flash disks (Host mode):&lt;br /&gt;
&lt;br /&gt;
 Device Drivers  ---&amp;gt;&lt;br /&gt;
   SCSI device support  ---&amp;gt;&lt;br /&gt;
     &amp;lt;*&amp;gt; SCSI device support&lt;br /&gt;
     [*] legacy /proc/scsi/ support&lt;br /&gt;
     &amp;lt;*&amp;gt; SCSI disk support&lt;br /&gt;
     [*] Probe all LUNs on each SCSI device&lt;br /&gt;
   [*] USB support  ---&amp;gt;&lt;br /&gt;
     &amp;lt;*&amp;gt;   USB Mass Storage support&lt;br /&gt;
&lt;br /&gt;
For [https://en.wikipedia.org/wiki/Human_interface_device HID]s, like USB mouse and keyboard (Host mode):&lt;br /&gt;
&lt;br /&gt;
 Device Drivers  ---&amp;gt;&lt;br /&gt;
   [*] HID Devices  ---&amp;gt;  &lt;br /&gt;
     -*-   Generic HID support&lt;br /&gt;
     &amp;lt;*&amp;gt;   USB Human Interface Device (full HID) support  &lt;br /&gt;
     Special HID drivers  ---&amp;gt;&lt;br /&gt;
       [*] Load all HID drivers on hid core load&lt;br /&gt;
       A4 tech&lt;br /&gt;
       &amp;lt;*&amp;gt; Apple&lt;br /&gt;
       &amp;lt;*&amp;gt; Belkin&lt;br /&gt;
       &amp;lt;*&amp;gt; Bright&lt;br /&gt;
       &amp;lt;*&amp;gt; Cherry&lt;br /&gt;
       &amp;lt;*&amp;gt; Chicony&lt;br /&gt;
       &amp;lt;*&amp;gt; Cypress&lt;br /&gt;
       &amp;lt;*&amp;gt; Dell&lt;br /&gt;
       &amp;lt;*&amp;gt; Ezkey&lt;br /&gt;
       &amp;lt;*&amp;gt; Gyration&lt;br /&gt;
       &amp;lt;*&amp;gt; Logitech&lt;br /&gt;
       &amp;lt;*&amp;gt; Microsoft&lt;br /&gt;
       &amp;lt;*&amp;gt; Monterey&lt;br /&gt;
       &amp;lt;*&amp;gt; Pantherlord devices support&lt;br /&gt;
       &amp;lt;*&amp;gt; Petalynx&lt;br /&gt;
       &amp;lt;*&amp;gt; Samsung&lt;br /&gt;
       &amp;lt;*&amp;gt; Sony&lt;br /&gt;
       &amp;lt;*&amp;gt; Sunplus&lt;br /&gt;
&lt;br /&gt;
Gadget side configuration. We select the Ethernet gadget here, but others are available. The Ethernet gadget allows to establish an Ethernet connection with a PC over USB.&lt;br /&gt;
&lt;br /&gt;
 Device Drivers  ---&amp;gt;&lt;br /&gt;
   [*] USB support  ---&amp;gt;&lt;br /&gt;
     &amp;lt;*&amp;gt;   USB Gadget Support  ---&amp;gt;&lt;br /&gt;
       (2)   Maximum VBUS Power usage (2-500 mA)&lt;br /&gt;
       USB Peripheral Controller (Freescale USB Device Controller)  ---&amp;gt;&lt;br /&gt;
         Freescale USB Device Controller&lt;br /&gt;
       [*]   Support for DR peripheral port on Freescale controller&lt;br /&gt;
       Select transceiver for DR port (On-chip UTMI)  ---&amp;gt;&lt;br /&gt;
         (X) On-chip UTMI&lt;br /&gt;
       [*]   OTG Support&lt;br /&gt;
       &amp;lt;*&amp;gt;   USB Gadget Drivers (Ethernet Gadget (with CDC Ethernet support))  ---&amp;gt;&lt;br /&gt;
         (X) Ethernet Gadget (with CDC Ethernet support)&lt;br /&gt;
       [*]       RNDIS support&lt;br /&gt;
       &amp;lt;*&amp;gt;   USB OTG pin detect support for UTMI PHY&lt;br /&gt;
&lt;br /&gt;
== Test in Linux ==&lt;br /&gt;
&lt;br /&gt;
What you will need:&lt;br /&gt;
* SBC-i.MX51 with above configuration&lt;br /&gt;
* Cable mini-USB-B-plug to USB-A-plug&lt;br /&gt;
* Cable mini-USB-A-plug to USB-A-jack&lt;br /&gt;
* USB flash disk&lt;br /&gt;
* A Linux PC with the cdc_ether driver, that&amp;#039;s for the Ethernet gadget. Most distributions have it included by default.&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s start!&lt;br /&gt;
&lt;br /&gt;
* Connect a USB flash disk (cable mini-USB-A-plug to USB-A-jack). Linux will detect it automatically.&lt;br /&gt;
 USB Gadget suspended&lt;br /&gt;
 USB Host resumed&lt;br /&gt;
 usb 2-1: new high speed USB device using fsl-ehci and address 3&lt;br /&gt;
 usb 2-1: device v1b1c p1ab1 is not supported&lt;br /&gt;
 usb 2-1: configuration #1 chosen from 1 choice&lt;br /&gt;
 scsi2 : SCSI emulation for USB Mass Storage devices&lt;br /&gt;
 usb-storage: device found at 3&lt;br /&gt;
 usb-storage: waiting for device to settle before scanning&lt;br /&gt;
 scsi 2:0:0:0: Direct-Access     Corsair  Flash Voyager    1100 PQ: 0 ANSI: 0 CCS&lt;br /&gt;
 sd 2:0:0:0: [sda] 7831552 512-byte hardware sectors: (4.00 GB/3.73 GiB)&lt;br /&gt;
 sd 2:0:0:0: [sda] Write Protect is off&lt;br /&gt;
 sd 2:0:0:0: [sda] Mode Sense: 43 00 00 00&lt;br /&gt;
 sd 2:0:0:0: [sda] Assuming drive cache: write through&lt;br /&gt;
 sd 2:0:0:0: [sda] 7831552 512-byte hardware sectors: (4.00 GB/3.73 GiB)&lt;br /&gt;
 sd 2:0:0:0: [sda] Write Protect is off&lt;br /&gt;
 sd 2:0:0:0: [sda] Mode Sense: 43 00 00 00&lt;br /&gt;
 sd 2:0:0:0: [sda] Assuming drive cache: write through&lt;br /&gt;
  sda: sda1&lt;br /&gt;
 sd 2:0:0:0: [sda] Attached SCSI removable disk&lt;br /&gt;
 usb-storage: device scan complete&lt;br /&gt;
 FAT: invalid media value (0xb9)&lt;br /&gt;
 VFS: Can&amp;#039;t find a valid FAT filesystem on dev sda.&lt;br /&gt;
&lt;br /&gt;
* The OTG port is now in host mode. Linux will automatically mount partitions if it detects a valid file system on it. That&amp;#039;s where the last messages in the listing above come from. You can check for mounts by typing &amp;#039;&amp;#039;mount&amp;#039;&amp;#039;:&lt;br /&gt;
 root@sbc-imx51:~# mount&lt;br /&gt;
 ...&lt;br /&gt;
 /dev/sda1 on /media/sda1 type vfat (rw,sync,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1)&lt;br /&gt;
 root@sbc-imx51:~#&lt;br /&gt;
* As you can see, our USB disk has one valid FAT partition, which was automatically mounted to &amp;#039;&amp;#039;/media/sda1&amp;#039;&amp;#039;. Now, unmount this partition&lt;br /&gt;
 umount /media/sda1&lt;br /&gt;
* We remove the USB disk now:&lt;br /&gt;
 usb 2-1: USB disconnect, address 3&lt;br /&gt;
 USB Host suspended&lt;br /&gt;
 USB Gadget resumed&lt;br /&gt;
* Next, we connect the USB-OTG port to a Linux PC (cable mini-USB-B-plug to USB-A-plug)&lt;br /&gt;
 g_ether gadget: high speed config #1: CDC Ethernet (ECM)&lt;br /&gt;
* Now, the OTG port works in device mode. The Ethernet gadget creates a new network device, which we can assign an IP address to:&lt;br /&gt;
 root@sbc-imx51:~# ifconfig usb0 up 192.168.4.2&lt;br /&gt;
 root@sbc-imx51:~# ifconfig usb0&lt;br /&gt;
 usb0      Link encap:Ethernet  HWaddr 62:BD:18:D6:42:D9  &lt;br /&gt;
           inet addr:192.168.4.2  Bcast:192.168.4.255  Mask:255.255.255.0&lt;br /&gt;
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1&lt;br /&gt;
           RX packets:2 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
           TX packets:12 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
           collisions:0 txqueuelen:1000 &lt;br /&gt;
           RX bytes:404 (404.0 B)  TX bytes:3034 (2.9 KiB)&lt;br /&gt;
* To enable Ethernet-over-USB, you have to assign also an IP address on your Linux PC:&lt;br /&gt;
 harald@WS-HP4600-35:~$ sudo ifconfig usb0 up 192.168.4.1&lt;br /&gt;
 [sudo] password for harald: &lt;br /&gt;
 harald@WS-HP4600-35:~$ ifconfig usb0&lt;br /&gt;
 usb0      Link encap:Ethernet  HWaddr 86:62:99:a4:18:4d  &lt;br /&gt;
           inet addr:192.168.4.1  Bcast:192.168.4.255  Mask:255.255.255.0&lt;br /&gt;
           inet6 addr: fe80::8462:99ff:fea4:184d/64 Scope:Link&lt;br /&gt;
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1&lt;br /&gt;
           RX packets:13 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
           TX packets:17 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
           collisions:0 txqueuelen:1000 &lt;br /&gt;
           RX bytes:3204 (3.2 KB)  TX bytes:4899 (4.8 KB)&lt;br /&gt;
 &lt;br /&gt;
 harald@WS-HP4600-35:~$ &lt;br /&gt;
* Now you can ping your PC with the SBC-i.MX51:&lt;br /&gt;
 root@sbc-imx51:~# ping 192.168.4.1&lt;br /&gt;
 PING 192.168.4.1 (192.168.4.1): 56 data bytes&lt;br /&gt;
 64 bytes from 192.168.4.1: seq=0 ttl=64 time=6.499 ms&lt;br /&gt;
 64 bytes from 192.168.4.1: seq=1 ttl=64 time=1.113 ms&lt;br /&gt;
 64 bytes from 192.168.4.1: seq=2 ttl=64 time=1.178 ms&lt;br /&gt;
 64 bytes from 192.168.4.1: seq=3 ttl=64 time=1.044 ms&lt;br /&gt;
 �&lt;br /&gt;
 --- 192.168.4.1 ping statistics ---&lt;br /&gt;
 4 packets transmitted, 4 packets received, 0% packet loss&lt;br /&gt;
 round-trip min/avg/max = 1.044/2.458/6.499 ms&lt;br /&gt;
 root@sbc-imx51:~#&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it!&lt;br /&gt;
&lt;br /&gt;
[[Category:SBC-i.MX51]]&lt;br /&gt;
[[Category:i.MX]]&lt;/div&gt;</summary>
		<author><name>en&gt;Peter</name></author>
	</entry>
</feed>