[Voyage-linux] About GPIO (III)
acounis
(spam-protected)
Fri Feb 11 23:59:39 HKT 2011
Hello,
I have an 3D2 board which has a different BIOS. I'm running Voyage 0.6.5, that can explain your problem.
--
Stéphane Acounis
Le 11 févr. 2011 à 16:54, Yago Fernandez Hansen <sti at soportec.com> a écrit :
> Hi everybody
>
> I have been reading your interesting posts to make tests with the configurations you have included.
>
> I have the folowing configuration:
>
> Alix.3d3 with last BIOS
> Voyage Linux 0.6.5
>
> I have soldered two cables to a pushbutton (normally open).
> The result is the next:
>
> od -x /dev/cs5535_gpio24 | cut -c 11-12 | head -1
>
> always returns 30, pushed or not.
> I like the bash script Stephane uses, but what is the next step?
>
> Thank you again for your help.
>
> Yadox
>
>
>> > The state of the button can be monitored with this line:
>> > od -x /dev/cs5535_gpio24 | cut -c 11-12 | head -1
>> >
>> > it reads 31 in the idle state and 30 if the button is pressed.
>> >
>> > --
>> > Stphane ACOUNIS
>> > SUBATECH Nantes - Service d'lectronique
>> > Tl: 02-51-85-84-28 06-64-62-99-20
>> >
>> > Faut pas se laisser abattre devise Kennedy
>> >
>> > _______________________________________________
>> > Voyage-linux mailing list
>> > Voyage-linux at list.voyage.hk
>> > http://list.voyage.hk/mailman/listinfo/voyage-linux
>> >
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: http://list.voyage.hk/pipermail/voyage-linux/attachments/20110210/433e57ea/attachment-0001.htm
>>
>> ------------------------------
>>
>> Message: 7
>> Date: Thu, 10 Feb 2011 14:47:13 +0100
>> From: St?phane Acounis <stephane.acounis at subatech.in2p3.fr>
>> Subject: Re: [Voyage-linux] About GPIO support
>> To: voyage-linux at voyage.hk
>> Message-ID: <20110210144713.087dfe7e at nanpc201>
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> Le Thu, 10 Feb 2011 08:21:21 -0500
>> Jon Meek <meekjt at gmail.com> a crit:
>>
>> > Stphane - When you implement the power off button please post the
>> > details!
>> >
>>
>> Ohhhh very simple, it works quite well. I have an Alix 3D2 board and
>> the switch is located near the USB connector (S1 written on the PCB).
>> Just solder two wires and connect them to a normally opened push button.
>>
>> I have wrote a simple bash script (power-button):
>>
>> ------------------------------------------------------------------------------
>>
>> #!/bin/bash
>>
>> while true; do
>> button=`od -x /dev/cs5535_gpio24 | cut -c 11-12 | head -1`
>> if [ $button == "30" ]; then
>> sleep 3
>> button=`od -x /dev/cs5535_gpio24 | cut -c 11-12 | head -1`
>> if [ $button == "30" ]; then
>> beep -f 1000 -r 2 -n -r 5 -l 10 --new
>> /sbin/poweroff
>> else
>> exit
>> fi
>> fi
>> sleep 1
>> done
>>
>> ------------------------------------------------------------------------------
>>
>> and installed a line in the root's crontab:
>>
>> @reboot /data/Scripts/power-button
>>
>> Then pressing more than 3 seconds on the switch will do a clean halt of
>> the board.
>>
>> If someone has a better and more efficient way to monitor the switch, please share.
>>
>> --
>> Stphane ACOUNIS
>> SUBATECH Nantes - Service d'lectronique
>> Tl: 02-51-85-84-28 06-64-62-99-20
>>
>> Faut pas se laisser abattre devise Kennedy
>>
>>
>>
>> ------------------------------
>>
>> Message: 8
>> Date: Thu, 10 Feb 2011 10:44:53 -0600
>> From: Jeff Ramin <jeff.ramin at singlewire.com>
>> Subject: [Voyage-linux] bringing an interface up when it becomes
>> available
>> To: voyage-linux <voyage-linux at voyage.hk>
>> Message-ID: <4D541605.1090000 at singlewire.com>
>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>>
>>
>> Is there a way to configure voyage such that an interface is automatically
>> brought up when the link state changes? For example, let's say the machine
>> boots but doesn't have a physical connection to the network. After boot,
>> an ethernet cable is connected.
>>
>> How would I set things up so that the interface is brought up and configured
>> (or dhcp/pump run) without user interaction?
>>
>> Thanks.
>>
>
> _______________________________________________
> Voyage-linux mailing list
> Voyage-linux at list.voyage.hk
> http://list.voyage.hk/mailman/listinfo/voyage-linux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.voyage.hk/pipermail/voyage-linux/attachments/20110211/d392aa65/attachment.html>
More information about the Voyage-linux
mailing list