Hi ,
I too tried that code.Still, I receive the following output(crc stripped):

FF FF 00 7D 06 03 00 4B 00(rssi values)
FF FF 00 7D 06 04 00 46 00
FF FF 00 7D 06 05 00 4A 00

After scanning the e-mail lists,I found that :It should be converted into decimal(Then interpreting them as dBm) and -45dBm has to be subtracted form it,to get the correct reading.Is that correct? and they say that the rssi value interpretation changes with tinyos version.I use 1.1.10 and mica2 motes.

When referred to CC1000 data sheet ,It has the following 2 lines in pg.no:30:
P = -51.3 VRSSI– 49.2 [dBm] at 433 MHz
P = -50.0 VRSSI– 45.5 [dBm] at 868 MHz.

But I am using 916Mhz band.I am kind a confused with these statements

Thanks for your attention,
Kishore

Michael Schippling wrote:
Since the data[] array is bytes, only one byte (the LSB) is assigned.
One quick fix it is to do two assignments, knowing that everybody
expects multi-byte data to be in little-endian order:
data[2] = strength & 0xff;
data[3] = strength >> 8;

MS


RamKishore wrote:
Hi Michael,
You pointed the right problem.The assumption that packet length will be automatically get adjusted at base station was wrong.When full length messages were sent ,it really worked.*Thank you very very much*.One small question regarding RSSI values read and interpretation. I was trying to read counter value sent by transmitter, RSSI and crc values with message length set to 6 .As per AM.h file,strength and crc fields are 16 bit .To achieve this the following additions are made to previous code.

gRxBufPoolTbl[gRxHeadIndex]->data[2] = Msg->strength;
gRxBufPoolTbl[gRxHeadIndex]->data[3] = Msg->crc;
The output is shown below:

length counter RSSI crc FF FF 00 7D 06 02 00 39 42 00 00
FF FF 00 7D 06 03 00 2D E2 00 00
FF FF 00 7D 06 04 00 2D 02 00 00
FF FF 00 7D 06 05 00 2E A2 00 00

As seen, rssi and crc values are 8bit only.I thought crc is being over-written on remaining RSSI 8 bits, I made the following changes to code:
gRxBufPoolTbl[gRxHeadIndex]->data[2] = Msg->strength;
gRxBufPoolTbl[gRxHeadIndex]->data[4] = Msg->crc;
I have the corresponding output:

length counter RSSI CRC FF FF 00 7D 06 02 00 39 00 42 00 00
FF FF 00 7D 06 03 00 2D 00 E2 00 00
FF FF 00 7D 06 04 00 2D 00 02 00 00
FF FF 00 7D 06 05 00 2E 00 A2 00 00

Are these values correct ; what is their interpretation?

Thank you very much for your time and patience.

Thanks once again,
Kishore




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

Reply via email to