We just installed seed’s openwrt img “openwrt-bcm27xx-bcm2711-rpi-4-squashfs-sysupgrade.img.gz” ( OpenWrt 22.03.3, r20028-43d71ad93e) on Raspberry 4b - 4Gb. When we tried to use gpio and serial pins we got this error.
We tried to install this package raspi-io with npm (because it can only install with npm I can not find any other resource) but it can not be installed, below that you can see the error we got.
root@OpenWrt:~# npm install raspi-io
npm notice
npm notice New major version of npm available! 8.19.3 -> 10.4.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.4.0
npm notice Run npm install -g npm@10.4.0 to update!
npm notice
npm ERR! code 127
npm ERR! path /root/node_modules/raspi-soft-pwm
npm ERR! command failed
npm ERR! command sh -c -- sh ./script/pigpio.sh
npm ERR! pigpio doesn't appear to be installed, installing now. You may be asked for your password.
npm ERR! ./script/pigpio.sh: line 37: sudo: not found
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2024-02-19T10_10_46_288Z-debug-0.log
We also tried to install dependencies by hand but it also was not possible because of some errors.
Note: We used GPIO’s and serial pins with only python rpi.gpio package but we can not find a way to work it with node-red. Does anyone know how to solve these problems?
Yes, we can install this but can not apt-get. Because of that we approached problem via different ways like embed dependicies in img and test, looked every dependicy and tried to install these, look alternative packages like gpio4 etc. but only rpi.gpio worked. We just want to find a way to work any packages on node-red to control IOs on device.
Actually the problem is node-red's raspi-io package I can not install it, is there any change to use a local python package as node-red's serial package
I don't use OpenWRT so my thoughts might be worthless. However I suspect that the problem is really that OpenWRT, not being designed specifically for the Raspberry Pi, does not have the GPIO access built in.
I am sure you can.
I really think an OpenWRT forum is more likely to find you the answers.