Closed farshidtz closed 1 year ago
The test app can't access the GPIO in confinement on UC:
$ sudo matter-pi-gpio-commander.test-blink
WiringPi pin: 8
wiringPiSetup: Unable to open /dev/mem or /dev/gpiomem: Permission denied.
Aborting your program because if it can not access the GPIO
hardware then it most certianly won't work
Try running with sudo?
We may need to use the wiringPiSetupSys
setup function instead which uses the /sys/class/gpio
interface.
Moreover, I found that the wiringPi library has other setup modes which make use of BCM-GPIO and physical numbering: http://wiringpi.com/reference/setup/
@farshidtz Thank you, looks good!
Thank you for your review. It is ready to merge, leaving https://github.com/MonicaisHer/matter-pi-gpio-commander/pull/3#issuecomment-1431093425 for future work.
Given the limitations in the Python SDK, such as the lack of ability to control the communication protocol, this PR switches to use the C++ SDK.
The application code is based on https://github.com/MonicaisHer/connectedhomeip/tree/lighting-app-rpi-gpio/examples/lighting-app/linux
Other changes:
gpio
snap option has been replaced withwiringpi-pin
for clarity.To install from store: