1

Topic: How do I shut it off (if a battery is attached)

1. I really would like to preserve the real time clock, so I added a battery.

2. There appears to be no off switch.

3. I keep getting kernel event messages and the 3.3v stays on for the bluetooth if I remove 5v power.

How do I keep the RTC running, but shut everything else off (among other things so I can swap the microSD)?

Re: How do I shut it off (if a battery is attached)

I don't have one handy to confirm, but the little white button between the single USB connector and the serial pins should shut the device off.

Re: How do I shut it off (if a battery is attached)

You're somewhat correct in that there's no "real" off switch.  Duane is correct in that there's an "off" button, but that just unmounts filesytems and shuts down several CPU blocks.  As long as there's 5V attached, you won't be able to turn it "off".  It's because that particular CPU was designed for MP3 players that would charge over USB, and would always have a battery attached.  Not a situation where you'd ever want to turn it off.

Long story short, try the little white button smile

4

Re: How do I shut it off (if a battery is attached)

ChumbyLurker wrote:

You're somewhat correct in that there's no "real" off switch.  Duane is correct in that there's an "off" button, but that just unmounts filesytems and shuts down several CPU blocks.  As long as there's 5V attached, you won't be able to turn it "off".  It's because that particular CPU was designed for MP3 players that would charge over USB, and would always have a battery attached.  Not a situation where you'd ever want to turn it off.

Long story short, try the little white button smile

I will try it, but I don't have the 5v attached, so I assume the button will "turn it off" if that is the case even if the battery is connected?

Re: How do I shut it off (if a battery is attached)

Yes, it will power it off.  But keep the RTC running, which is what you want.

6

Re: How do I shut it off (if a battery is attached)

OK, but is there a way through a command and/or system call to achieve the same thing (I would want it to use the battery to do a clean shutdown, or perhaps housekeeping or such for a few minutes then power up and wake up when power is again applied).

Maybe as part 2, are there any "wake (boot) on event' things available?

Re: How do I shut it off (if a battery is attached)

If it's off, it'll power on again when you apply 5V.  That's just how the CPU works, and there's no way around it.

To power off from the command line, use "poweroff".  It'll go through the normal shutdown process (according to /etc/inittab), then either gate a bunch of CPU blocks, or if it's running on battery it'll automatically shut down.

To have it power on at a certain time, write the unixtime you want it to boot at to /sys/class/rtc/rtc0/wakealarm.  E.g. if I wanted to have it power on an hour from when I'm writing this ("date +%s" says it's 1286769299), I'd run:

echo 1286772899 > /sys/class/rtc/rtc0/wakealarm

8

Re: How do I shut it off (if a battery is attached)

ChumbyLurker wrote:

To power off from the command line, use "poweroff".  It'll go through the normal shutdown process (according to /etc/inittab), then either gate a bunch of CPU blocks, or if it's running on battery it'll automatically shut down.

To have it power on at a certain time, write the unixtime you want it to boot at to /sys/class/rtc/rtc0/wakealarm.  E.g. if I wanted to have it power on an hour from when I'm writing this ("date +%s" says it's 1286769299), I'd run:

echo 1286772899 > /sys/class/rtc/rtc0/wakealarm

Thank You!  That is exactly what I needed to know.