Kirak, Hong | 1 Jul 2008 01:32
Picon
Favicon

Resource arbitration between CC2420 and Uart0 on Telosb

Hello, guys,

 

I’m making a program which uses radio and uart0 on the telosb mote.

 

Since the radio and uart0 share bus on telosb, I had to deal with resource arbitration.

 

The thing is, when I made an uart0 manager like this, it dosen’t work.

 

More specifically, after some time, I never receive sendDone() signal after I send() and got a SUCCESS return value,

 

So the entire program is collapsed.

 

----------------------------------------------------------------------------------

  task void requestTask()

  {

        call UartResource.request();

  }

 

  async event void UartRequested.requested()

  {

        UartResource.releaseTask();

        post requestTask();

  }

 

  async event void UartRequested.immediateRequested()

  {

        UartResource.releaseTask();

        post requestTask();

 

  }

----------------------------------------------------------------------------------

 

I know it’s greedy, because everytime it releases, it requests again.

 

But as I know about CC2420 on telosb, it should work.

 

Anyway, I tried another case like following, and it works!

 

----------------------------------------------------------------------------------

 

  event void RadioSend.sendDone[am_id_t id](message_t* msg, error_t error) {

 

        post requestTask();

}

 

  task void requestTask()

  {

        call UartResource.request();

  }

 

  async event void UartRequested.requested()

  {

        UartResource.releaseTask();

  }

 

  async event void UartRequested.immediateRequested()

  {

        UartResource.releaseTask();

  }

----------------------------------------------------------------------------------

 

It seems much less greedy since it only tries to grab the resource after sendDone() has signaled.

 

Does anybody can answer me about the problem with case 1?

 

And in addition, why the CC2420 releases the resource between send() and sendDone()?

 

Thanks.

 

With Kind Regards,

Kirak

<div>

<div class="Section1">

<p class="MsoNormal">Hello, guys,<p></p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal">I&rsquo;m making a program which uses radio and uart0 on the
telosb mote.<p></p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal">Since the radio and uart0 share bus on telosb, I had to deal
with resource arbitration.<p></p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal">The thing is, when I made an uart0 manager like this, it
dosen&rsquo;t work.<p></p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal">More specifically, after some time, I never receive
sendDone() signal after I send() and got a SUCCESS return value, <p></p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal">So the entire program is collapsed.<p></p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal">----------------------------------------------------------------------------------<p></p></p>

<p class="MsoPlainText">&nbsp; task void requestTask()<p></p></p>

<p class="MsoPlainText">&nbsp; {<p></p></p>

<p class="MsoPlainText">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call
UartResource.request();<p></p></p>

<p class="MsoPlainText">&nbsp; }<p></p></p>

<p class="MsoPlainText"><p>&nbsp;</p></p>

<p class="MsoPlainText">&nbsp; async event void UartRequested.requested()<p></p></p>

<p class="MsoPlainText">&nbsp; {<p></p></p>

<p class="MsoPlainText">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
UartResource.releaseTask();<p></p></p>

<p class="MsoPlainText">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; post requestTask();<p></p></p>

<p class="MsoPlainText">&nbsp; }<p></p></p>

<p class="MsoPlainText"><p>&nbsp;</p></p>

<p class="MsoPlainText">&nbsp; async event void
UartRequested.immediateRequested()<p></p></p>

<p class="MsoPlainText">&nbsp; {<p></p></p>

<p class="MsoPlainText">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
UartResource.releaseTask();<p></p></p>

<p class="MsoPlainText">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; post requestTask();<p></p></p>

<p class="MsoPlainText"><p>&nbsp;</p></p>

<p class="MsoPlainText">&nbsp; }<p></p></p>

<p class="MsoNormal">----------------------------------------------------------------------------------<p></p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal">I know it&rsquo;s greedy, because everytime it releases, it requests
again.<p></p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal">But as I know about CC2420 on telosb, it should work.<p></p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal">Anyway, I tried another case like following, and it works!<p></p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal">----------------------------------------------------------------------------------<p></p></p>

<p class="MsoPlainText">&nbsp; <p></p></p>

