2010年6月27日星期日

Backup the Trac and Subversion in Linux Server

http://wiki.archlinux.org/index.php/Subversion_backup_and_restore

svnadmin dump /path/to/reponame > /tmp/reponame.dump ;
scp -rp /tmp/reponame.dump user@server.domain.com:/tmp/

http://trac.edgewall.org/wiki/TracBackup
$ trac-admin /path/to/projenv hotcopy /path/to/backupdir

Bash for loop

#!/bin/bash
for i in $( ls ); do
echo item: $i
done


http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-7.html

2010年6月26日星期六

small linux system

http://www.damnsmalllinux.org/download.html

http://puppylinux.org/main/index.php?file=Download%20Latest%20Release.htm

2010年6月25日星期五

Jensen's inequality

if p1, ... pn are positive number which sum to 1 and f is real continuous function that is convex.
then,

sum_i Pi f(x_i) > f(sum_i Pi x_i)

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)

2010年6月13日星期日

Android Programming ZZ

http://cairo.cs.uiuc.edu/~yHuang/misc.html

Android Programming