The pin on the Raspberry Pi header labeled WP_GPIO_1_lvl corresponds to GPIO22 on the outer ring of the CF3 socket. WP_GPIO_2_lvl corresponds to GPIO23 on the outer ring of the CF3 socket.
Lets try to isolate whether this is a Linux problem or a GpioService problem. On my mangOH Red with wp85, I was able to do the following:
# cd /sys/class/gpio
# echo 22 > export
# cd gpio22
# cat direction
in
Now I connect Raspberry Pi header pin 11 (WP_GPIO_1_lvl) to pin 25 (ground)
# cat value
0
Now I connect Raspberry Pi header pin 11 (WP_GPIO_1_lvl) to pin 1 (3.3V)
# cat value
1
The sysfs interface to the GPIO seems to be working. Can you check and see if it works for you?
Thank you @nilsarve for reporting this problem. There was a bug in a kernel driver which meant that GPIO22 was being taken by the kernel when it shouldn’t have been.
step 10) To use on mangOH IoT slot, run ssh root@192.168.2.2 and do the following commands: echo 2 > /sys/class/gpio/export
gives me this error:
sh: write error: Device or resource busy
How can I get it to work?