Beagleboard Remote Shutdown

I currently design a sensor that employs a Beagleboard to collect and process measurement data. From time to time, the sensor has to be cut off from the electrical power supply. How can the Beagleboard (currently working under Angstrom) be shutdown by a remote command? What would test look like, that ensures a successful shutdown?

Christian

The proper LINUX way would be to SSH into the BB and then run the command "halt" to shut it down, or "reboot" to restart it immediately...

Is this what you're asking or something different?

The proper LINUX way would be to SSH into the BB and then run the
command "halt" to shut it down, or "reboot" to restart it immediately...

Thank you very much for answer.

Is this what you're asking or something different?

My problem is a bit different. I want to make sure the Beagleboard has been halted correctly, before the electrical power is removed, so that no measurement data is lost and that the file system is left intact.

Christian

How will the bone be notified that the power is about to be cut off? I have a solar powered application so outages are inevitable, but unpredictable. I've dealt with it by writing a daemon that monitors the voltage of the battery and if the voltage drops too close to the low voltage cutout of the charge controller it issues issues the 'shutdown' command. Making sure it comes back up at some point was the trickier bit for me as it's possible to get close enough to low voltage cutout of my charge controller to trigger the shutdown, but then never actually hit the cutout. If that happens then without some external help the system is down for the count.

Steve

How will the bone be notified that the power is about to be cut off? I have
a solar powered application so outages are inevitable, but unpredictable.
I've dealt with it by writing a daemon that monitors the voltage of the
battery and if the voltage drops too close to the low voltage cutout of
the charge controller it issues issues the 'shutdown' command. Making sure
it comes back up at some point was the trickier bit for me as it's
possible to get close enough to low voltage cutout of my charge controller
to trigger the shutdown, but then never actually hit the cutout. If that
happens then without some external help the system is down for the count.

Surely the answer to that is a hardware timer. Triggered by a GPIO pin which
would be set when the shutdown command is issued, it would turn off the
power when the timer expires. Then when the voltage in the battery gets to
be high enough you turn it back on.

David

How will the bone be notified that the power is about to be cut off?

The host computer schedules the times of operation for the sensor and informs the Beagleboard that the electrical supply is to be cut. in the ideal case, the Beagleboard should signal the host computer that Angstrom hast been halted and power can be safely removed.

I have a solar powered application so outages are inevitable, but
unpredictable. I've dealt with it by writing a daemon that monitors
the voltage of the battery and if the voltage drops too close to the
low voltage cutout of the charge controller it issues issues the
'shutdown' command. Making sure it comes back up at some point was
the trickier bit for me as it's possible to get close enough to low
voltage cutout of my charge controller to trigger the shutdown, but
then never actually hit the cutout. If that happens then without some
external help the system is down for the count.

This case is more difficut as brown-outs have to be considered.

Christian

What about a tcp socket, you bind it to a port and then simply use a
basic state machine to process the payload. The you can use a linux
command to shutdown the beagleboard only once the data has been
successful stored. There are tonnes of tcp socket examples online.

If you are cutting the power anyway, all you need to be concerned with
is to unmount r/w mounted filesystems. So, use a read-only rootfs
and mount your data collection partition separately so that you
can cleanly unmount it when needed. Then just cut the power.