<p class="MsoPlainText">&nbsp; event void RadioSend.sendDone[am_id_t
id](message_t* msg, error_t error) {<p></p></p>

<p class="MsoPlainText"><p>&nbsp;</p></p>

<p class="MsoPlainText">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; post
requestTask();<p></p></p>

<p class="MsoPlainText">}<p></p></p>

<p class="MsoPlainText"><p>&nbsp;</p></p>

<p class="MsoPlainText">&nbsp; task void requestTask()<p></p></p>

<p class="MsoPlainText">&nbsp; {<p></p></p>

<p class="MsoPlainText">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call
UartResource.request();<p></p></p>

<p class="MsoPlainText">&nbsp; }<p></p></p>

<p class="MsoPlainText"><p>&nbsp;</p></p>

<p class="MsoPlainText">&nbsp; async event void UartRequested.requested()<p></p></p>

<p class="MsoPlainText">&nbsp; {<p></p></p>

<p class="MsoPlainText">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
UartResource.releaseTask();<p></p></p>

<p class="MsoPlainText">&nbsp; }<p></p></p>

<p class="MsoPlainText"><p>&nbsp;</p></p>

<p class="MsoPlainText">&nbsp; async event void UartRequested.immediateRequested()<p></p></p>

<p class="MsoPlainText">&nbsp; {<p></p></p>

<p class="MsoPlainText">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
UartResource.releaseTask();<p></p></p>

<p class="MsoPlainText">&nbsp; }<p></p></p>

<p class="MsoNormal">----------------------------------------------------------------------------------<p></p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal">It seems much less greedy since it only tries to grab the
resource after sendDone() has signaled.<p></p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal">Does anybody can answer me about the problem with case 1?<p></p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal">And in addition, why the CC2420 releases the resource
between send() and sendDone()?<p></p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal">Thanks.<p></p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal">With Kind Regards,<p></p></p>

<p class="MsoNormal">Kirak<p></p></p>

</div>

</div>
Varun Jain | 1 Jul 2008 02:17
Picon
Favicon

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:

[root <at> tinyos-devel ~]# java net.tinyos.tools.Listen

serial <at> /dev/ttyS0:19200: resynchronising

00 FF FF 00 00 09 00 16 21 00 0D 00 02 00 01 00 65

serial <at> /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

serial <at> COM1: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

 

 

Attachment (TestNetwork.java): application/octet-stream, 1748 bytes
Attachment (TestNetworkMsg.java): application/octet-stream, 11 KiB
<div>

<div class="Section1">

<p class="MsoNormal">Hi,<p></p></p>

<p class="MsoNormal">I am trying the &ldquo;TestNetwork&rdquo; application and having
the following issues:<p></p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoListParagraph"><span>A)<span>&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span>I was earlier getting
a bad packet using the Listen tool as:</span><p></p></p>

<p><span>[root <at> tinyos-devel ~]# java
net.tinyos.tools.Listen</span><p></p></p>

<p><span>serial <at> /dev/ttyS0:19200: resynchronising</span><p></p></p>

<p><span>00 FF FF 00 00 09 00 16 21 00 0D 00 02 00
01 00 65</span><p></p></p>

<p><span>serial <at> /dev/ttyS0:19200: bad packet</span><p></p></p>

<p><span>00 FF FF 00 00 09 00 16 33 01 F4 00 00 00
00 00 66</span><p></p></p>

<p><span>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&nbsp; 00 00 00 00</span><p></p></p>

<p class="MsoNormal"><span>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.<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoListParagraph"><span>B)<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>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:<p></p></p>

<p class="MsoListParagraph">java net.tinyos.tools.MsgReader
TestNetworkMsg&nbsp;&nbsp;&nbsp; OR&nbsp;&nbsp;&nbsp; java TestNetwork<p></p></p>

<p class="MsoListParagraph"><p>&nbsp;</p></p>

<p class="MsoListParagraph">$ java TestNetwork<p></p></p>

<p class="MsoListParagraph">serial <at> COM1:57600: resynchronising<p></p></p>

<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <p></p></p>

