On my Pi3B+ I had pigpiod configured to run on boot and I can successfully run compiled c programs; specifically DHTXXD.c which contains:-
/* DHTXXD.c 2016-02-16 Public Domain */ #include <stdio.h> #include <stdlib.h> #include <pigpiod_if2.h>
However when I try to run
pigs hwver I get an error "socket connect failed" even though
systemctl status pigpiod shows it is running and port 8888 is open.
pigs command failed.
I disabled and reenabled
sudo systemctl enable pigpiod which responded:-
Created symlink /etc/systemd/system/multi-user.target.wants/pigpiod.service → /lib/systemd/system/pigpiod.service.
When I disable
pigpiod on boot then
If I manually enable with
sudo pigpiod then both work.
pigpiod manually started
$ sudo systemctl status pigpiod ● pigpiod.service - Daemon required to control GPIO pins via pigpio Loaded: loaded (/lib/systemd/system/pigpiod.service; disabled; vendor preset: enabled) Active: inactive (dead)
pigpiod automatically started
$ sudo systemctl status pigpiod ● pigpiod.service - Daemon required to control GPIO pins via pigpio Loaded: loaded (/lib/systemd/system/pigpiod.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2018-12-13 12:18:39 AEDT; 35s ago Process: 347 ExecStart=/usr/bin/pigpiod -l (code=exited, status=0/SUCCESS) Main PID: 371 (pigpiod) CGroup: /system.slice/pigpiod.service └─371 /usr/bin/pigpiod -l
Anyone have any idea to make reliable autostart?