First of all, note that the README instructions in tinyos-1.x/contrib/PEGSensor/README.PEGSensor is incorrect. In step 3.1, you type cd tinyos-1.x/contrib/PEGSensor/PEGSensor make mica2dot make mica2dot reinstall.0x200 Note that you are compiling in PEGSensor/PEGSensor. If you cannot get PEGSensor to compile, and you get errors similar to the errors found in the file PEGSensor_compile_failed.txt , it is likely that you have multiple Config parameters with the same index number. This can happen because PEGSensor depends on the localization work in Calamari. The Calamari tree might be modified over time without testing whether the changes are compatible with PEGSensor. To resolve this, perform these steps: 1) comment out the unnecessary services. For example, look at PEGSensor_CVS_diff.txt on services that are unnecessary 2) Look in the autogenerated file build/Config.h to find the duplicate number entries. 1) make mica2dot to generate the files in the build directory. The compilation will fail after creating Config.h 2) open up Config.h in a text browser. Note the numbers that are used multiple times (you may want to consult your compilation error messages and ConfigM.nc for help). 3) grep recursively (grep -R "//!! Config number-in-conflict" *) in the tinyos-1.x/contrib directory for the parameters that are conflicting. Change the number in the line: //!! Config number-in-conflict of the corresponding *.nc file such that it is unique (check Config.h). Preferably, change the *.nc file in the PEGSensor directory, so as not to screw up other projects. 4) Save and recompile * As of 4/23/2004 the conflicts are: 108: CONFIG_txRetry CONFIG_useWhichPosition # change this 109: CONFIG_useEstimatedEvader # change this CONFIG_txDelay 3) Remember to change the matlab tools to match the change in config numbers (this does not affect compilation, but affects whether those config parameters are useable when you access them through matlab) 1) Change peg.m's Config number to command mapping. Search for the string 'config_query(##)' in peg.m, where ## is the Config number 2) Change peglistener.m's Config number to command mapping. Search under the function 'ConfigResponse' and find the Config number in the case statement. If you checked out recently from the CVS tree and get the error messages similar to the file PEGSensor_compile_failed2.txt , Then a temporary fix is to run these commands in your contrib/PEGSensor/PEGSensor directory: mv /opt/tinyos-1.x/tos/system/Ident.h /opt/tinyos-1.x/tos/system/Ident.h.old make mica2dot mv /opt/tinyos-1.x/tos/system/Ident.h.old /opt/tinyos-1.x/tos/system/Ident.h