<p class="MsoListParagraph">I am attaching the two files which I have written to
do the task, can someone suggest me where I am going wrong.<p></p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal">Cheers,<p></p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal"><span lang="EN-AU">Varun<p></p></span></p>

<p class="MsoNormal"><span lang="EN-AU"><p>&nbsp;</p></span></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

</div>

</div>
Varun Jain | 1 Jul 2008 02:21
Picon
Favicon

Re: Command line arguments in T2

Hi Shikhar,

Once you have compiled with 'make telosb', you can do the following in
the /app/build/telosb:

tos-set-symbols main.exe main.exe-3 TOS_NODE_ID=3
ActiveMessageAddressC\$addr=3

This will set the TOS_NODE_ID to be 3 and then you can install the
'main.exe-3' file to your mote and it will have an ID of 3, I have used
it successfully to test multi-hop networks. I am pretty sure that you
can set other variables with 'tos-set-symbols' as Janos also
suggested...

Cheers,

Varun

-----Original Message-----
From: tinyos-help-bounces <at> millennium.berkeley.edu
[mailto:tinyos-help-bounces <at> millennium.berkeley.edu] On Behalf Of
Shikhar Sachan
Sent: Sunday, June 29, 2008 9:48 AM
To: tinyos-help <at> millennium.berkeley.edu
Subject: [Tinyos-help] Command line arguments in T2

I want to set some parameters in my T2 application using arguments
which I am thinking of passing in the command line while installing my
program on to the motes. To be more specific. Lets say I have vriables
x,y and I want to do something like ...make telosb
reinstall,<tos_node_id> <x> <y>. How can I do that. Is it supported by
T2.

Shikhar
_______________________________________________

Varun Jain | 1 Jul 2008 03:44
Picon
Favicon

Re: Serial port JAVA Message access issues.

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: tinyos-help-bounces <at> millennium.berkeley.edu [mailto:tinyos-help-bounces <at> millennium.berkeley.edu] On Behalf Of Varun Jain
Sent: Tuesday, July 01, 2008 10:18 AM
To: tinyos-help <at> millennium.berkeley.edu
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:

[root <at> tinyos-devel ~]# java net.tinyos.tools.Listen

serial <at> /dev/ttyS0:19200: resynchronising

00 FF FF 00 00 09 00 16 21 00 0D 00 02 00 01 00 65

serial <at> /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

serial <at> COM1: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

 

 

<div>

<div class="Section1">

<p class="MsoNormal"><span>Hi,<p></p></span></p>

