Resetting Arduino via ZigBee.

149 views
Skip to first unread message

Luke Weston

unread,
Feb 8, 2010, 11:26:15 PM2/8/10
to Aiko distributed platform
Hi everyone;

I have had discussions with Jon, Andy, Sam and others in the past
about AVR watchdog timers... and how you handle the possibility of
crashing the AVR when you've got an embedded device deployed out in
the field doing environmental sensing or power measurement or
something like that using the Aiko platform, and you can't get to the
hardware easily.

I think this is potentially a good solution for this:

If the aiko-gateway doesn't hear any data coming in from the aiko-node
devices (which are presumably connected via ZigBee) within a certain
amount of time, the gateway then sends a reset command out via the
Zigbee.
The ZigBee on the remote end then receives this and pulses low one of
its GPIO pins which resets the Arduino; it's wired into the AVR's
reset pin circuit.

Alternatively, perhaps the ZigBee in the node itself has got enough
smarts to be able to tell that the AVR is talking, and if not, to
reset the AVR.

This requires a little bit of programming of the ZigBee devices so
that they implement this, but it seems like a fairly nice solution,
and one that takes advantage of the fact that the ZigBees are really
fully fledged microcontrollers themselves. This seems pretty flexible
and powerful and doesn't require any additional electronics.

Your thoughts?

Jonathan Oxer

unread,
Feb 8, 2010, 11:33:55 PM2/8/10
to aiko-p...@googlegroups.com
On Mon, 2010-02-08 at 20:26 -0800, Luke Weston wrote:

> The ZigBee on the remote end then receives this and pulses low one of
> its GPIO pins which resets the Arduino; it's wired into the AVR's
> reset pin circuit.

Nice. Could be worth thinking about ways this could be used for a DOS
attack though.

Also, this looks a lot like a first step towards another very nice
potential mod, which is being able to push new firmware to a node via
ZigBee. If the XBee module can reset the AVR and it's also connected to
the RX pin, it should be enough to assert reset and then a few hundred
milliseconds later start squirting a new hex file at it.

Cheers :-)
--
Jonathan Oxer
Ph +61 4 3851 6600
* Internet Vision Technologies (www.ivt.com.au)
* Practical Arduino (www.practicalarduino.com)
* SuperHouse Automation (www.superhouse.tv)
* Geek My Ride! (www.geekmyride.org)

signature.asc

Luke Weston

unread,
Feb 10, 2010, 4:32:08 AM2/10/10
to Aiko distributed platform

>
> Also, this looks a lot like a first step towards another very nice
> potential mod, which is being able to push new firmware to a node via
> ZigBee. If the XBee module can reset the AVR and it's also connected to
> the RX pin, it should be enough to assert reset and then a few hundred
> milliseconds later start squirting a new hex file at it.

Like this? :-)

http://ladyada.net/make/xbee/arduino.html

Jonathan Oxer

unread,
Feb 10, 2010, 3:59:12 PM2/10/10
to aiko-p...@googlegroups.com
On Wed, 2010-02-10 at 01:32 -0800, Luke Weston wrote:

Pretty much. I think it would be better to assert one of the XBee's
GPIOs manually though, to prevent the remote node from resetting every
time RTS is asserted at the transmitter end. The way it's documented
above is extremely convenient if you're using XBee purely for pushing
across new firmware, but if you also want to use it for general comms it
may reset the Arduino unnecessarily.

signature.asc

Luke Weston

unread,
Feb 11, 2010, 12:23:39 AM2/11/10
to aiko-p...@googlegroups.com
Yep Jon, I totally agree.
Reply all
Reply to author
Forward
0 new messages