The metadata contains information about the packet that is used by the radio stack. Like you said, it is not transmitted as part of the packet, but rather contains side-note information about the packet.
The metadata fields are all 0's at boot time, because they haven't been initialized. When you receive a packet, the buffer receiving the packet doesn't have any of its metadata configured except the RSSI and LQI fields. When you copy the metadata fields from your received packet to the payload portion of a serial packet, seeing 0's in most of the fields is correct. The timestamp should be the local relative time the packet was received, which is the time the SFD (start frame delimiter) interrupt fired on the radio chip when it began to receive a packet. The RSSI and LQI fields reflect those values while the packet was being received. At that time, there is a transmitter nearby, so you'll see lots of energy on the channel. The RssiToSerial application monitors the RSSI at any time - and the values you read mostly occur when a transmitter is not on the channel. In those cases, you'll be reading the energy of the noise floor. When the radio receives a packet, it will automatically fill in the RSSI and LQI fields in the metadata for that packet. If you want to read the RSSI values when the radio is not receiving a packet, you would use CC2420ControlC's ReadRssi interface. LQI values are only available when receiving a packet. -David _____ From: jiwen zhang [mailto:[EMAIL PROTECTED] Sent: Monday, June 02, 2008 8:11 AM To: David Moss Subject: about the metadata of cc2420 Hello David : as we know , the metadata is not sended when we use the command AMSend.send to send a packet . Can you explain the function of the metadata ? i see some codes of cc2420 driver . are all fields of metadata given an significative value ? such as rssi , lqi and so on ? i put the metadata in the payload when i receive a packet and send the packet to serial port in order to see what the values are . i find rxInterval,maxRetries and retryDelay are equal to zero . are they right ? and the time field is some strange value , for example , every second , i send a packet , the value of time field i receive are 3e 43 , ac 4d , 1a 27 , 88 46 ... , i don't know how do they figure out in the implemention of cc2420 driver . the rssi value i get (i use the interface CC2420PacketBody) is E5 or E9 when there is only one sender and one receiver . it is different with the value i get by the application of /apps/tests/cc2420RssiToSerial whose value is about 4A ,4B or 4C, why ? how do these value get in the implemention of cc2420 driver ? read from the specified register ? and what about lqi ? (the value i get is about 6B or 6C , and also one sender , one receiver ) typedef nx_struct cc2420_metadata_t { nx_uint8_t rssi; nx_uint8_t lqi; nx_uint8_t tx_power; nx_bool crc; nx_bool ack; nx_uint16_t time; nx_uint16_t rxInterval; /** Packet Link Metadata */ #ifdef PACKET_LINK nx_uint16_t maxRetries; nx_uint16_t retryDelay; #endif } cc2420_metadata_t; -- zhang jiwen
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
