[Tinyos-devel] BaseStationP bug

Chieh-Jan (Mike) Liang cliang4 at cs.jhu.edu
Tue Feb 19 12:35:58 PST 2008


Hi David,

Then, should UartAMPacket.setSource(...) comes after memset(...)?

Thank you

Mike

On Tue, 19 Feb 2008, David Moss wrote:

> Hi Mike -
>
> The location where the header is cleared is just after the source address,
> length, and id of that packet are extracted into local variables.  These
> local variables are then used in the next send() command and put back into
> the packet by the communication driver itself.
>
> -David
>
>
>
>
> -----Original Message-----
> From: Chieh-Jan (Mike) Liang [mailto:cliang4 at cs.jhu.edu]
> Sent: Monday, February 18, 2008 5:28 PM
> To: David Moss
> Cc: tinyos-devel at millennium.berkeley.edu
> Subject: Re: [Tinyos-devel] BaseStationP bug
>
> Hi David,
>
> One question about your fix. Before the radio packet is injected to
> serial, you erase the header. If I am not mistaken, after you do this, you
> need to set the packet source address back. This is for the "transparent"
> bridging.
>
> Thank you
>
> Mike
>
> On Fri, 15 Feb 2008, David Moss wrote:
>
>> The BaseStation application moves received packets directly into the send
>> branch of the serial or radio stacks without clearing the header.
> Residual
>> header information is left over from the opposite communication driver,
>> which can cause send/receive problems elsewhere.
>>
>>
>>
>> The case I'm seeing here is a message is received through the serial
> stack,
>> causing the message's header to be filled in like a serial header.  The
>> message is moved directly into the radio stack without clearing the
> header.
>> Some bytes of a radio packet header, like FCF, are not edited by the radio
>> stack because they are assumed to contain pre-configured settings.  The
> FCF
>> byte is therefore corrupted by the bytes left over from the serial stack.
>> This causes a node receiving the packet with the corrupted FCF byte to
>> filter out and drop the packet.
>>
>>
>>
>> The solution is for the BaseStation application to clear each message_t's
>> header before injecting the message into the send branch of the opposite
>> communication driver.  I have attached my version of BaseStationP, but I
>> would recommend the owner(s) of this application take a look before
>> committing the fixes back to tinyos-2.x/apps/BaseStation.
>>
>>
>>
>> -David
>>
>>
>>
>>
>
>


More information about the Tinyos-devel mailing list