[Tinyos-help] [lesson 4 with tinyOs2.0]
Peizhao Hu
peizhao at itee.uq.edu.au
Tue Jun 5 09:47:12 PDT 2007
A common problem that have to be mentioned in the documentation.
possible reasons:
1. if you are using SerialForwarder, make sure your problem is pointing
to the same port number, which SerialForwarder is outputing to.
you can start your SerialForwarder as
java net.tinyos.sf.SerialForwarder -port 9003 -comm serial@/dev/ttyS0:mica2
then you use use sf at localhost:9003
2. if you tried to connect from other host rather than localhost, you
have to make sure the System-wide Environment Variable for "MOTECOM" is
set to whatever you desired to use.
i.e.: sf at REMOTE_HOST_IP:PORT
if you look into the TinyOS source code, you will found the JNI function
tries to get this variable using ENV.getenv("MOTECOM"). It binds to
default value (sf at localhost:9002) when it can't resolve the variable.
for Mac Users, there is a tool, called "RCEnvironment", which allows you
to add system-wide environment variable (require reboot/logout to take
effect).
Benjamin Madore wrote:
> On Tue, June 5, 2007 10:26 am, vazoumana fofana said:
>
>> i try to compile the lesson 4 Mote Pc serial Communication and Serial
>> Forwarder :
>> When i execute java TestSerial, there is an error message wich appears :
>> sf at localhost:9002 died - exiting (java.net.ConnectException: Connection
>> refused).
>>
>
> What platform? (Windows, Linux, Mac) Do you have a firewall? Have you set up
> your motecom variable? What commands are you using to execute TestSerial?
> Are you using the serial forwarder or not?
>
> What version of TinyOS?
>
>
--
regards;
Peizhao
More information about the Tinyos-help
mailing list