(file) Return to README CVS log (file) Jump to this file's LXR Page (dir) Up to [CENS] / tos-contrib / moap

File: [CENS] / tos-contrib / moap / README (download)
Revision: 1.1, Wed Apr 28 21:58:41 2004 UTC (5 years, 6 months ago) by rkapur
Branch: MAIN
CVS Tags: scale_radio_channel, rdd_alpha_version_1, pregeonet, nims-lab-Sep07-2004, nims-jr-Sep05-04, lessgps_release, kiss_release, bp_scale_radio_channel, acoustic-05-18-06, PRE_TOSNIC_FIX, PRE_NOMEGA_MOTENIC, PRE_MOTENIC_CLEANUP, PRE_CEILING_FIX, PRE_64BIT, MOTENIC_PRE_BUGFIX_20050415, LESSGPS_1_00, LAURA_CALIBRATION_EXPERIMENTS, KISS_1_0, HOSTMOTE_V_6_EXPERIMENTAL, HOSTMOTE_PROTOCOL_VERSION_7, HOSTMOTE_PROTOCOL_VERSION_6_WITH_HOSTMOAP, HOSTMOTE_PROTOCOL_VERSION_5_WITH_HOSTMOAP, HOSTMOTE_PROTOCOL_VERSION_5, HOSTMOTE_PROTOCOL_VERSION_4, HOSTMOTE_PROTOCOL_VERSION_3, HEAD, ESS_RELEASE_3_5, ESS_RELEASE_3_4, ESS_RELEASE_3_3, ESS_RELEASE_3_2, ESS_RELEASE_3_1, ESS_RELEASE_3_0, ESS_RELEASE_2_0, ESS_CONNECTIVITY, ESS_CENTROUTE_TESTING, ESS2-CMS-V1_5_pretest, ESS2-CMS-V1_4cMergeSympathy_2, ESS2-CMS-V1_4c, ESS2-CMS-V1_4b, ESS2-CMS-V1_4a, ESS2-CMS-V1_3, ESS2-CMS-V1_2, ESS2-CMS-V1_1, ESS2-CMS-V1_0, EMSTAR_RELEASE_2_5, EMSTAR_RELEASE_2_1_BRANCH, EMSTAR_RELEASE_2_1, EMSTAR_RELEASE_2_0, EMSTAR_PRE_HTML, CYCLOPS_RELEASE_CANDIDATE_2_0, CYCLOPS_PRERELEASE_STABLE, CENTROUTE_EMSTAR_SOCKETS, BG_1_0, BANGLADESH_ARSENIC_1_2, BANGLADESH_ARSENIC_1_1, AMARSS_JR_DEPLOYMENT_6_05_07
Adding new files for decoding diff file on motes.

MOAP Code Distribution using Differential Compression
Tom Yeh
Rahul Kapur
Ujjwal Lahoti

INSTALLATION INSTRUCTIONS
1)Untar moap_diff.final.tar in the tos-contrib directory (if a moap directory currently
exists move the existing directory to another name) 



DIRECTORY STRUCTURE
apps/
	This directory contains two applications.  The MoapTest application is a simple Blink program
	with a hook to Moap.  The application blinks the yellow led until it hears a publish request
	from another mote, at which point it proceeds with the MOAP DIFF application.  The second 
	application is a modified Blink which just turns the green LED on.  Our sample test changed
	loaded MoapTest on the mote and then sent a diff to convert it to the modified Blink application.
	(See documentation as to why the modified Blink was used as the new binary).

doc/
	Contains the original MOAP instructions

moap_emstar/
	This directory contains the EMSTAR side of the moap code.  This directory should be replace the 
	/devel/link/ directory inside your emstar directory.  Changes were done to moapsource.c to 
	parse in a diff binary instead of an srec file.  Also the moap-sc was changed to simulate our 
	moap diff code on EmTOS.

tools/
	The tools directory contains the bootloader srec and isntallation files.  It also contains the 
	diff_tool to do differential compression.  The diff_files directory inside diff_tools contains
	the object dump files and binary diff files for our sample application.

tos/
	This directory contains the source code for MOAP Diff.  the system/ directory contains all our
	added and changed files.

RUNNING THE DIFF TOOL
The diff tool requires the mica2 built .exe files for both the original and new version of the code.  On 
each .exe file run 'avr-objdump -z S <filename>.exe > <filename>.cxx'.  One thing to note is that
the avr-objdump on the cygwin seems to work correctly but on the cens machines creates a dump file with
high level code embedded in it.  We use the avr-objdump on cygwin since it provides the correct format.

Next run 'perl diff.master.final'.  The the script will ask the source and destination cxx files created
in the above step.  The result will be a final.diff file.  This file contains a ascii text based set of 
instructions to convert the old version to the new version.

Finally run 'perl bin.perl' which will take the final.diff file and create a final.bin.  This final.bin
is the binary diff file that needs to be sent to moapsource.

The diff_file directory contains the cxx, diff, and bin files for the moap2blink code tested on the motes.

RUNNING MOAP DIFF ON EMTOS

When running on EMTOS we need to mimic the instruction ROM. To do this we have created a emtos_memcpy_P
command which loads an srec of the binary into memory and uses it as instruction ROM memories.  Open
ProcessM.nc and change the emtos_memcpy_init to point to the srec file of the application running your
mote.  In our example application it needs to point to the apps/MoapTest/build/mica2/main.srec file. Once
this change is made, compile your application with 'make mica2' to create the srec file and then
'make emstar' to create your emtos executable.  In our case compile in apps/MoapTest.  


For moapsource the  moap_emstar directory has to be copied to the emstar directory as described above and compiled.
Next change moapsource_tab to use the bin file created by the Diff tool. Change moap_tab to point to the 
emstar binary compiled by make emstar. Then change moap-sc to configure the preferred radio model number of 
nodes.  Currently we are using two nodes, one is an Emstar moapsource and the other is a TOS mote.

When the above is configured run 'emrun/emsim <your path to moap-sc>'  from the obj directory in emstar.

RUNNING MOAP DIFF ON THE MOTES
Compile the apps/MoapTest to mica2.  Install the srec file onto the mote with a non-zero id number.  Next 
install the bootloader on the mote.  (NOTE Bootloader must be installed AFTER the application).  Next 
install Transciever on a mote and link it to your emstar pc with a serial cable.  Make sure that hostmote
and motenic is running.  Start the moapsource executable with the .bin file and version number.


      

CENS CVS Mailing List
Powered by
ViewCVS 0.9.2