Re: [Tinyos-help] PhoenixSource, BuildSource and MoteIF
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 1. How can i do it? I > had thought on using the next code: > > PhoenixSource source = > BuildSource.makePhoenix(BuildSource.makeSF("serial@/dev/ttyS0:57600", > 1), 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("", 1) or, if you prefer to use a packet source name BuildSource.makePacketSource("sf@:1") David Gay ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] PhoenixSource, BuildSource and MoteIF
The exact code i use is the next: PhoenixSource source = BuildSource.makePhoenix( BuildSource.makeSF("/dev/ttyS0",9001), PrintStreamMessenger.err); source.start(); mote = new MoteIF(source); When i execute it i receive the following message: Exception in thread "Thread-1" java.lang.IllegalArgumentException: protocol = socket host = null at sun.net.spi.DefaultProxySelector.select(DefaultProxySelector.java :146) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:358) at java.net.Socket.connect(Socket.java:519) at java.net.Socket.connect(Socket.java:469) at java.net.Socket.(Socket.java:366) at java.net.Socket.(Socket.java:179) at net.tinyos.packet.SFSource.openSource(SFSource.java:56) at net.tinyos.packet.AbstractSource.open(AbstractSource.java:77) at net.tinyos.packet.PhoenixSource.run(PhoenixSource.java:167) Any idea? Thanks On 10/2/07, Peizhao Hu <[EMAIL PROTECTED]> wrote: > > you have to at least cut & paste your error message here. > also do you mean having two parallel serialforwarder running on > different port or programmatically change the port number? > > regards; > > Peizhao > > > José Manuel Sánchez-Matamoros Pérez 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 1. How can i do > > it? I had thought on using the next code: > > > > PhoenixSource source = > > BuildSource.makePhoenix(BuildSource.makeSF("serial@/dev/ttyS0:57600", > > 1), PrintStreamMessenger.err); > > source.start(); > > MoteIF mote = new MoteIF(source); > > > > When i execute this code, i have an error and i don't know where is the > > problem. What can i do? > > > > Thanks!! > > > > -- > > José Manuel Sánchez-Matamoros Pérez > > > > > > > > > > ___ > > Tinyos-help mailing list > > Tinyos-help@Millennium.Berkeley.EDU > > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > -- José Manuel Sánchez-Matamoros Pérez ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] PhoenixSource, BuildSource and MoteIF
you have to at least cut & paste your error message here. also do you mean having two parallel serialforwarder running on different port or programmatically change the port number? regards; Peizhao José Manuel Sánchez-Matamoros Pérez 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 1. How can i do it? I had thought on using the next code: PhoenixSource source = BuildSource.makePhoenix(BuildSource.makeSF("serial@/dev/ttyS0:57600", 1), PrintStreamMessenger.err); source.start(); MoteIF mote = new MoteIF(source); When i execute this code, i have an error and i don't know where is the problem. What can i do? Thanks!! -- José Manuel Sánchez-Matamoros Pérez ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] PhoenixSource, BuildSource and MoteIF
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 1. How can i do it? I had thought on using the next code: PhoenixSource source = BuildSource.makePhoenix(BuildSource.makeSF("serial@/dev/ttyS0:57600", 1), PrintStreamMessenger.err); source.start(); MoteIF mote = new MoteIF(source); When i execute this code, i have an error and i don't know where is the problem. What can i do? Thanks!! -- José Manuel Sánchez-Matamoros Pérez ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help