<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.28.3">
</HEAD>
<BODY>
Hi everybody<BR>
<BR>
I have been reading your interesting posts to make tests with the configurations you have included.<BR>
<BR>
I have the folowing configuration:<BR>
<BR>
Alix.3d3 with last BIOS<BR>
Voyage Linux 0.6.5<BR>
<BR>
I have soldered two cables to a pushbutton (normally open). <BR>
The result is the next:<BR>
<BR>
<B>od -x /dev/cs5535_gpio24 | cut -c 11-12 | head -1</B><BR>
<BR>
always returns 30, pushed or not.<BR>
I like the bash script Stephane uses, but what is the next step?<BR>
<BR>
Thank you again for your help.<BR>
<BR>
Yadox<BR>
<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>
> 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
> <A HREF="mailto:Voyage-linux@list.voyage.hk">Voyage-linux@list.voyage.hk</A>
> <A HREF="http://list.voyage.hk/mailman/listinfo/voyage-linux">http://list.voyage.hk/mailman/listinfo/voyage-linux</A>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <A HREF="http://list.voyage.hk/pipermail/voyage-linux/attachments/20110210/433e57ea/attachment-0001.htm">http://list.voyage.hk/pipermail/voyage-linux/attachments/20110210/433e57ea/attachment-0001.htm</A>

------------------------------

Message: 7
Date: Thu, 10 Feb 2011 14:47:13 +0100
From: St?phane Acounis  <<A HREF="mailto:stephane.acounis@subatech.in2p3.fr">stephane.acounis@subatech.in2p3.fr</A>>
Subject: Re: [Voyage-linux] About GPIO support
To: <A HREF="mailto:voyage-linux@voyage.hk">voyage-linux@voyage.hk</A>
Message-ID: <20110210144713.087dfe7e@nanpc201>
Content-Type: text/plain; charset=ISO-8859-1

Le Thu, 10 Feb 2011 08:21:21 -0500
Jon Meek <<A HREF="mailto:meekjt@gmail.com">meekjt@gmail.com</A>> 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 <<A HREF="mailto:jeff.ramin@singlewire.com">jeff.ramin@singlewire.com</A>>
Subject: [Voyage-linux] bringing an interface up when it becomes
        available
To: voyage-linux <<A HREF="mailto:voyage-linux@voyage.hk">voyage-linux@voyage.hk</A>>
Message-ID: <<A HREF="mailto:4D541605.1090000@singlewire.com">4D541605.1090000@singlewire.com</A>>
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.

</PRE>
</BLOCKQUOTE>
<BR>
</BODY>
</HTML>