[Tinyos-help] strange problem about uint64_t type on TelosB on gcc compiler

2009-10-28 Thread BAI LI
Hi,

I am currently designing a authentication protocol in sensor networks. I
have defined the follwoing variables:

//on the sender side:

uint64_t hash=0;
uint8_t payload[8];

//break the 64 bit hash down into eight 8-bit paylaod for sending purpose
for(i=0;i=10;i++){
   payload[0]=(uint8_t)(st[i].hash56);
   payload[1]=(uint8_t)(st[i].hash48);
   payload[2]=(uint8_t)(st[i].hash40);
   payload[3]=(uint8_t)(st[i].hash32);
   payload[4]=(uint8_t)(st[i].hash24);
   payload[5]=(uint8_t)(st[i].hash16);
   payload[6]=(uint8_t)(st[i].hash8);
   payload[7]=(uint8_t)st[i].hash;
}

when i compiled the code, there is no error.
===
//on the receiver side,
uint64_t receivedhash=0;
uint8_t receivedpayload[9];

receivedhash=(uint64_t)msdu[0]56
  +(uint64_t)msdu[1]48
  +(uint64_t)msdu[2]40
  +(uint64_t)msdu[3]32
  +(uint64_t)msdu[4]24
  +(uint64_t)msdu[5]16
  +(uint64_t)msdu[6]8
  +(uint64_t)msdu[7];

when i compiled the code, i got the following error: I have tested the
different portions of code and make sure the problem comes from the above
piece.

hashtesting.nc:906: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://gcc.gnu.org/bugs.html http://gcc.gnu.org/bugs.html for
instructions.
make: *** [exe0] Error 1

Anyone can help me out? I have tried the whole morning with no luck. Thanks
in advance.

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] ERROR: Timeout. Is the node a Deluge T2 base station?

2009-09-30 Thread BAI LI
Hi,

Last time I talked to Razvan, and I forgot to mention this similar problem
as well.

I used MicaZ and MIB520 to test the Deluge. When you connect the MIB520 to
PC, it will show two COM#. For example, COM3 and COM4. You only can use
ttyS3 not ttyS(3-1) to inject this image. But the rest of deluge command you
still have to use ttyS(3-1) instead. I haven't investigated this problem
further.

Razvan, could you update the manual if so? you can test it instead.

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] motelist doesn't work

2009-09-14 Thread BAI LI
Hi,

Have you actually tried motelist command on Micaz platform? And i am using
TinyOS 2.1 not moteworks. I have tried and failed it. So i am not too sure
what I missed?

Regards,
Bai

On Tue, Sep 15, 2009 at 3:18 AM, Giri Baleri mbal...@xbow.com wrote:

  Motelist has nothing to do with the radio platform you are using. This
 command looks at the FTDI USB chip (resident on TelosB and MIB520) driver
 and reports the virtual COM ports found. If you are using MIB520 as a
 programming board, then it should report the COM ports assigned to it.



 Giri


  --

 *From:* tinyos-help-boun...@millennium.berkeley.edu [mailto:
 tinyos-help-boun...@millennium.berkeley.edu] *On Behalf Of *BAI LI
 *Sent:* Friday, September 11, 2009 5:31 PM
 *To:* Michael Schippling
 *Cc:* Tinyos-Help
 *Subject:* Re: [Tinyos-help] motelist doesn't work



 Hi,



 I didn't use moteworks as my project is based on Tinyos2.1. But i read a
 post somewhere in this list  the motelist command works on Iris nodes not
 only telosb. It can display the COM number. So i thought the motelist
 command is supposed to work on micaz as well. In fact I found no device
 found. But anyways I will go to Device Manager to check out the port number
 if necessary.



 Regards,

 Bai

 On Sat, Sep 12, 2009 at 3:06 AM, Michael Schippling sc...@santafe.edu
 wrote:

 Moteworks is based on some mystery version of T1 and includes
 most of the dev tree, but not the doc tree which is the only
 indicator of actual version that I've uncovered. I'm not sure
 what you mean about iris using motelist commands, did you try
 that program with your micas to no effect?

 MS


 BAI LI wrote:

 Hi,


  I never use moteworks. I heard moteworks only supports tinyos1.x not 2.1.
 But it is interesting iris can use motelist command not micaz.
  Regards,
 Bai

 On Fri, Sep 11, 2009 at 1:55 AM, Michael Schippling sc...@santafe.edumailto:
 sc...@santafe.edu wrote:

Just for grins, try this one. It came with Moteworks and
seems to work with Iris boards attached via MIB520:
   http://www.etantdonnes.com/Motes/motelist.exe.moteworks

I need to figure out how it works eventually anyway...
I can poet the source as well if it helps, or you can d/l
Moteworks from Xbow's site.

MS



Razvan Musaloiu-E. wrote:

Hi!

On Thu, 10 Sep 2009, BAI LI wrote:

Hi,

Thanks for your reply.

Yes. I am using MIB520 as well. But i just can't work it
out. So if anyone
in this list try motelist command with micaz platform.
please let me know.


I just tried a MIB520 and the motelist doesn't show it. As far
as I know the motelist is only for the telos family of motes.

--Razvan ME

On Thu, Sep 10, 2009 at 1:57 AM, Michael Schippling

sc...@santafe.edu mailto:sc...@santafe.eduwrote:



To my knowledge motelist only works with USB attached
devices.
If you have a MIB520 it might work with mica's, but I've
only
tried it with the Iris and then only the motelist
version that
came with Xbow's Moteworks. I don't know if it's different
from the standard one.
MS


BAI LI wrote:

 Hi,
 Recently I tested my code on micaz. When I typed
motelist commande, It
said no device found. But I am able to compile and
burn the code on micaz.
The mote works fine. When i pluged the telosb node
back to the pc, it can
display the COM# properly. I have searched the
keyword motelist, i can find
motelist under /tools/platforms/msp430/motelist. I
don't know what to do
since there is no errors poped up. Am I supposed to
recompile the TOOLS
folder since there is no micaz folder there? Could
someone give me some
possible directions please? Thanks.
 Regards,
Bai



  


___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu

mailto: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

Re: [Tinyos-help] motelist doesn't work

2009-09-11 Thread BAI LI
Hi,

I didn't use moteworks as my project is based on Tinyos2.1. But i read a
post somewhere in this list  the motelist command works on Iris nodes not
only telosb. It can display the COM number. So i thought the motelist
command is supposed to work on micaz as well. In fact I found no device
found. But anyways I will go to Device Manager to check out the port number
if necessary.

Regards,
Bai

On Sat, Sep 12, 2009 at 3:06 AM, Michael Schippling sc...@santafe.eduwrote:

 Moteworks is based on some mystery version of T1 and includes
 most of the dev tree, but not the doc tree which is the only
 indicator of actual version that I've uncovered. I'm not sure
 what you mean about iris using motelist commands, did you try
 that program with your micas to no effect?

 MS


 BAI LI wrote:

 Hi,
  I never use moteworks. I heard moteworks only supports tinyos1.x not 2.1.
 But it is interesting iris can use motelist command not micaz.
  Regards,
 Bai

 On Fri, Sep 11, 2009 at 1:55 AM, Michael Schippling 
 sc...@santafe.edumailto:
 sc...@santafe.edu wrote:

Just for grins, try this one. It came with Moteworks and
seems to work with Iris boards attached via MIB520:
   http://www.etantdonnes.com/Motes/motelist.exe.moteworks

I need to figure out how it works eventually anyway...
I can poet the source as well if it helps, or you can d/l
Moteworks from Xbow's site.

MS



Razvan Musaloiu-E. wrote:

Hi!

On Thu, 10 Sep 2009, BAI LI wrote:

Hi,

Thanks for your reply.

Yes. I am using MIB520 as well. But i just can't work it
out. So if anyone
in this list try motelist command with micaz platform.
please let me know.


I just tried a MIB520 and the motelist doesn't show it. As far
as I know the motelist is only for the telos family of motes.

--Razvan ME

On Thu, Sep 10, 2009 at 1:57 AM, Michael Schippling
sc...@santafe.edu mailto:sc...@santafe.eduwrote:


To my knowledge motelist only works with USB attached
devices.
If you have a MIB520 it might work with mica's, but I've
only
tried it with the Iris and then only the motelist
version that
came with Xbow's Moteworks. I don't know if it's different
from the standard one.
MS


BAI LI wrote:

 Hi,
 Recently I tested my code on micaz. When I typed
motelist commande, It
said no device found. But I am able to compile and
burn the code on micaz.
The mote works fine. When i pluged the telosb node
back to the pc, it can
display the COM# properly. I have searched the
keyword motelist, i can find
motelist under /tools/platforms/msp430/motelist. I
don't know what to do
since there is no errors poped up. Am I supposed to
recompile the TOOLS
folder since there is no micaz folder there? Could
someone give me some
possible directions please? Thanks.
 Regards,
Bai



  


___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
mailto: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

Re: [Tinyos-help] motelist doesn't work

2009-09-10 Thread BAI LI
Hi,

I never use moteworks. I heard moteworks only supports tinyos1.x not 2.1.
But it is interesting iris can use motelist command not micaz.

Regards,
Bai

On Fri, Sep 11, 2009 at 1:55 AM, Michael Schippling sc...@santafe.eduwrote:

 Just for grins, try this one. It came with Moteworks and
 seems to work with Iris boards attached via MIB520:
http://www.etantdonnes.com/Motes/motelist.exe.moteworks

 I need to figure out how it works eventually anyway...
 I can poet the source as well if it helps, or you can d/l
 Moteworks from Xbow's site.

 MS



 Razvan Musaloiu-E. wrote:

 Hi!

 On Thu, 10 Sep 2009, BAI LI wrote:

 Hi,

 Thanks for your reply.

 Yes. I am using MIB520 as well. But i just can't work it out. So if
 anyone
 in this list try motelist command with micaz platform. please let me
 know.


 I just tried a MIB520 and the motelist doesn't show it. As far as I know
 the motelist is only for the telos family of motes.

 --
 Razvan ME

 On Thu, Sep 10, 2009 at 1:57 AM, Michael Schippling sc...@santafe.edu
 wrote:

 To my knowledge motelist only works with USB attached devices.
 If you have a MIB520 it might work with mica's, but I've only
 tried it with the Iris and then only the motelist version that
 came with Xbow's Moteworks. I don't know if it's different
 from the standard one.
 MS


 BAI LI wrote:

  Hi,
  Recently I tested my code on micaz. When I typed motelist commande, It
 said no device found. But I am able to compile and burn the code on
 micaz.
 The mote works fine. When i pluged the telosb node back to the pc, it
 can
 display the COM# properly. I have searched the keyword motelist, i can
 find
 motelist under /tools/platforms/msp430/motelist. I don't know what to
 do
 since there is no errors poped up. Am I supposed to recompile the TOOLS
 folder since there is no micaz folder there? Could someone give me some
 possible directions please? Thanks.
  Regards,
 Bai


 


 ___
 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

Re: [Tinyos-help] Deluge compilation on micaz

2009-09-09 Thread BAI LI
Hi Razvan,

When I typed echo $PYTHONPATH, the computer didn't show me anything. What
do you think? I will try it tomorrow at office and let you know. Thanks.

Regards,
Bai

On Wed, Sep 9, 2009 at 3:22 PM, Razvan Musaloiu-E. razv...@cs.jhu.eduwrote:

 Hi!

 On Wed, 9 Sep 2009, BAI LI wrote:

 On Wed, Sep 9, 2009 at 2:43 PM, Razvan Musaloiu-E. razv...@cs.jhu.edu
 wrote:

 Hi!

 On Wed, 9 Sep 2009, BAI LI wrote:

 Hi,


 That is the manual I am using. All the stuffs are latest. Not too sure
 where
 it went wrong.

 I tried the command you suggested already. No luck. Have you tried it on
 micaz since it is updated to the latest CVS?


 I don't have a micaz at hand but I just retested with a telosb and it
 works
 fine. I think your python is searching for the tos.py in the wrong place.
 Is
 your PYTHONPATH is using including the $TOSROOT/support/sdk/python?


 Where I can or what command I can use to check out if my pytho using th
 ecorrect path?


 From the bash shell you can print the PYTHONPATH with the following
 command:

echo $PYTHONPATH

 Same as for PATH basically. :-)


  You can check the path my running python and the type:

   import tos
   help(tos)

 And then look at the FILES sections. In my case it says:

   FILE
   /home/lpl/local/src/tinyos-2.x/support/sdk/python/tos.py

 Which is correct because that is where my local installation is.


 Am I doing it right as you suggested? I got the following errors. I guess
 the Python path is not correct?

 administra...@jujumao /opt/tinyos-2.x/apps/tests/deluge/blink
 $ python
 Python 2.5.1 (r251:54863, May 18 2007, 16:56:43)
 [GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin
 Type help, copyright, credits or license for more information.

  import tos

 Traceback (most recent call last):
  File stdin, line 1, in module
 ImportError: No module named tos

  import tos.py

 Traceback (most recent call last):
  File stdin, line 1, in module
 ImportError: No module named tos.py

  help(tos)

 Traceback (most recent call last):
  File stdin, line 1, in module
 NameError: name 'tos' is not defined



 This is strange. If you don't have tos.py in your path then the tos-deluge
 should fail in a different way.

 --
 Razvan ME



 One more thing: the correct baudrate for micaz is 57600 and not 115200.


 Thanks



 --
 Razvan ME

 On Wed, Sep 9, 2009 at 2:13 PM, Razvan Musaloiu-E. razv...@cs.jhu.edu

 wrote:


 Hi!


 On Wed, 9 Sep 2009, BAI LI wrote:

 Hi,


 Since Deluge manual doesn't provide any micaz install command. It
 could be
 something wrong with the command I typed. But i tried different
 combination.
 It still had the same error. So I reckon it has nothing to do with
 this
 command.


 What manual are you reading? The current one is this one:
  http://docs.tinyos.net/index.php/Deluge_T2

 One thing to note is that the first parameter needs to ser...@port
 :SPEED
 for serial ports.

 --
 Razvan ME


 On Wed, Sep 9, 2009 at 2:03 PM, Razvan Musaloiu-E. razv...@cs.jhu.edu

 wrote:



 Hi!



 On Wed, 9 Sep 2009, BAI LI wrote:

 Hi,


 I have followed the intructions from the Deulge tutorial and also
 installed
 pyserial tools as required. I met the following error when i tried
 to
 inject
 blink image to micaz

 administra...@jujumao /opt/tinyos-2.x/apps/tests/deluge/Blink
 $ tos-deluge /dev/ttyS5:115200 -i 1 build/micaz/tos-image.xml
 Traceback (most recent call last):
  File /usr/local/bin/tos-deluge, line 401, in module
  am = tos.AM()
 TypeError: __init__() takes exactly 2 arguments (1 given)

 It is the latest CVS. What could cause this problem?


 Can you run tos-deluge and see if the output is like this?


 $ tos-deluge
 Usage: /home/lpl/local/bin/tos-deluge source
 -p|-i|-r|-d|-e|-s
 image_number [options]
   source can be:
  ser...@port:SPEED   Serial ports
  netw...@host:PORT   MIB600
   -p --pingProvide status of the image in the external
 flash
   -i --inject  Inject a compiled TinyOS application
[options]: tos_image.xml file path
   -e --erase   Erase an image in the external flash
   -b --bootForce a reboot of the mote
   -r --reprogram   Reprogram the mote
   -d --disseminate Disseminate the image in the external flash to
 the network
   -dr --disseminate-and-reprogram
   -s --stopStop the dissemination
   -ls --local-stop Stop the dissemination only on the local mote

 If it's not then you are not running the latest CVS. :-)

 --
 Razvan ME







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

[Tinyos-help] motelist doesn't work

2009-09-09 Thread BAI LI
Hi,

Recently I tested my code on micaz. When I typed motelist commande, It said
no device found. But I am able to compile and burn the code on micaz. The
mote works fine. When i pluged the telosb node back to the pc, it can
display the COM# properly. I have searched the keyword motelist, i can find
motelist under /tools/platforms/msp430/motelist. I don't know what to do
since there is no errors poped up. Am I supposed to recompile the TOOLS
folder since there is no micaz folder there? Could someone give me some
possible directions please? Thanks.

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] uint64_t problems

2009-09-08 Thread BAI LI
You mean the app.c file?

