OK, now this is more familiar. I've used a program without the UART module wired to the app, and the messages did get injected and showed up in the "receive()" event handler for the GenericComm module (when in TOSSIM and using the SerialForwarder in "tossim-serial" mode). I guess this is similar to what you saw. I did find this thing weird, and it contradicts what I have read in the documentation. It looks like this might be the answer to your "sendDone() being called twice" problem.
I wonder if this is TinyOS 1.1.11 specific problem. My app needs to use bidirectional communication over "tossim-serial" interface, but so far I was only able to inject packets, and only into GenericComm. I didn't try to wire UARTComm to my app directly, but I tried to run TOSBase in TOSSIM and I couldn't get anything going using the "tossim-serial" mode. Something clearly doesn't work right. Dmitri On 11/13/06, Tarun Bansal <[EMAIL PROTECTED]> wrote:
I had mailed sometime back about packets being received twice. In the same context, I would also like to bring few more observations. May be that will help us in solving this problem. I am using TinyOS 1.1.11 1. When I run the program on TOSSIM (CC1000 stack) and wire both GenericComm and UARTComm to the main application: and I send a packet to the "base station mote" through Java (via SerialForwarder) - the "BS mote" receives the message twice (Checked by enabling debug messages) If only UARTComm is wired, the BS receives only one copy of the message 2. Similarly If I run the whole thing on actual micaz motes: IF I wire both GenericComm and UARTComm, the "base station mote" fails to receive any messages from SerialForwarder If I wire only UARTComm, then BS mote perfectly receives all the messages from Java (via SerialForwarder) I can feel that both the cases are due to same reason - probably mapping to the same bus/port. Can anyone explain this? Tarun On 11/7/06, Tarun Bansal <[EMAIL PROTECTED]> wrote: > I am using TOSSIM environment with TinyOS 1.1.11 and CC1000 stack > > Tarun > > On 11/7/06, Philip Levis <[EMAIL PROTECTED]> wrote: > > On Nov 7, 2006, at 12:10 AM, Tarun Bansal wrote: > > > > > I was examining the behavior of sendDone() after sending a packet over > > > radio (in TOSSIM environment). I noticed that it is being called twice > > > for every packet sent. > > > > > > If I send the pkt to an actual address, both sendDone()'s have their > > > ack flag up. > > > However if the pkt is sent to a fictitious mote, the flag is first up > > > and second time down. > > > > > > Can you please explain this behaviour and how do I interpret these > > > readings? > > > Also should I expect the same behaviour on real Mica2 motes? > > > > TinyOS 1.x or 2.x? > > > > If 1.x, default radio stack, CC1000 stack or CC2420 stack? > > > > Phil > > >
_______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
