[Tinyos-help] JNI Questions

Ruben Rios ruben at lcc.uma.es
Wed Apr 7 02:30:49 PDT 2010


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:46)
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
>


More information about the Tinyos-help mailing list