To apply the patch: 1) Unpack the package directly onto where J-Sim v1.3 is installed (i.e., the $J_SIM directory). Prompt "yes" to any file overrides. 2) Add the following line below the variable PACKAGES in $J_SIM/Makefile drcl.inet.sensorsim.diffusion \ 3) Recompile the sources: Type make at directory $J_SIM 4) Now you are ready to run the sample .tcl scripts which will be located at $J_SIM/script/drcl/inet/sensorsim and $J_SIM/script/drcl/inet/sensorsim/diffusion This patch contains: 1) A localization protocol: D. Niculescu and B. Nath. "Ad hoc positioning system (APS)," In Proc. of IEEE GLOBECOM'01. 2) A directed diffusion protocol: C. Intanagonwiwat, R. Govindan, and D. Estrin. "Directed diffusion: A scalable and robust communication paradigm for sensor networks," In Proc. of ACM MobiCom'00. 3) Additions and modifications to the sensorsim package: a- AcousticProp and AcousticChannel: added an acoustic propagation model and an acoustic channel. b- TargetPacket, TargetAgent, SensorAgent and SensorAppAgentContract: Added sequence number (seqNum) and binary data (body) fields to TargetPacket. c- SensorPhy, SensorPositionReportContract and SensorNodePositionTracker: Added a new port (toSensorNodePositionTracker) to SensorPhy so that whenever a sensor node detects a signal from a target node, it will send a SensorPositionReportContract.Message to SensorNodePositionTracker. d- SensorPacket, SensorAppWirelessAgentContract, WirelessAgent and SensorApp: Modified SensorPacket to set and get the binary data field in the superclass (Packet). e- SensorLocationInformation and SensorNodePositionTracker: Added a separate class for SensorLocationInformation instead of being a static class within SensorNodePositionTracker. f- SensorNeighborQueryContract: Modified SensorNeighborQueryContract to be able to report the locations of the neighboring nodes. g- SensorChannel: Kept the timer port so that the sensor channel can forward data packets after a fixed propagation delay.