Hello All – I am trying to write a simple program for the MicaZ motes
that will send a command entered at the cygwin prompt to all of the motes in a
network (ie, the base node will broadcast to all of the nodes within range, who
will in turn broadcast to the motes within their range, etc). I am
modeling this program off of BcastM.nc, which is used in Lesson 7 of the TinyOS
tutorial. This program seems to be exhibiting odd behavior in that nodes
seem to be receiving a message multiple times. I have traced it down to
the is_new_msg function – it seems that a node isn’t able to detect
whether a message is old or new. inline char
is_new_msg(struct SimpleCmdMsg *bmsg) { if
(bcast_pending) return 0; return
(((bmsg->seqno - lastSeqno)>0) ||((bmsg->seqno+127)<lastSeqno) ) ; } The code for this function seems inconsistent with its
description in the tutorial: “If the sequence number of the current
message is within 127 of the current message, the command is accepted,
processed, and forwarded. Otherwise, it's dropped.” Has anyone had
success with the BcastM program? (I found some old posts referencing bugs
in the BcastM code that wouldn’t be fixed.) Could it also be
possible that multiple messages are already in the message queue before the
mote is able to mark some of them as seen? Has anyone had luck with a
command broadcast program? Any help would be appreciated! Thank you very much, Gina Upperman |
_______________________________________________ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help