Hi,

I'm using T2.
I am trying to run a serial forwarder in a java programm,as below:



try {
        Process p = null;
        int n=0;
String SFCREATINGCMDL ="java net.tinyos.sf.SerialForwarder -port "+sfportStr+"
-comm "+packetSourceString;

 p = Runtime.getRuntime().exec(SFCREATINGCMDL);

      } 
                                                
catch(Exception ex) 
{
   ex.printStackTrace();
}       

PacketSource ps = BuildSource.makePacketSource(sfserver);
PhoenixSource source=BuildSource.makePhoenix(ps,PrintStreamMessenger.err);
source.start();
MoteIF mif = new MoteIF(source);

Where sfportStr is a numer like 9003 and packetSourceString is an expression
like serial@/dev/ttyUSB0:57600 and sfserver is an expression like
:sf at lca2-s1-pc3:9003

So the thing is that I can see a sf window  pop up after running the command
but programm stops when it arrives to MoteIF creation and exits with
this message:


sf at lca2-s1-pc3:9003
sf at lca2-s1-pc3:9003 died - exiting (java.net.ConnectException: Connection
refused)

I don't have another sf running on the same port and the bizarre thing is if 
I write the same expression as SFCREATINGCMDL in a console it works,and I will
have no problem for creating MoteIF ,I've checked lot of times the expression
SFCREATINGCMDL,and i've even printed using println ,and I think it's
correct .



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

Reply via email to