The CC2420 hardware sees the length as 

  Length = (header - length byte) + payload.  

I don't remember if the CRC is included in there. It might be tacked
on/removed automatically in hardware when autocrc is enabled (?) - the
microcontroller doesn't see it anyhow.  So... the length seen by the CC2420
hardware is the size of the full packet to transmit/receive.


TinyOS sees the length a little bit differently:

  Length = payload

The length here is geared for applications, because applications only care
about the size of the actual payload they're sending/receiving.

-David





-----Original Message-----
From: Mischa Weise [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 26, 2007 4:08 AM
To: David Moss
Cc: [email protected]
Subject: Re: [Tinyos-help] CC2420 send / resend

Thank you for the answer, David.

Now I use CC2420ReceiveC.Receive Interface and receive all the packets.
Another question: In what way does the payload returned from 
CC2420ReceiveC Receive.receive(...) and the payload returned from 
AMReceiveC Receive.receive(...) differ for the same packet? In my 
implementation CC2420ReceiveC returns len=16 and AMReceiveC returns 
len=4. The cause seems to be in CC2420ActiveMessageP where the length is 
decreased by CC2420_SIZE (=header+footersize). Am I correct in the 
assumption that actually it does not matter when I copy my data, because 
the data is always at the same offset, where *payload is pointing to.
Can you explain the difference between the payload in CC2420ReceiveC and 
AMReceiveC or point me to some litrature? (I flow over some TEPs and the 
CC2420manual vom TI but found nothing specific)

M.


David Moss wrote:
> Hi Mischa -
> 
> CC2420Transmit.resend(FALSE) will resend whatever has been previously
loaded
> into the TXFIFO on the CC2420, without using clear channel assessments.
> This is one of the fastest methods of repetitively transmitting a single
> packet on the CC2420, and is what the low power listening implementation
> uses to wake up other nodes.
> 
> The CC2420 receiver will detect each packet separately and present those
> packets to CC2420Receive.  Higher up, the UniqueReceive layer of the radio
> stack will filter out duplicate packets based on their DSN and source
> address information.  If you want to actually receive the duplicate
packet,
> you'll need to connect directly to CC2420ReceiveC and intercept it there.
> 
> If it makes it easier on your implementation, send a packet using low
power
> listening to the broadcast address.  Tell the LowPowerListening interface
> before send that the receiver's rx sleep interval is, say... 10 minutes.
> YThen, LPL will do all the transmitting of that single packet for you as
> fast as it possibly can for 10 full minutes (you'll hit send and the
> sendDone will occur 10 minutes later).  Of course, you can modify the
> DefaultLplP implementation on your machine if you want to see when it's
> calling resend().
> 
> -David
> 
> 
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Mischa
> Weise
> Sent: Wednesday, July 25, 2007 1:23 PM
> To: [email protected]
> Subject: [Tinyos-help] CC2420 send / resend
> 
> context:
> ********
> I want to find out, how fast I can broadcast packets with the CC2420 
> Radio on the Tmote platform (under the newest TinyOS-2.x from cvs). 
> Therefore I send a packet burst of the same packet and measure the time 
> at the sender (send->sendDone-event) and at a receiver(receive-event or 
> SFDpinUp->SFDpinDown).
> My implementation is working if I use AMSend for every single packet of 
> the burst. But now I want to make it faster and use 
> CC2420Transmit.resend(...)
> Actually, I don't care about seq-no. or acks. (all acks turned off 
> anyway). I just want the receiver to get the payload of any broadcasted 
> package.
> 
> questions:
> *********
> Can I just use AMSend.send(AM_BROADCAST_ADDR, &pkt, paylen) and than use 
> CC2420Transmit.resend(FALSE) as long as I want to resend the packet at 
> &pkt? (to generate a packet burst of that packet)
> 
> And will the CC2420 detect each packets separately? Or will it detect 
> only the first such package and then discard all the following?
> (There are obviously different meanings of "detect": SFD pin behavior, 
> TinyOS CC2420 behavior, TinyOS ActiveMessage behavior)
> 
> 
> Thank you in advance for any answers, clues, pointers to instruction.
> M.
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> 


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

Reply via email to