Hi, I don't know about the receive part. But if you want to know when the transmission begins in a tmote (or any other mote that uses CC2420 in TinyOS 2.x) you might have a look at the file CC2420TransmitP.nc. In the function attemptSend(), there is a line like the following:
status = m_cca ? call STXONCCA.strobe() : call STXON.strobe(); Then there is a line again: if ( status & CC2420_STATUS_TX_ACTIVE ) congestion = FALSE; My understanding (I might be wrong) is that if the second condition is true (i.e., congestion = FALSE), then the first line (the call to strobe) actually started the transmission. --Mehedi On 6/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi Mehedi, thanks for the answer. I've made a LocalTimeMicro component with those components you said, but now how can I make sure I get the time of arrival of the packet? If I place the "call LocalTimeMicro.get()" in the Receive.receive/Send.sendDone() event, some (or many) microseconds have passed since the actual arrival/departure of the packet (the SFD detection). What I would like is that the packet's time metadata was in microseconds On Fri Jun 29 23:58 , 'Mehedi Bakht' <[EMAIL PROTECTED]> wrote: You might use a microsecond counter (MSP430CounterMicroC if you are working on MSP430 platform) and then wire it CounterToLocalTimeC to get the current time. You will have to use TransformCounterC component to convert the 16-bit values to 32-bit values. Hope it helps. --Mehedi On 6/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote: > > > Hello tinyos-ers! > > I'm using the "time" metadata field to know when the packet was > received/sent, but that is in 32khz time units. Is there any way to know the > time in microseconds? And possibly in a larger integer than 16bit? > > > Hope to hear from you, > > thanks in advance > > > > >
_______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
