Thanks for the reply. I finally locate the cause of my problem. When the routing engine initializes, it calls AMPacket.address() to determine its ID. But in Motelab, AMPacket.address() returns 1 for all the nodes instead of their actual ID, and node 1 is not a root node. Since there is no root node, no routing tree can be established.
I fixed the problem by setting the node's ID to TOS_NODE_ID. But the reason of why AMPacket.address() returns 1 is no clear to me. My guess is that TOS_AM_ADDRESS is not set when Motelab programs its nodes, so TOS_AM_ADDRESS just defaults to 1. Regards, Tao On Mon, Mar 22, 2010 at 12:06 AM, Omprakash Gnawali <gnaw...@cs.stanford.edu> wrote: > On Sat, Mar 20, 2010 at 5:46 PM, Tao Liu <liu3...@gmail.com> wrote: >> Hi, >> >> I am trying to run apps/MultihopOscilloscope on Harvard's Motelab >> testbed, but no radio message is delivered to the root node. >> >> The only change I made is to set the root node manually in >> MultihopOscilloscopeC.nc: >> >> event void SerialControl.startDone(error_t error) { >> if (error != SUCCESS) >> fatal_problem(); >> >> // This is how to set yourself as a root to the collection layer: >> // if (local.id % 500 == 0) >> // set root manually >> if (local.id == 41) >> call RootControl.setRoot(); >> >> startTimer(); >> } >> >> I verified the program locally, and it was working with 3 nodes. I >> also dumped the debug messages from Motelab, it seems that nodes can >> not hear each other and no route is established. Could someone give me >> a pointer about why does it happen? > > If the motes don't have sensors, readDone does not get called. Do > those motes have sensors? > > The particular sink can also be disconnected from the network. > > - om_p > _______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help