Author: Brano Kusy, modified tinyos-2.x/apps/AntiTheft application CS321 warmup project, Advanced AntiTheft application ==================================================== Description: ------------ A more advanced AntiTheft application designed to teach basics networking. Theft is detected by light level (a dark mote is a mote that has been stolen and placed in a concealed dark place, e.g., a pocket!) and reported either by turning on a red LED for some time, or by reporting the theft to nodes within broadcast radio range, or both. The antitheft detection parameters and theft reporting choices are remotely controllable using the java GUI found in the java subdirectory. If both LED and radio reporting options are turned off, the mote shows the measured light level on LEDs. Class Assignment: ----------------- Implementation of task theftAction() in AntiTheftAdvancedM.nc is not complete: reporting theft by a radio broadcast is not implemented. Implement sending of the alertMsg using AlertMsg.send() command as shown in the class. Don't forget that alertMsg should contain sensed light level. Requirements: ------------- - two iMote2 motes - one ITS400 sensorboard - one IIB2400 interface board Usage: ------ Install mote1 with TOSBase: 1. cd $TOSROOT/apps/TOSBase 2. compile for "imote2 debug" and upload to the mote 3. connect IIB2400 board to the mote and connect cable to the miniUSB on the interface board Install mote2 with AntiTheftAdvancedAppC: 1. cd AntiTheft 2. edit Makefile and make sure that AntiTheftAdvancedAppC will be compiled #COMPONENT=AntiTheftAppC COMPONENT=AntiTheftAdvancedAppC 3. compile and upload AntiTheftAdvancedAppC application for "imote2 debug" 4. connect sensorboard to the mote and reset it (hold the reset button for a few seconds) Compile and run java application: 1. start SerialForwarder (replace COMX with the actual port number) java net.tinyos.sf.SerialForwarder -comm serial@COMX:imote2 -port 9001 2. cd AntiTheft/java 3. compile java application make # just the first time 4. start java application java AntiTheftGui The buttons and text fields on the right allow you to change the theft detection and reporting settings. The interval text box changes the interval at which motes check for theft (default is every second), the threshold text box changes the light threshold at which the mote reports thefts. Changes are only sent to the mote network when you press the Update button. Finally, if you've selected the radio theft report option, the message area will report received theft messages. if both led and radio are unselected, the mote shows the light level on its LEDs. 5. optionally start Listen application to see the thefts packets java net.tinyos.tools.Listen