[Tinyos-help] JNI Questions

David Conde dconde at citic.es
Wed Apr 7 09:55:15 PDT 2010


Hi,

I had a similar problem because I did not have permission for reading
javax.comm.properties file but I was using UBUNTU Operative System, so I
guess in Windows should not be a problem.

Do you have javax.comm installed in your computer?If you do, do you have
javax.comm.properties in the right place?

Regards

-----Mensaje original-----
De: tinyos-help-bounces at millennium.berkeley.edu
[mailto:tinyos-help-bounces at millennium.berkeley.edu] En nombre de Ruben Rios
Enviado el: miércoles, 07 de abril de 2010 11:31
Para: Michael Schippling; Arik Sapojnik
CC: tinyos-help
Asunto: Re: [Tinyos-help] JNI Questions

Thank you for the quick reply both of you :) By the way, I am working
on a Windows machine. I have tried to copy both toscomm.dll and
getenv.dll from my TinyOS (under Cygwin) installation to the working
directory (where my app is running) but I still get the following
error:


java.io.IOException: Could not open COM1: TOSComm JNI library runtime
error: Error 5.
Acces denied.
in NativeSerialPort.CreateFile
at net.tinyos.packet.SerialByteSource.openStreams(SerialByteSource.java:58)
at net.tinyos.packet.StreamByteSource.open(StreamByteSource.java:51)
at net.tinyos.packet.Packetizer.openSource(Packetizer.java:139)
at net.tinyos.packet.AbstractSource.open(AbstractSource.java:69)
at net.tinyos.packet.Packetizer.open(Packetizer.java:132)
at
Localization.WSNLocalizatorImpl.executeInputParser(WSNLocalizatorImpl.java:4
6)
at Localization.WSNLocalizatorTest.main(WSNLocalizatorTest.java:43)
stream:error (text)

Any ideas?
Thanks a lot


2010/4/7 Michael Schippling <schip at santafe.edu>:
> You will need to install (or copy) the TOS comm and getenv.dll
> files to your new system's Java Runtime. I'm not sure exactly
> what the file names are, but some searching for those two should
> come up with more. You don't need cygwin or the rest of TOS if
> all you are doing is running a java app.
>
> MS
>
>
> Ruben Rios wrote:
>>
>> Dear all,
>>
>> I have written a Java application which gets data from sensor nodes
>> through the serial port. I have done this by using tinyos.jar.
>> Everything's fine to this point. I have tried to use this application
>> in another machine which has no TinyOS installed in it and it prompts
>> different errors depending on the situation. The first problem I come
>> across is an exception telling "The toscomm JNI library was not found
>> ...". Does it mean I need to install Cygwin + TinyOS on that machine
>> to get it working? May I simply add some files to my working directory
>> or Java directory to make it work?
>>
>> Any comments, ideas, workarounds, are really appreciated!
>> Regards
>> _______________________________________________
>> Tinyos-help mailing list
>> Tinyos-help at millennium.berkeley.edu
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-help mailing list
Tinyos-help at millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help




More information about the Tinyos-help mailing list