<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.stereopi.com/app.php/feed/topic/42" />

	<title>StereoPi Forum</title>
	<subtitle>StereoPi Forum</subtitle>
	<link href="https://forum.stereopi.com/index.php" />
	<updated>2019-05-25T15:22:58+00:00</updated>

	<author><name><![CDATA[StereoPi Forum]]></name></author>
	<id>https://forum.stereopi.com/app.php/feed/topic/42</id>

		<entry>
		<author><name><![CDATA[stereomaton]]></name></author>
		<updated>2019-05-25T15:16:50+00:00</updated>

		<published>2019-05-25T15:16:50+00:00</published>
		<id>https://forum.stereopi.com/viewtopic.php?p=216#p216</id>
		<link href="https://forum.stereopi.com/viewtopic.php?p=216#p216"/>
		<title type="html"><![CDATA[Re: OTG support]]></title>

		
		<content type="html" xml:base="https://forum.stereopi.com/viewtopic.php?p=216#p216"><![CDATA[
Found!<br><br>First, according to <a href="https://lb.raspberrypi.org/forums/viewtopic.php?t=173267#p1107702" class="postlink">https://lb.raspberrypi.org/forums/viewt ... 7#p1107702</a>, we need to have USB_OTG logical 1 to be in device mode. Stereopi has a pull-down on this pin which makes the USB port to be a host (makes sense for LAN/USB). Fortunately, thanks to this resistor, man could potentially easily change the value with a bit of soldering. However, the so called implantation document, describing where are placed components on the board, would make it easier...<br><br>Can you publish it ?<br><br>Searching further, I found here <a href="https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README" class="postlink">https://github.com/raspberrypi/firmware ... ays/README</a> that we can override the behavior by software regardless of the hardware pin, by adding <em class="text-italics">dtoverlay=dwc2,dr_mode=peripheral</em> instead of the aforementioned <em class="text-italics">dtoverlay=dwc2</em> in /boot/config.txt<br>And this works!<br><br>However, if you do the same for your board, beware that now the usb port is forced in device mode. This implies that LAN9513 (i.e. USB ports and Ethernet) will not work anymore (unless you change the config.txt back) even when the micro USB is unplugged. The ideal way would be that SEL_USB_SW controls the USB_OTG signal, but as the polarity is reversed, it is not a straightforward hack to do.<br><br>Also notice that in order to use the usb-net link, you also need either to set a fixed IP (e.g. 192.168.42.2) on your host PC with proper routes for its usb interface, or install a properly configured DHCP server on the stereopi to deliver automatic network configuration to the PC.<p>Statistics: Posted by <a href="https://forum.stereopi.com/memberlist.php?mode=viewprofile&amp;u=101">stereomaton</a> — Sat May 25, 2019 3:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stereomaton]]></name></author>
		<updated>2019-05-25T13:27:01+00:00</updated>

		<published>2019-05-25T13:27:01+00:00</published>
		<id>https://forum.stereopi.com/viewtopic.php?p=214#p214</id>
		<link href="https://forum.stereopi.com/viewtopic.php?p=214#p214"/>
		<title type="html"><![CDATA[Re: OTG support]]></title>

		
		<content type="html" xml:base="https://forum.stereopi.com/viewtopic.php?p=214#p214"><![CDATA[
Not so many time to spent on it, but I tried this:<ol style="list-style-type:decimal"><li>Add <em class="text-italics">dtoverlay=dwc2</em> in /boot/config.txt</li><li>Add <em class="text-italics">modules-load=dwc2,g_ether</em> at the end of /boot/cmdline.txt command line</li></ol>Now the kernel does not complain anymore and an usb0 interface is created.<br><br>Also added this in (newly created) /etc/network/interfaces.d/usb0 <div class="codebox"><p>Code: </p><pre><code>auto usb0allow-hotplug usb0iface usb0 inet static       address 192.168.42.1       netmask 255.255.255.0       network 192.168.42.0       broadcast 192.168.42.255</code></pre></div>so that network interface is statically configured at startup, which is OK.<br><br>However, the usb-net device is not detected by my host computer. Need more investigation.<br>The kernel notifies ethernet/lan disconnect so the usb-switching circuitry seems to do its job at least.<p>Statistics: Posted by <a href="https://forum.stereopi.com/memberlist.php?mode=viewprofile&amp;u=101">stereomaton</a> — Sat May 25, 2019 1:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Realizator]]></name></author>
		<updated>2019-05-23T10:46:19+00:00</updated>

		<published>2019-05-23T10:46:19+00:00</published>
		<id>https://forum.stereopi.com/viewtopic.php?p=185#p185</id>
		<link href="https://forum.stereopi.com/viewtopic.php?p=185#p185"/>
		<title type="html"><![CDATA[Re: OTG support]]></title>

		
		<content type="html" xml:base="https://forum.stereopi.com/viewtopic.php?p=185#p185"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>Yes, you can safely plug both micro USB and power, bat in this case power from power connector will be ignored (VD4 part of the schematics). We do it to avoid direct connection of two power sources (micro USB and external power).</div></blockquote>I would rather say that no power will be drawn from the micro-USB connector if the external power has equal or higher voltage (and switch is on). Quite the opposite.</div></blockquote>Yep, I may be wrong with isolating USB or external power source. Need to look at this again, as this feature was originally implemented at the end of 2015, in our first generation of StereoPi. Here is how this generation looks like:<br><br><img src="http://stereopi.com/sites/default/files/stereopi1_table_alfa_600.jpg" class="postimage" alt="Image"><p>Statistics: Posted by <a href="https://forum.stereopi.com/memberlist.php?mode=viewprofile&amp;u=2">Realizator</a> — Thu May 23, 2019 10:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stereomaton]]></name></author>
		<updated>2019-05-23T10:36:33+00:00</updated>

		<published>2019-05-23T10:36:33+00:00</published>
		<id>https://forum.stereopi.com/viewtopic.php?p=184#p184</id>
		<link href="https://forum.stereopi.com/viewtopic.php?p=184#p184"/>
		<title type="html"><![CDATA[Re: OTG support]]></title>

		
		<content type="html" xml:base="https://forum.stereopi.com/viewtopic.php?p=184#p184"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>I saw the small image extraction on the wiki, but at the time, I did not catch it. </div></blockquote>Sorry, could you please clarify this notice? <img class="smilies" src="https://forum.stereopi.com/images/smilies/icon_e_smile.gif" width="15" height="17" alt=":-)" title="Smile"></div></blockquote>Retrospectively, I think I was tired, because I did not even read the bottom text which I usually do.<br>I was confused to not know where the top right wires go, but actually it is without importance.<br><blockquote class="uncited"><div>Yes, you can safely plug both micro USB and power, bat in this case power from power connector will be ignored (VD4 part of the schematics). We do it to avoid direct connection of two power sources (micro USB and external power).</div></blockquote>I would rather say that no power will be drawn from the micro-USB connector if the external power has equal or higher voltage (and switch is on). Quite the opposite.<br><blockquote class="uncited"><div>We did not run specific tests on OTG, but I think all manuals for using it on Pi Zero or Pi A/A+ (like <a href="https://gist.github.com/gbaman/50b6cca61dd1c3f88f41" class="postlink">this one</a>) should work.</div></blockquote>The link you provide talk about a device-tree overlay (which modifies the OTG driver configuration), so I suspect it to be a good candidate. I will try whenever possible.<p>Statistics: Posted by <a href="https://forum.stereopi.com/memberlist.php?mode=viewprofile&amp;u=101">stereomaton</a> — Thu May 23, 2019 10:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Realizator]]></name></author>
		<updated>2019-05-23T09:38:46+00:00</updated>

		<published>2019-05-23T09:38:46+00:00</published>
		<id>https://forum.stereopi.com/viewtopic.php?p=178#p178</id>
		<link href="https://forum.stereopi.com/viewtopic.php?p=178#p178"/>
		<title type="html"><![CDATA[Re: OTG support]]></title>

		
		<content type="html" xml:base="https://forum.stereopi.com/viewtopic.php?p=178#p178"><![CDATA[
<blockquote class="uncited"><div>I saw the small image extraction on the wiki, but at the time, I did not catch it. </div></blockquote>Sorry, could you please clarify this notice? <img class="smilies" src="https://forum.stereopi.com/images/smilies/icon_e_smile.gif" width="15" height="17" alt=":-)" title="Smile"><br><blockquote class="uncited"><div>With the whole schematics, it is easier to understand.<br>The schematics also allowed me to understand that the USB-slave jumper is not related to OTG (and totally useless in my case as there is no emmc on my raspberri-pi module) and that I can safely plug both micro-usb and external power on white connector at the same time.</div></blockquote>Yes, you can safely plug both micro USB and power, bat in this case power from power connector will be ignored (VD4 part of the schematics). We do it to avoid direct connection of two power sources (micro USB and external power).<br><blockquote class="uncited"><div>Unfortunately, I am away from my stereopi for several days, so I will not be able to test it soon.<br>However, I suspect that there is something wrong in the software as the error message suggests a missing driver (or driver configuration). If it does not work directly (as I suspect), I will give a look at the device tree for a missing driver or driver option.</div></blockquote>We did not run specific tests on OTG, but I think all manuals for using it on Pi Zero or Pi A/A+ (like <a href="https://gist.github.com/gbaman/50b6cca61dd1c3f88f41" class="postlink">this one</a>) should work.<p>Statistics: Posted by <a href="https://forum.stereopi.com/memberlist.php?mode=viewprofile&amp;u=2">Realizator</a> — Thu May 23, 2019 9:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stereomaton]]></name></author>
		<updated>2019-05-22T21:56:32+00:00</updated>

		<published>2019-05-22T21:56:32+00:00</published>
		<id>https://forum.stereopi.com/viewtopic.php?p=174#p174</id>
		<link href="https://forum.stereopi.com/viewtopic.php?p=174#p174"/>
		<title type="html"><![CDATA[Re: OTG support]]></title>

		
		<content type="html" xml:base="https://forum.stereopi.com/viewtopic.php?p=174#p174"><![CDATA[
Thanks very much for the schematics!<br><br>I saw the small image extraction on the wiki, but at the time, I did not catch it. With the whole schematics, it is easier to understand.<br>The schematics also allowed me to understand that the USB-slave jumper is not related to OTG (and totally useless in my case as there is no emmc on my raspberri-pi module) and that I can safely plug both micro-usb and external power on white connector at the same time.<br><br>Unfortunately, I am away from my stereopi for several days, so I will not be able to test it soon.<br>However, I suspect that there is something wrong in the software as the error message suggests a missing driver (or driver configuration). If it does not work directly (as I suspect), I will give a look at the device tree for a missing driver or driver option.<p>Statistics: Posted by <a href="https://forum.stereopi.com/memberlist.php?mode=viewprofile&amp;u=101">stereomaton</a> — Wed May 22, 2019 9:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Realizator]]></name></author>
		<updated>2019-05-22T14:10:48+00:00</updated>

		<published>2019-05-22T14:10:48+00:00</published>
		<id>https://forum.stereopi.com/viewtopic.php?p=170#p170</id>
		<link href="https://forum.stereopi.com/viewtopic.php?p=170#p170"/>
		<title type="html"><![CDATA[Re: OTG support]]></title>

		
		<content type="html" xml:base="https://forum.stereopi.com/viewtopic.php?p=170#p170"><![CDATA[
Stereomaton, now you can find our schematics <a href="https://wiki.stereopi.com/index.php?title=DIY_Ninjas_Section#Schematic_of_the_StereoPi_board" class="postlink">here in our Wiki</a>.<p>Statistics: Posted by <a href="https://forum.stereopi.com/memberlist.php?mode=viewprofile&amp;u=2">Realizator</a> — Wed May 22, 2019 2:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Realizator]]></name></author>
		<updated>2019-05-22T06:54:34+00:00</updated>

		<published>2019-05-22T06:54:34+00:00</published>
		<id>https://forum.stereopi.com/viewtopic.php?p=166#p166</id>
		<link href="https://forum.stereopi.com/viewtopic.php?p=166#p166"/>
		<title type="html"><![CDATA[Re: OTG support]]></title>

		
		<content type="html" xml:base="https://forum.stereopi.com/viewtopic.php?p=166#p166"><![CDATA[
Stereomaton, we'll release PDF versions of our schematics in the nearest days.<br>The main idea is when you connect StereoPi by micro USB to your computer, system disconnects LAN9513 chip, and expose Compute Module's USB <a href="https://wiki.stereopi.com/index.php?title=DIY_Ninjas_Section#Undeclared_feature:_usb_client_mode" class="postlink">directly to micro USB pins</a>. In this mode you can use it in client mode, like with Pi Zero or Pi A/A+ models.<p>Statistics: Posted by <a href="https://forum.stereopi.com/memberlist.php?mode=viewprofile&amp;u=2">Realizator</a> — Wed May 22, 2019 6:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stereomaton]]></name></author>
		<updated>2019-05-21T12:59:41+00:00</updated>

		<published>2019-05-21T12:59:41+00:00</published>
		<id>https://forum.stereopi.com/viewtopic.php?p=163#p163</id>
		<link href="https://forum.stereopi.com/viewtopic.php?p=163#p163"/>
		<title type="html"><![CDATA[Re: OTG support]]></title>

		
		<content type="html" xml:base="https://forum.stereopi.com/viewtopic.php?p=163#p163"><![CDATA[
Here some observations.<br><br>Concerning software, using the shipped distro, the kernel emits a warning (around) every second:   <div class="codebox"><p>Code: </p><pre><code>WARN::dwc_otg_hcd_hub_control:3746: DWC OTG HCD - Unknown hub control request type or invalid typeReq: c033h wIndex: 0h wValue: 0h</code></pre></div>As it is a warning, I tried to load modules anyway:<div class="codebox"><p>Code: </p><pre><code>modprobe dwc2modprobe g_ether</code></pre></div>The modules are loaded:<div class="codebox"><p>Code: </p><pre><code># lsmod Module                  Size  Used byg_ether                16384  0usb_f_rndis            28672  1 g_etheru_ether                24576  2 g_ether,usb_f_rndislibcomposite           53248  2 g_ether,usb_f_rndisdwc2                  143360  0udc_core               49152  4 dwc2,u_ether,usb_f_rndis,libcompositecfg80211              573440  0rfkill                 28672  2 cfg80211i2c_bcm2835            16384  0fixed                  16384  0uio_pdrv_genirq        16384  0uio                    20480  1 uio_pdrv_genirqi2c_dev                16384  0ip_tables              24576  0x_tables               32768  1 ip_tablesipv6                  425984  30</code></pre></div>But no interface is created and dmesg shows an error:<div class="codebox"><p>Code: </p><pre><code>udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers</code></pre></div>I am not familiar enough with raspberry-pi way to do OTG gadget (and moreover the stereopi way), and I did not have done it for a while on other boards so I might have forgotten something here. Any idea ?<p>Statistics: Posted by <a href="https://forum.stereopi.com/memberlist.php?mode=viewprofile&amp;u=101">stereomaton</a> — Tue May 21, 2019 12:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stereomaton]]></name></author>
		<updated>2019-05-25T15:22:58+00:00</updated>

		<published>2019-05-21T12:47:56+00:00</published>
		<id>https://forum.stereopi.com/viewtopic.php?p=162#p162</id>
		<link href="https://forum.stereopi.com/viewtopic.php?p=162#p162"/>
		<title type="html"><![CDATA[[Solved] OTG support]]></title>

		
		<content type="html" xml:base="https://forum.stereopi.com/viewtopic.php?p=162#p162"><![CDATA[
I post in hardware section because, as a BSP issue, it is more related to hardware than user software.<br><br><strong class="text-strong">Context:</strong><br>Ethernet access is not always convenient, but yet networking is useful.<br>Hence, I often use USB-net to connect to my boards.<br>Firsts tries on stereopi are failures. <br><br><strong class="text-strong">Question:</strong><br>As schematics seems not to be available yet (not even in pdf read-only format), is the hardware able to deal with OTG drivers ?<br>Would I need to do some change to support it ?<br>If relevant, I use the CM3Lite module.<br><br><strong class="text-strong">2019-05-25 Solved:</strong><br>I managed to make USB-net work with a complete software solution (explained in this thread).<br>However there are some trade-off to be aware of (again, highlighted in the thread)<p>Statistics: Posted by <a href="https://forum.stereopi.com/memberlist.php?mode=viewprofile&amp;u=101">stereomaton</a> — Tue May 21, 2019 12:47 pm</p><hr />
]]></content>
	</entry>
	</feed>
