I have not used it for almost one year, but the serial communication is
quite straightforward.

1) You make and compile a Java program able to communicate through serial
port. Optionally you could use the classes generated by MIG

2) Launch SerialForwarder
java net.tinyos.sf.SerialForwarder -comm serial@/dev/ttyUSB1:intelmote2
3) Launch each of the applications attaching them to serial forwarder (I
say applications in plural because the possibility of sharing the serial
port for many threads is the main utility I found for serialforwarder)
java TinyOSconsole -comm sf@localhost:9002
java TinyOS2mote -comm sf@localhost:9002

And that is all!

Good luck!
Sergio


On Sat, May 5, 2012 at 9:59 PM, Behdad aminian <[email protected]>wrote:

> Hi all,
>
> I Need to send a very simple hex data "00FFFFFFFF02000B0000" from a java
> program via the SerialForwarder to a tinyos mote (Basestation).
> I have convert this string to its hex value and save it in a byte array
> and send to the port of serial forwarder via tcp connection, but the
> serialforwarder does not receive any data and disconnect the connection
> when I try to send a data.
> (I wrote a simple tcp server for testing and I ma able to receive data in
> my server but not in serial forwarder.)
>
> Should I do any thing special?
> I do not know what is wrong and what should I do and I will
> be appreciated if some one help me or at least give me some hints.
>
>
> Best,
> Behdad
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to