Hi,
I am trying to debug my java program that I sent in the last mail, and
it appears that I do not get into the "message Received" function in the
TestNetwork.java file. so I believe that is why the incoming packet does
not prints out on the serial:
public void messageReceived(int to, Message message) {
BUT my doubt still remains because it is not that I am not receiving the
data correctly. I am receiving the data correctly as can be seen using
the "Listen" tool in raw packet format but then why does it not enter
this particular function above in the TestNetwork.java file. Do we have
to do something particular in the TestNetworkC.nc file to get the
message???
Varun Jain
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Varun
Jain
Sent: Tuesday, July 01, 2008 10:18 AM
To: [email protected]
Subject: [Tinyos-help] Serial port JAVA Message access issues.
Hi,
I am trying the "TestNetwork" application and having the following
issues:
A) I was earlier getting a bad packet using the Listen tool as:
[EMAIL PROTECTED] ~]# java net.tinyos.tools.Listen
serial@/dev/ttyS0:19200: resynchronising
00 FF FF 00 00 09 00 16 21 00 0D 00 02 00 01 00 65
serial@/dev/ttyS0:19200: bad packet
00 FF FF 00 00 09 00 16 33 01 F4 00 00 00 00 00 66
00 FF FF 00 00 17 00 EE 00 00 00 00 01 F4 1B EE 01 F4 00 1B 01 F4 00 00
CA FE 00 00 00 00 00
I am thinking that it was because the packets received were not going
out on the serial faster, so I increased the baud rate for my platform
to 57600bps, which improved the result. But there are only 2 nodes as of
now and as the number of nodes increase, then its going to become a
bottleneck, can you tell me how to increase the speed of the serial to
115200bps or 256kbps. I saw in the Atmega-128 code in the Atm128UartP.nc
(tos/chips/atm128) file that platforms having atmega-128 can have only
two baud rates of 19200 and 57600bps. My platform has an atmega128 and
CC2420.
B) Secondly, I am trying to read the TestNetwork structure and
trying to print it over the UART. I have written a TestNetwork.java file
similar to TestSerial.java and an TestNetworkMSg.java file again similar
to TestSerialMsg.java file. When I try to do the following, I do not get
anything and the program does not print anything whereas Listen tool
gives the correct packet as shown above:
java net.tinyos.tools.MsgReader TestNetworkMsg OR java TestNetwork
$ java TestNetwork
[EMAIL PROTECTED]:57600: resynchronising
I am attaching the two files which I have written to do the task, can
someone suggest me where I am going wrong.
Cheers,
Varun
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help