Hi !

When using Listen or TestSerial, you have to specify the communication port 
with :

-comm serial@/dev/ttyUSBx:speed

Were x is the data port of your device, and speed depends on your mote (cf. 
Lesson 4).

You can also set $MOTECOM variable to avoid typing again and again the comm 
port. As Erhan said, USB0 is usually for programming and USB1 for data (for 
Windows it's comX). Use both motelist and ll /dev/ttyUSB* to check available 
ports.

If you still have connection refused, maybe another program you're running is 
using data from data port USB1. The way to solve that is creating a 
SerialForwarder on the data port with java.(...).SerialForwarder -comm 
DATAPORT, then programs you want to use have to use sf@localhost:9002 (check 
Lesson for details on arguments) as -comm parameter.

Hope it helps and it's not so wrong / ununderstandable,

Erwan

Le 30 mars 2011 à 21:09, Erhan Uyar a écrit :

> Hello,
> 
> Today I was also working on Lesson 4 and I got it working, maybe you
> should follow this steps,
> 
> Mote-PC serial communication and SerialForwarder (pre-T2.1.1)
> 
> * cd /opt/tinyos-2.1.1/apps/tests/TestSerial
> 
> * make iris install mib510,/dev/ttyUSB0
> 
> * export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar:.
> 
> * javac TestSerial.java
> 
> * javac TestSerialMsg.java
> 
> * java TestSerial -comm serl@/dev/ttyUSB1:iris
> 
> gateway is connected to USB0 to install code but for listening use USB1
> 
> -- 
> Erhan UYAR - Computer Support Specialist
> +90(312)210 3363 - eu...@metu.edu.tr
> 
> Middle East Technical University
> Computer Center
> User Support Group
> 
> Alinti Sobit Thapa <thapaso...@gmail.com>
> 
>> Hello, I used to solve first problem simply unplugging usb connector and
>> connecting it again. I dont know the main cause about this.
>> 
>> Second, from your output, your serialPort seems to be working. But, you are
>> not getting result and results display depends how you display them or may
>> be your mote did not send any message to PC.
>> 
>> Thanks.
>> Sobit Thapa
>> Graduate Research Assistant
>> Texas State University
>> 
>> On Wed, Mar 30, 2011 at 12:58 PM, Geo Gkolfin <geo198...@gmail.com> wrote:
>> 
>>> Hello!
>>> I am trying to follow lesson's 4 instructions (
>>> http://docs.tinyos.net/index.php/TinyOS_Tutorials#Getting_Started_with_TinyOS
>>> )
>>> in order to have my iris mote communicate with the pc over /dev/ttyUSB0
>>> port.  So, I install the TestSerial application and I try to run:
>>> *
>>> *
>>> *java TestSerial*
>>> 
>>> **yet what I get is:
>>> 
>>> *sf@localhost:9002 died - exiting (java.net.ConnectException: Connection
>>> refused)*
>>> 
>>> Skipping this step (I do not know what to do) and continuing to the next
>>> command -just out of curiosity- I try:
>>> 
>>> *sudo chmod 666 /dev/ttyUSB0*
>>> *java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:57600*
>>> 
>>> and that gives me an endless:
>>> 
>>> *serial@/dev/ttyUSB0:57600: resynchronising*
>>> 
>>> This only stops mith Ctrl+z. What should I try?
>>> 
>>> Thank you in advance.
>>> 
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Tinyos-help mailing list
>>> Tinyos-help@millennium.berkeley.edu
>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>> 
>> 
> 
> 
> 
> 
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
> 
> 
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to