cgipio.cgi error message

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I recompile my 2.6.23.atmel.4 image and I put it on the board. I have problems whit the led. I can't use the cgipio.cgi program to change them. When I open the page i gate the next error.


Error: I could only read 2 bytes from the GPIO device.
LED is on => do you want to turn it off?

When I us the button, I receive

Error: I could only read 2 bytes from the GPIO device.
LED is on => LED was ordered to be toggled, but I could not find out if I was supposed to turn it off or on, I am very sorry :'(

I can make them flash using the next code from the address https://www.avrfreaks.net/index.p...

#cd /sys/class/leds/b
#echo 1 > brightness (turn on the led-b)
#echo 0 > brightness (turn off the led-b)
#echo "heartbeat" > trigger (to set 'heartbeating' to the led-b)
#echo "none" > trigger (turn off the heartbeat)
If you want to see the cuurent value of "brightness" & "trigger" try "cat brightness" or "cat trigger" respectively.

It is a problem from me ?
10x

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The old CGI program for toggling GPIO will not work with the gpio_leds driver.

If you use the shell script provided in Buildroot for AVR32 (v2.1.0), then it will toggle leds by adressing the /sys/class/leds stuff. You can not have a /dev/gpioN and /sys/class/leds/N to the same I/O line.

If your gpio_leds stuff work, you are fine :) The gpio_leds is the generic (correct) way to interface LEDs in the Linux kernel.

Hans-Christian