Installation Document: Sensorweb 2.0
Installation Document: Sensorweb 2.0
SensorWeb 2.0
Compiled by:
Ronald Siswara Wong
Jehanzeb Khan
1.1. Purpose
This document describes all the installation process for the SensorWeb 2.0 Software
starting from scratch. This document covers all aspect of its installation including all
various softwares needed, and how to deploy the web services in your machine.
• Section 2 (Not all software are compulsory and readers are encouraged to
check Section 3 when encounter some problems to see if they have already
been documented).
• Section 4 (This section could be skipped but most service and routine in
NOSA will not work without this).
• Section 5 (Compulsory)
1.3. References
• Various NOSA installation notes written by Tom Kobialka
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
5. You need to install an editor for editing files. I chose three different editors to
try out.
6. You will need to install an utility for executing rpm command that is used for
installing NesC program in step 4 below.
Here are the commands for editing passwd file with vi editor.
Note the directory below is already correct. I believe the above step for changing
passwd file is no longer necessary. Somebody must have installed a patch to
automatically perform this home directory correction. To exit vi editor without
saving changes, type “:q!” and depress enter key. To save changes and exit vi editor,
type “:wq” and depress enter key.
b) Set the new make utility to be your makefile by adding the following
line to your .profile:
export MAKERULES=$TOSROOT/tools/make/Makerules
Screen shot of .bash_profile before editing.
To edit .bash_profile with vi editor, use the below code:
Screen shot showing vi editor with three added lines of code. Note: To exit and save
changes while using vi editor, type “:wq” and depress enter key. After exiting vi
editor, you must restart cygwin for changes in .bash_profile to take effect.
Step 4 – Install NesC
1. Download NesC from the TinyOS website:
[Link] . Get the latest version nesc-
[Link] and load to a directory of your choice.
2. Using cygwin, navigate to your chosen directory and install using “rpm --
ignoreos –ivh [Link]”.
PATH=/cygdrive/c/wasabi/usr/local/bin:$PATH
e) Don't set GCC_EXEC_PREFIX like the user guide says.
Restart cygwin to make sure the path change has taken
effect.
Note: Skip step 7, 8, 9 and 10 if using USB for programming. These steps are for
xflash programming with JTAG cable.
Skip step 7.
Step 7 – Test the setup again
• Go to $TOSROOT/apps/blink
• Type : make imote2 debug
• It should complete.
o If you get a dwarf2bd error, you probably didn’t restart your machine after
installing the SDT tools. Try restarting your machine and repeat the step
above. Note: [Link] is installed in c:\nordheim\xdbbin
o You can check if the path is setup correctly by typing which dwarf2bd at
the cygwin prompt, you should get /cygdrive/c/nordheim/xdbbin/dwarf2bd
Skip step 9
Step 9 – Copy required files and setup the environment
• Copy [Link] and [Link] from $TOSROOT/contrib/imote2/installation to
c:\imote2
• Copy [Link] from $TOSROOT/contrib/imote2/installation to
C:\nordheim\xflash\[Link] (replace c:\norheim with your toolsuite location
if different)
• Copy [Link] from $TOSROOT/contrib/imote2/installation to
c:\nordheim\xflash\[Link] (overwrite existing file).
• If you have the Intel JTAG dongle, add the following line to your .profile file :
o export PXA27X_JTAG_DEV="\"INTEL(R) JTAG CABLE\""
Note, the INTEL JTAG cable might complain unless your PC has been hard
power cycled with its parallel port in ECP mode at base 0x378
• if you have a Macraigor Raven JTAG dongle, you don’t need to do anything.
Step 10 – Test the setup
• Restart Cygwin
• Plug in an Intel Mote 2 into the advanced connector of the debug board (J1 & J3).
• Push the power button on Intel Mote 2 (little button above the processor that
should be on the top side of the board when the mote is attached to the advanced
connectors.
• Go to tinyos-1.x/apps/Blink and type: make install imote2 debug.
• This will build, link and download the blink application to the Intel Mote 2.
• After the download is done, the mote should be blinking red at 2Hz (50% duty
cycle).
b. Push the power button of the Intel Mote 2. The mote will be
recognized as a USB human interface device.
c. Use the ImoteConsole program to communicate with the mote, this can
be found in $TOSROOT/contrib/imote2/tools/bin directory.
i. You may have to do this first:
chmod a+x $TOSROOT/contrib/imote2/tools/bin/
[Link]
g. Type “ls” to see available commands. Type NodeID, the mote will
print out the serial number of the mote.
2. Debug through UART:
a. Connect the Intel Mote 2 to the programming board. If you installed
the programming board successfully in step 9 above, it will create two
“USB serial port” instances, you can find which COM ports were
mapped by going to control panel, system, hardware, device manager.
The ports will be listed under “Ports (COM & LPT)”. If you don’t see
these listed, please go back and check Step 9 above.
b. The second USB serial port listed is the one dedicated to the console.
c. Start hyperterm, choose the second com port listed and configure it to
115200, 8, none, 1, none.
d. Push the connect button. Push the enter button, you will see a
“BluSH>” prompt. Type NodeID, the mote will print out the serial
number of the mote.
2.2. Install JNI Library for getenv
To install JNI Library, execute:
> cd $TOSROOT/tools/java/jni
> make install
> cd $TOSROOT/apps/TinyDBApp
> make pc
* Make TinyViz
> cd $TOSROOT/tools/java/net/tinyos/sim
> make
Inorder to run the TinyDB in the TOSSIM Simulator, we have to include the
following files in our classpath
C:\tinyos-1.x\tools\java\;
C:\[Link]; (This file should be downloaded from the following link)
C:\tinyos-1.x\tools\java\jars\; (This must be done in order for java to compile)
C:\tinyos-1.x\tools\java\jars\[Link];
C:\tinyos-1.x\tools\java\jars\[Link];
C:\tinyos-1.x\tools\java\jars\[Link];
C:\tinyos-1.x\tools\java\jars\[Link];
C:\tinyos-1.x\tools\java\jars\[Link];
> cd $TOSROOT/tools/java
> java [Link] -sim
Assuming you set the DBG string as above, you should be able to click the "Reset
Motes" button and see a message in the window where you started the pc binary (the
first shell window) stating that reset is not supported in the simulator.
Make sure ANT_HOME is set prior to building and don't forget to add
$ANT_HOME/bin to your $PATH
For the purposes of the remainder of this document, the symbolic name
"$CATALINA_HOME" is used to refer to the full pathname of the release
directory. As an example, in my computer, the symbol $CATALINA_HOME in
my computer represents C:\Program Files\Apache Software Foundation\apache-
tomcat-5.5.20
NOTE: CATALINA_HOME represents the root of your tomcat installation.
• Add to /etc/[Link]:
This [Link] file will determine the execution path of the sensor
web services.
• Start tomcat:
/cygdrive/c/Program Files/Apache Software Foundation/Tomcat
5.5/bin/[Link]
• Start TinyViz
> cd $TOSROOT/apps/TinyDBApp
> export DBG=usr1
> tinyviz -run build/pc/[Link] 5
classname=[Link]
• Go to c:/Surge-View/
execute [Link]
set: serail@COM1:57600
• Ensure the motes and bass station are connected to the serial port
• Execute:
2.11. Globus
To setup Eclipse environment follow the guide “Using Eclipse to Develop Grid
Services” available at:
[Link]
To learn about grid services check out the “Borja’s Grid Services Tutorial” available
at:
[Link]
2.12. TcpTunnelGui
Follow these steps to use TcpTunnel for monitoring purpose:
1. Download [Link] from [Link]
2. Extract the file into directory of your choice (for me, it was C:\workspace\)
3. Run it
> cd /cygdrive/c/workspace/soap-2_3_1/lib
> java -cp [Link] [Link] 8081 localhost
8080
2.13. SVN
Start a new repository:
cd /home/projects/nosa/ (create this directory first!)
svnadmin create --fs-type fsfs svnrepository_1.0
add:
<copy toDir="${[Link]}">
<fileset dir="${[Link]}">
<include name="*.jar"/>
</fileset>
</copy>
under <target name="_baseTomcatDeploy"> (approx line 116)
under $GLOBUS_LOCATION/share/globus_wsrf_common/tomcat/[Link]
2.15. Logging
Change in /cygdrive/c/Program Files/Java/jdk1.5.0_02/jre/lib/[Link]
[Link] from FINE to Finest
2.16. Documentation
Documentation on Web Services
[Link]
Solution:
find the Globals.h file and edit it, replacing all instances of NULL with 0.
Solution:
Add:
$ diff -u [Link] Makefile
--- [Link] 2004-03-02 [Link].000000000 -0500
+++ Makefile 2004-10-18 [Link].000000000 -0400
@@ -53,6 +53,7 @@
net/tinyos/util/*.class \
net/tinyos/packet/*.class \
net/tinyos/message/*.class \
+ net/tinyos/message/avrmote/*.class \
org/apache/oro/text/regex/*.class \
org/python/compiler/*.class \
org/python/core/*.class \
Note: If you don't understand what the above means, simply add the following line to
your makefile in the place shown above
net/tinyos/message/avrmote/*.class
Then, In the same directory execute:
> make
Starting SimDriver...
SimComm: TossimInitEvent received (5 motes)... initializing system.
SimComm: Pausing system for TossimInitEvent
DRIVER: Can't use AutoRun when SimComm already connected
(check for stale [Link] processes)
Solution:
Simply open task manager and end [Link] task. Then just try it again. This is most
likely happen because you end the previous TinyViz application prematurely.
3.4.
Connection refused while running TinyDBMain java class
Problem:
I have followed the TinyDB documentation provided in $TOSROOT/doc/[Link]
and when I execute the command below, it gives me a weird error telling me that
connection is refused. Whats wrong with it ? I have read every single documentation
available but there is nothing that mention this kind of problem.
Solution:
If you read the TinyDB documentation carefully, you may notice that when they run
the TinyDBMain class, they had already install TinyDB on a mote. That mote is the
one that we are trying to connect. Obviously now you may realize that we get this
problem simply because we have nothing that we try to connect to. So how do we go
around this? What we need to do is to simulate the mote. Please ensure that you have
run the PC binary simulation before you run the TinyDBMain class. That PC binary
will simulate the motes that we need.
Solution:
This is one of the most common problems found in using Tomcat. This happens
simply because there is another web server (or any other process) that has already
claimed port 8080. This can also occur when you have already started a Tomcat
previously and didn't shut it down properly. To shut it down properly, use the script
[Link] available at $CATALINA_HOME/bin
Solution:
All my classes weere mixed up. My org_sensorweb_sensor_collectionsevice.jar
file had no content! I fixed this by following Borja's tutorial more closely and
modifying my class paths in my wsdl file to more closely align with his. Special care
was taken to separate my actual implementation (.impl) from the generated stubs.
Which is what I got mixed up.
Solution:
Different [Link] files where being used to compile my code, compared to those used
to execute my code. I followed the Eclipse grid services document to create a new
project where I had complete control over my jar files.
4. Postgres Installation
This section contains guide on set up and initialisation of PostgreSQL 7.4.5 under
Cygwin / Windows XP
Note that the postgres package that we need to use is PostgreSQL is the version 7.4.5
and it is already included in the TinyOS default install.
4.1. Set up
4.1.1. Step 0 - Setting Up Cygserver
Type in the following command in your Cygwin
Note that a client application which wants to use the services provided by cygserver
*must* have the environment variable CYGWIN set so that it contains the word
"server". So if you don't need any other special CYGWIN setting, just set it to
"server".
This program needs to be running anytime you start the PostgreSQL server
(postmaster) or initialize a database (initdb).
or
The first command will leave the server running into the foreground while the second
command will start the postmaster in the background. Note also that the second
command will redirect the entire log message to the file called logfile.
This will start the postmaster, and if successful you will see some initial log entries,
and an entry "LOG: database system is ready".
Before anyone can access the database, you must start the database server (i.e.
postmaster).
NOTE: For some of the common problems associated with postmaster start up failure,
please refer to [Link]
* Create Users:
Note: This is not totally necessary, by default the user that
executed createdb will already be in the database, however you
may want to set a password (see below).
Use:
> DROP USER name;
to remove a user.
* Set password:
ALTER USER tkob PASSWORD '********';
To remove a database:
dropdb sensorml_repository
Once you have created a database, you can access it by running the PostgreSQL
interactive terminal program, called psql, which allows you to interactively enter, edit,
and execute SQL commands
NOTE: this is for terminal access only, for in-program access you will need to use the
java connector ([Link]
For help:
> mydb=> \h
> mydb=> \q
Commands:
UP TO: [Link]
!!!IMPORTANT:!!!
Because Java only uses TCP/IP connections, the PostgreSQL server must be
configured to accept TCP/IP connections. This can be done by setting tcpip_socket =
true in the [Link] file or by supplying the -i option flag when starting
postmaster.
-i allows clients to connect over TCP/IP as opposed to just those from the local
machine.
4.5.
Shutting Down Postgres
> pg_ctl stop -w -D /var/postgresql/data -s -m smart
> kill $(ps -f | grep cygserver | awk '{print $2}')
-- Postgres Startup
-- ================
-- export CYGWIN=server
-- /usr/sbin/cygserver &
-- postmaster -i -D /var/postgresql/data &
-- Postgres Shutdown
-- =================
-- pg_ctl stop -w -D /var/postgresql/data -s -m smart
-- kill $(ps -f | grep cygserver | awk '{print $2}')
-- Sample Data
-- Manual Insertion into Postgres database.. Should be done dynamically
-- Postgres Startup
-- ================
-- export CYGWIN=server
-- /usr/sbin/cygserver &
-- postmaster -i -D /var/postgresql/data &
-- Postgres Shutdown
-- =================
-- pg_ctl stop -w -D /var/postgresql/data -s -m smart
-- kill $(ps -f | grep cygserver | awk '{print $2}')
-- WorkStation
INSERT INTO Sensor VALUES('Sensor_126');
INSERT INTO namespace
VALUES('Sensor_126','sml','[Link]
INSERT INTO namespace
VALUES('Sensor_126','gml','[Link]
INSERT INTO namespace
VALUES('Sensor_126','swe','[Link]
-- Base Station
INSERT INTO Sensor VALUES('Sensor_0');
INSERT INTO namespace
VALUES('Sensor_0','sml','[Link]
INSERT INTO namespace
VALUES('Sensor_0','gml','[Link]
INSERT INTO namespace
VALUES('Sensor_0','swe','[Link]
INSERT INTO namespace
VALUES('Sensor_0','xLink','[Link]
-- Platform
INSERT INTO StationaryPlatform VALUES('Platform_0');
INSERT INTO PlatformDescription VALUES('Platform_0','Crossbow
MIB510CA Base Station for Mica2 Motes with MPR400CB receiver, copyright
2003');
-- Sensors
INSERT INTO SensorDescription VALUES('Sensor_0','Crossbow Sensor 0
node, Mica Sensor board MTS300CA');
INSERT INTO identification
VALUES('Sensor_0','longName','urn:og[Link]identifier:longName','Base
Station');
INSERT INTO classification
VALUES('Sensor_0','longName','urn:og[Link]lassifier:observationClassificatio
n','in-situ');
-- Sensor 1
INSERT INTO Sensor VALUES('Sensor_1');
INSERT INTO namespace
VALUES('Sensor_1','sml','[Link]
INSERT INTO namespace
VALUES('Sensor_1','gml','[Link]
INSERT INTO namespace
VALUES('Sensor_1','swe','[Link]
INSERT INTO namespace
VALUES('Sensor_1','xLink','[Link]
-- platform
INSERT INTO StationaryPlatform VALUES('Platform_1');
INSERT INTO PlatformDescription VALUES('Platform_1','MPR400CB 2003
Crossbow receiver');
-- sensors
INSERT INTO SensorDescription VALUES('Sensor_1','Crossbow Sensor 1
node, Mica Sensor board MTS300CA');
INSERT INTO identification
VALUES('Sensor_1','longName','urn:og[Link]identifier:longName','Sensor 1');
INSERT INTO classification
VALUES('Sensor_1','longName','urn:og[Link]lassifier:observationClassificatio
n','in-situ');
-- Sensor 2
INSERT INTO Sensor VALUES('Sensor_2');
INSERT INTO namespace
VALUES('Sensor_2','sml','[Link]
INSERT INTO namespace
VALUES('Sensor_2','gml','[Link]
INSERT INTO namespace
VALUES('Sensor_2','swe','[Link]
INSERT INTO namespace
VALUES('Sensor_2','xLink','[Link]
-- platform
INSERT INTO StationaryPlatform VALUES('Platform_2');
INSERT INTO PlatformDescription VALUES('Platform_2','MPR400CB 2003
Crossbow receiver');
-- sensors
INSERT INTO SensorDescription VALUES('Sensor_2','Crossbow Sensor 2
node, Mica Sensor board MTS300CA');
INSERT INTO identification
VALUES('Sensor_2','longName','urn:og[Link]identifier:longName','Sensor 2');
INSERT INTO classification
VALUES('Sensor_2','longName','urn:og[Link]lassifier:observationClassificatio
n','in-situ');
========================================================
Drop scripts should be placed in some other file.
========================================================
Then you need to make sure also to get tomcat running with eclipse. The guide to do
that can be found in the same guide provided above.
To start with, you should have been given the NOSA directory containing all the
codes. If you are using Eclipse and you are just starting out, start by importing the
Project into your workspace. Choose File->Import. In the dialog, choose General-
>Existing Projects into Workspace. Follow the prompt as appropriately.
tinyos-lib contains the library file that you will need. Just place it into the same
directory as NOSA as depicted above
Workspace
- ws-core-4.0.3
- NOSA
- tinyos-lib
- Surge-View
The first error is caused by the next two errors so we will need to fix those errors.
Unbound classpath container is caused by the fact that Eclipse could not find these
libraries (this could be defined as user libraries previously).
To check this, [Link] file from NOSA directory and see if there are two user
libraries with the name of GT4 and Tiny-OS defined there.
What we need to do is to update the Java Build Path libraries to include those GT4
and Tiny-OS libraries. By doing so will enable the Eclipse editor to find those classes
that NOSA sources will import.
Go to Project->Properties page. Select the Java Build Path page and click the
Libraries tab. You would notice that all those libraries will be listed and there are two
unbound libraries which are GT4 and Tiny-OS itself.
Fix each one of them by clicking Edit. In the dialog that comes up, choose the user
library for each of them. If it is empty, you will need to create a new user library for
each of them. For the GT4 library, create a new user library with the name GT4
Library, then click the button Add JARs and select and add all of the JARs in
$GLOBUS_LOCATION\lib to the library. Selecting OK and Finish leaves us with
the properly configured Libraries tab. The GT4 library should not be unbounded
anymore. Note that $GLOBUS_LOCATION refer to the location where your GT4 is
installed.
Do the similar thing with Tiny-OS library. The only difference is that, add the JARs
from the tinyos-lib provided together with NOSA.
• [Link]:
o [Link]
o [Link]
o [Link]
• [Link]:
o [Link] (Note that there are more than 1 occurrences of this
variable to be changed. In fact, there are 4 occurrences of them)
• [Link]:
o [Link]
Note also that you might need to edit build_***.xml if hard coded path elements exist
(if we miss anything)
You also need to add [Link] to your Java build path in Eclipse. Go to
Window->Preferences then choose Java->Build Path->Classpath Variables. Add new
variable entries for GLOBUS_LOCATION and APPLICATION_PROPERTIES. For
GLOBUS_LOCATION, point it to the location of the GT4 folder (it is
C:/workspace/ws-core-4.0.3/ in my machine). For APPLICATION_PROPERTIES,
point it to the location of $NOSA/[Link] where NOSA represents the
location of NOSA source code. You may need to type the location directly instead of
using the file selector.
Initially, uncomment the bottom target (remove the <!-- and -->) and execute Ant
build on it.
After that is built, comment the bottom line and uncomment the next above that. Keep
on doing that until you reach the top.
In other words, this is the sequence order on which the build should be executed:
1. WebNotificationService
2. SensorRepositoryService
3. SensorCollectionService
4. SensorPlanningService
To execute Ant build on the targets, follow the instructions given in the tutorial for
building grid services using Eclipse. (this is the link in case you forget it already
[Link]
Error:
The eclipse editor shows red compilation errors on the package [Link] and all the
other class that is imported from that package.
Solution:
The problem comes from the fact that Eclipse couldn’t see the package [Link].
When you install TinyOS, [Link] file is included in $TOSROOT/tools/java/jars.
Add this jar as a new user library to silence all those Editor View’s red compile
errors. Ensure that you use the [Link] provided by TinyOS
Error:
When I tried built the target, it gives me many compilation errors. From closer looks,
it seems that most of the problem is because Eclipse couldn’t find the package
[Link].
Solution:
This is because Eclipse could see the package but Ant could not see the package. One
solution to this would be to add all the jars to Ant CLASSPATH. One way of doing it
is to go to Window->Preferences. In the dialog that comes up, choose Ant->Runtime.
Choose Ant Home Entries (Default) and then choose Add External Jars to add
[Link] from $TOSROOT/tools/java/jars. Ensure that you use the [Link] provided
by TinyOS.
Error:
I get the following error, when I try to access
[Link]
Solution:
The problem comes from the fact that Tomcat is not able to locate the
[Link] file located in the “C:\Program Files\Apache Software
Foundation\Tomcat 6.0\common\classes”. Open the dialog in
Windows>Preferences>Tomcat>JVM and add the above mentioned path in Classpath
textbox.
Error:
When I tried to execute the target, it complains that the any of these packages
[Link]*.* does not exist or
[Link]*.* does not exist or
[Link]*.* does not exist
Solution:
This is because the Eclipse expecting a stubs but could not find that stubs anywhere.
This is most likely because you executed the build target in the wrong order cause
there is some dependencies between them. The correct order is
1. WebNotificationService
2. SensorRepositoryService
3. SensorCollectionService
4. SensorPlanningService
Tomcat must also have access to all the jars file inside tinyos-lib. To do this, you can
simply copy all the jar files from tinyos-lib to $TOMCAT/webapps/wsrf/WEB-
INF/lib.
After all the 4 build target is executed successfully, we could check if the services
work by going to their URL. The URL for these services are defined in
[Link] file. Note: change port numbers from 8081 to 8080. Then, visit
these URLs to check that these services work.
In the case where accessing those services shows you an error, it is helpful to debug
Tomcat by making it show more detail log message. To change that, simply open the
file $JAVA_HOME/jre/lib/[Link] and change the global logging level.
The variable is .level and it is INFO by default. Change it to FINE or FINEST.
May want to create a small script which will do everything (or as much as possible)
automatically.
Error:
While running [Link], the GUI loaded up fine but I get the following error
when I tried to use the functionality
AxisFault
faultCode:
{[Link]
faultSubcode:
faultString: [Link]
faultActor:
faultNode:
faultDetail:
{[Link]
tException
at [Link].invoke0(Native Method)
at
[Link](NativeMethodAccessorIm
[Link])
at
[Link](DelegatingMethodAc
[Link])
at [Link]([Link])
at
[Link](RPCProvider.
java:384)
at
[Link](RPCProvider.j
ava:107)
at
[Link]([Link]:
90)
at
[Link](RPCProvide
[Link])
at
[Link]([Link]
)
at
[Link]([Link]
a:32)
at [Link]([Link])
at [Link]([Link])
at
[Link]([Link]
0)
at [Link]([Link])
at
[Link]([Link])
at [Link]([Link])
at
[Link]([Link]
va:327)
at [Link]([Link])
at
[Link](Applicat
[Link])
at
[Link](ApplicationFilter
[Link])
at
[Link](StandardWrapper
[Link])
at
[Link](StandardContextV
[Link])
at
[Link](StandardHostValve.j
ava:126)
at
[Link]([Link]
va:105)
at
[Link](StandardEngineVal
[Link])
at
[Link]([Link]
:148)
at
[Link]([Link]:
869)
at
[Link].http11.Http11BaseProtocol$Http11ConnectionHandler.
processConnection([Link])
at
[Link](PoolTcpEndp
[Link])
at
[Link](LeaderFoll
[Link])
at
[Link]$[Link](ThreadP
[Link])
at [Link]([Link])
Caused by: [Link]: org/jdom/Element
at
[Link].i
nitialise([Link])
at
[Link]
[Link]([Link])
at
[Link]
eateResource([Link])
... 32 more
{[Link]
[Link]
at
[Link](SOAPFaultBuild
[Link])
at
[Link](SOAPFaultBuil
[Link])
at
[Link](Deserializat
[Link])
at
[Link](Unknown
Source)
at
[Link](
Unknown
Source)
at
[Link]$FragmentC
[Link](Unknown
Source)
at
[Link]
ent(Unknown
Source)
at [Link](Unknown
Source)
at [Link](Unknown
Source)
at [Link](Unknown Source)
at [Link](Unknown
Source)
at [Link]([Link])
at
[Link](DeserializationCo
[Link])
at
[Link]([Link])
at [Link]([Link])
at
[Link](MustUnde
[Link])
at [Link]([Link])
at [Link]([Link])
at [Link]([Link])
at [Link]([Link])
at [Link]([Link])
at [Link]([Link])
at
[Link]
[Link]([Link]
:224)
at [Link]([Link])
at [Link]([Link])
at [Link]([Link])
Solution:
The problem lies in this line
You need to ensure that the [Link] file is copied across your $TOMCAT/wsrf/lib
directory.
7. Build the SensorWeb 2.0 Software and your changes can be seen in the stubs
generated as a result of build.
Installing NesC for TinyOS involves downloading the latest version from the TinyOS website and executing 'rpm --ignoreos –ivh nesc-1.xxxx.cygwin.i386.rpm' in the terminal . Common issues during installation include incorrect RPM usage if dependencies aren't resolved, often requiring additional Cygwin utilities to handle such packages . Integrating NesC with the development environment is essential for compiling TinyOS applications, hence ensuring no conflicts or unmet dependencies during its installation is critical .
To test the Intel Mote 2 environment setup, navigate to the $TOSROOT/apps/blink directory and execute 'make imote2 debug'. This performs a compilation that should complete but may display warnings about 'dwarf2bd', signaling successful interaction between the setup tools . It verifies that the environment and paths for the toolkit, including the make utility, are correctly configured, confirming their readiness for use in development and debugging activities .
To install Cygwin for the Intel Mote 2 development environment, follow these steps: First, obtain the latest version of Cygwin from the official website, as this is necessary for Win32-based applications like TinyOS to function within a Unix-like environment . Install Cygwin at C:\tinyos\cygwin, ensuring options to 'install for all users' and 'use Unix file types' are selected, which facilitates compatibility with other Unix-like tools and systems . Crucially, make sure to change the Devel list by installing cvs, cvsps, and cvsutil, which are essential for code versioning and tracking changes, along with the make sublist required for testing setups in later steps . Modifying the home directory in the /etc/passwd file to 'C:/Documents and Settings/your_loginname' resolves issues with access permissions and software compatibility by aligning with Unix directory structures .
Resolving the 'Connection refused' error in TinyDBMain involves running a PC binary simulation before executing TinyDBMain. This error arises when attempting to connect to a non-existent mote, as TinyDBMain looks for a connection to an actual mote, which must be simulated if not physically available . Ensure that the PC binary simulation is operational to make the simulated motes available for connection, which is a common misstep leading to connection failures .
To add a new method to existing web services in SensorWeb 2.0, begin by adding the method signature in the SensorPlanningService interface within the 'org.sensorweb.service.sps' package . Implement this method in the SensorPlanningService class under 'org.sensorweb.service.globus.sps.impl', ensuring proper setup and message logging . Incorporate the method reference within 'SensorPlanningService.wsdl' by declaring it without input parameters as a complex type . Define request and response messages and the operation item in WSDL to reflect these changes . Finally, replicate these WSDL modifications in the corresponding NOSA paths and rebuild SensorWeb to apply changes . This process is crucial for maintaining service flexibility and evolving capabilities, allowing integration of new functionalities without disrupting existing systems .
To configure environment variables for the TinyOS1.1 tree, set the TOSDIR and TOSROOT variables. If TinyOS is installed in /cygdrive/c/tinyos-1.x, add 'export TOSROOT=/cygdrive/c/tinyos-1.x' to your .profile file, designating the directory where TinyOS is installed . Then add 'export TOSDIR=$TOSROOT/tos' to specify the directory containing TinyOS source files, critical for correct system paths recognition . Additionally, set the new make utility as your makefile executor by adding 'export MAKERULES=$TOSROOT/tools/make/Makerules' to .profile. This ensures the system uses TinyOS's specific make rules during compilation, aiding in properly building applications within the environment .
To fix compilation issues in TOSSIM simulation, modify the Makefile by adding 'net/tinyos/message/avrmote/*.class', which ensures inclusion of specific class files necessary for simulating TinyOS messages . These adjustments address errors related to missing class definitions needed for successful compilation and execution of simulations . This step ensures that all relevant classes are compiled into the project, facilitating proper functioning of simulated environments .
A common issue when running Tomcat is the error 'Address already in use: JVM_Bind:8080', which typically occurs when another web server or process is using port 8080 . This can also happen if a previous Tomcat session wasn't properly shut down. To resolve this, ensure no other web servers are running on port 8080, or if Tomcat was previously run, shut it down using the provided shutdown script at $CATALINA_HOME/bin .
To debug an Intel Mote 2 via USB, first connect a USB cable to the Intel Mote 2 board at J2 and to the PC . The mote will be recognized as a USB human interface device when powered on, necessary for establishing a communication line . Then, use the ImoteConsole program found in $TOSROOT/contrib/imote2/tools/bin by making it executable with 'chmod a+x' . Launch the console via './iMoteConsole.exe', select the Imote2 from the drop-down where it's named 'USB ID', and start communication . These steps are critical for interacting with the mote and performing low-level operations, like issuing commands or retrieving the serial number, aiding in troubleshooting and testing development environments .
Challenges in simulating TinyOS applications with TOSSIM often include missing platform-specific message classes, leading to errors such as 'java.lang.ClassNotFoundException: net.tinyos.message.avrmote.TOSMsg' . This occurs because the simulation requires certain Java classes that aren't located within visible directories. The solution involves editing the Makefile to include 'net/tinyos/message/avrmote/*.class', recompiling to ensure all necessary classes are compiled into the project, and address issues with dependencies . Ensuring these classes are present and correctly referenced prevents runtime errors and supports accurate simulation of TinyOS applications .