iMX233 OLinuXino NANO - GPIO issues [SOLVED]

Started by wickwire, August 16, 2014, 09:44:12 pm

Previous topic - Next topic

wickwire

August 16, 2014, 09:44:12 pm Last Edit: August 21, 2014, 04:24:22 pm by wickwire
Hi,

I've recently acquired an Olinuxino Nano and so far I'm quite pleased with it, however I'm having a bit of an issue with the GPIO, maybe someone here is able to help (I've already researched the forum but couldn't quite clear my doubts):

- my goal is to use the Nano with a solar panel and a USB Wifi dongle, for power and ssh connectivity respectively.

This setup is already working, by use of the Debian image from this URL in the product page:

https://www.olimex.com/wiki/IMX233 < imx233 Debian 2GB SD-card image based on Kernel 3.11 (no audio no TV out support) release-1

My additional goal now is to use the built-in LEDs (power, reset, recovery) to signal that the unit has indeed booted properly and has WiFi connectivity.

I followed this simple guide in order to get the power LED to blink > http://olimex.wordpress.com/2012/09/06/imx233-olinuxino-get-started-making-the-arch-linux-sd-card/

however, I can only have it blink if I use the Arch Linux image referenced in the blog post (which in turn, is missing all the necessary WiFi packages that I need for my particular setup).

If I go with the initial Debian image where I get WiFi, then while doing


echo out > /sys/class/gpio/gpio65/direction


I get a warning saying that the file does not exist and if I attempt to generate it against /sys/class/gpio/export, the system then tells me the device is busy.

I would like, if possible, to work with the Debian image in order to have gpio65 working and then cook up a bash script to signal boot success + WiFi activation, so my questions at this point are:

1) why is gpio65 busy under this 3.11 Debian image
2) what must I do to get past this with this image
3) is it possible to use the RESET and RECOVERY LEDs the same way, and if so, which gpio are those?

Thanks in advance!


Stinde


have you tried this:

check what is inside /sys/class/leds directory
This is for imx233 maxi green led:

LED on:
/sys/class/leds/green# echo 1 > brightness 
I'm not sure if the PWM control of LED is possible, in that case brightness value is 0-255
LED off:
/sys/class/leds/green# echo 0 > brightness

Blinking with heartbeat:
/sys/class/leds/green# echo heartbeat > trigger

other triggers:
/sys/class/leds/green# cat trigger

BR,

Timo

wickwire

Hi Timo,

Thanks for the help, it worked flawlessly with my Nano. I was also wrongly under the impression that the board had 3 LEDs, one for each button - that isn't the case, there's just the green LED next to the power button but that will do, I'll use it with the "timer" function first to confirm successful boot and afterwards, the heartbeat setting to indicate successful wifi connection.

Many thanks!