Posts: 4
Joined: Thu Aug 16, 2018 9:17 pm

pigpiod with dtoverlay after startup

Mon Aug 20, 2018 10:24 pm

I am having trouble with issuing dtoverlay commands outside of config.txt while the pigpiod daemon is running.

For example, if do the following...
Start the pigpiod daemon:
sudo pigpiod

Then I try to run my C program which issues SPI commands to a MCP2515 which uses the pigpiod daemon:
sudo ./myProg

Followed by a dtoverlay command to initialize the MCP2515 for socketCAN:
sudo dtoverlay spi1-2cs cs0_spidev=disabled cs1_spidev=disabled cs0_pin=17 cs1_pin=18
sudo dtoverlay mcp2515-can0-spi1 oscillator=16000000 interrupt=43 spimaxfrequency=10000000

And the command to bring up the CAN link:
sudo ip link set can0 up type can bitrate 250000 restart-ms 100

This procedure gives positive indications that all links were brought up cleanly (even dmesg has no complaints). However, I am unable to receive any CAN packets.

If instead I disable the pigpiod daemon and use a different version of myProg which does not use the pigpiod daemon, everything works just fine.

Is there a known issue with running dtoverlay commands while the pigpiod daemon is running?

Return to “C/C++”