On Wed, Sep 9, 2009 at 12:54 PM, Eric Decker cire...@gmail.com wrote:

 that might be a tool chain problem.  I would recommend looking at the code
 generated.
 eric


 On Tue, Sep 8, 2009 at 7:42 PM, BAI LI libai0...@gmail.com wrote:

 Hi Michael,

 Thanks for your reply. I have solved the problem by adding ULL to the
 value I assigned to the variable n. It is as follows:

 uint64_t n=0x01FF;

 howver, I have encountered some other problems. The program working on
 telosb can't work on micaZ at all. i am still investigating what the problem
 is. But it is really strange when I tried to use micaZ instead of telosb. I
 didn't expect such more problems than I thought.

 Regards,
 Bai

 On Wed, Sep 9, 2009 at 2:15 AM, Michael Schippling sc...@santafe.eduwrote:

 I think the MSP chip in the telos is 16 bit whereas the ATMEGA in
 the micas is 8. Probably the ATMEGA doesn't support 64 bit quantities.
 Look in the avr system header files to see if there is any indication.

 MS


 BAI LI wrote:

 Hi,
  I have developed a hash function recently on telosb. Now I tested it on
 micaz. When I compiled the program on telosb, there is no warning or 
 errors.
 However, when it comes to micaZ nodes, it gave me a warining:
  squashm.nc:70 http://squashm.nc:70: warning: integer constant is too
 large for 'long' type
  The 70th line of code is like the following:
  uint64_t n=0x01FF;
  I wonder how come telosb can hold this big integer not Micaz?
  Should I ingnore this warning or fix it? How to fix this warning?
 Thanks.
  Regards,
 Bai


 

 ___
 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




 --
 Eric B. Decker
 Senior (over 50 :-) Researcher



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

[Tinyos-help] Deluge compilation on micaz

2009-09-08 Thread BAI LI
Hi,

I have followed the intructions from the Deulge tutorial and also installed
pyserial tools as required. I met the following error when i tried to inject
blink image to micaz

administra...@jujumao /opt/tinyos-2.x/apps/tests/deluge/Blink
$ tos-deluge /dev/ttyS5:115200 -i 1 build/micaz/tos-image.xml
Traceback (most recent call last):
  File /usr/local/bin/tos-deluge, line 401, in module
am = tos.AM()
TypeError: __init__() takes exactly 2 arguments (1 given)

It is the latest CVS. What could cause this problem?

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Deluge compilation on micaz

2009-09-08 Thread BAI LI
Hi,

That is the manual I am using. All the stuffs are latest. Not too sure where
it went wrong.

I tried the command you suggested already. No luck. Have you tried it on
micaz since it is updated to the latest CVS?

Regards,
Bai

On Wed, Sep 9, 2009 at 2:13 PM, Razvan Musaloiu-E. razv...@cs.jhu.eduwrote:

 Hi!

 On Wed, 9 Sep 2009, BAI LI wrote:

 Hi,

 Since Deluge manual doesn't provide any micaz install command. It could be
 something wrong with the command I typed. But i tried different
 combination.
 It still had the same error. So I reckon it has nothing to do with this
 command.


 What manual are you reading? The current one is this one:
http://docs.tinyos.net/index.php/Deluge_T2

 One thing to note is that the first parameter needs to ser...@port:SPEED
 for serial ports.

 --
 Razvan ME


 On Wed, Sep 9, 2009 at 2:03 PM, Razvan Musaloiu-E. razv...@cs.jhu.edu
 wrote:

 Hi!


 On Wed, 9 Sep 2009, BAI LI wrote:

 Hi,


 I have followed the intructions from the Deulge tutorial and also
 installed
 pyserial tools as required. I met the following error when i tried to
 inject
 blink image to micaz

 administra...@jujumao /opt/tinyos-2.x/apps/tests/deluge/Blink
 $ tos-deluge /dev/ttyS5:115200 -i 1 build/micaz/tos-image.xml
 Traceback (most recent call last):
  File /usr/local/bin/tos-deluge, line 401, in module
  am = tos.AM()
 TypeError: __init__() takes exactly 2 arguments (1 given)

 It is the latest CVS. What could cause this problem?


 Can you run tos-deluge and see if the output is like this?

   $ tos-deluge
   Usage: /home/lpl/local/bin/tos-deluge source -p|-i|-r|-d|-e|-s
   image_number [options]
 source can be:
ser...@port:SPEED   Serial ports
netw...@host:PORT   MIB600
 -p --pingProvide status of the image in the external
 flash
 -i --inject  Inject a compiled TinyOS application
  [options]: tos_image.xml file path
 -e --erase   Erase an image in the external flash
 -b --bootForce a reboot of the mote
 -r --reprogram   Reprogram the mote
 -d --disseminate Disseminate the image in the external flash to
 the network
 -dr --disseminate-and-reprogram
 -s --stopStop the dissemination
 -ls --local-stop Stop the dissemination only on the local mote

 If it's not then you are not running the latest CVS. :-)

 --
 Razvan ME



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

Re: [Tinyos-help] Deluge compilation on micaz

2009-09-08 Thread BAI LI
On Wed, Sep 9, 2009 at 2:43 PM, Razvan Musaloiu-E. razv...@cs.jhu.eduwrote:

 Hi!

 On Wed, 9 Sep 2009, BAI LI wrote:

 Hi,

 That is the manual I am using. All the stuffs are latest. Not too sure
 where
 it went wrong.

 I tried the command you suggested already. No luck. Have you tried it on
 micaz since it is updated to the latest CVS?


 I don't have a micaz at hand but I just retested with a telosb and it works
 fine. I think your python is searching for the tos.py in the wrong place. Is
 your PYTHONPATH is using including the $TOSROOT/support/sdk/python?


Where I can or what command I can use to check out if my pytho using th
ecorrect path?


 You can check the path my running python and the type:

import tos
help(tos)

 And then look at the FILES sections. In my case it says:

FILE
/home/lpl/local/src/tinyos-2.x/support/sdk/python/tos.py

 Which is correct because that is where my local installation is.


Am I doing it right as you suggested? I got the following errors. I guess
the Python path is not correct?

administra...@jujumao /opt/tinyos-2.x/apps/tests/deluge/blink
$ python
Python 2.5.1 (r251:54863, May 18 2007, 16:56:43)
[GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin
Type help, copyright, credits or license for more information.
 import tos
Traceback (most recent call last):
  File stdin, line 1, in module
ImportError: No module named tos
 import tos.py
Traceback (most recent call last):
  File stdin, line 1, in module
ImportError: No module named tos.py
 help(tos)
Traceback (most recent call last):
  File stdin, line 1, in module
NameError: name 'tos' is not defined



One more thing: the correct baudrate for micaz is 57600 and not 115200.

Thanks



 --
 Razvan ME

 On Wed, Sep 9, 2009 at 2:13 PM, Razvan Musaloiu-E. razv...@cs.jhu.edu
 wrote:

 Hi!

 On Wed, 9 Sep 2009, BAI LI wrote:

 Hi,


 Since Deluge manual doesn't provide any micaz install command. It could
 be
 something wrong with the command I typed. But i tried different
 combination.
 It still had the same error. So I reckon it has nothing to do with this
 command.


 What manual are you reading? The current one is this one:
   http://docs.tinyos.net/index.php/Deluge_T2

 One thing to note is that the first parameter needs to ser...@port:SPEED
 for serial ports.

 --
 Razvan ME


 On Wed, Sep 9, 2009 at 2:03 PM, Razvan Musaloiu-E. razv...@cs.jhu.edu

 wrote:


 Hi!



 On Wed, 9 Sep 2009, BAI LI wrote:

 Hi,


 I have followed the intructions from the Deulge tutorial and also
 installed
 pyserial tools as required. I met the following error when i tried to
 inject
 blink image to micaz

 administra...@jujumao /opt/tinyos-2.x/apps/tests/deluge/Blink
 $ tos-deluge /dev/ttyS5:115200 -i 1 build/micaz/tos-image.xml
 Traceback (most recent call last):
  File /usr/local/bin/tos-deluge, line 401, in module
  am = tos.AM()
 TypeError: __init__() takes exactly 2 arguments (1 given)

 It is the latest CVS. What could cause this problem?


 Can you run tos-deluge and see if the output is like this?


  $ tos-deluge
  Usage: /home/lpl/local/bin/tos-deluge source -p|-i|-r|-d|-e|-s
  image_number [options]
source can be:
   ser...@port:SPEED   Serial ports
   netw...@host:PORT   MIB600
-p --pingProvide status of the image in the external
 flash
-i --inject  Inject a compiled TinyOS application
 [options]: tos_image.xml file path
-e --erase   Erase an image in the external flash
-b --bootForce a reboot of the mote
-r --reprogram   Reprogram the mote
-d --disseminate Disseminate the image in the external flash to
 the network
-dr --disseminate-and-reprogram
-s --stopStop the dissemination
-ls --local-stop Stop the dissemination only on the local mote

 If it's not then you are not running the latest CVS. :-)

 --
 Razvan ME





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

[Tinyos-help] uint64_t problems

2009-09-07 Thread BAI LI
Hi,

I have developed a hash function recently on telosb. Now I tested it on
micaz. When I compiled the program on telosb, there is no warning or errors.
However, when it comes to micaZ nodes, it gave me a warining:

squashm.nc:70: warning: integer constant is too large for 'long' type

The 70th line of code is like the following:

uint64_t n=0x01FF;

I wonder how come telosb can hold this big integer not Micaz?

Should I ingnore this warning or fix it? How to fix this warning? Thanks.

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] strange deluge errors

2009-09-02 Thread BAI LI
Hi,

Thanks for your reply. I tried to trace back this problem. I think zigbee
files use a modified cc2420 files while Deluge still uses official cc2420
files. Am I right? I have one questions for Deluge. Thanks in advance.

1. for bootloader=tosboot this statement is trying to compile all the
files sitting in ...lib/tosboot, is that correct?

Regards,
Bai
On Wed, Aug 19, 2009 at 2:20 PM, Razvan Musaloiu-E. razv...@cs.jhu.eduwrote:

 Hi!

 On Wed, 19 Aug 2009, BAI LI wrote:

 Hi,

 I am testing the zigbee files under tinyos 2.x directory and tried to get
 deluge working as well. I got the following errors after I added
 components
 DelugeC; in AssociationExample.nc and BOOTLOADER=tosboot in Makefile. I
 have also copied volumes-stm25p.xml in the AssociationExample folder.
 Could
 anyone tell me what is wrong with the files please (Line 64, 65 and 68)?


 I'm not sure in what state is this AssociationExample. On the latest CVS
 the compilation fails with the error:

AssociationExampleM.nc:7:24: error: printfUART.h: No such file or
 directory

  Thanks.

 e...@wsn /opt/tinyos-2.x/tos/lib/net/zigbee/apps/AssociationExample
 $ make telosb
 mkdir -p build/telosb
 tos-storage-stm25p  /opt/tinyos-2.x/tos/platforms/telosb
 volumes-stm25p.xml

 build/telosb/StorageVolumes.h || rm -f build/telosb/StorageVolumes.h

   compiling AssociationExample to a telosb binary
 ncc -o build/telosb/main.exe  -Os -O
 -I/opt/tinyos-2.x/tos/lib/net/zigbee/ieee80 2154/includes
 -I/opt/tinyos-2.x/tos/lib/net/zigbee/ieee802154/mac
 -I/opt/tinyos-2.x/tos/lib/net/zigbee/ieee802154/phy
 -I/opt/tinyos-2.x/tos/lib/net/zigbee/ieee802154/timerasync
 -I/opt/tinyos-2.x/tos/lib/net/zigbee/ieee802154/interfaces
 -I/opt/tinyos-2.x/tos/lib/net/zigbee/ieee802154/interfaces/mac
 -I/opt/tinyos-2.x/tos/lib/net/zigbee/ieee802154/interfaces/phy
 -I/opt/tinyos-2.x/tos/lib/net/zigbee/cc2420 -mdisable-hwmul -Wall -Wshadow
 -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board=
 -DDEFINED_TOS_AM_GROUP=0x22 -Ibuild/telosb
 -DIDENT_APPNAME=\AssociationExam\ -DIDENT_USERNAME=\EIT\
 -DIDENT_HOSTNAME=\wsn\ -DIDENT_USERHASH=0xa200ffadL
 -DIDENT_TIMESTAMP=0x4a8b6ac2L -DIDENT_UIDHASH=0x00f400b1L -DDELUGE
 -I/opt/tinyos-2.x/tos/lib/net -I/opt/tinyos-2.x/tos/lib/net/drip
 -I/opt/tinyos-2.x/tos/lib/net/Deluge
 -I/opt/tinyos-2.x/tos/lib/net/Deluge/FlashVolumeManager
 -I/opt/tinyos-2.x/to!

 s/lib/net/Deluge/BlockStorageManager
 -I/opt/tinyos-2.x/tos/lib/net/Deluge/extra
 -I/opt/tinyos-2.x/tos/lib/net/Deluge/extra/msp430
 -I/opt/tinyos-2.x/tos/lib/net/Deluge/extra/telos
 -I/opt/tinyos-2.x/tos/lib/net/Deluge/extra/telosb
 -Wl,--section-start=.text=0x4a00,--defsym=_reset_vector__=0x4000
 -DCC2420_DEF_RFPOWER=1  AssociationExample.nc -lm

 In component `CC2420CsmaC':
 /opt/tinyos-2.x/tos/chips/cc2420/csma/CC2420CsmaC.nc:64: no match
 /opt/tinyos-2.x/tos/chips/cc2420/csma/CC2420CsmaC.nc:65: no match
 /opt/tinyos-2.x/tos/chips/cc2420/csma/CC2420CsmaC.nc:68: no match


 The relevant lines from CC2420CsmaC.nc are:

64CsmaP.CC2420Transmit - CC2420TransmitC;
65CsmaP.SubBackoff - CC2420TransmitC;

 From what I see the zigbee is overwriting the CC2420TransmitC.nc and
 CC2420TransmitP.nc with new versions in tos/lib/net/zigbee/cc2420. The new
 CC2420TransmitC seems to provides a Sendframe interface instead of Send
 interface. I don't much about these code so I don't know why there is this
 mismatch. The guys working in the zigbee stack might be able to provide more
 help:

http://www.hurray.isep.ipp.pt/activities/ZigBee_WG/

 All the best!
 Razvan ME

 /opt/tinyos-2.x/tos/chips/cc2420/lpl/DummyLplC.nc:39:2: warning: #warning
 *** LOW POWER COMMUNICATIONS DISABLED ***
 /opt/tinyos-2.x/tos/chips/msp430/adc12/Msp430Adc12ImplP.nc:66:2: warning:
 #warning Accessing TimerA for ADC12
 make: *** [exe0] Error 1

 Regards,
 Bai


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

Re: [Tinyos-help] strange deluge errors

2009-09-02 Thread BAI LI
Hi,

So currently I can have Zigbee and Deluge both working separately. However i
tried to add Deluge compoent to my Zigbee application then the errors poped
up. Is there a way that I can get a makefile to compile two separate folders
but the program will work as one application. I am nto very familiar with
how to use makefiels. Can someone help me out please? Thanks in advance.

Regards,
Bai
On Wed, Aug 19, 2009 at 2:20 PM, Razvan Musaloiu-E. razv...@cs.jhu.eduwrote:

 Hi!

 On Wed, 19 Aug 2009, BAI LI wrote:

 Hi,

 I am testing the zigbee files under tinyos 2.x directory and tried to get
 deluge working as well. I got the following errors after I added
 components
 DelugeC; in AssociationExample.nc and BOOTLOADER=tosboot in Makefile. I
 have also copied volumes-stm25p.xml in the AssociationExample folder.
 Could
 anyone tell me what is wrong with the files please (Line 64, 65 and 68)?


 I'm not sure in what state is this AssociationExample. On the latest CVS
 the compilation fails with the error:

AssociationExampleM.nc:7:24: error: printfUART.h: No such file or
 directory

  Thanks.

 e...@wsn /opt/tinyos-2.x/tos/lib/net/zigbee/apps/AssociationExample
 $ make telosb
 mkdir -p build/telosb
 tos-storage-stm25p  /opt/tinyos-2.x/tos/platforms/telosb
 volumes-stm25p.xml

 build/telosb/StorageVolumes.h || rm -f build/telosb/StorageVolumes.h

   compiling AssociationExample to a telosb binary
 ncc -o build/telosb/main.exe  -Os -O
 -I/opt/tinyos-2.x/tos/lib/net/zigbee/ieee80 2154/includes
 -I/opt/tinyos-2.x/tos/lib/net/zigbee/ieee802154/mac
 -I/opt/tinyos-2.x/tos/lib/net/zigbee/ieee802154/phy
 -I/opt/tinyos-2.x/tos/lib/net/zigbee/ieee802154/timerasync
 -I/opt/tinyos-2.x/tos/lib/net/zigbee/ieee802154/interfaces
 -I/opt/tinyos-2.x/tos/lib/net/zigbee/ieee802154/interfaces/mac
 -I/opt/tinyos-2.x/tos/lib/net/zigbee/ieee802154/interfaces/phy
 -I/opt/tinyos-2.x/tos/lib/net/zigbee/cc2420 -mdisable-hwmul -Wall -Wshadow
 -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board=
 -DDEFINED_TOS_AM_GROUP=0x22 -Ibuild/telosb
 -DIDENT_APPNAME=\AssociationExam\ -DIDENT_USERNAME=\EIT\
 -DIDENT_HOSTNAME=\wsn\ -DIDENT_USERHASH=0xa200ffadL
 -DIDENT_TIMESTAMP=0x4a8b6ac2L -DIDENT_UIDHASH=0x00f400b1L -DDELUGE
 -I/opt/tinyos-2.x/tos/lib/net -I/opt/tinyos-2.x/tos/lib/net/drip
 -I/opt/tinyos-2.x/tos/lib/net/Deluge
 -I/opt/tinyos-2.x/tos/lib/net/Deluge/FlashVolumeManager
 -I/opt/tinyos-2.x/to!

 s/lib/net/Deluge/BlockStorageManager
 -I/opt/tinyos-2.x/tos/lib/net/Deluge/extra
 -I/opt/tinyos-2.x/tos/lib/net/Deluge/extra/msp430
 -I/opt/tinyos-2.x/tos/lib/net/Deluge/extra/telos
 -I/opt/tinyos-2.x/tos/lib/net/Deluge/extra/telosb
 -Wl,--section-start=.text=0x4a00,--defsym=_reset_vector__=0x4000
 -DCC2420_DEF_RFPOWER=1  AssociationExample.nc -lm

 In component `CC2420CsmaC':
 /opt/tinyos-2.x/tos/chips/cc2420/csma/CC2420CsmaC.nc:64: no match
 /opt/tinyos-2.x/tos/chips/cc2420/csma/CC2420CsmaC.nc:65: no match
 /opt/tinyos-2.x/tos/chips/cc2420/csma/CC2420CsmaC.nc:68: no match


 The relevant lines from CC2420CsmaC.nc are:

