I think the maxium TOSH_DATA_LENGTH should be 114bytes(including 114).

For Telosb, the header_t definition:
platfom_message.h
typedef union message_header {
  cc2420_header_t cc2420;
  serial_header_t serial;
} message_header_t;

CC2420.h
typedef nx_struct cc2420_header_t {
  nxle_uint8_t length;
  nxle_uint16_t fcf;
  nxle_uint8_t dsn;
  nxle_uint16_t destpan;
  nxle_uint16_t dest;
  nxle_uint16_t src;

  /** I-Frame 6LowPAN interoperability byte */
#ifdef CC2420_IFRAME_TYPE
  nxle_uint8_t network;
#endif

#ifndef TINYOS_IP
  nxle_uint8_t type;
#endif

} cc2420_header_t;

cc2420_header_t is 12byte. As for 802.15.4 Standard, nxle_uint8_t length is
PHR. So the MAC Layer header is 11bytes(including nxle_uint8_t network and
type) , then FCS is 2bytes. The maxium MAC Layer frame is 127bytes. So
TOSH_DATA_LENGTH should not exceed 127-11-2=114byte.

I had tested the maxium TOSH_DATA_LENGTH, and remembered that it is
114bytes, although in Makefile we can set TOSH_DATA_LENGTH more than 114. I
run BlinkToRadio and changed BlinkToRadio.h payload, then run BaseStation to
see whether it works.

Regards,
Lizhao

2009/5/9 Eric Decker <[email protected]>

> The maximum that TOSH_DATA_LENGTH can be set do is determined by the CC2420
> h/w.
>
> eric
>
>
> On Fri, May 8, 2009 at 9:09 PM, Xiaohui Liu <[email protected]> wrote:
>
>> Hi Eric,
>>
>> Thanks for your help. The same is found in TOSROOT\tos\chips\cc2420\CC2420.h.
>> However, neither of them talks about the max value that can be set. Any
>> thought?
>> -Xiaohui
>>
>> On Fri, May 8, 2009 at 11:32 PM, Eric Decker <[email protected]> wrote:
>>
>>> You have to start the search from the top level of the T2 tree.
>>>
>>> I get the following as well as others:
>>>
>>> ./tos/types/message.h:6:#ifndef TOSH_DATA_LENGTH
>>> ./tos/types/message.h:7:#define TOSH_DATA_LENGTH 28
>>>
>>>
>>> eric
>>>
>>>
>>>
>>> On Fri, May 8, 2009 at 8:07 PM, Xiaohui Liu <[email protected]> wrote:
>>>
>>>> I appreciate your help and I find TOSH_DATA_LENGTH in 
>>>> TOSROOT\tos\chips\cc2420\CC2420.h,
>>>> but it contains no info on the maximum of TOSH_DATA_LENGTH. Any other
>>>> idea? Thanks.
>>>> -Xiaohui
>>>>
>>>> On Fri, May 8, 2009 at 7:05 PM, Eric Decker <[email protected]> wrote:
>>>>
>>>>> The best way is to look in the source code.
>>>>> I use something like
>>>>>
>>>>> find . -exec grep -nHi tosh_data_length \{\} \;
>>>>>
>>>>>
>>>>>
>>>>> On Fri, May 8, 2009 at 3:42 PM, Xiaohui Liu <[email protected]> wrote:
>>>>>
>>>>>> Hi all,
>>>>>> What is the max value of TOSH_DATA_LENGTH I can set in TinyOS 2.x? I
>>>>>> find some previous discussions on this, but it seems to me no conclusion 
>>>>>> has
>>>>>> been reached. Also do I find it in TEP 111, which does not clarify this
>>>>>> neither. Thanks for your availability.
>>>>>>
>>>>>> -Xiaohui
>>>>>>
>>>>>> _______________________________________________
>>>>>> Tinyos-help mailing list
>>>>>> [email protected]
>>>>>>
>>>>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Eric B. Decker
>>>>> Senior (over 50 :-) Researcher
>>>>> Autonomous Systems Lab
>>>>> Jack Baskin School of Engineering
>>>>> UCSC
>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> Eric B. Decker
>>> Senior (over 50 :-) Researcher
>>> Autonomous Systems Lab
>>> Jack Baskin School of Engineering
>>> UCSC
>>>
>>>
>>
>
>
> --
> Eric B. Decker
> Senior (over 50 :-) Researcher
> Autonomous Systems Lab
> Jack Baskin School of Engineering
> UCSC
>
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Lizhao You
Undergraduate Student of GPS Group
Department of Computer Science and Technology, Nanjing University
Nanjing, Jiangsu, 210093 China PR.
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to