[Tinyos-help] using tinyos1.x java on openslug NSLU

Xavier Orduña xavier.orduna at gmail.com
Mon Mar 10 03:19:05 PDT 2008


Hi Muzammil,

I've worked before with NSLU2 and a tinyos network.

My recommendation is that you use the sdk programmed in c language instead
of using the java tools. All you have to do is compile (with the apropriate
gnu arm compiler)  the serial forwarder that you can find in "
tinyos-1.x\tools\src\sf" and copy it to your slug.

I had no problem with OpenWRT last version and tinyos 2.

If you need more help, ask!

Regards,

Xavi

On Mon, Mar 10, 2008 at 4:05 AM, Muzammil Hussain <mh69 at cse.buffalo.edu>
wrote:

> Hi,
> I am trying to make the java tools of tinyos-1.x work on openslug 4.8
> (nslu-linux) running on a NSLU.
> More specifically the Listen and Send classes. I modified them so that
> the can take an extra argument from command prompt like java
> net.tinyos.tools.Listen serial@/dev/ttyS5:57600.
> Instead of setting the MOTECOM environment variable since I was not
> able to set the Env.getenv JNI stuff.
>
> I am using jamvm version 1.5 to run these. I compiled the java files
> on my laptop which has tinyos setup with IBMJava 1.4.2
> I copy the compiled files from the laptop to the NSLU2 and run them.
>
> I downloaded the javacomm library needed in BuildSource for setting up
> the serial connection and set it up.
>
> However when I run
> root at ubicomp-nslu01:/opt/tinyos-1.x/tools/java$ java
> net.tinyos.tools.Listen2 serial@/dev/ttyS5:57600
> getenv JNI library not found. Env.getenv will not work
> (please consult installation directions in
> tinyos-1.x/tools/java/net/tinyos/util/Env.INSTALL)
> Trying to connect '/dev/ttyS5'
> Error loading LinuxSerialParallel: java.lang.UnsatisfiedLinkError:
> Native library `LinuxSerialParallel' not found (as file
> `libLinuxSerialParallel.so') in gnu.classpath.boot.library.path and
> java.library.path
> java.lang.UnsatisfiedLinkError: isDevLink
>   at com.sun.comm.Unix.isDevLink(Native Method)
>   at com.sun.comm.PathBundle.add(PathBundle.java:108)
>   at com.sun.comm.PlatformPortBundle.<init>(PlatformPortBundle.java:44)
>   at javax.comm.CommPortIdentifier.<clinit>(CommPortIdentifier.java:138)
>   at net.tinyos.packet.SerialByteSource.openStreams(SerialByteSource.java
> :61)
>   at net.tinyos.packet.StreamByteSource.open(StreamByteSource.java:51)
>   at net.tinyos.packet.Packetizer.openSource(Packetizer.java:119)
>   at net.tinyos.packet.AbstractSource.open(AbstractSource.java:77)
>   at net.tinyos.packet.Packetizer.open(Packetizer.java:114)
>   at net.tinyos.tools.Listen2.main(Listen2.java:54)
>
>
>
> However I can successfully (I believe so) run Listen or Send
> (original) which read the MOTECOM variable and if it is unset, take
> sf at localhost:9001 as the defualt.
> I believe it works, even though it tries to open the connection but
> fails(because I am not running the sf at 9001).
>
> Can anyone throw some light on this ?
>
>
> --
> regards,
> M
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
www.alcim.net
Buscant sempre nous reptes, alguna proposta?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20080310/28e0f34b/attachment.htm


More information about the Tinyos-help mailing list