[Tinyos-help] matlab problem with java

Manu Gupta manu4ever at gmail.com
Fri Sep 30 04:53:39 PDT 2005


Hi ,
I hope u have successfully run the defineTOSEnviornment.m, u should see
Group ID DD, if its a success,
now u have to do the following

Configure java settings because Matlab uses java commands to communicate to
motes connected to serial port. Class archive 'comm.jar' is needed to be
added to class path for serial communication through java and for enabling
many TinyOS classes that produce abstraction to mote communication in many
ways. just copy 'comm.jar' file present communication API at
java.sun.com<http://java.sun.com>into
*'c:\tinyos\cygwin\opt\tinyos-1.x\tools\java'* folder and add the line
'c:\tinyos\cygwin\opt\tinyos-1.x\tools\java\comm.jar' at the end of
classpath.txt file that can be opened to edit through 'edit classpath.txt'
command on Matlab. To add TinyOS library, add the code *
'c:\tinyos\cygwin\opt\tinyos-1.x\tools\java'* at the end of 'classpath.txt'.
This, though, is not enough to have full environment setup. You need to tell
the Java Virtual Machine (JVM), loaded by Matlab, the properties of serial
port and environment setting of Java Native Interface (JNI). So copy the '
win32com.dll' and 'getenv.dll' from downloaded comm API folder and
'C:/tinyos/cygwin/opt/tinyos-1.x/tools/java/jni' folder to '*
C:\MATLAB7\sys\java\jre\win32\jre1.4.2\bin*' folder. Now add '
javax.comm.properties' file from downloaded comm API folder to *
'C:\MATLAB7\sys\java\jre\win32\jre1.4.2\lib*' folder.
It is important to compile the java files present in
'C:\tinyos\cygwin\opt\tinyos-1.x\tools\java\net\tinyos\matlab' folder. add
the *'C:\MATLAB7\java\jar\jmi.jar'* to the system class-path to compile. Do
not forget to add 'c:\tinyos\cygwin\opt\tinyos-1.x\tools\java\comm.jar' and
'c:\tinyos\cygwin\opt\tinyos-1.x\tools\java' to the system class-path to
compile. This will compile java files that are needed to control Matlab
through java. Various classes present in TinyOS API rely on these classes.

Also go thru chap 6 on tinyos tutorials, there r some issues with jvm of
matlab that leads to crash which u r refering.
hope this will solve ur problem
--

Cheers! manu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20050930/3ddac0de/attachment.html


More information about the Tinyos-help mailing list