64CsmaP.CC2420Transmit - CC2420TransmitC;
65CsmaP.SubBackoff - CC2420TransmitC;

 From what I see the zigbee is overwriting the CC2420TransmitC.nc and
 CC2420TransmitP.nc with new versions in tos/lib/net/zigbee/cc2420. The new
 CC2420TransmitC seems to provides a Sendframe interface instead of Send
 interface. I don't much about these code so I don't know why there is this
 mismatch. The guys working in the zigbee stack might be able to provide more
 help:

http://www.hurray.isep.ipp.pt/activities/ZigBee_WG/

 All the best!
 Razvan ME

 /opt/tinyos-2.x/tos/chips/cc2420/lpl/DummyLplC.nc:39:2: warning: #warning
 *** LOW POWER COMMUNICATIONS DISABLED ***
 /opt/tinyos-2.x/tos/chips/msp430/adc12/Msp430Adc12ImplP.nc:66:2: warning:
 #warning Accessing TimerA for ADC12
 make: *** [exe0] Error 1

 Regards,
 Bai


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

[Tinyos-help] strange deluge errors

2009-08-18 Thread BAI LI
Hi,

I am testing the zigbee files under tinyos 2.x directory and tried to get
deluge working as well. I got the following errors after I added components
DelugeC; in AssociationExample.nc and BOOTLOADER=tosboot in Makefile. I
have also copied volumes-stm25p.xml in the AssociationExample folder. Could
anyone tell me what is wrong with the files please (Line 64, 65 and 68)?
Thanks.

e...@wsn /opt/tinyos-2.x/tos/lib/net/zigbee/apps/AssociationExample
$ make telosb
mkdir -p build/telosb
tos-storage-stm25p  /opt/tinyos-2.x/tos/platforms/telosb volumes-stm25p.xml
bu
ild/telosb/StorageVolumes.h || rm -f build/telosb/StorageVolumes.h
compiling AssociationExample to a telosb binary
ncc -o build/telosb/main.exe  -Os -O
-I/opt/tinyos-2.x/tos/lib/net/zigbee/ieee80
2154/includes -I/opt/tinyos-2.x/tos/lib/net/zigbee/ieee802154/mac
-I/opt/tinyos-
2.x/tos/lib/net/zigbee/ieee802154/phy
-I/opt/tinyos-2.x/tos/lib/net/zigbee/ieee8
02154/timerasync -I/opt/tinyos-2.x/tos/lib/net/zigbee/ieee802154/interfaces
-I/o
pt/tinyos-2.x/tos/lib/net/zigbee/ieee802154/interfaces/mac
-I/opt/tinyos-2.x/tos
/lib/net/zigbee/ieee802154/interfaces/phy
-I/opt/tinyos-2.x/tos/lib/net/zigbee/c
c2420 -mdisable-hwmul -Wall -Wshadow -Wnesc-all -target=telosb
-fnesc-cfile=buil
d/telosb/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22 -Ibuild/telosb
-DIDENT_APPNAM
E=\AssociationExam\ -DIDENT_USERNAME=\EIT\ -DIDENT_HOSTNAME=\wsn\
-DIDENT_
USERHASH=0xa200ffadL -DIDENT_TIMESTAMP=0x4a8b6ac2L
-DIDENT_UIDHASH=0x00f400b1L -
DDELUGE -I/opt/tinyos-2.x/tos/lib/net -I/opt/tinyos-2.x/tos/lib/net/drip
-I/opt/
tinyos-2.x/tos/lib/net/Deluge
-I/opt/tinyos-2.x/tos/lib/net/Deluge/FlashVolumeMa
nager -I/opt/tinyos-2.x/tos/lib/net/Deluge/BlockStorageManager
-I/opt/tinyos-2.x
/tos/lib/net/Deluge/extra -I/opt/tinyos-2.x/tos/lib/net/Deluge/extra/msp430
-I/o
pt/tinyos-2.x/tos/lib/net/Deluge/extra/telos
-I/opt/tinyos-2.x/tos/lib/net/Delug
e/extra/telosb
-Wl,--section-start=.text=0x4a00,--defsym=_reset_vector__=0x4000
-DCC2420_DEF_RFPOWER=1  AssociationExample.nc -lm
In component `CC2420CsmaC':
/opt/tinyos-2.x/tos/chips/cc2420/csma/CC2420CsmaC.nc:64: no match
/opt/tinyos-2.x/tos/chips/cc2420/csma/CC2420CsmaC.nc:65: no match
/opt/tinyos-2.x/tos/chips/cc2420/csma/CC2420CsmaC.nc:68: no match
/opt/tinyos-2.x/tos/chips/cc2420/lpl/DummyLplC.nc:39:2: warning: #warning
*** L
OW POWER COMMUNICATIONS DISABLED ***
/opt/tinyos-2.x/tos/chips/msp430/adc12/Msp430Adc12ImplP.nc:66:2: warning:
#warni
ng Accessing TimerA for ADC12
make: *** [exe0] Error 1

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] set the RFpower level in TinyOS 2.1

2009-07-01 Thread BAI LI
Hi,

Thanks for your reply. At the beginning, I thought they must have one
similar interface like in TinyOS1.x. But I guess I was wrong. I wonder how
other people set the RF power level in TinyOS 2.x.

Regards,
Bai

On Wed, Jul 1, 2009 at 3:19 AM, Michael Schippling sc...@santafe.eduwrote:

 Sorry, I'm a luddite. I should think that there is a similar
 interface in T2. Did you try searching for SetRFPower and
 such like?

 MS


 BAI LI wrote:

 Hi,
  Thanks for your reply. But sorry for the confusion. I mean how to do it
 in TinyOS2.1 not TinyOS1.x. Thanks.
  Regards,
 Bai

 On Tue, Jun 30, 2009 at 2:41 AM, Michael Schippling 
 sc...@santafe.edumailto:
 sc...@santafe.edu wrote:

 From tos/interfaces/CC2420Control.nc:

 /**
  * Set the transmit RF power value.
  * The input value is simply an arbitrary
  * index that is programmed into the CC2420 registers.
  * The output power is set by programming the power amplifier.
  * Valid values are 1 through 31 with power of 1 equal to
  * -25dBm and 31 equal to max power (0dBm)
  *
  * @param power A power index between 1 and 31
  *
  * @result SUCCESS if the radio power was adequately set.
  *
  */
 command result_t SetRFPower(uint8_t power);
MS


BAI LI wrote:

Hi,
 I went through some posts in the list and most of them talked
about how to set the RF power in tinyOX 1.x. I am just wondering
if anyone knows how to set the RF power level dynamically in the
code instead of adding some flag in the makefile? I know in 1.x,
i have to use CC2420Control interface. Thanks in advance.
 Regards,
Bai



  

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
mailto: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

[Tinyos-help] set the RFpower level in TinyOS 2.1

2009-06-29 Thread BAI LI
Hi,

I went through some posts in the list and most of them talked about how to
set the RF power in tinyOX 1.x. I am just wondering if anyone knows how to
set the RF power level dynamically in the code instead of adding some flag
in the makefile? I know in 1.x, i have to use CC2420Control
interface. Thanks in advance.

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] set the RFpower level in TinyOS 2.1

2009-06-29 Thread BAI LI
Hi,

Thanks for your reply. But sorry for the confusion. I mean how to do it in
TinyOS2.1 not TinyOS1.x. Thanks.

Regards,
Bai

On Tue, Jun 30, 2009 at 2:41 AM, Michael Schippling sc...@santafe.eduwrote:

 From tos/interfaces/CC2420Control.nc:

  /**
   * Set the transmit RF power value.
   * The input value is simply an arbitrary
   * index that is programmed into the CC2420 registers.
   * The output power is set by programming the power amplifier.
   * Valid values are 1 through 31 with power of 1 equal to
   * -25dBm and 31 equal to max power (0dBm)
   *
   * @param power A power index between 1 and 31
   *
   * @result SUCCESS if the radio power was adequately set.
   *
   */
  command result_t SetRFPower(uint8_t power);

 MS


 BAI LI wrote:

  Hi,
  I went through some posts in the list and most of them talked about how
 to set the RF power in tinyOX 1.x. I am just wondering if anyone knows how
 to set the RF power level dynamically in the code instead of adding some
 flag in the makefile? I know in 1.x, i have to use CC2420Control interface.
 Thanks in advance.
  Regards,
 Bai


 

 ___
 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

[Tinyos-help] install program on multiple nodes

2009-06-22 Thread BAI LI
Hi,

Every time, I install the application on nodes and I have to do it one by
one. Or I can use deluge to spread application image to the rest of nodes. I
am just wondering if it is possible to install one program on several nodes
through usb hub? Anyone done that before? Should I write up a script in
order to implement that. It is really hard and waste of time  if we have a
large network to test. Thanks.

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] understanding of Timers in TinyOS

2009-04-17 Thread BAI LI
Hi Michael,
Thanks for your reply. I noticed in TEP102. It says:

startPeriodic(dt)cancel any previously running timer and set to fire in dt
time units from the time of invocation. The timer will fire periodically
every dt time units until stopped.startOneShot(dt)cancel any previously
running timer and set to fire in dt time units from the time of invocation.
The timer will only fire once then stop.
But it is TinyOS2.x. I am using TinyOS1.x. Don't these rules apply to the
timer structure in TinyOS1.x? You said it will be overlapping timers. In
that case, I suppose running another timer doesn't cancel any previous
running timers. Right?

And also It says previous running timers, If the program is executing the
code inside the timer.fired, Will that interrupt the code execution and jump
out of timer function? Thanks.

Regards,
Peter

On Sat, Apr 18, 2009 at 2:13 AM, Michael Schippling sc...@santafe.eduwrote:

 I believe the first timer2 fire will be at 12000,
 since it gets started on the first 2000 REPEAT fire.
 However at that point timer1 will also fire and
 you will start getting overlapping events as both
 timers will effectively be on 2000 REPEAT cycles.

 MS

 BAI LI wrote:

 Hi,
  I am confused about the timer strucuture. someone could clarify it for
 me? Thanks.
  In the following code,
 
 call Timer1.start(TIMER_REPEAT,2000);
  event result_t Timer.fired(){
  call Timer2.start(TIMER_ONE_SHOT,1);
 }
 ***
 so the timer1 is triggered every 2000 time units. However, in the timer1
 strucuture, I have timer2 which will be triggered at 1 time units. What
 is the order to proceed the above code. like the following?
  trigger timer1 at 2000
 trigger timer1 at 4000
 trigger timer1 at 6000
 trigger timer1 at 8000
 trigger timer1 at 1
 trigger timer2 at 1?
  Any help would be appreciated!
  Regards,
 Peter


 

 ___
 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

[Tinyos-help] understanding of Timers in TinyOS

2009-04-16 Thread BAI LI
Hi,

I am confused about the timer strucuture. someone could clarify it for me?
Thanks.

In the following code,

call Timer1.start(TIMER_REPEAT,2000);

event result_t Timer.fired(){
  call Timer2.start(TIMER_ONE_SHOT,1);
}
***
so the timer1 is triggered every 2000 time units. However, in the timer1
strucuture, I have timer2 which will be triggered at 1 time units. What
is the order to proceed the above code. like the following?

trigger timer1 at 2000
trigger timer1 at 4000
trigger timer1 at 6000
trigger timer1 at 8000
trigger timer1 at 1
trigger timer2 at 1?

Any help would be appreciated!

Regards,
Peter
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] call for developers

2009-03-17 Thread BAI LI
Hi All,

Sorry for this inproper ad. I am currently doing a DSD funded project about
security mechanism in Melbourne, Australia. Is there any other sensor
network developer in Australia who is interested in this project? If so,
Could you send me a message and discuss with me further please? Thanks in
advance.

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

Re: [Tinyos-help] new tinyviz plugin (Ervis Velika)

2009-03-16 Thread BAI LI
I think you are looking for this:
http://tinyos.cvs.sourceforge.net/*checkout*/tinyos/tinyos-2.x-contrib/contrib.html
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] wiring VirtualizeTimerC component

2009-03-11 Thread BAI LI
Hi,

Can anyone tell me how to use VirtualizeTimerC component instead of
TimerMilliC? I have done sth like the folllowings: I am trying to set up
three timers

*Configuration file:*

components App;
components new VirtualizeTimerC(TMilli,3) as Timer0;
App.Timer0 - Timer0;

*Application file:*
module App {
  uses interface Boot;
  uses interface TimerTMilli as Timer0[3];
}
implementation {
  event void Boot.booted() {
call AMControl.start();
  }

  event void AMControl.startDone(error_t err) {
call Timer0.startOneShot[0](1000);
  }

  event void Timer0.fired[0](){
  }
}

Is this the right way to use this components? I have been trying for a while
but it didn't work out. I think it didn't wire properly. Can anyone help me
out? Thanks in advance.

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

Re: [Tinyos-help] wiring VirtualizeTimerC component

2009-03-11 Thread BAI LI
Anyone can help me out?

On Wed, Mar 11, 2009 at 6:08 PM, BAI LI libai0...@gmail.com wrote:

 Hi,

 Can anyone tell me how to use VirtualizeTimerC component instead of
 TimerMilliC? I have done sth like the folllowings: I am trying to set up
 three timers

 *Configuration file:*

 components App;
 components new VirtualizeTimerC(TMilli,3) as Timer0;
 App.Timer0 - Timer0;

 *Application file:*
 module App {
   uses interface Boot;
   uses interface TimerTMilli as Timer0[3];
 }
 implementation {
   event void Boot.booted() {
 call AMControl.start();
   }

   event void AMControl.startDone(error_t err) {
 call Timer0.startOneShot[0](1000);
   }

   event void Timer0.fired[0](){
   }
 }

 Is this the right way to use this components? I have been trying for a
 while but it didn't work out. I think it didn't wire properly. Can anyone
 help me out? Thanks in advance.

 Regards
 Pete

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

[Tinyos-help] HplMsp430UsartInterrupts problems

2009-03-11 Thread BAI LI
Dear Jan amd TinyOS community,

I am working on the hash message transmission part of the Australia
government funded project. However I experienced some odd probelms related
to the interfaces you developed. Could you help me out what is wrong? I
can't see any problems. It could be something wrong with the interface you
designed. Thanks.

If anyone can help me out, it will be really appreciated.

Here is the code: in the main file.

#include Timer.h
#include printf.h
#include sha1.h
module App {
  uses interface Boot;
  uses interface Leds;
  uses interface TimerTMilli as Timer0;
  uses interface Packet;
  uses interface AMPacket;
  uses interface AMSend;
  uses interface Receive;
  uses interface SplitControl as AMControl;
  uses interface sha1;
  uses interface LocalTimeTMilli;
}
implementation {
  uint8_t sha1sum[20];

  //uint64_t cmd=0x;   //R XOR S=m


  uint32_t destinationMote=0x0002;
  uint8_t message[8]={0};
  uint8_t length=8;
  message_t pkt;
  SHA1Context ctx;
  SHA1Context temp;
  bool busy = FALSE;
  uint8_t msg1=0;

  event void Boot.booted() {
call AMControl.start();
  }
  event void AMControl.startDone(error_t err) {

 if (err == SUCCESS) {


  call Timer0.startOneShot(2000);
}
else {
  call AMControl.start();
}
  }
  event void AMControl.stopDone(error_t err) {
  }
  event void Timer0.fired() {
uint64_t R=0x;   //R XOR S=m
  uint64_t S=0x1234567890ABCDEF;
uint64_t M=0x;
  uint64_t m=0x;
 int i;
//uint64_t hash;
 call Leds.led1On();
 R=call LocalTime.get();
 m=R^S^M;
 for(i=0;i8;i++){
  message[i]=(uint8_t)(m0x00ff);
  m=8;
 }
 //printf(m= %lx \n,m);
 //printfflush();
 //*message=abc;
 call sha1.reset(ctx);
call sha1.update(ctx, message,length);
 call sha1.digest(ctx, sha1sum);

 if(TOS_NODE_ID==0x0001){
if (!busy) {
  HashMsg* hmpkt =
 (HashMsg*)(call Packet.getPayload(pkt, sizeof(HashMsg)));
  if (hmpkt == NULL) {
 return;
  }
   hmpkt-flag=1;
  hmpkt-nodeid = TOS_NODE_ID;
  hmpkt-payload_MD1 = ctx.Intermediate_Hash[0];
   hmpkt-payload_MD2 = ctx.Intermediate_Hash[1];
   hmpkt-payload_MD3 = ctx.Intermediate_Hash[2];
   hmpkt-payload_MD4 = ctx.Intermediate_Hash[3];
   hmpkt-payload_MD5 = ctx.Intermediate_Hash[4];
   hmpkt-payload_M=M;
   hmpkt-payload_R=R;
   if (call AMSend.send(destinationMote,
  pkt, sizeof(HashMsg)) == SUCCESS) {
  //call Leds.led0On();
busy = TRUE;
  }
}
 }
  }


  event void AMSend.sendDone(message_t* msg, error_t err) {
if (pkt == msg) {
  busy = FALSE;
}
  }
  event message_t* Receive.receive(message_t* msg, void* payload, uint8_t
len){
uint32_t receivedMD[5]={0};
 uint64_t receivedR=0;
 uint64_t receivedM=0;
 uint64_t receivedm=0;
 uint64_t receivedS=0x1234567890ABCDEF;
 int i;

 HashMsg* hmpkt = (HashMsg*)payload;

 receivedMD[0]=hmpkt-payload_MD1;
 receivedMD[1]=hmpkt-payload_MD2;
 receivedMD[2]=hmpkt-payload_MD3;
 receivedMD[3]=hmpkt-payload_MD4;
 receivedMD[4]=hmpkt-payload_MD5;
 receivedR=hmpkt-payload_R;
 receivedM=hmpkt-payload_M;
receivedm=receivedR^receivedM^receivedS;

 for(i=0;i8;i++){ //if I
removed this FOR part, i can compile it.
  message[i]=(uint8_t)(receivedm0x00ff);
  receivedm=8;
 }

 call sha1.reset(temp);
 call sha1.update(temp, message,length);
 call sha1.digest(temp, sha1sum);
 call Leds.led1On();

return msg;
  }


}

If I removed the red highlight part, I can compile it otherwise I got the
errors as follows:

/opt/tinyos-2.x/tos/chips/msp430/usart/HplMsp430UsartInterrupts.nc: In
function
`App$Receive$receive':
/opt/tinyos-2.x/tos/chips/msp430/usart/HplMsp430UsartInterrupts.nc:49:
internal
error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://gcc.gnu.org/bugs.html http://gcc.gnu.org/bugs.html for
instructions.
make: *** [exe0] Error 1


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

