Page 1 of 1

Can't set BCM 4 to output

Posted: Saturday 02 April 2016 14:22
by Number8
Hello,
This command fails: gpio export 4 out. The following error message is dropped : Unable to open GPIO direction interface for pin4: “No such file or directory”. However this command works fine: gpio –g mode 4 out.

Current configuration
RasPI Model B2 running under Raspian GNU/Linux 7, updated
wiringPI version : 2.31 or 2.32 same problem

I have reported the issue to Gordon, his answer is the following
So that pin is used for other purposes too - as a clock pin and the pin that 1-wire support works over.

I'm suspecting its something to do with the 1-wire support that's getting in the way, so you might need to see if that's enabled in the device tree or modules or whatever (I don't really know much about how its implemented, sorry)
I just have no clue on how to fix this. Has anybody faced this problem and found the solution?
Thank you

Re: Can't set BCM 4 to output

Posted: Saturday 02 April 2016 14:43
by RidingTheFlow
sudo raspi-config Go to Advanced options. Scroll down to 1-wire. Disable, reboot, see if it helps.
Or just use some other pin (recommended), you may need 1-wire support in the future.

Re: Can't set BCM 4 to output

Posted: Saturday 02 April 2016 15:23
by Number8
Thanks. As a matter of fact I commented dtoverlay=w1-gpio in /boot/config.txt. This fixes the issue.
No need to remove I2C support.