Page 1 of 1
GPIO1
Posted: Sat May 30, 2020 3:11 pm
by eslavko
Hello...
I'm make test pod for some testing device. I use RPI and pigpiod. The problem is that I use all the pins including GPIO1. And now I face that pigpio library refuse to use that pin. Is it possible to override that?. I don't have any HAT, EEPROM or camera. So pin should be free. The limitation seems to be in library itself.
Thanks for any useful info.
Re: GPIO1
Posted: Sat May 30, 2020 3:16 pm
by joan
Start the daemon with the -x option, e.g.
sudo pigpiod -x -1 will allow access to all GPIO.
http://abyz.me.uk/rpi/pigpio/pigpiod.html
Re: GPIO1
Posted: Sat May 30, 2020 3:23 pm
by eslavko
That's works. Thanks.
...now how to start daemon on reboot?
sudo systemctl enable pigpiod -x -1
doesn't work.
Re: GPIO1
Posted: Sat May 30, 2020 3:31 pm
by knute
You might try editing /lib/systemd/system/pigpiod.service.
Re: GPIO1
Posted: Sat May 30, 2020 3:44 pm
by eslavko
doesn't work. Seems that completely ignore the parameters.
Re: GPIO1
Posted: Sat May 30, 2020 3:45 pm
by eslavko
the file itself:
Code: Select all
[Unit]
Description=Daemon required to control GPIO pins via pigpio
[Service]
ExecStart=/usr/bin/pigpiod -x -1
ExecStop=/bin/systemctl kill pigpiod
Type=forking
[Install]
WantedBy=multi-user.target
Re: GPIO1
Posted: Sat May 30, 2020 4:45 pm
by eslavko
systemctl seems to skip all parameters when starting pigpiod!
seems to strange to be real but I try that on fresh install too and fail again.
at least adding
to crontab works.
Re: GPIO1
Posted: Sat May 30, 2020 4:54 pm
by eslavko
knute wrote: ↑Sat May 30, 2020 3:31 pm
You might try editing /lib/systemd/system/pigpiod.service.
As this doesn't work I just got crazy idea. I changed line
ExecStart=/usr/bin/pigpiod -x -1
with
ExecStart=/usr/bin/pigpiodgarbage -x -1
so giving wrong name here. And after rebot I have surprise. pigpiod is loaded! so that file is not correct one!
Re: GPIO1
Posted: Sat May 30, 2020 6:17 pm
by knute
Did you do a systemctl daemon-reload?
Re: GPIO1
Posted: Sun May 31, 2020 11:16 am
by eslavko
ups.. NO
But still don't work.
Here is complete workflow:
sudo systemctl disable pigpiod.service
sudo systemctl stop pigpiod.service
sudo nano /lib/systemd/system/pigpiod.service
replace ExecStart=/usr/bin/pigpiod with
ExecStart=/usr/bin/pigpiodgarbage -x -1
sudo systemctl daemon-reload
sudo systemctl enable pigpiod.service
sudo systemctl start pigpiod.service
pigpiod is started!
Re: GPIO1
Posted: Sun May 31, 2020 7:18 pm
by knute
eslavko wrote: ↑Sun May 31, 2020 11:16 am
replace ExecStart=/usr/bin/pigpiod with
ExecStart=/usr/bin/pigpiodgarbage -x -1
Are you sure that pigpiod is in fact running when you called to start pigpiodgarbage?
Re: GPIO1
Posted: Sun May 31, 2020 7:23 pm
by dickon
If he stuck it in his crontab, I'm not at all surprised it is...
Re: GPIO1
Posted: Tue Jun 02, 2020 6:06 am
by eslavko
I deleted it from crontab.
sudo systemctl disable pigpiod.service
sudo systemctl stop pigpiod.service
sudo nano /lib/systemd/system/pigpiod.service
replace ExecStart=/usr/bin/pigpiod with
ExecStart=/usr/bin/pigpiodgarbage -x -1
sudo systemctl daemon-reload
sudo reboot
after rebot there is no pigpiod task (looking with htop)
when I issue sudo systemctl start pigpiod.service
the pigpiod task appears but without -x -1 (but it shouldnt as pigpiodgarbage is called)