NO thank u Micheal,that helps me to understand why it works like
that,I'll try Chad's proposition and will
see what will be the result..
For sure,I'm still open to the other propositions..
B.


En réponse à Michael Schippling <[EMAIL PROTECTED]>:

> 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
> 
> 
> [EMAIL PROTECTED] 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
> > [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