Re: [Tinyos-help] [SPAM: 4.000] HplMsp430UsartInterrupts problems

2009-03-11 Thread BAI LI
Hi,

Thanks for your reply. It said how to fix it as follows

Here is a trivial patch:
--- gcc-3.2.3/gcc/config/msp430/msp430.c2007-08-28
11:07:50.0 +0200
+++ gcc-3.2.3patched/gcc/config/msp430/msp430.c 2007-08-28
11:19:17.0 +0200
@@ -5414,11 +5414,11 @@
  dummy += 6;
  OUT_INSN (len, clr\t%B0, operands);
  OUT_INSN (len, clr\t%C0, operands);
  OUT_INSN (len, clr\t%D0, operands);

-  if (GET_CODE (operands[0]) == REG)
+  if ((GET_CODE (operands[0]) == REG)  len)
*len -= 3;

  if (len)
*len = dummy;
But Where am i supposed to find this msp430.c file. I have searched this
entire directory. But It didn't pop up. Thanks.

Regarsd,
Bai

On Thu, Mar 12, 2009 at 3:42 PM, Allan McInnes 
allan.mcin...@canterbury.ac.nz wrote:

 The error you are seeing is a problem with mspgcc, not with Jan's code. You
 can find a discussion of the bug and suggestions for a bugfix at
 https://www.millennium.berkeley.edu/pipermail/tinyos-help/2007-August/027578.html
 Cheers,
 Allan


   On 12/03/2009, at 4:27 PM, BAI LI wrote:

   Dear Jan amd TinyOS community,

 I am working on the hash message transmission part of the Australia
 government funded project. However I experienced some odd probelms related
 to the interfaces you developed. Could you help me out what is wrong? I
 can't see any problems. It could be something wrong with the interface you
 designed. Thanks.

 If anyone can help me out, it will be really appreciated.

 Here is the code: in the main file.

 #include Timer.h
 #include printf.h
 #include sha1.h
 module App {
   uses interface Boot;
   uses interface Leds;
   uses interface TimerTMilli as Timer0;
   uses interface Packet;
   uses interface AMPacket;
   uses interface AMSend;
   uses interface Receive;
   uses interface SplitControl as AMControl;
   uses interface sha1;
   uses interface LocalTimeTMilli;
 }
 implementation {
   uint8_t sha1sum[20];

   //uint64_t cmd=0x;   //R XOR S=m


   uint32_t destinationMote=0x0002;
   uint8_t message[8]={0};
   uint8_t length=8;
   message_t pkt;
   SHA1Context ctx;
   SHA1Context temp;
   bool busy = FALSE;
   uint8_t msg1=0;

   event void Boot.booted() {
 call AMControl.start();
   }
   event void AMControl.startDone(error_t err) {

  if (err == SUCCESS) {


   call Timer0.startOneShot(2000);
 }
 else {
   call AMControl.start();
 }
   }
   event void AMControl.stopDone(error_t err) {
   }
   event void Timer0.fired() {
 uint64_t R=0x;   //R XOR S=m
   uint64_t S=0x1234567890ABCDEF;
 uint64_t M=0x;
   uint64_t m=0x;
  int i;
 //uint64_t hash;
  call Leds.led1On();
  R=call LocalTime.get();
  m=R^S^M;
  for(i=0;i8;i++){
   message[i]=(uint8_t)(m0x00ff);
   m=8;
  }
  //printf(m= %lx \n,m);
  //printfflush();
  //*message=abc;
  call sha1.reset(ctx);
 call sha1.update(ctx, message,length);
  call sha1.digest(ctx, sha1sum);

  if(TOS_NODE_ID==0x0001){
 if (!busy) {
   HashMsg* hmpkt =
  (HashMsg*)(call Packet.getPayload(pkt, sizeof(HashMsg)));
   if (hmpkt == NULL) {
  return;
   }
hmpkt-flag=1;
   hmpkt-nodeid = TOS_NODE_ID;
   hmpkt-payload_MD1 = ctx.Intermediate_Hash[0];
hmpkt-payload_MD2 = ctx.Intermediate_Hash[1];
hmpkt-payload_MD3 = ctx.Intermediate_Hash[2];
hmpkt-payload_MD4 = ctx.Intermediate_Hash[3];
hmpkt-payload_MD5 = ctx.Intermediate_Hash[4];
hmpkt-payload_M=M;
hmpkt-payload_R=R;
if (call AMSend.send(destinationMote,
   pkt, sizeof(HashMsg)) == SUCCESS) {
   //call Leds.led0On();
 busy = TRUE;
   }
 }
  }
   }


   event void AMSend.sendDone(message_t* msg, error_t err) {
 if (pkt == msg) {
   busy = FALSE;
 }
   }
   event message_t* Receive.receive(message_t* msg, void* payload, uint8_t
 len){
 uint32_t receivedMD[5]={0};
  uint64_t receivedR=0;
  uint64_t receivedM=0;
  uint64_t receivedm=0;
  uint64_t receivedS=0x1234567890ABCDEF;
  int i;

  HashMsg* hmpkt = (HashMsg*)payload;

  receivedMD[0]=hmpkt-payload_MD1;
  receivedMD[1]=hmpkt-payload_MD2;
  receivedMD[2]=hmpkt-payload_MD3;
  receivedMD[3]=hmpkt-payload_MD4;
  receivedMD[4]=hmpkt-payload_MD5;
  receivedR=hmpkt-payload_R;
  receivedM=hmpkt-payload_M;
 receivedm=receivedR^receivedM^receivedS;

  for(i=0;i8;i++){ //if I
 removed this FOR part, i can compile it.
   message[i]=(uint8_t)(receivedm0x00ff);
   receivedm=8;
  }

  call sha1.reset(temp);
  call sha1.update(temp, message,length);
  call sha1.digest(temp, sha1sum);
  call Leds.led1On();

 return msg;
   }


 }

 If I removed the red highlight part, I can compile it otherwise I got the
 errors as follows:

 /opt/tinyos-2.x/tos/chips/msp430/usart/HplMsp430UsartInterrupts.nc: In
 function
 `App$Receive$receive':
 /opt/tinyos-2.x/tos/chips/msp430/usart/HplMsp430UsartInterrupts.nc:49:
 internal
 error: Segmentation fault
 Please submit a full bug

[Tinyos-help] passing array in command

2009-03-08 Thread BAI LI
Hi,

I know it may sound like a very simple problem but I am totally confused.

I have an array here:

uint8_t array[4]={0x11,0x22,0x33,0x44};

when I pass this array in the command I called. I got some warning. I can't
understand it.

call abc(x[4]);

I got the warning:

warning: passing argument 2 of `abc' makes pointer from integer without a
cast

However if i use

call command(x);

Nothing wrong when i compiled it.

Could anyone tell me what is the problem? Is it kinda of NesC grammer I
didn't notice? Thanks in advance.

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] passing array in command

2009-03-08 Thread BAI LI
Hi,

sorry I was trying to make the code easy understanding. The code is like the
following. I am trying to manipulating some hash code.
I didn't use the point structure for array x[];

sha1.h file=
typedef struct SHA1Context
{
uint32_t Message_Digest[5]; /* Message Digest (output)  */
uint32_t Length_Low;/* Message length in bits   */
uint32_t Length_High;   /* Message length in bits   */
unsigned char Message_Block[64]; /* 512-bit message blocks  */
int Message_Block_Index;/* Index into message block array   */
int Computed;   /* Is the digest computed?  */
int Corrupted;  /* Is the message digest corruped?  */
} SHA1Context;

===testSha1C.nc main program===
#include sha1.h

