On 10/2/07, José Manuel Sánchez-Matamoros Pérez <[EMAIL PROTECTED]> wrote:
> Hi all!
>
> I'm developing an application for storing the data adquisition of a WSN. The
> programming language is java, so i need to use MIG application. I have made
> a program that reads messages from serial forwarder in port 9001; the code
> for initialize the object moteIF is the next:
>
> MoteIF mote = new MoteIF();
> mote.registerListener(new LogMsg(), this);
>
> On this way my program run correctly and i can read every message sends by
> the WSN.
>
> I have the next problem: i want to configure my program for listenning
> serial forwarder on another TCP port, for example 10000. How can i do it? I
> had thought on using the next code:
>
> PhoenixSource source =
> BuildSource.makePhoenix(BuildSource.makeSF("serial@/dev/ttyS0:57600",
> 10000), PrintStreamMessenger.err);

The first argument to makeSF is the hostname of the serial forwarder
(as makeSF's javadoc comment indicates...), not a packet source. I.e,
you should do
  BuildSource.makeSF("<hostname>", 10000)
or, if you prefer to use a packet source name
  BuildSource.makePacketSource("sf@<hostname>:10000")

David Gay

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to