Hi,

The payload you send with the standard TinyOS implementation (e.g. 
AMSenderC) is more or less directly put into a 802.15.4 packet which 
itself cannot have a bigger payload than 127 bytes (defined by the 
802.15.4 PHY). Some bytes are used already for the active message 
headers (source_addr, dest_addr, ...), so that not the full 127 bytes 
are available e. g. on the IRIS platform I have 113 bytes left. You can 
find out by using the Packet.maxPayloadLength() provided by your 
ActiveMessageC.

TOSH_DATA_LENGTH just defines the size of the message structure 
message_t, but it does not tell the communication layer how much bytes 
to send (this is done directly by passing the len parameter to the 
AMSend.send(..., uint8_t len) command). Thus, setting TOSH_DATA_LENGTH 
to 1000 bytes won't enable the sending of 1000 byte packets using the 
standard AMSend implementations.

Secondly, setting TOSH_DATA_LENGTH to high values means that whenever 
you define a message_t type variable, you use up >1000 bytes of RAM of 
your mote. Thats "quite a bit" on devices with very limited RAM (e. g. 
8K bytes on IRIS mote). I do not think that this is advisable.

Regards
Andreas

Manas Maheshwari schrieb:
> Hi,
> I am starting on tiny-os and working to build an application where my
> packet payload can go from 0 to ,say, 1000 bytes.
>
> I understand that we need to modify the TOSH_DATA_LENGTH parameter to
> make this possible. I am not able to figure out that does tiny-os would
> always transmit TOSH_DATA_LENGTH ( which would not be optimal) or it
> just passes this parameter and the actual payload length bytes only
> ( say 30).
>
> Secondly are there any disadvantages of using high value for
> TOSH_DATA_LENGTH, like some wasted memory(in case I am rarely
> transmitting TOSH_DATA_LENGTH bytes) on the motes.
>  
> Thanks
> MM
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
>   

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to