[Tinyos-help] SF problem

Michael Schippling schip at santafe.edu
Tue Oct 2 11:06:23 PDT 2007


I'm assuming that there is a space before -comm (" -comm ") because
it's not visible in your message...

If it's crashing in MoteIF its probably trying to open the serial port.
There might be some difference in the environment that you get from exec().
Or there may be different permissions needed. You could try execing
a bash script to see what you are really getting, or instrumenting the
SF code to print trace messages at relevant points.

not much help, I know...
MS


behnaz.bostanipour at epfl.ch wrote:
> 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
> Tinyos-help at Millennium.Berkeley.EDU
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


More information about the Tinyos-help mailing list