<p class="MsoNormal"><span>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 &ldquo;message
Received&rdquo; function in the TestNetwork.java file. so I believe that is why
the incoming packet does not prints out on the serial:<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>public void messageReceived(int
to, Message message) {<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>BUT my doubt still remains because
it is not that I am not receiving the data correctly. I am receiving the data
correctly &nbsp;as can be seen using the &ldquo;Listen&rdquo; 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???<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<div>

<p class="MsoNormal"><span lang="EN-AU">Varun Jain<p></p></span></p>

<p class="MsoNormal"><span lang="EN-AU"><p>&nbsp;</p></span></p>

</div>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<div>

<div>

<p class="MsoNormal"><span>From:</span><span>
tinyos-help-bounces <at> millennium.berkeley.edu
[mailto:tinyos-help-bounces <at> millennium.berkeley.edu] On Behalf Of Varun
Jain<br>Sent: Tuesday, July 01, 2008 10:18 AM<br>To: tinyos-help <at> millennium.berkeley.edu<br>Subject: [Tinyos-help] Serial port JAVA Message access issues.<p></p></span></p>

</div>

</div>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal">Hi,<p></p></p>

<p class="MsoNormal">I am trying the &ldquo;TestNetwork&rdquo; application and
having the following issues:<p></p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoListParagraph"><span>A)<span>&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span>I was earlier
getting a bad packet using the Listen tool as:</span><p></p></p>

<p><span>[root <at> tinyos-devel ~]# java
net.tinyos.tools.Listen</span><p></p></p>

<p><span>serial <at> /dev/ttyS0:19200: resynchronising</span><p></p></p>

<p><span>00 FF FF 00 00 09 00 16 21 00 0D 00 02 00
01 00 65</span><p></p></p>

<p><span>serial <at> /dev/ttyS0:19200: bad packet</span><p></p></p>

<p><span>00 FF FF 00 00 09 00 16 33 01 F4 00 00 00
00 00 66</span><p></p></p>

<p><span>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&nbsp; 00 00 00 00</span><p></p></p>

<p class="MsoNormal"><span>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.<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoListParagraph"><span>B)<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>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:<p></p></p>

<p class="MsoListParagraph">java
net.tinyos.tools.MsgReader TestNetworkMsg&nbsp;&nbsp;&nbsp;
OR&nbsp;&nbsp;&nbsp; java TestNetwork<p></p></p>

<p class="MsoListParagraph"><p>&nbsp;</p></p>

<p class="MsoListParagraph">$ java TestNetwork<p></p></p>

<p class="MsoListParagraph">serial <at> COM1:57600: resynchronising<p></p></p>

<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<p></p></p>

<p class="MsoListParagraph">I am attaching the two files which I have written to
do the task, can someone suggest me where I am going wrong.<p></p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal">Cheers,<p></p></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal"><span lang="EN-AU">Varun<p></p></span></p>

<p class="MsoNormal"><span lang="EN-AU"><p>&nbsp;</p></span></p>

<p class="MsoNormal"><p>&nbsp;</p></p>

</div>

</div>
BAI LI | 1 Jul 2008 10:27
Picon

serial forwards probelms on lesson 5

Hi All,
 
I am having problems with serial forwards. I am using telosb motes. when i type

Administrator <at> baili /opt/tinyos-2.x/apps/Oscilloscope/java
$ java net.tinyos.sf.SerialForwarder
 
the serial forwarder window pops up but it didn't display any data only num clinets changed to 1
here is the message displayed:
 
Could not open com1: TOSComm JNI library runtime error: Error 2.
   ϵͳÕҲ»µ½ָ¶¨µÄÎļþ¡£
   in NativeSerialPort.CreateFile
serial <at> com1:57600 died - restarting
 
 
When i type command like
Administrator <at> baili /opt/tinyos-2.x/apps/Oscilloscope/java
$ java net.tinyos.sf.SerialForwarder -comm sf <at> localhost:9002
 
it displayed on the serial forwarder interface like
 
Listening to sf <at> localhost:9002
Listening for client connections on port 9002
 
then got struck, nums clinents is also 1.
 
what probelms it might be? Sum1 told me telosb should go with mica together to run this application. Is that true? Any1 only use telosb motes to run this serial forwarder successfully?
 
It also happens to my
 
<div>
<div>Hi All,</div>
<div>&nbsp;</div>
<div>I am having problems with serial forwards. I am using telosb motes. when i type </div>
<div>
<br><a href="mailto:Administrator <at> baili">Administrator <at> baili</a> /opt/tinyos-2.x/apps/Oscilloscope/java<br>$ java net.tinyos.sf.SerialForwarder</div>
<div>&nbsp;</div>
<div>the serial forwarder window pops up but it didn't display any data only num clinets changed to 1</div>
<div>here is the message displayed:</div>
<div>&nbsp;</div>
<div>Could not open com1: TOSComm JNI library runtime error: Error 2.<br>&nbsp;&nbsp; &#1013;&#883;&Otilde;&#1202;&raquo;&micro;&frac12;&#1464;&para;&uml;&micro;&Auml;&Icirc;&#316;&thorn;&iexcl;&pound;<br>&nbsp;&nbsp; in NativeSerialPort.CreateFile<br><a href="mailto:serial <at> com1:57600">serial <at> com1:57600</a> died - restarting</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>When i type command like </div>
<div>
<a href="mailto:Administrator <at> baili">Administrator <at> baili</a> /opt/tinyos-2.x/apps/Oscilloscope/java<br>$ java net.tinyos.sf.SerialForwarder -comm <a href="mailto:sf <at> localhost:9002">sf <at> localhost:9002</a>
</div>
<div>&nbsp;</div>
<div>it displayed on the serial forwarder interface like</div>
<div>&nbsp;</div>
<div>Listening to <a href="mailto:sf <at> localhost:9002">sf <at> localhost:9002</a><br>Listening for client connections on port 9002</div>
<div>&nbsp;</div>
<div>then got struck, nums clinents is also 1.</div>
<div>&nbsp;</div>
<div>what probelms it might be? Sum1 told me telosb should go with mica together to run this application. Is that true? Any1 only use telosb motes to run this serial forwarder successfully?</div>
<div>&nbsp;</div>
<div>It also happens to my </div>
<div>&nbsp;</div>
</div>
Andrey Gursky | 1 Jul 2008 12:34
Picon
Favicon

Re: Serial port JAVA Message access issues.

Varun,

Regards increasing the serial connection speed you can read here:

http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2008-June/034373.html

But I don't know, whether this what you want.

Andrey

 > 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.
 >

François Ingelrest | 1 Jul 2008 15:34
Picon
Picon
Favicon

A watchdog component for TinyOS

Dear all,

As there does not seem to exist an easily usable watchdog component
for TinyOS, we have written one for our own needs. Since we believe
this could be useful to others, we have put it on our website:

http://sensorscope.epfl.ch/index.php/TinyOS_Watchdog

It is a generic component, so it can be instanciated as many times as
needed for the various places to check in the code. A sample
application is provided to demonstrate its usage, and we believe that
it should be very easy to grasp.

Cheers,

--

-- 
François INGELREST
LCAV, I&C school
BC 364, EPFL
CH-1015 Lausanne, Switzerland

Tel.  : +41 (0)21 693 12 81
E-Mail: Francois.Ingelrest <at> epfl.ch
WWW   : http://fingelrest.silent-blade.org

John Paul | 1 Jul 2008 16:02
Picon

Undefined reference to pow and sqrt functions in telosb!!!

Hi,
I am working on telosb motes. I am using the pow and sqrt functions of math.h library. I include the math.h header file in the source code. When i typed the command "make telosb", it gave me the following errors.

app.c:(.text+0x4486): undefined reference to `pow'
app.c:(.text+0x44a8): undefined reference to `pow'
app.c:(.text+0x44b8): undefined reference to `sqrt'


While if i compiled of micaz it didn't show any error.

Could someone help in this regard. Help appreciated.


Regards,
john Paul
<div>
<div class="Ih2E3d">Hi,<br>I am working on telosb motes. I am using the pow and sqrt
functions of math.h library. I include the math.h header file in the
source code. When i typed the command "make telosb", it gave me the
following errors.<br><br>app.c:(.text+0x4486): undefined reference to `pow'<br>app.c:(.text+0x44a8): undefined reference to `pow'<br>app.c:(.text+0x44b8): undefined reference to `sqrt'<br><br><br>
</div>While if i compiled of micaz it didn't show any error.<br><br>Could someone help in this regard. Help appreciated.<br><br><br>Regards,<br>john Paul</div>
fhg07 | 1 Jul 2008 16:09
Picon

problems with tymo-dymo

Well, I was searching for some implemented protocols for tinyOS 2.x and
I found this one, which seemed to be what I was looking for. However,
after downloading its source and placing it inside my tinyos2 installation
directory, whenever I try to create the binary, with make, lots of errors
appear, and I really cannot understand why that happens.

For instance, when I am in the MHBaseStation/ Directory, and type make mica2,
that is what follows:

"fernando <at> baco:/opt/tinyos2/tinyos-2.x-src/apps/MHBaseStation$ make mica2
mkdir -p build/mica2
    compiling TymaBaseAppC to a mica2 binary
ncc -o build/mica2/main.exe  -Os -I../../tos/lib/net/dymo
-I../../tos/lib/net/multihop -I../tymaluate/monitor/ -I../tymaluate/sense/
-Wall -Wshadow -Wnesc-all -target=mica2 -fnesc-cfile=build/mica2/app.c
-board=micasb -DDEFINED_TOS_AM_GROUP=0x22 -finline-limit=100000
-DIDENT_PROGRAM_NAME=\"TymaBaseAppC\" -DIDENT_USER_ID=\"fernando\"
-DIDENT_HOSTNAME=\"baco.inf.ufpr.b\" -DIDENT_USER_HASH=0x92905e1aL
-DIDENT_UNIX_TIME=0x486a3a0fL -DIDENT_UID_HASH=0xb0fea519L
-fnesc-dump=wiring -fnesc-dump='interfaces(!abstract())'
-fnesc-dump='referenced(interfacedefs, components)'
-fnesc-dumpfile=build/mica2/wiring-check.xml TymaBaseAppC.nc -lm
../tymaluate/monitor/MonitorM.nc:1:26: dymo_routing.h: No such file or
directory
In file included from TymaBaseAppC.nc:11:
In component `MonitorC':
MonitorC.nc:5: failed to preprocess ../tymaluate/monitor/MonitorM.nc
MonitorC.nc:5: component DymoNetworkC not found
MonitorC.nc:8: cannot find `Leds'
MonitorC.nc:9: cannot find `Read'
MonitorC.nc:10: cannot find `SplitControl'
MonitorC.nc:11: cannot find `DymoMonitor'
MonitorC.nc:12: cannot find `RoutingTableInfo'
MonitorC.nc:18: cannot find `Receive'
MonitorC.nc:19: cannot find `MHSend'
MonitorC.nc:20: cannot find `Intercept'
MonitorC.nc:22: cannot find `MHPacket'
In file included from BaseStationC.nc:73,
                 from TymaBaseAppC.nc:13:
In component `ConverterM':
ConverterM.nc:30: conflicting types for `AMSend.getPayload'
/opt/tinyos2/tinyos-2.x-src/tos/interfaces/AMSend.nc:124: previous
declaration of `AMSend.getPayload'
ConverterM.nc: In function `AMSend.getPayload':
ConverterM.nc:31: too few arguments to function
ConverterM.nc: At top level:
ConverterM.nc:46: `getPayload' is not in interface `Receive'
ConverterM.nc: In function `Receive.getPayload':
ConverterM.nc:47: interface has no command or event named `getPayload'
ConverterM.nc: At top level:
ConverterM.nc:50: `payloadLength' is not in interface `Receive'
ConverterM.nc: In function `Receive.payloadLength':
ConverterM.nc:51: interface has no command or event named `payloadLength'
In component `BaseStationC':
BaseStationC.nc: At top level:
BaseStationC.nc:77: cannot find `SplitControl'
BaseStationC.nc:87: cannot find `MHSend'
BaseStationC.nc:88: cannot find `Receive'
BaseStationC.nc:89: cannot find `Receive'
BaseStationC.nc:90: cannot find `MHPacket'
BaseStationC.nc:96: cannot find `Packet'
BaseStationC.nc:97: cannot find `MHPacket'
make: *** [exe0] Error 1"

Any idea of what could possibly be wrong?

Philip Levis | 1 Jul 2008 17:41
Picon

Re: sendDone not signaled


On Jun 17, 2008, at 12:33 AM, drirawmailbox-tos <at> yahoo.fr wrote:

> Hello,
> I want to provide in a component AMSend and Receive interfaces to be  
> used in a higher layer application.
>
> command void* AMSendSync.getPayload(message_t* msg){
>     sync_init= (sync_InitSec_msg_t*)(call  
> subAMSendSync.getPayload(msg));
>     return &(sync_init->sync);
>     //return call subAMSendSync.getPayload(msg);
> }
>
> command error_t AMSendSync.send(am_addr_t addr, message_t* msg,  
> uint8_t len){
>     sync_init->Org=myOrg;
>     for(k=0;k<8;k++){
>       sync_init->cle[k]=cPi[k];
>     }
>     return call subAMSendSync.send(addr, msg,  
> (uint8_t)sizeof(sync_InitSec_msg_t));
>     //return call subAMSendSync.send(addr, msg, len);
> }
>
> The higher application works if I use "return call  
> subAMSendSync.getPayload(msg); AND return call  
> subAMSendSync.send(addr, msg, len); " only . But when I use the  
> above code, the message was not sent and sendDone is not signaled.
>
> How do you think about it?

What does the call to send return?

Phil

Gmane