[Tinyos-help] Best TOSH_DATA_LENGTH ?

Alan Marchiori alan at alanmarian.com
Tue Jul 28 09:28:54 PDT 2009


On Tue, Jul 28, 2009 at 9:27 AM, Rémi Villé<ville.remi at gmail.com> wrote:
> Hi,
>
> TOSH_DATA_LENGTH is about 20-30 byte, depending of the mote. I have read
> that we can increase this value to something like 100 byte.
> But what would be the reason to choose a 100 byte payload rather than a 30
> byte one ?
> I mean if I have 100 byte to send, should I send 4 packet of 30 byte ? Maybe
> because if there's one error in the message (CRC detection) I should
> retransmit 100 byte rather than 30 byte...
>
> I don't know which is the best way to choose a good TASH_DATA_LENGTH
> (assuming that I have an infinite number of byte to send), maybe by
> experimentation or by analyzing? or maybe the default length has been chosen
> with this considerations?
>


if you had infinite bytes to send I suspect the best choice would be
the largest possible payload size.  For 802.15.4 radios this is 128
bytes, but TOS adds some extra headers.  I think you can go up to
around 120 bytes for TOSH_DATA_LENGTH, you should verify this number
to be sure.  See this thread also:
https://www.millennium.berkeley.edu/pipermail/tinyos-help/2009-May/040012.html

I don't know exactly how the 30 byte default was chosen but I suspect
it was chosen to provide 'enough' data for many sensor network
applications while being small enough not to use up a not of memory on
the mote.  Since TOS is statically linked every message_t must hold
TOSH_DATA_LENGTH bytes (plus some headers).



More information about the Tinyos-help mailing list