[Tinyos-help] help-need information about NetProg

Razvan Musaloiu-E. razvanm at cs.jhu.edu
Mon Feb 18 14:24:15 PST 2008


On Mon, 18 Feb 2008, vbhatia at ksu.edu wrote:

> Hi all,
> In the Deluge manual, it is specified that NetProg interface can be
> extended to reprogram the nodes based on their nodeid. Can somebody
> give me an insight on how to do that.
> What comes to my mind is that we can include the NetProg interface in
> the application itself and using a one shot timer, can call the
> ProgImageAndReboot(imgnum) command giving as an argument the image
> number of the image we want to reboot with.

I attached an example application that is using reboot() from the NetProg 
interface. The application is blinking the red led ten times and then 

> But then the timer would be controlling and changing the application, 
> not the user.

Instead of fired() from a Timer you can use the receive() from a Receive 
(either from radio or serial).

> Is there a way where we can give a command from pc including image
> number and nodeid to a particular node and after receiving the command,
> invoke the ProgImageAndReboot(imgnum) command in the application
> itself.

You can take a look at DelugeManagerP from tos/lib/net/Deluge if you want 
to see how Deluge is using the NetProg interface.

Note: I tested the example application using the git repository from here:

All the best!
Razvan ME
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Reboot.tar.gz
Type: application/x-gzip
Size: 595 bytes
Url : https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20080218/2a3975dd/Reboot.tar.bin

More information about the Tinyos-help mailing list