roach374
Posts: 9
Joined: Fri Feb 09, 2018 6:56 pm

pigpiod.service missing on Ubuntu (server)?

Fri Sep 17, 2021 12:48 am

I'm trying Ubuntu server on my RPI for the first time, and trying to enable pigpiod to run on startup. After downloading / making / installing per instructions here, the daemon works as expected when I run it manually, but trying to get it running via

Code: Select all

 sudo systemctl enable pigpiod
just gives me an error, "Failed to enable unit: Unit file pigpiod.service does not exist."

Do I need to create this service file manually? Is there some canonical, accepted way to install pigpiod as a service on Ubuntu 20 on RPI?

thanks,

roach374
Posts: 9
Joined: Fri Feb 09, 2018 6:56 pm

Re: pigpiod.service missing on Ubuntu (server)?

Fri Sep 17, 2021 4:22 am

Related question: There doesn't seem to be any way to install pigpiod or python-pigpio using apt. Has anyone managed to do this?

danjperron
Posts: 3866
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: pigpiod.service missing on Ubuntu (server)?

Fri Sep 17, 2021 3:17 pm

did you try https://abyz.me.uk/rpi/pigpio/download.html

looks like that all checks work for me on my ubuntu 64 bits.

Daniel

User avatar
joan
Posts: 15731
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: pigpiod.service missing on Ubuntu (server)?

Fri Sep 17, 2021 3:42 pm

pigpio is tied to the Raspberry Pi hardware so it's unlikely to ever be packaged with a general Linux distribution such as Ubuntu.

danjperron
Posts: 3866
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: pigpiod.service missing on Ubuntu (server)?

Fri Sep 17, 2021 5:03 pm

Joan,

Your pigpio works with my ubuntu 64 bits. Ubuntu on Raspberry Pi of course!!
daniel@ubuntuPi4:~$ cat /proc/version
Linux version 5.3.0-1040-raspi2 (buildd@bos02-arm64-039) (gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)) #42-Ubuntu SMP Fri Apr 16 09:26:16 UTC 2021
I install it and its working!

sudo pigpiod

Code: Select all

python
import pigpio
pi = pigpio.pi()
pi.write(17,0)
pi.write(17,1)

roach374
Posts: 9
Joined: Fri Feb 09, 2018 6:56 pm

Re: pigpiod.service missing on Ubuntu (server)?

Tue Sep 21, 2021 6:58 pm

So, even though this is NOT an Ubuntu forum, and I shouldn't be posting such silly questions here (I know that now, thanks everyone), I'll post my solution that ended up working for me, in case anyone in the future sees this.

Basically,
1) Install pigpio from github, as mentioned in https://abyz.me.uk/rpi/pigpio/download.html (there is no way to do this with apt or pip)
2) create (as sudo) /lib/systemd/system/pigpiod.service, and add the following:

Code: Select all

[Unit]
Description=Daemon required to control GPIO pins via pigpio
[Service]
ExecStart=/usr/local/bin/pigpiod
ExecStop=/bin/systemctl kill -s SIGKILL pigpiod
Type=forking
[Install]
WantedBy=multi-user.target
restart, and check status of the service with sudo systemctl status pigpiod

Return to “Ubuntu”