What is pmsg? And assuming that forwarder() is supposed to send
the current message back, I don't see where it gets copied. When
you return the argument "msg" it gets recycled so it's contents
are not valid, and may actually be the next message you receive.
In other words you may have a queuing problem.

If that doesn't help...I guess you should post _all_ your code...
MS


Hamdi Roumani wrote:
The basestation sends out a packet with the TOS_BCAST_ADDR with a particular seqno. There are two motes which each forward anything they receive if they have not seen the seqno before. I put in a delay and still the base only receives one of these. The weird part if there is another mote simply broadcasting at the same time the base receives all of those packets.
The following is the ReceivedMsg event on the mote:

TOS_MsgPtr ret = msg;
struct SimpleCmdMsg *data= (struct SimpleCmdMsg *)pmsg->data;
if (!bcast_pending)
{
if (((data->seqno - lastSeqno1)>0) || ((data->seqno+127)<lastSeqno1) )
{
bcast_pending = 1;
atomic lastSeqno1 = data->seqno;
post cmdInterpret();
call Leds.greenOn();
post forwarder();
ret = msg;
}
}
msg = pmsg;
return ret;



--Regards,
Hamdi


Quoting Michael Schippling <[EMAIL PROTECTED]>:

I'm sorry, can you describe the system a bit more.
I was distracted and didn't really follow the first version.

One thing to check is that you are using the right IDs
if you are sending to specific motes. You could also put
an intentional delay in one of the re-Motes to see if it
is an interference problem.

MS

Hamdi Roumani wrote:
Thanks,

I can't seem to figure out whats going on - i'm sure its not the motes - both are sending as SENDDONE is being called and returned sucess.

The basestation still only recieves on the packets - This only occurs when the base station is the source of the transmition
Regards,
Hamdi


Quoting Michael Schippling <[EMAIL PROTECTED]>:

That kind of depends...if all the motes can "hear" each other
there is a good chance that the CDMA (CSMA? I always forget...)
mechanism will work and one will defer to another that got there
first. But it doesn't always work. And the micaZ seems to work
better than the mica2 in this respect.

If you are predictably missing messages this is probably not
the problem, but it can contribute.

TOSBase just passes everything it gets along to the UART,
except it may filter out groupIDs that don't match...

MS

Hamdi Roumani wrote:
After a packet is sent from a basestation and if 2 motes reply by simply resending the same message back to the basestation it interfernce likely to cause one of the msgs not to be received? - in other words after outputing a packet from TOS_Base is there anything special that needs to be done if your going to reply to the msg from multiple motes at the same time.

Also does TOS_Base drop received packets if they are the same, or for any other reason?
--Regards,
Hamdi





----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to