<?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/1066" />

	<title>StereoPi Forum</title>
	<subtitle>StereoPi Forum</subtitle>
	<link href="https://forum.stereopi.com/index.php" />
	<updated>2021-01-20T14:51:08+00:00</updated>

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

		<entry>
		<author><name><![CDATA[stereomaton]]></name></author>
		<updated>2021-01-20T14:51:08+00:00</updated>

		<published>2021-01-20T14:51:08+00:00</published>
		<id>https://forum.stereopi.com/viewtopic.php?p=2400#p2400</id>
		<link href="https://forum.stereopi.com/viewtopic.php?p=2400#p2400"/>
		<title type="html"><![CDATA[Re: Invalid Channel]]></title>

		
		<content type="html" xml:base="https://forum.stereopi.com/viewtopic.php?p=2400#p2400"><![CDATA[
It seems that the GPIO you want to use is used by another program/driver.<br>It is quite strange since there is nothing special there that could a priori be in conflict, though I do not have the original image on my StereoPi to compare.<br><br>The linux kernel has a special file to see what GPIO are in use by the drivers: <span style="color:#008000">/sys/kernel/debug/gpio</span><br>If it does not exist (I do not have the original image in my StereoPi to check), you may have to mount the debugfs filesystem: <span style="color:#008000">mount -t debugfs none /sys/kernel/debug/</span><br><br>For example, on my current system I have:<div class="codebox"><p>Code: </p><pre><code>pi@raspberrypi:~ $ sudo cat /sys/kernel/debug/gpiogpiochip0: GPIOs 0-53, parent: platform/3f200000.gpio, pinctrl-bcm2835: gpio-3   (                    |sysfs               ) in  hi IRQgpiochip2: GPIOs 100-101, brcmvirt-gpio, can sleep: gpio-100 (                    |led0                ) out hi    gpiochip1: GPIOs 504-511, parent: platform/soc:firmware:expgpio, raspberrypi-exp-gpio, can sleep:</code></pre></div>We see that GPIO 3 ("BCM notation") is used by sysfs (the driver that allows to control the GPIO in user programs) and that the GPIO 100 is used by the led driver (the led is showing activity on SD card).<br><br>To know which program uses the GPIO through a sysfs driver, you can run <span style="color:#008000">fuser $(realpath /sys/class/gpio/gpio3/value)</span> (for GPIO 3 here) This gives the process ID of the program, which you can then pass to other programs to retrieve details, for example <span style="color:#008000">ps u -p 486</span> (for process ID 486 here)<br><br>This can be a first step to see what is going on.<p>Statistics: Posted by <a href="https://forum.stereopi.com/memberlist.php?mode=viewprofile&amp;u=101">stereomaton</a> — Wed Jan 20, 2021 2:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[fnouguie]]></name></author>
		<updated>2021-01-14T22:52:20+00:00</updated>

		<published>2021-01-14T22:52:20+00:00</published>
		<id>https://forum.stereopi.com/viewtopic.php?p=2394#p2394</id>
		<link href="https://forum.stereopi.com/viewtopic.php?p=2394#p2394"/>
		<title type="html"><![CDATA[Invalid Channel]]></title>

		
		<content type="html" xml:base="https://forum.stereopi.com/viewtopic.php?p=2394#p2394"><![CDATA[
Hi everyone,<br><br>I just bought a stereopi and tried my first tests on it. I want to play with stereo capability and stepper motors.<br>While I was waiting for the stereopi board delivery, I played with a stepper motor (and its controler) on a regular Raspberry pi 3 and it was working just fine.<br>I wired the motor on the stereoPi card (taking care of the 180 deg rotation of the GPIO pins) but wasn't able to make it running properly.<br><br>While initiating the pins to use (7,11,13,15, 31,33,35,37):<br>&gt;&gt; GPIO.setmode(GPIO.BOARD)<br>&gt;&gt; GPIO.setup(pin, GPIO.OUT)<br><br>I get first a warning for pin #7:<br>"RuntimeWarning: This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings."<br>then an error when setting up pin #31:"The channel sent is invalid on a Raspberry Pi"<br><br><br>I tried to change GPIO.BOARD to GPIO.BCM in GPIO.setmode() but it did not help.<br>Any clue ?<br><br>Thanks in advance<br>Fred<p>Statistics: Posted by <a href="https://forum.stereopi.com/memberlist.php?mode=viewprofile&amp;u=692">fnouguie</a> — Thu Jan 14, 2021 10:52 pm</p><hr />
]]></content>
	</entry>
	</feed>
