[TinyOS-Help]: Surge.Mainclass error & when staring SerialForwarder, how to set the baud rate??

Michael Schippling schip at santafe.edu
Tue Dec 4 08:42:58 PST 2007


For baud rate you usually use the name of the mote platform, like:
serial at COM5:mica2  or serial at COM5:tmote
that also handles some message formatting issues internally.

The error message means exactly what it says: the port is in use.
Some other process on your computer has COM1 open already...it could
be a mouse or something like that.

But I notice, now, that you want to run the simulator "tossim",
not a real system. According to:
http://www.tinyos.net/tinyos-1.x/doc/serialcomm/index.html
you can use something like "tossim-serial[@HOSTNAME]" instead of
the COMx spec.

MS


Renee Azhen wrote:
> Dear all:
> I want to use tossim to simulate the Surge application, but faced two 
> problems:
> 1. when staring SerialForwarder, how to set the baud rate??  I am using a  
>     laptop
> here is the command:
> java net.tinyos.sf.SerialForwarder -comm serial at COM1:<baud 
> <mailto:serial at COM1:<baud> rate>
> 2. I use the default baud rate, 19200, but when start the Java 
> application Sure.Mainclass, an error occured, here is the screening shot:
> C:\Program Files\UCB\cygwin\opt\tinyos-1.x\tools\java>java 
> net.tinyos.surge.Main
> Class 125
> Using AM group ID 125 (0x7d)
> Starting mote listener...
> java.io.IOException: Port COM1 busy
>         at 
> net.tinyos.packet.SerialByteSource.openStreams(SerialByteSource.java:
> 69)
>         at net.tinyos.packet.StreamByteSource.open(StreamByteSource.java:52)
>         at net.tinyos.packet.Packetizer.openSource(Packetizer.java:119)
>         at net.tinyos.packet.AbstractSource.open(AbstractSource.java:77)
>         at net.tinyos.packet.Packetizer.open(Packetizer.java:114)
>         at net.tinyos.packet.PhoenixSource.run(PhoenixSource.java:167)
> java.io.IOException: Port COM1 busy
>         at 
> net.tinyos.packet.SerialByteSource.openStreams(SerialByteSource.java:
> 69)
>         at net.tinyos.packet.StreamByteSource.open(StreamByteSource.java:52)
>         at net.tinyos.packet.Packetizer.openSource(Packetizer.java:119)
>         at net.tinyos.packet.AbstractSource.open(AbstractSource.java:77)
>         at net.tinyos.packet.Packetizer.open(Packetizer.java:114)
>         at net.tinyos.packet.PhoenixSource.run(PhoenixSource.java:167)
> serial at COM1:19200 <mailto:serial at COM1:19200> died - exiting 
> (java.io.IOException: Port COM1 busy)
>  
>  
> Dear all, could you help me to resolve these two problems??
> really thanks
> Sam
> 
> 
> ------------------------------------------------------------------------
> 进入雅虎游戏嘉年华,赢取液晶显示器! 
> <http://cn.mail.yahoo.com/promo/carnival07/index.html?source=xy>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

-- 
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew



More information about the Tinyos-help mailing list