I have found the bug, I didn't set the length of the packet in the LoopBack.
Sorry.
Romain
On 5/11/07, Romain Thouvenin <[EMAIL PROTECTED]> wrote:
Hi,
I am trying to deploy a sensor network with a base station (I use a
slightly modified BaseStation).
When regular nodes send data to the base station, it is forwarded
through the serial port, it works perfectly.
But I also need the base station to send data. So I programmed the two
applications on the base station : my BaseStation and my other
applications. They communicate via a LoopBack component that I
implemented. The LoopBack seems to work well, but the serial forwarder
says the packet is too long.
If check the length of the packet in the receive event of the
BaseStation, it's fine. But if I check it just before the uartSend
call, it is too long, how is that possible ?
The modifications of BaseStation are only :
line 190 :
tmpLen = len = call Packet.payloadLength(msg);
id = call AMPacket.type(msg);
addr = call AMPacket.destination(msg);
line 265 :
len = call RadioPacket.payloadLength(msg);
addr = call RadioAMPacket.destination(msg);
id = call RadioAMPacket.type(msg);
Packet and AMPacket are wired to ActiveMessageC, and the radio packets
are wired to my multihop protocol component.
Does anyone have an idea ?
It looks like the packet is modified between the "radio" receipt and
the uart send, but the loopback component gives a copy of the packet,
so I don't understand how it is possible.
Thanks for your help,
Romain
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help