implementation
{
  SHA1Context sha;
  int i;
  uint8_t x[4]={0x11,0x22,0x33,0x44};

  event void Boot.booted() {
//power up the cc2420 chip
call Sha1Control.start();
 call Timer.startOneShot(1);
  }
  event void Timer.fired()
  {

 call Sha1.resetSHA1(sha);
 call Sha1.setSHA1Input(sha, x, 4);
}

command defination=
command void Sha1.setSHA1Input(SHA1Context *context,uint8_t
message_array[4],unsigned length)
{
uint32_t time;
 int i=0;
 if (!length)
{
return;
  // return;
}
 printf(setSHA1Input);
if (context-Computed || context-Corrupted)
{
context-Corrupted = 1;
return;
}
while(length--  !context-Corrupted  i4)
{
context-Message_Block[context-Message_Block_Index++] =
(message_array[i]  0xFF);
context-Length_Low += 8;
/* Force it to 32 bits */
context-Length_Low = 0x;
if (context-Length_Low == 0)
{
context-Length_High++;
/* Force it to 32 bits */
context-Length_High = 0x;
if (context-Length_High == 0)
{
/* Message is too long */
context-Corrupted = 1;
}
}
if (context-Message_Block_Index == 64)
{
call Sha1.setSHA1ProcessMessageBlock(context);
}
i++;
}

Then I got the warning:
TestSha1C.nc:95: warning: passing argument 2 of `Sha1.setSHA1Input' makes
pointe
r from integer without a cast
On Mon, Mar 9, 2009 at 11:57 AM, Roy Shea roys...@gmail.com wrote:

 Howdy,

  uint8_t array[4]={0x11,0x22,0x33,0x44};
  ...
  call abc(x[4]);
 
  I got the warning:
 
  warning: passing argument 2 of `abc' makes pointer from integer without a
 cast

 Not sure why it is referring to argument 2.  Was the above warning
 produced by the sample code you posted?  The code you listed also looks
 ambiguous to me.  Let me make a few assumptions:

 - The function abc is a function expecting an array of unsigned 8 bit
  integers, so it is a declaration looking like:

  void abc(uint8_t* data);

 - The function command has the same prototype as abc

 - The variable x is the same as the variable array

 I think this is just a problem with how you are using arrays in C.  The
 type of x is a pointer to unsigned 8 bit integers or, as specified in C,
 a uint8_t *.  Using:

 x[4]

 in C causes the fifth element (yes, this an out of bounds accesses!) of
 the array to be dereferenced.  This element will have type uint8_t, so
 the function abc is being given an object of type uint8_t, or an 8-bit
 integer.  Since the function abc expects something of type uint8_t *,
 the compiler warns that it had to convert the integer type into a
 pointer type.

  call command(x);

 In this case the function called command is being given an object of
 type uint8_t *.  Since this is what the function expects, no warning
 is generated.

 If you're rusty on C pointers and arrays, you may want to brush up on
 them.  A search for c array tutorial will bring up lots of hits.

 Peace,
 -Roy

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

Re: [Tinyos-help] passing array in command

2009-03-08 Thread BAI LI
Hi,

Yes, I know.

But in the command defination, I put uint8_t message_array[4], not uint8_t
*message_array as the passing parameter. therefore I am supposed to call the
command with the same type of parameter, but if i use x[4], it pops up that
warning. if I only use x, there is no warning. What is wrong? I didn't use
the array pointer in either command defination or command calling. Then why
warning?

Cheers,
Bai

On Mon, Mar 9, 2009 at 12:19 PM, Allan McInnes 
allan.mcin...@canterbury.ac.nz wrote:

 The argument declaration
  ..., uint8_t message_array[4], ...

  is equivalent to

   ..., uint8_t* message_array, ...

 So comments that Roy and I previously made still apply. You can get more
 info from the C FAQ: http://c-faq.com/aryptr/aryptrparam.html
 Cheers,
 Allan


  On 9/03/2009, at 2:12 PM, BAI LI wrote:

  Hi,

 sorry I was trying to make the code easy understanding. The code is like
 the following. I am trying to manipulating some hash code.
 I didn't use the point structure for array x[];

 sha1.h file=
 typedef struct SHA1Context
 {
 uint32_t Message_Digest[5]; /* Message Digest (output)  */
 uint32_t Length_Low;/* Message length in bits   */
 uint32_t Length_High;   /* Message length in bits   */
 unsigned char Message_Block[64]; /* 512-bit message blocks  */
 int Message_Block_Index;/* Index into message block array   */
 int Computed;   /* Is the digest computed?  */
 int Corrupted;  /* Is the message digest corruped?  */
 } SHA1Context;

 ===testSha1C.nc main program===
 #include sha1.h

 implementation
 {
   SHA1Context sha;
   int i;
   uint8_t x[4]={0x11,0x22,0x33,0x44};

   event void Boot.booted() {
 //power up the cc2420 chip
 call Sha1Control.start();
  call Timer.startOneShot(1);
   }
   event void Timer.fired()
   {

  call Sha1.resetSHA1(sha);
  call Sha1.setSHA1Input(sha, x, 4);
 }

 command defination=
 command void Sha1.setSHA1Input(SHA1Context *context,uint8_t
 message_array[4],unsigned length)
 {
 uint32_t time;
  int i=0;
  if (!length)
 {
 return;
   // return;
 }
  printf(setSHA1Input);
 if (context-Computed || context-Corrupted)
 {
 context-Corrupted = 1;
 return;
 }
 while(length--  !context-Corrupted  i4)
 {
 context-Message_Block[context-Message_Block_Index++] =
 (message_array[i]  0xFF);
 context-Length_Low += 8;
 /* Force it to 32 bits */
 context-Length_Low = 0x;
 if (context-Length_Low == 0)
 {
 context-Length_High++;
 /* Force it to 32 bits */
 context-Length_High = 0x;
 if (context-Length_High == 0)
 {
 /* Message is too long */
 context-Corrupted = 1;
 }
 }
 if (context-Message_Block_Index == 64)
 {
 call Sha1.setSHA1ProcessMessageBlock(context);
 }
 i++;
 }

 Then I got the warning:
 TestSha1C.nc:95: warning: passing argument 2 of `Sha1.setSHA1Input' makes
 pointe
 r from integer without a cast
 On Mon, Mar 9, 2009 at 11:57 AM, Roy Shea roys...@gmail.com wrote:

 Howdy,

  uint8_t array[4]={0x11,0x22,0x33,0x44};
  ...
  call abc(x[4]);
 
  I got the warning:
 
  warning: passing argument 2 of `abc' makes pointer from integer without
 a cast

 Not sure why it is referring to argument 2.  Was the above warning
 produced by the sample code you posted?  The code you listed also looks
 ambiguous to me.  Let me make a few assumptions:

 - The function abc is a function expecting an array of unsigned 8 bit
  integers, so it is a declaration looking like:

  void abc(uint8_t* data);

 - The function command has the same prototype as abc

 - The variable x is the same as the variable array

 I think this is just a problem with how you are using arrays in C.  The
 type of x is a pointer to unsigned 8 bit integers or, as specified in C,
 a uint8_t *.  Using:

 x[4]

 in C causes the fifth element (yes, this an out of bounds accesses!) of
 the array to be dereferenced.  This element will have type uint8_t, so
 the function abc is being given an object of type uint8_t, or an 8-bit
 integer.  Since the function abc expects something of type uint8_t *,
 the compiler warns that it had to convert the integer type into a
 pointer type.

  call command(x);

 In this case the function called command is being given an object of
 type uint8_t *.  Since this is what the function expects, no warning
 is generated.

 If you're rusty on C pointers and arrays, you may want to brush up on
 them.  A search for c array tutorial will bring up lots of hits.

 Peace,
 -Roy




___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https

[Tinyos-help] low level compilation questions

2009-03-08 Thread BAI LI
Hi,

I am just wondering how NesC compiler optimizes the computation for a*a and
a % n. Could you point out some references I can have a look at please?
Thanks in advance.

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] passing array in command

2009-03-08 Thread BAI LI
HI,

Sorry i misunderstood it. It worked now. Thanks for your help.

Regards,
Bai

On Mon, Mar 9, 2009 at 12:28 PM, BAI LI libai0...@gmail.com wrote:

 Hi,

 Yes, I know.

 But in the command defination, I put uint8_t message_array[4], not uint8_t
 *message_array as the passing parameter. therefore I am supposed to call the
 command with the same type of parameter, but if i use x[4], it pops up that
 warning. if I only use x, there is no warning. What is wrong? I didn't use
 the array pointer in either command defination or command calling. Then why
 warning?

 Cheers,
 Bai

   On Mon, Mar 9, 2009 at 12:19 PM, Allan McInnes 
 allan.mcin...@canterbury.ac.nz wrote:

 The argument declaration
  ..., uint8_t message_array[4], ...

  is equivalent to

   ..., uint8_t* message_array, ...

 So comments that Roy and I previously made still apply. You can get more
 info from the C FAQ: http://c-faq.com/aryptr/aryptrparam.html
 Cheers,
 Allan


  On 9/03/2009, at 2:12 PM, BAI LI wrote:

  Hi,

 sorry I was trying to make the code easy understanding. The code is like
 the following. I am trying to manipulating some hash code.
 I didn't use the point structure for array x[];

 sha1.h file=
 typedef struct SHA1Context
 {
 uint32_t Message_Digest[5]; /* Message Digest (output)  */
 uint32_t Length_Low;/* Message length in bits   */
 uint32_t Length_High;   /* Message length in bits   */
 unsigned char Message_Block[64]; /* 512-bit message blocks  */
 int Message_Block_Index;/* Index into message block array   */
 int Computed;   /* Is the digest computed?  */
 int Corrupted;  /* Is the message digest corruped?  */
 } SHA1Context;

 ===testSha1C.nc main program===
 #include sha1.h

 implementation
 {
   SHA1Context sha;
   int i;
   uint8_t x[4]={0x11,0x22,0x33,0x44};

   event void Boot.booted() {
 //power up the cc2420 chip
 call Sha1Control.start();
  call Timer.startOneShot(1);
   }
   event void Timer.fired()
   {

  call Sha1.resetSHA1(sha);
  call Sha1.setSHA1Input(sha, x, 4);
 }

 command defination=
 command void Sha1.setSHA1Input(SHA1Context *context,uint8_t
 message_array[4],unsigned length)
 {
 uint32_t time;
  int i=0;
  if (!length)
 {
 return;
   // return;
 }
  printf(setSHA1Input);
 if (context-Computed || context-Corrupted)
 {
 context-Corrupted = 1;
 return;
 }
 while(length--  !context-Corrupted  i4)
 {
 context-Message_Block[context-Message_Block_Index++] =
 (message_array[i]  0xFF);
 context-Length_Low += 8;
 /* Force it to 32 bits */
 context-Length_Low = 0x;
 if (context-Length_Low == 0)
 {
 context-Length_High++;
 /* Force it to 32 bits */
 context-Length_High = 0x;
 if (context-Length_High == 0)
 {
 /* Message is too long */
 context-Corrupted = 1;
 }
 }
 if (context-Message_Block_Index == 64)
 {
 call Sha1.setSHA1ProcessMessageBlock(context);
 }
 i++;
 }

 Then I got the warning:
 TestSha1C.nc:95: warning: passing argument 2 of `Sha1.setSHA1Input' makes
 pointe
 r from integer without a cast
 On Mon, Mar 9, 2009 at 11:57 AM, Roy Shea roys...@gmail.com wrote:

 Howdy,

  uint8_t array[4]={0x11,0x22,0x33,0x44};
  ...
  call abc(x[4]);
 
  I got the warning:
 
  warning: passing argument 2 of `abc' makes pointer from integer without
 a cast

 Not sure why it is referring to argument 2.  Was the above warning
 produced by the sample code you posted?  The code you listed also looks
 ambiguous to me.  Let me make a few assumptions:

 - The function abc is a function expecting an array of unsigned 8 bit
  integers, so it is a declaration looking like:

  void abc(uint8_t* data);

 - The function command has the same prototype as abc

 - The variable x is the same as the variable array

 I think this is just a problem with how you are using arrays in C.  The
 type of x is a pointer to unsigned 8 bit integers or, as specified in C,
 a uint8_t *.  Using:

 x[4]

 in C causes the fifth element (yes, this an out of bounds accesses!) of
 the array to be dereferenced.  This element will have type uint8_t, so
 the function abc is being given an object of type uint8_t, or an 8-bit
 integer.  Since the function abc expects something of type uint8_t *,
 the compiler warns that it had to convert the integer type into a
 pointer type.

  call command(x);

 In this case the function called command is being given an object of
 type uint8_t *.  Since this is what the function expects, no warning
 is generated.

 If you're rusty on C pointers and arrays, you may want to brush up on
 them.  A search for c array tutorial

Re: [Tinyos-help] odd problem on message_t

2009-03-04 Thread BAI LI
Hi,

Yes. It worked now. Thanks. I forgot the change the cc2420.h file. BUt this
way is much better. Thanks.

Regards,
Bai

On Wed, Mar 4, 2009 at 6:13 PM, Ittipong Khemapech ik.tin...@googlemail.com
 wrote:

 Hi,

 I *didn't* look at your code and I'm not sure about the #define
 TOSH_DATA_LENGTH to 35 in message.h.

 Try add:

 CFLAGS += -DTOSH_DATA_LENGTH=35

 in your Makefile.

 Please let me know how it goes.

 Ittipong

 2009/3/4 BAI LI libai0...@gmail.com

   Hi All,

 I am currenting doing a very simple network test. I designed the message
 structure in .h file and some sending functions in the following.

 typedef nx_struct HashMsg {
   nx_uint16_t nodeid;
   nx_uint8_t flag;
   nx_uint32_t payload_MD1;
   nx_uint32_t payload_MD2;
   nx_uint64_t payload_M;
   nx_uint64_t payload_R;
   nx_uint16_t payload_ID;
 } HashMsg;


 Part of the sending code is as folows:


 event void Timer0.fired() {

  uint16_t destinationMote=0x0002;
 if (!busy) {
   HashMsg* hmpkt =
  (HashMsg*)(call Packet.getPayload(pkt, sizeof(HashMsg)));
   if (hmpkt == NULL) {
  return;
   }
   hmpkt-flag=1;
   hmpkt-nodeid = TOS_NODE_ID;
   hmpkt-payload_MD1 = 0x12345678;
hmpkt-payload_MD2 = 0x90ABCDEF;// disable this line, it will work
hmpkt-payload_M=0x;
hmpkt-payload_R=0x;
hmpkt-payload_ID=0x;
   if (call AMSend.send(destinationMote,
   pkt, sizeof(HashMsg)) == SUCCESS) {
   call Leds.led0On();
 busy = TRUE;
   }
 }

   }

 When the program loads the data to send. The program is dead with one more
 line hmpkt-payload_MD2 = 0x90ABCDEF;. I don't know what the problem is as
 I have changed the #define TOSH_DATA_LENGTH to 35 in message.h which is
 enough to handle the data. However it didn't work still. I suspect that it
 could be message size problem. But I can't work it out. THanks.

 Regards,
 Bai

 ___
 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

[Tinyos-help] zigbee protocol stack

2009-03-03 Thread BAI LI
Hi,

I am just wondering if anyone knows which company sells the zigbee protocol
stack based on tinyos2.x? Thanks in advance.

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] odd problem on message_t

2009-03-03 Thread BAI LI
Hi All,

I am currenting doing a very simple network test. I designed the message
structure in .h file and some sending functions in the following.

typedef nx_struct HashMsg {
  nx_uint16_t nodeid;
  nx_uint8_t flag;
  nx_uint32_t payload_MD1;
  nx_uint32_t payload_MD2;
  nx_uint64_t payload_M;
  nx_uint64_t payload_R;
  nx_uint16_t payload_ID;
} HashMsg;


Part of the sending code is as folows:


event void Timer0.fired() {

 uint16_t destinationMote=0x0002;
if (!busy) {
  HashMsg* hmpkt =
 (HashMsg*)(call Packet.getPayload(pkt, sizeof(HashMsg)));
  if (hmpkt == NULL) {
 return;
  }
  hmpkt-flag=1;
  hmpkt-nodeid = TOS_NODE_ID;
  hmpkt-payload_MD1 = 0x12345678;
   hmpkt-payload_MD2 = 0x90ABCDEF;// disable this line, it will work
   hmpkt-payload_M=0x;
   hmpkt-payload_R=0x;
   hmpkt-payload_ID=0x;
  if (call AMSend.send(destinationMote,
  pkt, sizeof(HashMsg)) == SUCCESS) {
  call Leds.led0On();
busy = TRUE;
  }
}

  }

When the program loads the data to send. The program is dead with one more
line hmpkt-payload_MD2 = 0x90ABCDEF;. I don't know what the problem is as
I have changed the #define TOSH_DATA_LENGTH to 35 in message.h which is
enough to handle the data. However it didn't work still. I suspect that it
could be message size problem. But I can't work it out. THanks.

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] strange problem on compilation

2009-02-26 Thread BAI LI
Hi All,

I just designed a small test for my project to collect the data.

In the .h file, i have a struct like this

typedef nx_struct HashMsg {
  nx_uint16_t nodeid;
  nx_uint8_t flag;
  nx_uint64_t payload_hash;
  nx_uint64_t payload_M;
  nx_uint64_t payload_R;
  nx_uint16_t payload_ID;
} HashMsg;

typedef struct Context
{
 uint64_t hash;
 uint64_t M;
 uint64_t R;
 uint16_t ID;
} Context;



in the test file I disigned the send and receive function.

Context a;

event void Timer0.fired() {
//uint64_t hash;

 uint64_t cmd=0x;
 uint64_t S=0x;




 if(TOS_NODE_ID==0x0001){
   //call Squash.resetSquash(squash);
   call Squash.setSquash(cmd,S);
 if (!busy) {
  HashMsg* hmpkt =
 (HashMsg*)(call Packet.getPayload(pkt, sizeof(HashMsg)));
  if (hmpkt == NULL) {
 return;
  }
  hmpkt-nodeid = TOS_NODE_ID;
   hmpkt-flag = 1;
  hmpkt-payload_hash = 0x;
   hmpkt-payload_M = 0x;// M
hmpkt-payload_R = 0x;// R
   hmpkt-payload_ID = 0x;
  if (call AMSend.send(destinationMote,
  pkt, sizeof(HashMsg)) == SUCCESS) {
  call Leds.led0On();
busy = TRUE;
  }
}


 event message_t* Receive.receive(message_t* msg, void* payload, uint8_t
len){
 if (len == sizeof(HashMsg)) {
  HashMsg* hmpkt = (HashMsg*)payload;
   if(hmpkt-flag==1){
  a.hash=hmpkt-payload_hash;

   }
 }
return msg;
  }

I can't compile it. the error is as follows: it said sth wrong with my
receive.receive event.

$ make telosb
mkdir -p build/telosb
compiling BlinkToRadioAppC to a telosb binary
ncc -o build/telosb/main.exe  -Os -O -mdisable-hwmul -Wall -Wshadow
-Wnesc-all -
target=telosb -fnesc-cfile=build/telosb/app.c -board=
-DDEFINED_TOS_AM_GROUP=0x2
2 -I/opt/tinyos-2.x/tos/lib/printf -DIDENT_APPNAME=\BlinkToRadioApp\
-DIDENT_U
SERNAME=\EIT\ -DIDENT_HOSTNAME=\wsn\ -DIDENT_USERHASH=0xa200ffadL
-DIDENT_TI
MESTAMP=0x49a725ccL -DIDENT_UIDHASH=0x26925cc5L  BlinkToRadioAppC.nc -lm
/opt/tinyos-2.x/tos/chips/cc2420/lpl/DummyLplC.nc:39:2: warning: #warning
*** L
OW POWER COMMUNICATIONS DISABLED ***
/opt/tinyos-2.x/tos/chips/msp430/usart/HplMsp430UsartInterrupts.nc: In
function
`BlinkToRadioC$Receive$receive':
/opt/tinyos-2.x/tos/chips/msp430/usart/HplMsp430UsartInterrupts.nc:49:
internal
error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://gcc.gnu.org/bugs.html http://gcc.gnu.org/bugs.html for
instructions.
make: *** [exe0] Error 1

==

I know it is sth wrong with the struct. If I don't assign the received
message to the struct member as follows. It can be compiled. I am just
wonderig why it could have this kind of problem?

event message_t* Receive.receive(message_t* msg, void* payload, uint8_t
len){
uint64_t hash;//changed

 if (len == sizeof(HashMsg)) {
  HashMsg* hmpkt = (HashMsg*)payload;
   if(hmpkt-flag==1){
  hash=hmpkt-payload_hash;   //changed

  //a.hash=hmpkt-payload_hash;// original

   }

 }
return msg;
  }

==

Anyone can tell me what is the problem? Thanks in advance.
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] rom and ram size

2009-02-19 Thread BAI LI
Hi All,

When you compile the program in TinyOS, it will show you the Rom and Ram
size in the compiling infor. I am just wondering wat factors determine both
rom and ram size. As I developed two hash functions however when i did the
comparison. They don't have much difference on the size of rom and ram. I
would like to polish the program and try to reduce the size of rom and ram.
Can anyone tell me what I should notice when i program? Thanks。

regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] rom and ram size

2009-02-19 Thread BAI LI
Hi,

Thanks for your reply. I did a test on Blink application in TinyOS1.x and
TinyOS2.x. The ROM size of Blink in 1.x is 2000+ bytes while in 2.x is about
8000+ bytes. How come the similar code has such big difference? That is why
I am curious about why the ROM and RAM size is much bigger than in 1.x.

For those objdump and readelf tools, what kind of file format it can
regonize? Is that .o file? Where I can normally file those file in my
application? Is that possible to offer me an example?

Thanks.
Bai

On Fri, Feb 20, 2009 at 9:30 AM, Razvan Musaloiu-E. razv...@cs.jhu.eduwrote:

 Hi!


 On Thu, 19 Feb 2009, BAI LI wrote:

   Hi All,

 When you compile the program in TinyOS, it will show you the Rom and Ram
 size in the compiling infor. I am just wondering wat factors determine
 both
 rom and ram size. As I developed two hash functions however when i did the
 comparison. They don't have much difference on the size of rom and ram. I
 would like to polish the program and try to reduce the size of rom and
 ram.
 Can anyone tell me what I should notice when i program? Thanks.


 In few words ROM includes the code and initialized data and RAM includes
 both initialized and uninitialized data (note that the stack is not
 included).

 Two excellent tools you can use to explore your program are objdump and
 readelf. For telos they have a 'msp430-' prefix in front. For mica family
 the prefix is 'avr-'.

 All the best!
 Razvan ME

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

[Tinyos-help] unable to run testNetwork application

2009-02-11 Thread BAI LI
Hi,

you need to specify your problem then we can help you.

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] help needed on uint64_t type

2009-02-06 Thread BAI LI
Hi,

Thanks for your solution. It is a method. But when you use UNION structure,
every time you only can store one varialbe in that UNION structure. You have
to overwrite that memory address Which made it a bit inconvenience. BUt it
is a good method when you break a 64 bits message into two 32 bits messages
though. Thanks. :)

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] help needed on uint64_t type

2009-02-05 Thread BAI LI
Hi All,

I just tested it. I guess prinf couldn't print 64 bits variables but low 32
btis instead. By moving the  variable 32 bits left, it can print the high 32
bits. such as a32. it made the debugging work a bit harder but still ok.
Anyone kowns how to print the whole variable instead breaking it into two
parts. Let me know. Thanks.

Regards,
Bai

On Thu, Feb 5, 2009 at 5:56 PM, kiseop Lee aco...@gmail.com wrote:

 Hi,
 This is tested in Visual C++ in the Windows. but I don't know it in tinyos
 compiler.
 Only refer to your work...

  char sql[100];

 __int64 var1=0x12345678ABCDABCD;
  sprintf(sql,%I64x,var1);   //not L. Upper case of i[ai]...
 sprintf(sql,%I64d,var1);

 Best regards,
 K.S.Lee

  2009/2/5 BAI LI libai0...@gmail.com

 Hi All,

 I have defined a uint64_t type variable as follows:

 uint64_t a;
 a=0x;
 printf(a= %lld /n,a);
 printf(a= %llx /n,a);

 the result displayed as follows:

 a= -1
 a= 

 The compilation didn't show any error. What is the problem? Does printf
 support to display the uint64_t type? Any help would be appreciated!

 Regards,
 Bai


 ___
 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

Re: [Tinyos-help] help needed on uint64_t type

2009-02-05 Thread BAI LI
Hi Andrey,

I just tested it. it didn't work though. What the flag you used in printf?
Is that llx? Right? It still displayed low 32 bits. Confusing.

Regards,
Bai

On Fri, Feb 6, 2009 at 3:27 AM, Andrey Gursky andrey.gur...@online.uawrote:

 Bai, you should explicit write ULL at the end of the such big number
 (tested in C):
 a=0xULL;

 Best wishes,
 Andrey

  Hi All,

 I have defined a uint64_t type variable as follows:

 uint64_t a;
 a=0x;
 printf(a= %lld /n,a);
 printf(a= %llx /n,a);

 the result displayed as follows:

 a= -1
 a= 

 The compilation didn't show any error. What is the problem? Does printf
 support to display the uint64_t type? Any help would be appreciated!

 Regards,
 Bai



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

Re: [Tinyos-help] Deluge T2 dissemination problem on XubunTOS-2.1.0

2009-02-05 Thread BAI LI
Hi,

I think your second step was not correct. You should not flag the telosb
with base station since your micaz was working as base station now. you can
normally install Goldimage on telosb with an id.

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] help needed on uint64_t type

2009-02-04 Thread BAI LI
Hi All,

I have defined a uint64_t type variable as follows:

uint64_t a;
a=0x;
printf(a= %lld /n,a);
printf(a= %llx /n,a);

the result displayed as follows:

a= -1
a= 

The compilation didn't show any error. What is the problem? Does printf
support to display the uint64_t type? Any help would be appreciated!

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] @safe flag

2009-02-04 Thread BAI LI
Hi All,

I found the code as follows in CounterToLocalTimeC file,

generic module CounterToLocalTimeC(typedef precision_tag) @safe()
{
  provides interface LocalTimeprecision_tag;
  uses interface Counterprecision_tag,uint32_t;
}
implementation
{
  async command uint32_t LocalTime.get()
  {
return call Counter.get();
  }
  async event void Counter.overflow()
  {
  }
}

But I don't understand what the meaning of @safe? Sum1 can explain it to
me? Any help would be appreciated.

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] math.h on Telosb

2009-01-28 Thread BAI LI
Hi,

Thanks for your help. But it still didn't work. I tried sqrtf. It is the
only one which can be compiled without errors. But the result was totally
wrong. So I guess i will give up on the math.h functions. What I can do
instead of using pow or sqrt function is to manipulate the bits.

2^1 -  20   2
2^2 -  21   4
2^3 -  22   8
2^4 -  23   16
2^5 -  24   32
2^6 -  25   64


But I am still interested in why math.h is not working on Telosb. Some
people said it worked on Mica. So I guess it is hardware related problem.
But still, why MSP430 has this math.h file but can't be used. Anyone who
made it can share some experience? Thanks in advance.

Regards,
Bai

On Wed, Jan 28, 2009 at 3:46 PM, Robert Szewczyk szewc...@gmail.com wrote:

 As I recall, the math library on MSP430 supports has a fairly complete
 support for single precision variants of the math functions -- try
 using powf and sqrtf

 Rob

 On Tue, Jan 27, 2009 at 3:24 PM, BAI LI libai0...@gmail.com wrote:
   HI,
 
  I was trying to use math.h file sitting in the MSP folder to run some
 sqrt
  and pow functions. But once I include the file math.h it told me
 undefined
  reference to sqrt and pow. The errors shown in the following:
 
  $ make telosb
  mkdir -p build/telosb
  compiling TestAesAppC to a telosb binary
  ncc -o build/telosb/main.exe  -Os -O -mdisable-hwmul -Wall -Wshadow
  -Wnesc-all -
  target=telosb -fnesc-cfile=build/telosb/app.c -board=
  -DDEFINED_TOS_AM_GROUP=0x2
  2 -DIDENT_APPNAME=\TestAesAppC\ -DIDENT_USERNAME=\EIT\
  -DIDENT_HOSTNAME=\ws
  n\ -DIDENT_USERHASH=0xa200ffadL -DIDENT_TIMESTAMP=0x497fa030L
  -DIDENT_UIDHASH=0
  xb441b921L -I/opt/tinyos-2.x/tos/lib/printf  TestAesAppC.nc -lm
  /opt/tinyos-2.x/tos/chips/cc2420/lpl/DummyLplC.nc:39:2: warning: #warning
  *** L
  OW POWER COMMUNICATIONS DISABLED ***
  /cygdrive/c/DOCUME~1/EIT/LOCALS~1/Temp/cc7jt2Gp.o: In function
  `VirtualizeTimerC
  $0$fireTimers':
  app.c:(.text+0x1494): undefined reference to `pow'
  make: *** [exe0] Error 1
 
  So can anyone help me out? I searched the list. Sum1 said to use lm to
 link
  the math library. How to do it properly? Like make telosb lm? It didnt'
  work. Thanks in advance.
 
  Regards,
  Bai
   ___
  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

[Tinyos-help] math.h on Telosb

2009-01-27 Thread BAI LI
HI,

I was trying to use math.h file sitting in the MSP folder to run some sqrt
and pow functions. But once I include the file math.h it told me undefined
reference to sqrt and pow. The errors shown in the following:

$ make telosb
mkdir -p build/telosb
compiling TestAesAppC to a telosb binary
ncc -o build/telosb/main.exe  -Os -O -mdisable-hwmul -Wall -Wshadow
-Wnesc-all -
target=telosb -fnesc-cfile=build/telosb/app.c -board=
-DDEFINED_TOS_AM_GROUP=0x2
2 -DIDENT_APPNAME=\TestAesAppC\ -DIDENT_USERNAME=\EIT\
-DIDENT_HOSTNAME=\ws
n\ -DIDENT_USERHASH=0xa200ffadL -DIDENT_TIMESTAMP=0x497fa030L
-DIDENT_UIDHASH=0
xb441b921L -I/opt/tinyos-2.x/tos/lib/printf  TestAesAppC.nc -lm
/opt/tinyos-2.x/tos/chips/cc2420/lpl/DummyLplC.nc:39:2: warning: #warning
*** L
OW POWER COMMUNICATIONS DISABLED ***
/cygdrive/c/DOCUME~1/EIT/LOCALS~1/Temp/cc7jt2Gp.o: In function
`VirtualizeTimerC
$0$fireTimers':
app.c:(.text+0x1494): undefined reference to `pow'
make: *** [exe0] Error 1

So can anyone help me out? I searched the list. Sum1 said to use lm to link
the math library. How to do it properly? Like make telosb lm? It didnt'
work. Thanks in advance.

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] how to print out uint64_t type

2009-01-27 Thread BAI LI
Hi,

I just ran a small test by defining a uint64_t type. And I tried to use
printf to print out this variable. But it didn't work. May I konw why? Is
that becasue the Telosb only support 32 bits? But when I define this
uint64_t type, it didn't pop up any error.

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] math.h on Telosb

2009-01-27 Thread BAI LI
Hi Eric,

Thanks. Yes. I agree. sqrt and pow can be implemented by shift the bits
instead. How about MOD? for example, b=a%2. Is any other possible solution
instead of using the functions? Thanks.

Regards,
Bai

On Wed, Jan 28, 2009 at 11:53 AM, Eric Decker cire...@gmail.com wrote:

 I suspect that is because the routines are actually implemented in a
 library. You'll have to poke around and see what libraries are available.

 The normal libgcc.a library provided for the msp430 toolchain doesn't have
 these routines in them.

 eric


   On Tue, Jan 27, 2009 at 3:24 PM, BAI LI libai0...@gmail.com wrote:

   HI,

 I was trying to use math.h file sitting in the MSP folder to run some sqrt
 and pow functions. But once I include the file math.h it told me undefined
 reference to sqrt and pow. The errors shown in the following:

 $ make telosb
 mkdir -p build/telosb
 compiling TestAesAppC to a telosb binary
 ncc -o build/telosb/main.exe  -Os -O -mdisable-hwmul -Wall -Wshadow
 -Wnesc-all -
 target=telosb -fnesc-cfile=build/telosb/app.c -board=
 -DDEFINED_TOS_AM_GROUP=0x2
 2 -DIDENT_APPNAME=\TestAesAppC\ -DIDENT_USERNAME=\EIT\
 -DIDENT_HOSTNAME=\ws
 n\ -DIDENT_USERHASH=0xa200ffadL -DIDENT_TIMESTAMP=0x497fa030L
 -DIDENT_UIDHASH=0
 xb441b921L -I/opt/tinyos-2.x/tos/lib/printf  TestAesAppC.nc -lm
 /opt/tinyos-2.x/tos/chips/cc2420/lpl/DummyLplC.nc:39:2: warning: #warning
 *** L
 OW POWER COMMUNICATIONS DISABLED ***
 /cygdrive/c/DOCUME~1/EIT/LOCALS~1/Temp/cc7jt2Gp.o: In function
 `VirtualizeTimerC
 $0$fireTimers':
 app.c:(.text+0x1494): undefined reference to `pow'
 make: *** [exe0] Error 1

 So can anyone help me out? I searched the list. Sum1 said to use lm to
 link the math library. How to do it properly? Like make telosb lm? It didnt'
 work. Thanks in advance.

 Regards,
 Bai

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




 --
 Eric B. Decker
 Senior (over 50 :-) Researcher
 Autonomous Systems Lab
 Jack Baskin School of Engineering
 UCSC


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

Re: [Tinyos-help] Deluge t2 dessimination problem

2009-01-19 Thread BAI LI
Hi,

The voltage level for reboot can be changed right? Where can I  find the
file defined and change it? Thanks

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] main.exe and ihex file questions

2008-12-29 Thread BAI LI
Hi All,

After the compilation of nesC application, it generated a ihex file. When I
open this file by eidtor, i got the following information:

:104AB240805A20013F40D8533E4000113D4003
:104A12110D9E0524FE4F1E530E9DFB2B20
:104A20003F4002113D4023110D9F0524CF435C
:104A30001F530F9DFB2B3040DA4D30403E4A001390
:104A4000100050009000D000FF4212C390
:104A5F100F110F115FF332C203437FF3304188
.

why the first five digits are always the same, what does these stand for?
Anyone could help me to understand this ihex file? Thanks.

Another question is since main.exe is the ELF executable output format , how
to compile the application into some binary format, like 1011010101
format?

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Deluge: unable to initialize the port connection

2008-12-28 Thread BAI LI
Hi,

I have a question regarding to the Deluge. Normally when the port ID is less
than 10, I can install the application with base station flag and inject the
program later. But when the port number become bigger, i still can install
the application with base station flag but fail to inject the new image. the
following is the error i captured i don't understand. Is there any
restriction on port id? Thanks in advance.

e...@wsn /opt/tinyos-2.x/apps/Blink1
$ tos-deluge /dev/ttyS26 telosb -p 0
ERROR: Unable to initialize serial port connection to /dev/ttyS26

regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Problem in Deluge T2

2008-12-21 Thread BAI LI
Hi Jeena,

I am not too sure if i understand your questions well. But you need to make
sure the running program on remote motes includes DelugeC component.
Otherwise it won't reprogram for the second time. there is no such unlock
command needed in order to get remote motes working.

Cheers,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] where to set the power level?

2008-12-17 Thread BAI LI
Thanks for all you guys' help. The problem is solved as you suggested.
Thanks so much. now my nodes can only talk in about half one meter range.

Cheers
Bai

On Wed, Dec 17, 2008 at 5:46 PM, Urs Hunkeler u...@gmx.ch wrote:

 Hi,

 A typical Makefile in TinyOS 2.x that I use looks something like this:

 

 COMPONENT = MyDemoAppC
 CFLAGS += -DCC2420_DEF_RFPOWER=1
 #CFLAGS += -DCC2420_DEF_CHANNEL=18
 #CFLAGS += -DTOSH_DATA_LENGTH=64

 include $(MAKERULES)

 

 There is no need for any modifications in the code (if I remember
 correctly, the TX power level was set in multiple places). Defining the
 power level in the CFLAGS (as in the example above) will have precedence
 over the values that would otherwise be set in the TinyOS code.

 You can also set the TX power level on a per-packet basis with code similar
 to this (right before sending the packet):


 

 call CC2420Packet.setPower(packet, pwr);

 

 packet is a reference to the radio packet you want to transmit
 (message_t), pwr is the power level you want the packet to be sent with
 (e.g. 3) and CC2420Packet is an interface available from the component
 CC2420PacketC.

 I don't know whether there is a difference in the output power between 1
 and 3, but a value of 1 definitely works to reduce the power in my setup
 (with telosb with the internal antenna I get a max tx distance of about 3m).

 If this still does not work for you, do you have modified hardware (e.g.
 external antenna)? Do you at least observe a difference in the TX range
 (e.g. 20m instead of 50m)?

 Cheers,
 Urs



 BAI LI wrote:

 I just tested it. Same here. Not working. Thanks for your help anyway.
  Any
 other ideas?

 Cheers,
 Bai

 On Wed, Dec 17, 2008 at 12:59 PM, Hui Kang huk...@ic.sunysb.edu wrote:

 Add this line to your makefile and remove those macro.
 CFLAGS=-DCC2420_DEF_RFPOWER=3


 - Hui

 BAI LI wrote:

 I read the cc2420 datasheet and modified it but unluckily it still didn't
 work. I modified the following code repectivcely.
  #ifndef CC2420_DEF_RFPOWER
 #define CC2420_DEF_RFPOWER  0x1F// changed the 0x1F to 3 or
 1,
 didn't work.
 #endif
  cheers,
 Bai


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

Re: [Tinyos-help] where to set the power level?

2008-12-16 Thread BAI LI
Yes, i modified the code. the default value of REPOAWER is 31 at the maximum
in Tinyos1.15. Then I changed it to 1. I believe nothing changed. The node
still can communicate with other nodes at least 15 meters. It is not that
good. I will try to use setRFPower. Is this the right value I should change
in order to decrease the transimission distance. I am confused. Anyone who
has experience, please help me. THanks in advanced.

On Tue, Dec 16, 2008 at 11:16 AM, Razvan Musaloiu-E. razv...@cs.jhu.eduwrote:

 Hi!

 On Mon, 15 Dec 2008, BAI LI wrote:

 Hi All,
 Anyone can tell me where to modify the power level in tinyos 1.x and
 tinyos
 2.x?


 In tinyos-2.x you can set the global radio power of CC2420 by defining the
 CC2420_DEF_RFPOWER to a different value or you can change it dynamically on
 a per-packet basis using the setPower command from the CC2420Packet
 interface.

 --
 Razvan ME

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

Re: [Tinyos-help] power level

2008-12-16 Thread BAI LI
I did changed the RFPOWER variable from 31 to 1. But nothing happened. I
expected the nodes can't talk to each other out of 5 meters. But they can
even communicate with each other in 15 meters ranges. What is wrong?

Bai

On Tue, Dec 16, 2008 at 11:57 PM, fh...@c3sl.ufpr.br wrote:

 Yeap, if you want to increase the distance you can reach when sending a
 message you should adjust the transmission power. You can set it inside
 your code. But if I am not wrong, there is also a way to set it in
 compilation time, I do not know how, though.

 Anyway, what modifications did you do there?


  Thanks for your reply. I read the post on the interest to set the power
  level in order to havce multihops as currently my telosb node could reach
  other nodes 50 meters away. I made it impossible to test two hop
  application. I suppose this transmissino power is the right one? Is that
  correct?
 
  CHeers,
  Bai
 
  What do you mean with power level, is it the transmission power when
  sending a packet? If so, you should take a look at the command setRFPower
  at the appropriate radio interface.
 


 --
 Fernando Henrique Gielow - UFPR - NR2
 Computer Science graduation student.


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

Re: [Tinyos-help] where to set the power level?

2008-12-16 Thread BAI LI
I read the cc2420 datasheet and modified it but unluckily it still didn't
work. I modified the following code repectivcely.

#ifndef CC2420_DEF_RFPOWER
#define CC2420_DEF_RFPOWER  0x1F// changed the 0x1F to 3 or 1,
didn't work.
#endif

cheers,
Bai


On Wed, Dec 17, 2008 at 8:30 AM, Nitin Sharma nitin...@gmail.com wrote:

 Hi,

 Could you try setting it to 3 or a little higher instead and see?

 PA_Level 3 Output Power -25 , TXCTRL register 0xA0E3

 The output power is programmable in 8 steps from approximately –24 to 0
 dBm.

 Page: 9 , 52 from CC2420 Data Sheet.

 Thanks,

   On Tue, Dec 16, 2008 at 2:47 PM, BAI LI libai0...@gmail.com wrote:

   Yes, i modified the code. the default value of REPOAWER is 31 at the
 maximum in Tinyos1.15. Then I changed it to 1. I believe nothing changed.
 The node still can communicate with other nodes at least 15 meters. It is
 not that good. I will try to use setRFPower. Is this the right value I
 should change in order to decrease the transimission distance. I am
 confused. Anyone who has experience, please help me. THanks in advanced.

   On Tue, Dec 16, 2008 at 11:16 AM, Razvan Musaloiu-E. 
 razv...@cs.jhu.edu wrote:

 Hi!

 On Mon, 15 Dec 2008, BAI LI wrote:

 Hi All,
 Anyone can tell me where to modify the power level in tinyos 1.x and
 tinyos
 2.x?


 In tinyos-2.x you can set the global radio power of CC2420 by defining
 the CC2420_DEF_RFPOWER to a different value or you can change it dynamically
 on a per-packet basis using the setPower command from the CC2420Packet
 interface.

 --
 Razvan ME



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




 --
 Nitin Sharma

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

Re: [Tinyos-help] power level

2008-12-16 Thread BAI LI
I just modified this piece of code as following

#ifndef CC2420_DEF_RFPOWER
#define CC2420_DEF_RFPOWER  0x1F
#endif

I changed it to different values. But nothing happened. So I guess i am
heading to the wrong direction.

Cheers,
Bai

On Wed, Dec 17, 2008 at 8:02 AM, Hui Kang huk...@ic.sunysb.edu wrote:

 If you can post the piece of the code, it maybe easier to point out.


 BAI LI wrote:

 I did changed the RFPOWER variable from 31 to 1. But nothing happened. I
 expected the nodes can't talk to each other out of 5 meters. But they can
 even communicate with each other in 15 meters ranges. What is wrong?
  Bai

 On Tue, Dec 16, 2008 at 11:57 PM, fh...@c3sl.ufpr.br mailto:
 fh...@c3sl.ufpr.br wrote:

Yeap, if you want to increase the distance you can reach when
sending a
message you should adjust the transmission power. You can set it
inside
your code. But if I am not wrong, there is also a way to set it in
compilation time, I do not know how, though.

Anyway, what modifications did you do there?


 Thanks for your reply. I read the post on the interest to set
the power
 level in order to havce multihops as currently my telosb node
could reach
 other nodes 50 meters away. I made it impossible to test two hop
 application. I suppose this transmissino power is the right one?
Is that
 correct?

 CHeers,
 Bai

 What do you mean with power level, is it the transmission power when
 sending a packet? If so, you should take a look at the command
setRFPower
 at the appropriate radio interface.



--
Fernando Henrique Gielow - UFPR - NR2
Computer Science graduation student.


 

 ___
 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

Re: [Tinyos-help] where to set the power level?

2008-12-16 Thread BAI LI
I just tested it. Same here. Not working. Thanks for your help anyway.  Any
other ideas?

Cheers,
Bai

On Wed, Dec 17, 2008 at 12:59 PM, Hui Kang huk...@ic.sunysb.edu wrote:

 Add this line to your makefile and remove those macro.
 CFLAGS=-DCC2420_DEF_RFPOWER=3


 - Hui

 BAI LI wrote:

 I read the cc2420 datasheet and modified it but unluckily it still didn't
 work. I modified the following code repectivcely.
  #ifndef CC2420_DEF_RFPOWER
 #define CC2420_DEF_RFPOWER  0x1F// changed the 0x1F to 3 or 1,
 didn't work.
 #endif
  cheers,
 Bai
 
  On Wed, Dec 17, 2008 at 8:30 AM, Nitin Sharma nitin...@gmail.commailto:
 nitin...@gmail.com wrote:

Hi,

Could you try setting it to 3 or a little higher instead and see?

PA_Level 3 Output Power -25 , TXCTRL register 0xA0E3

The output power is programmable in 8 steps from approximately –24
to 0 dBm.

Page: 9 , 52 from CC2420 Data Sheet.

Thanks,

On Tue, Dec 16, 2008 at 2:47 PM, BAI LI libai0...@gmail.com
mailto:libai0...@gmail.com wrote:

Yes, i modified the code. the default value of REPOAWER is 31
at the maximum in Tinyos1.15. Then I changed it to 1. I
believe nothing changed. The node still can communicate with
other nodes at least 15 meters. It is not that good. I will
try to use setRFPower. Is this the right value I should change
in order to decrease the transimission distance. I am
confused. Anyone who has experience, please help me. THanks in
advanced.

On Tue, Dec 16, 2008 at 11:16 AM, Razvan Musaloiu-E.
razv...@cs.jhu.edu mailto:razv...@cs.jhu.edu wrote:

Hi!


On Mon, 15 Dec 2008, BAI LI wrote:

Hi All,
Anyone can tell me where to modify the power level in
tinyos 1.x and tinyos
2.x?


In tinyos-2.x you can set the global radio power of CC2420
by defining the CC2420_DEF_RFPOWER to a different value or
you can change it dynamically on a per-packet basis using
the setPower command from the CC2420Packet interface.

--
Razvan ME



___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
mailto:Tinyos-help@millennium.berkeley.edu

 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help




--Nitin Sharma


 

 ___
 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

[Tinyos-help] where to set the power level?

2008-12-15 Thread BAI LI
Hi All,
Anyone can tell me where to modify the power level in tinyos 1.x and tinyos
2.x? Thanks in advance.

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] power level

2008-12-15 Thread BAI LI
Thanks for your reply. I read the post on the interest to set the power
level in order to havce multihops as currently my telosb node could reach
other nodes 50 meters away. I made it impossible to test two hop
application. I suppose this transmissino power is the right one? Is that
correct?

CHeers,
Bai

What do you mean with power level, is it the transmission power when
sending a packet? If so, you should take a look at the command setRFPower
at the appropriate radio interface.
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] errors on java net.tinyos.tools.Deluge --ping Any idea?

2008-11-04 Thread BAI LI
Hi Michael,

Thanks for your reply. I have gone through all the posts related to this
topic and found a lot of your posts as well. :) But it still didn't work
after i tried this morning. The following is wat I did. Is there anything
missing? When I compiled the jave tools, there is no probelmes except some
TinyDB components but i don't think it will affect the sf and Deluge. What
do you think? Is there anyone who successfully running serial forwarder on
telosb based on window cygwin (Tinyos1.15 version)?

These results turn to be resynchronizing again as i tried this serial
forwarder yesterday and got the same result. Do I have to get

regards,
Bai


Bai [EMAIL PROTECTED] ~
$ unset MOTECOM
Bai [EMAIL PROTECTED] ~
$ cd /opt/tinyos-1.x/apps/tosbase
Bai [EMAIL PROTECTED] /opt/tinyos-1.x/apps/tosbase
$ make telosb install,1
mkdir -p build/telosb
compiling TOSBase to a telosb binary
ncc -o build/telosb/main.exe -O -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d
-Wnesc-al
l -target=telosb -fnesc-cfile=build/telosb/app.c -board=
-DTOSH_MAX_TASKS_LOG2=8
 -I%T/lib/Deluge
-Wl,--section-start=.text=0x4800,--defsym=_reset_vector__=0x400
0 -DIDENT_PROGRAM_NAME=\TOSBase\ -DIDENT_USER_ID=\BaiLi\
-DIDENT_HOSTNAME=\
deakin-6f29b527\ -DIDENT_USER_HASH=0x75bf6332L
-DIDENT_UNIX_TIME=0x4910c52aL -D
IDENT_UID_HASH=0xbbde367dL -mdisable-hwmul
-I/opt/tinyos-1.x/tos/lib/CC2420Radio
 TOSBase.nc -lm
C:/tinyos/cygwin/opt/tinyos-1.x/tos/lib/CC2420Radio/CC2420RadioM.nc:116:
warning
: `Send.sendDone' called asynchronously from `sendFailed'
compiled TOSBase to build/telosb/main.exe
   11066 bytes in ROM
1848 bytes in RAM
msp430-objcopy --output-target=ihex build/telosb/main.exe
build/telosb/main.ihex
writing TOS image
/opt/tinyos-1.x/tools/make/msp/set-mote-id --objcopy msp430-objcopy
--objdump ms
p430-objdump --target ihex build/telosb/main.ihex
build/telosb/main.ihex.out-1 1
found mote on COM10 (using bsl,auto)
installing telosb bootloader using bsl
msp430-bsl --telosb -c 9 -r -e -I -p
C:/tinyos/cygwin/opt/tinyos-1.x/tos/lib/Del
uge/TOSBoot/build/telosb/main.ihex
MSP430 Bootstrap Loader Version: 1.39-telos-6
Mass Erase...
Transmit default password ...
Invoking BSL...
Transmit default password ...
Current bootstrap loader version: 1.61 (Device ID: f16c)
Changing baudrate to 38400 ...
Program ...
1796 bytes programmed.
Reset device ...
installing telosb binary using bsl (without mass erase)
msp430-bsl --telosb -c 9 -r -I -p build/telosb/main.ihex.out-1
MSP430 Bootstrap Loader Version: 1.39-telos-6
Invoking BSL...
Transmit default password ...
Current bootstrap loader version: 1.61 (Device ID: f16c)
Changing baudrate to 38400 ...
Program ...
11098 bytes programmed.
Reset device ...
rm -f build/telosb/main.exe.out-1 build/telosb/main.ihex.out-1
Bai [EMAIL PROTECTED] /opt/tinyos-1.x/apps/tosbase
$ motelist
Reference  CommPort   Description
-- -- 
XBR0LS4Y   COM10  Crossbow Telos Rev.B
Bai [EMAIL PROTECTED] /opt/tinyos-1.x/apps/tosbase
$ export MOTECOM=[EMAIL PROTECTED]:telosb
Bai [EMAIL PROTECTED] /opt/tinyos-1.x/apps/tosbase
$ java net.tinyos.tools.Listen
Failed to parse the baudrate telosb (value telosb), defaulting to 19200
[EMAIL PROTECTED]:19200: resynchronising

Bai [EMAIL PROTECTED] /opt/tinyos-1.x/apps/tosbase
$ unset MOTECOM
Bai [EMAIL PROTECTED] /opt/tinyos-1.x/apps/tosbase
$ export MOTECOM=[EMAIL PROTECTED]:57600
Bai [EMAIL PROTECTED] /opt/tinyos-1.x/apps/tosbase
$ java net.tinyos.tools.Listen
[EMAIL PROTECTED]:57600: resynchronising

On Wed, Nov 5, 2008 at 4:41 AM, Michael Schippling [EMAIL PROTECTED]wrote:

 Do you have a SerialForwarder process running? It looks like Deluge
 is trying to connect to one... Most likely what you need to do is
 set a MOTECOM environment variable to point to the serial port
 connected to your basestation mote. If there's no MOTECOM things
 default to trying to use the S.F. on a network port. Here's a
 couple samples from my env:

 export MOTECOM=[EMAIL PROTECTED]:mica2
 export MOTECOM=[EMAIL PROTECTED]:tmote

 Your port names and devices may be different.
 Search this list and the doc for more MOTECOM information.

 MS

 BAI LI wrote:

 Hi All,
  I am following Deluge 2.0 quick start. I got the following errors as
 follows. Any ideas on how to fix them? I am using Tinyos1.15 and telosb
 nodes as our project application is developed based on this version. I can't
 use Tinyos2.x instead. Any help would be highly appreciated.
  Bai [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 /opt/tinyos-1.x/apps/TestDeluge/DelugeBasic

 $ java net.tinyos.tools.Deluge --ping
 java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at
 java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158

Re: [Tinyos-help] errors on java net.tinyos.tools.Deluge --ping Any idea?

2008-11-04 Thread BAI LI
Thanks for your reply. Yes. I did install the Oscope application on another
mote. Am I required to get a MIB510 gateway for serial forwarder? Currently
I just connected the base station to my usb hub which pluged into my laptop.
Still no response. But Does serial forwarder has somthing to do with Deluge
2.0 application? It seems to be some java probelms. right?

regards,
Bai

On Wed, Nov 5, 2008 at 10:30 AM, Michael Schippling [EMAIL PROTECTED]wrote:

 Do you have something sending messages to the TOSBase mote?
 You could try running the regular Oscilloscope app,
 which in T1 sends messages directly to the UART channel.

 I'm not sure why your MOTECOM won't accept telosb,
 I've only used tmote...there may be some other special name.
 More searching in code and doc is indicated.

 Also try ListenRaw which doesn't try to parse anything.

 MS


 BAI LI wrote:

 Hi Michael,
  Thanks for your reply. I have gone through all the posts related to this
 topic and found a lot of your posts as well. :) But it still didn't work
 after i tried this morning. The following is wat I did. Is there anything
 missing? When I compiled the jave tools, there is no probelmes except some
 TinyDB components but i don't think it will affect the sf and Deluge. What
 do you think? Is there anyone who successfully running serial forwarder on
 telosb based on window cygwin (Tinyos1.15 version)?
  These results turn to be resynchronizing again as i tried this serial
 forwarder yesterday and got the same result. Do I have to get
  regards,
 Bai

 Bai [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ~
 $ unset MOTECOM
 Bai [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ~
 $ cd /opt/tinyos-1.x/apps/tosbase
 Bai [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 /opt/tinyos-1.x/apps/tosbase

 $ make telosb install,1
 mkdir -p build/telosb
compiling TOSBase to a telosb binary
 ncc -o build/telosb/main.exe -O -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d
 -Wnesc-al
 l -target=telosb -fnesc-cfile=build/telosb/app.c -board=
 -DTOSH_MAX_TASKS_LOG2=8
  -I%T/lib/Deluge
 -Wl,--section-start=.text=0x4800,--defsym=_reset_vector__=0x400
 0 -DIDENT_PROGRAM_NAME=\TOSBase\ -DIDENT_USER_ID=\BaiLi\
 -DIDENT_HOSTNAME=\
 deakin-6f29b527\ -DIDENT_USER_HASH=0x75bf6332L
 -DIDENT_UNIX_TIME=0x4910c52aL -D
 IDENT_UID_HASH=0xbbde367dL -mdisable-hwmul
 -I/opt/tinyos-1.x/tos/lib/CC2420Radio
  TOSBase.nc -lm
 C:/tinyos/cygwin/opt/tinyos-1.x/tos/lib/CC2420Radio/CC2420RadioM.nc:116:
 warning
 : `Send.sendDone' called asynchronously from `sendFailed'
compiled TOSBase to build/telosb/main.exe
   11066 bytes in ROM
1848 bytes in RAM
 msp430-objcopy --output-target=ihex build/telosb/main.exe
 build/telosb/main.ihex
writing TOS image
 /opt/tinyos-1.x/tools/make/msp/set-mote-id --objcopy msp430-objcopy
 --objdump ms
 p430-objdump --target ihex build/telosb/main.ihex
 build/telosb/main.ihex.out-1 1
found mote on COM10 (using bsl,auto)
installing telosb bootloader using bsl
 msp430-bsl --telosb -c 9 -r -e -I -p
 C:/tinyos/cygwin/opt/tinyos-1.x/tos/lib/Del
 uge/TOSBoot/build/telosb/main.ihex
 MSP430 Bootstrap Loader Version: 1.39-telos-6
 Mass Erase...
 Transmit default password ...
 Invoking BSL...
 Transmit default password ...
 Current bootstrap loader version: 1.61 (Device ID: f16c)
 Changing baudrate to 38400 ...
 Program ...
 1796 bytes programmed.
 Reset device ...
installing telosb binary using bsl (without mass erase)
 msp430-bsl --telosb -c 9 -r -I -p build/telosb/main.ihex.out-1
 MSP430 Bootstrap Loader Version: 1.39-telos-6
 Invoking BSL...
 Transmit default password ...
 Current bootstrap loader version: 1.61 (Device ID: f16c)
 Changing baudrate to 38400 ...
 Program ...
 11098 bytes programmed.
 Reset device ...
 rm -f build/telosb/main.exe.out-1 build/telosb/main.ihex.out-1
 Bai [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 /opt/tinyos-1.x/apps/tosbase
 $ motelist
 Reference  CommPort   Description
 -- -- 
 XBR0LS4Y   COM10  Crossbow Telos Rev.B
 Bai [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 /opt/tinyos-1.x/apps/tosbase
 $ export MOTECOM=[EMAIL PROTECTED]:telosb mailto:[EMAIL PROTECTED]:telosb
 Bai [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 /opt/tinyos-1.x/apps/tosbase
 $ java net.tinyos.tools.Listen
 Failed to parse the baudrate telosb (value telosb), defaulting to 19200
 [EMAIL PROTECTED]:19200 mailto:[EMAIL PROTECTED]:19200: resynchronising

 Bai [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 /opt/tinyos-1.x/apps/tosbase
 $ unset MOTECOM
 Bai [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 /opt/tinyos-1.x/apps/tosbase
 $ export MOTECOM=[EMAIL PROTECTED]:57600 mailto:[EMAIL PROTECTED]:57600
 Bai [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 /opt/tinyos-1.x/apps/tosbase
 $ java net.tinyos.tools.Listen
 [EMAIL PROTECTED]:57600 mailto:[EMAIL PROTECTED]:57600: resynchronising


 On Wed, Nov 5, 2008 at 4:41 AM, Michael Schippling [EMAIL PROTECTED]mailto:
 [EMAIL PROTECTED] wrote:

Do you

Re: [Tinyos-help] errors on java net.tinyos.tools.Deluge --ping Any idea?

2008-11-04 Thread BAI LI
After i removed the java.exe from windows/system32. Deluge has passed that
java errors. But now it facing another problem. It keeps pinging the node
and didn't even respond. nothing else. I tried all the deluge commands it
always show pinging node... Any ideas?

Bai [EMAIL PROTECTED] /opt/tinyos-1.x/apps/TestDeluge/DelugeBasic
$ unset MOTECOM
Bai [EMAIL PROTECTED] /opt/tinyos-1.x/apps/TestDeluge/DelugeBasic

$ export [EMAIL PROTECTED]:57600
Bai [EMAIL PROTECTED] /opt/tinyos-1.x/apps/TestDeluge/DelugeBasic
$ java net.tinyos.tools.Deluge -p
Pinging node ...

regards,
Bai

On Wed, Nov 5, 2008 at 1:19 PM, Michael Schippling [EMAIL PROTECTED]wrote:

 T1 and T2 are not fully compatible in message structure so I wouldn't
 expect anything to work if you cross-up versions. Your Java version
 shouldn't make any difference as long as you don't try to use a newer
 compiler with an older JRE.
 MS


 BAI LI wrote:

 Well I just installed the tinyos2.0 basestation and Oscope application on
 telosb motes and I can see Basestation is receiving the mesage but When i
 plug the base to tinyos1.15 laptop, running sf and listen tools. it didn't
 work either. I guess it didn't support telosb motes on tinyos1.15. For
 Deluge 2.0, I think something worng with Java as I didn't change anyting in
 tinyos. I am currently using java 1.4. Should I upgrade it to 1.5 instead?
 Thanks.
  Regards,
 Bai

 On Wed, Nov 5, 2008 at 11:00 AM, Michael Schippling [EMAIL 
 PROTECTED]mailto:
 [EMAIL PROTECTED] wrote:

You don't need serial forwarder.
Do you see any leds blinking on your TOSBase mote? That indicates
that messages are being received.

I would start with the simplest demo app that sends messages to the
serial port and use ListenRaw to see if I got anything. It looks like
you were able to download and motelist on COM10 so I have to assume
that things are connected correctly.

MS


BAI LI wrote:

Thanks for your reply. Yes. I did install the Oscope application
on another mote. Am I required to get a MIB510 gateway for
serial forwarder? Currently I just connected the base station to
my usb hub which pluged into my laptop. Still no response. But
Does serial forwarder has somthing to do with Deluge 2.0
application? It seems to be some java probelms. right?
 regards,
Bai

On Wed, Nov 5, 2008 at 10:30 AM, Michael Schippling
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

Do you have something sending messages to the TOSBase mote?
   You could try running the regular Oscilloscope app,
   which in T1 sends messages directly to the UART channel.

   I'm not sure why your MOTECOM won't accept telosb,
   I've only used tmote...there may be some other special name.
   More searching in code and doc is indicated.

   Also try ListenRaw which doesn't try to parse anything.

   MS


   BAI LI wrote:

   Hi Michael,
Thanks for your reply. I have gone through all the posts
   related to this topic and found a lot of your posts as
well. :)
   But it still didn't work after i tried this morning. The
   following is wat I did. Is there anything missing? When I
   compiled the jave tools, there is no probelmes except some
   TinyDB components but i don't think it will affect the sf
 and
   Deluge. What do you think? Is there anyone who successfully
   running serial forwarder on telosb based on window cygwin
   (Tinyos1.15 version)?
These results turn to be resynchronizing again as i
tried this
   serial forwarder yesterday and got the same result. Do I
have to get
regards,
   Bai
   Bai [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ~
   $ unset MOTECOM
   Bai [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ~

   $ cd /opt/tinyos-1.x/apps/tosbase
   Bai [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
/opt/tinyos-1.x/apps/tosbase

   $ make telosb install,1
   mkdir -p build/telosb
  compiling TOSBase to a telosb binary
   ncc -o build/telosb/main.exe -O -Wall -Wshadow
   -DDEF_TOS_AM_GROUP=0x7d -Wnesc-al
   l -target=telosb -fnesc-cfile=build/telosb/app.c -board=
   -DTOSH_MAX_TASKS_LOG2=8
-I%T/lib/Deluge

 -Wl,--section-start=.text=0x4800,--defsym

[Tinyos-help] random timer function in tinyos1.15

2008-11-04 Thread BAI LI
Hi All,

I am just wondering if there is any random() functions in Tinyos1.15? I put
an interface random and using a timer as follows

call Timer_send.start(TIMER_REPEAT,rand() * 0xff);

after I compile it, there is no error. But it doesn't seem to be random when
mote sends the message. Any ideas? Thanks.

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Deluge image size

2008-11-04 Thread BAI LI
Hi All,

I have another question. How big of program I can inject in the mote. I am
using Telosb mote. From datasheet, I can see 8MHz Texas Instruments MSP430
microcontroller (10k RAM, 48k Flash). It means I have 48k to store my
program. If My current program is 20k, I only can inject 28k for new image
right? Is that correct? Thanks in advance.

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] errors on java net.tinyos.tools.Deluge --ping Any idea?

2008-11-03 Thread BAI LI
Hi All,

I am following Deluge 2.0 quick start. I got the following errors as
follows. Any ideas on how to fix them? I am using Tinyos1.15 and telosb
nodes as our project application is developed based on this version. I can't
use Tinyos2.x instead. Any help would be highly appreciated.

Bai [EMAIL PROTECTED] /opt/tinyos-1.x/apps/TestDeluge/DelugeBasic
$ java net.tinyos.tools.Deluge --ping
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:426)
at java.net.Socket.connect(Socket.java:376)
at java.net.Socket.init(Socket.java:291)
at java.net.Socket.init(Socket.java:119)
at net.tinyos.packet.SFSource.openSource(SFSource.java:56)
at net.tinyos.packet.AbstractSource.open(AbstractSource.java:77)
at net.tinyos.packet.PhoenixSource.run(PhoenixSource.java:167)
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:426)
at java.net.Socket.connect(Socket.java:376)
at java.net.Socket.init(Socket.java:291)
at java.net.Socket.init(Socket.java:119)
at net.tinyos.packet.SFSource.openSource(SFSource.java:56)
at net.tinyos.packet.AbstractSource.open(AbstractSource.java:77)
at net.tinyos.packet.PhoenixSource.run(PhoenixSource.java:167)
[EMAIL PROTECTED]:9001 died - exiting (java.net.ConnectException: Connection
refused:
 connect)
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Any ideas on testing the network

2008-10-17 Thread BAI LI
Hi All,

I am working on a network application which implemented based on 802.15.4
protocols. I normally test the network by plugging in the motes to my laptop
and observe the printf statement to debug the network. How are you guys
doing for testing? Is there any easier way to test the network? Can moteview
or moteworks be used for this purpose? If there are a 30 motes' network, how
to test it in an efficient and effective way? Please help me thanks you in
advance.

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] open zigbee problems

2008-10-10 Thread BAI LI
Hi All,

I am currently implementing the applications based on this protocols. Now I
am trying to implement the receive functions. In the manual, it said:

The SFD pin going high means that the transceiver is starting to receive a
frame.
If the frame check sequence is ok (hardware condition, implemented by the
CC2420
transceiver and all the IEEE 802.15.4 compliant transceivers) the PHY layer
will be
signalled by the FIFO interrupt (async event result_t
HPLCC2420.FIFOPIntr()).

But I didn't find any event called async event result_t
HPLCC2420.FIFOPIntr() in pyhM.nc file. Does that mean I have to implement it
by myself? I am confused and desperately need some suggestions or help.
Thanks in advance

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] tos-deluge commande doesn't work

2008-09-28 Thread BAI LI
: warning: #warning
*** L
OW POWER COMMUNICATIONS DISABLED ***
/opt/tinyos-2.x/tos/chips/msp430/adc12/Msp430Adc12ImplP.nc:66:2: warning:
#warni
ng Accessing TimerA for ADC12
compiled BlinkAppC to build/telosb/main.exe
   38382 bytes in ROM
1398 bytes in RAM
msp430-objcopy --output-target=ihex build/telosb/main.exe
build/telosb/main.ihex
writing TOS image
cp build/telosb/main.ihex build/telosb/main.ihex.out
installing telosb bootloader using bsl
tos-bsl --telosb -c COM3 -r -e -I -p
C:/cygwin/opt/tinyos-2.x/tos/lib/tosboot/bu
ild/telosb/main.ihex
MSP430 Bootstrap Loader Version: 1.39-telos-8
Mass Erase...
Transmit default password ...
Invoking BSL...
Transmit default password ...
Current bootstrap loader version: 1.61 (Device ID: f16c)
Changing baudrate to 38400 ...
Program ...
2112 bytes programmed.
Reset device ...
installing telosb binary using bsl (without mass erase)
tos-bsl --telosb -c COM3 -r -I -p build/telosb/main.ihex.out
MSP430 Bootstrap Loader Version: 1.39-telos-8
Invoking BSL...
Transmit default password ...
Current bootstrap loader version: 1.61 (Device ID: f16c)
Changing baudrate to 38400 ...
Program ...
38414 bytes programmed.
Reset device ...
rm -f build/telosb/main.exe.out build/telosb/main.ihex.out
   +---+
   |   |
   | At this point the first led (red) should be blinking. |
   |   |
   |   Press ENTER to continue...  |
   |   |
   +---+
= Compile a new Blink
==
mkdir -p build/telosb
compiling BlinkAppC to a telosb binary
ncc -o build/telosb/main.exe  -Os -O -mdisable-hwmul -Wall -Wshadow
-Wnesc-all -
target=telosb -fnesc-cfile=build/telosb/app.c -board=
-DDEFINED_TOS_AM_GROUP=0x2
2 -Ibuild/telosb -DBLINK_REVERSE -DDELUGE_BASESTATION
-DIDENT_APPNAME=\BlinkApp
C\ -DIDENT_USERNAME=\EIT\ -DIDENT_HOSTNAME=\wsn\
-DIDENT_USERHASH=0xa200ffa
dL -DIDENT_TIMESTAMP=0x48df0b31L -DIDENT_UIDHASH=0xbe4e5e47L -DDELUGE
-I/opt/tin
yos-2.x/tos/lib/net -I/opt/tinyos-2.x/tos/lib/net/drip
-I/opt/tinyos-2.x/tos/lib
/net/Deluge -I/opt/tinyos-2.x/tos/lib/net/Deluge/FlashVolumeManager
-I/opt/tinyo
s-2.x/tos/lib/net/Deluge/BlockStorageManager
-I/opt/tinyos-2.x/tos/lib/net/Delug
e/extra -I/opt/tinyos-2.x/tos/lib/net/Deluge/extra/msp430
-I/opt/tinyos-2.x/tos/
lib/net/Deluge/extra/telos -I/opt/tinyos-2.x/tos/lib/net/Deluge/extra/telosb
-Wl
,--section-start=.text=0x4a00,--defsym=_reset_vector__=0x4000  BlinkAppC.nc
-lm
/opt/tinyos-2.x/tos/chips/cc2420/lpl/DummyLplC.nc:39:2: warning: #warning
*** L
OW POWER COMMUNICATIONS DISABLED ***
/opt/tinyos-2.x/tos/chips/msp430/adc12/Msp430Adc12ImplP.nc:66:2: warning:
#warni
ng Accessing TimerA for ADC12
compiled BlinkAppC to build/telosb/main.exe
   38382 bytes in ROM
1398 bytes in RAM
msp430-objcopy --output-target=ihex build/telosb/main.exe
build/telosb/main.ihex
writing TOS image
=== Upload the image
===
ERROR: Unable to initialize serial port connection to COM3
   ++
   ||
   | In the next step the following things will take place: |
   | - the mote will be rebooted|
   | - all the leds will blink for some time as the |
   |   reprogramming by tosboot takes place.|
   | - a fading of the leds will indicate the exiting from tosboot. |
   | - the mote should start blinking the 3rd led (blue/yellow).|
   ||
   |   Press ENTER to continue...   |
   ||
   ++
=== Reboot the base station

ERROR: Unable to initialize serial port connection to COM3
[EMAIL PROTECTED] /opt/tinyos-2.x/apps/tests/deluge/Blink
$ motelist
Reference  CommPort   Description
-- -- 
XBR0LLL9   COM3   Crossbow Telos Rev.B

On Sun, Sep 28, 2008 at 7:24 AM, Razvan Musaloiu-E. [EMAIL PROTECTED]wrote:

 Hi!


 On Sat, 27 Sep 2008, BAI LI wrote:

 Hi All,

 I have encountered a problem. When I use tos-deluge commande it always
 pops
 up these error message. I am not able to understand it. Please someone can
 help me? I have install the latest tinyOS files. Many thanks.

 error shown:

 Pinging node ...
 Traceback (most recent

[Tinyos-help] tos-deluge commande doesn't work

2008-09-26 Thread BAI LI
Hi All,

I have encountered a problem. When I use tos-deluge commande it always pops
up these error message. I am not able to understand it. Please someone can
help me? I have install the latest tinyOS files. Many thanks.

error shown:

Pinging node ...
Traceback (most recent call last):
  File /usr/bin/tos-deluge, line 473, in module
op_ping(s, sys.argv[4])
  File /usr/bin/tos-deluge, line 218, in op_ping
metadata = getMetaData(s, img_num)
  File /usr/bin/tos-deluge, line 204, in getMetaData
r = op_read(s, img_num, DELUGE_METADATA_OFFSET, DELUGE_METADATA_SIZE)
  File /usr/bin/tos-deluge, line 171, in op_read
if s.write_packet(SERIAL_AMGROUP, SERIAL_AMID, sreqpkt.payload()):
  File /usr/bin/tinyos.py, line 190, in write_packet
self.__put_bytes(packet)
  File /usr/bin/tinyos.py, line 105, in __put_bytes
self.__s.write(struct.pack('B', b))
  File /usr/lib/python2.5/site-packages/serial/serialposix.py, line 361,
in wr
ite
if self.fd is None: raise portNotOpenError
serial.serialutil.SerialException: Port not open

Regards,
Bai LI
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] network debugging tools

2008-09-23 Thread BAI LI
Hi,

I am newbie. just wondering if there is any available debug tools for tinyos
network debug except printf? I know TOSSIM is only for single node
application. I can't use TOSSIM. Rite? Could anyone suggest me some software
debug tools? Thanks.
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] serial forwards probelms on lesson 5

2008-07-01 Thread BAI LI
Hi All,

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

[EMAIL PROTECTED] /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
[EMAIL PROTECTED]:57600 died - restarting


When i type command like
[EMAIL PROTECTED] /opt/tinyos-2.x/apps/Oscilloscope/java
$ java net.tinyos.sf.SerialForwarder -comm [EMAIL PROTECTED]:9002

it displayed on the serial forwarder interface like

Listening to [EMAIL PROTECTED]: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
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help