Hi
Using a Raspberry Pi Model B with PiFace. I have downloaded, built and installed the PiFace libraries and enabled the spi devices. I wrote a C program and can turn the relays on and off. That program also sends HTML to the stdout. Indeed when executed I see the HTML on stdout.
I have downloaded and installed Apache2. A simple 'Hello World' app runs when I hit the cgi-bin directory with a web-browser. When, I try to hit my c-program using the cgi-bin in my web browser, I get the HTML presented to my browser. I print the time to the webpage so that I know it is working. However, the PiFace IO does not work. If I just run the c-program from the CLI in the cgi-bin directory, it generates the HTML with the time-stamp and actually executes the IO operations.
I browse to the Apache2 error log and see this error message "ERROR: Can not send SPI messageBad file descriptor".
My c-program has execute permissions.
The spi_bcm2708 module is loaded as confirmed by lsmod.
I get crw-rw---T on both /dev/spidev0.0 and /dev/spidev0.1 when using ls -l /dev/spidev*
Any ideas for what else I need to do to make the IO operate under CGI?
Thanks




