2010年6月25日星期五

Tmote programming

--------------------------
To compile:
gcc PER.c -o PER libmote.a -lm

--------------------------
Install the Transmitter:
cd SendingMote/
make tmote
motelist
make tmote install

cd RssiBase/
make tmote
motelist
make tmote install
--------------------------
Rx:
./combine /dev/ttyUSB0 115200
./combine /dev/ttyUSB4 115200

noise floor:
gcc noise_offset_average.c -o noise_offset_average libmote.a
./noise_offset_average /dev/ttyUSB0 115200

http://moteserver.uv.es/documentation.php

http://www.springerlink.com/content/t24g5763r7j765tw/

http://circuit.ucsd.edu/~curts/courses/ECE284_F05/projects/Project2_Telos.pdf


How to do RSSI reading without packet transmission:
http://docs.tinyos.net/index.php/Boomerang_RSSI_Readings


To disable CCA (CSMA) in Tmote:
In CC2420CsmaP.nc
ccaOn = TRUE;
to
ccaOn = FALSE;
and this will turn off the cca.

To remove CRC check for CC2420:
1. Modify CC2420ActiveMessageP.nc in /opt/tinyos-2.1.0/tos/chips/CC2420

remove line 173-175:

//if(!(call CC2420PacketBody.getMetadata(msg))->crc) {
// return msg;
//}

2. Modify CC2420ReceiveP.nc in /opt/tinyos-2.1.0/tos/chips/CC2420/receive

modify line 294-303:

// We may have received an ack that should be processed by Transmit
// buf[rxFrameLength] >> 7 checks the CRC
if (rx_buf ) {
uint8_t type = ( header->fcf >> IEEE154_FCF_FRAME_TYPE ) & 7;
signal CC2420Receive.receive( type, m_p_rx_buf );
post receiveDone_task();
return;
}

3. install code to Base Notes:
cd RssiBase
make micaz clear
make micaz
make micaz install,0 mib510,/dev/ttyUSB0

4. Compile C codes:
gcc SER_1.c libmote.a -o SER_1 -lm

5. Execute
./SER_1 /dev/ttyUSB1 57600(or 115200)

没有评论:

发表评论