Hi to all, I'm trying to integrate my Udoo with Openhab2. The GPIO binding seems to need export/import echoing working but in my case it doesn't..is it normal? Looking around the documentation and forums it seems I should be able to do something like: echo "18" > /sys/class/gpio/export echo "out" > /sys/class/gpio/gpio18/direction echo "1" > /sys/class/gpio/gpio18/value echo "18" > /sys/class/gpio/unexport But I get the following errors: echo "18" > /sys/class/gpio/export => -bash: echo: write error: Device or resource busy echo "18" > /sys/class/gpio/unexport => -bash: echo: write error: Invalid argument What can I do to fix this behaviour? Best, Flavio
If you are using Udoobuntu 2.x GPIO is already exported and also linked to /gpio instead of /sys/class/gpio See also https://www.udoo.org/docs/Hardware_&_Accessories/GPIO_Pinout.html Other issue could be that you want to export an already in use gpio pin. See also the device tree editor.
After a very deep debugging I found out that both OpenHab2 and Node-red are compatible with my Udoo quad... OpenHab2 interface with GPIO with an old binding implementation that doesn't work well with the current GPIO interface provided (it fails while trying to call gpio import/export) while I cannot find any working GPIO abstraction to integrate into node-red. I've tried to install node-red-contrib-gpio but no way to make it work. Is there anyone that was able to integrate udoo-quad with Node-red? That would be wesome
another topic hinted me to the possible trouble you have with the export of gpio, also sudo will not work, see: https://www.udoo.org/forum/threads/udoo-x86-braswell-gpios.8098/#post-33177 You can try to add yourself to a gpio group with sufficient access rights for gpio. To test you can try "sudo su" first. see also the following thread for hints on the Neo and Udoo X86 https://www.udoo.org/forum/threads/accessing-gpio-without-root.7949/
I've already tried it but it didn't work...no way to make call to export and import work without errors
Did you do this with openhab running? Because then openhab gpio service could block the gpio handling. Edit: what do you see with "ls /gpio" or "ls /sys/class/gpio"? Are there already exported gpio?
I've tried with both openhab2 running and (after rebooting) without it running. i found that all gpios are already present so expor/import always gave me that error. is there a way to not initialize them at boot ( making it somehow compatible ith the current implementation)? However I fear that the openhab2 GPIO binding is not very maintained
You will have to disable the Udoo-gpio-export script. So somewhere in the boot scripts (init.d?) this script is run. Or make the script empty so it will not do anything. Perhaps uninstalling is also possible. I am not that good Linux expert. https://github.com/ektor5/udoo-gpio-export @ektor5 can you describe shortly how to disable your script?