Re: [Tinyos-help] PowerTossimZ

2011-08-19 Thread Fajar Lab
Hi, make sure you have a powercurses.exe file in the working directory. 
Since the file needs curses library (curses.h), maybe you need to recompile 
powercurses.c  for your environment. 

Fjr.


Dari: OMNIA MEZGHANI 
Judul: [Tinyos-help] PowerTossimZ
Kepada: tinyos-help@millennium.berkeley.edu
Tanggal: Kamis, 18 Agustus, 2011, 10:57 PM






Hi ,
I need your help, I followed the Readme.txt of the PowerTossimZ but I encounter 
a problem with  the last instruction 'cat EnergyPowerCurses.txt | ./powercurses 
11'. I also tried './powercurses (num_motes_simulation) < 
EnergyPowerCurses.txt' but the same error is shown "bash: ./powercurses: No 
such file or directory" 
can you help me please 
   



___
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] Has anyone used AVRISP mk2 with tinyos?

2011-08-19 Thread soahil shuaib
Dear Janos Sallai,

As per the command line you mentioned, i entered the following to compile and 
install the Blink application on my platform:


PROGRAMMER=avrdude make rcb128rfa1 install,1 avrispmkii,usb


It worked fine and the application compiled. But when it came to avrdude 
programming the platform, the following was the output and it ended in an error:


installing rcb128rfa1 binary using avrispmkii
avrdude -cavrispmkII -Pusb -U hfuse:w:0x99:m -pm128rfa1 efuse:w:0xff:m 
-C/etc/avrdude/avrdude.conf  -U flash:w:build/rcb128rfa1/main.srec.out-123:a
avrdude was compiled without usb support.

avrdude done.  Thank you.

make: *** [program] Error 1


It appears that avrdude does not recognizes the usb. I am using a linux distro 
and tinyos was installed using stanford repository.

Any help or suggestion would be really appreciated.

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

[Tinyos-help] hi

2011-08-19 Thread Rakshitha GB
hello ... i need help in deploying Blink application on telosb..

i hv executed the command make telosb, and also   make telosb reinstall
bsl,/dev/ttyUSB0

nd d error am getting is   make: *** No rule to make target `telosb'.
Stop..

am in badly need of help

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

Re: [Tinyos-help] [Tinyos-devel] [Tinyos Core WG] Cross compilers and 2.1.2 update

2011-08-19 Thread Eric Decker
I haven't tried the stanford build.   I do have the tar balls that I've
built.

These were built on Ubuntu Lucid 10.04,  The tar ball can be found at:
http://tinyprod.net/downloads/msp430-20110813.tgz

The above is labelled LTS_20110716_0813 and has the patches peter has put up
through 08/13/11.


You need to install it in /opt.   You will also need to install libmpc-dev
and libmpc2.

See
http://www.mail-archive.com/mspgcc-users@lists.sourceforge.net/msg10143.html


I haven't done extensive testing yet but have done a few test compiles.
Give it a whirl and see how it works.

It would be good to see what is going on with the Stanford repository.

eric


On Fri, Aug 19, 2011 at 1:35 AM, Kevin Daly  wrote:

> Hi,
>
> Thanks for the info.
>
> A quick test this morning shows something is very broken for me.
>
> Code that was compiling and working no problem for me yesterday is not
> compiling for me now. I'm 100% certain that the only difference is the
> updates to msp430-gcc, msp430-libc-tinyos and msp430-binutils-tinyos from
> the stanford repository (ttp://tinyos.stanford.edu/tinyos/dists/ubuntulucid 
> main). I don't have a record of the versions I was running yesterday,
> but it was the version that was in the repository before these.
>
> I updated tinyos-main from trunk this morning (after the first failed
> compiling attempt) so I'm using revision 5695.
>
> See the attached text file for the errors I get when compiling Null for
> telosb.
> The first error that jumps out at me is msp430.h is not being found, but I
> do have it at
> /usr/lib/gcc/msp430/4.5.3/plugin/include/config/msp430/msp430.h. Any idea as
> to why the build system is not finding this. Am I missing an environment
> variable or what? Or any other ideas as to what is going wrong?
>
> Versions I have installed now:
> msp430-gcc: 4.5.3-20110811
> msp430-libc-tinyos: 20110612-20110811
> msp430-binutils-tinyos: 2.21.1-20110811
>
> I'll be very surprised if this problem is specific to my system, as I would
> have thought it was fairly standard (on Ubuntu 10.04 64-bit).
>
> Thanks,
> Kev
>
>
>
> On Fri, Aug 19, 2011 at 1:23 AM, Eric Decker  wrote:
>
>>
>>
>> On Thu, Aug 18, 2011 at 12:54 PM, Kevin Daly wrote:
>>
>>> Hi,
>>>
>>> Moving this to tinyos-help, as I'm sure it is is a more appropriate
>>> location for this question.
>>>
>>> In practical terms, for those of us who use msp430-gcc, but are not
>>> platform maintainers, what does this change to watchdog timer behaviour
>>> mean? Is there some change needed to the core platform files before this
>>> version of msp430-gcc can be used?
>>>
>>
>> It depends on your platform code.   Peter put in modifications for
>> existing platforms that preserves the existing old toolchain behaviour.
>>  Namely it disables the watchdog.
>>
>> In practice for production systems, the watchdog should get used because
>> it protects against the code going south in a major way.   But for the
>> current trunk it is disabled.  This was inherited from the way the old
>> toolchain worked.
>>
>> In the SVN trunk, the code is there for the shimmer, span, and telosb
>> platforms.   Those are the ones I checked.  I'm pretty sure that Peter got
>> all the major msp430 platforms supported in the trunk.
>>
>>
>>
>>> The package manager on my linux box just updated the msp430-gcc version
>>> to 4.x when I wasn't paying attention, so, what do I need to do to stop the
>>> watchdog timer from breaking all my apps? Is there a flag I can add to the
>>> makefile re-disable the watchdog timer if it proves problematic, or do I
>>> need to disable it in Boot.booted() (and if so exaclty how), or if I did
>>> want to tickle it, what is the easiest way to do this? I'll go read through
>>> the msp430f1611 user guide in the morning, but i'm on a fairly tight
>>> deadline at the moment so any advice is welcome.
>>>
>>
>> If you are using the main trunk you should be okay.   Or take a look at
>> the main trunk and search for WDTCTL.   You'll see where to put it if you
>> aren't on the main trunk.
>>
>> Take a look at tos/platforms/shimmer2/PlatformP.nc, look for WDTCTL.
>>
>>
>>> Incidentally, if it matters, I'm primarily using telosbs and tmotes, with
>>> a few shimmers scattered around.
>>>
>>> I could revert back to the version 3.x msp430-gcc, but the hardware
>>> multiplier fix could be fairly compelling for me.
>>>
>>
>> It would be better to use the new toolchain.   The more time we get on it
>> the better.   It also has significantly better optimization.
>>
>>
>>> Thanks in advance,
>>> Kevin
>>>
>>> On Thu, Aug 18, 2011 at 5:51 PM, Peter Bigot  wrote:
>>>
 To save time and questions, I'd like to remind those responsible for
 MSP430-based platforms that watchdog is NOT disabled on startup 
 anymore,
 and that hardware multiply support should be fully 
 stable

Re: [Tinyos-help] [Tinyos-devel] [Tinyos Core WG] Cross compilers and 2.1.2 update

2011-08-19 Thread Eric Decker
The first error is it can't find msp430.h which should live in the toolchain
area (msp430/include/msp430.h).

It comes the package msp430-libc (msp430-libc-20110612).

And then it goes downhill from there.



On Fri, Aug 19, 2011 at 1:35 AM, Kevin Daly  wrote:

> Hi,
>
> Thanks for the info.
>
> A quick test this morning shows something is very broken for me.
>
> Code that was compiling and working no problem for me yesterday is not
> compiling for me now. I'm 100% certain that the only difference is the
> updates to msp430-gcc, msp430-libc-tinyos and msp430-binutils-tinyos from
> the stanford repository (ttp://tinyos.stanford.edu/tinyos/dists/ubuntulucid 
> main). I don't have a record of the versions I was running yesterday,
> but it was the version that was in the repository before these.
>
> I updated tinyos-main from trunk this morning (after the first failed
> compiling attempt) so I'm using revision 5695.
>
> See the attached text file for the errors I get when compiling Null for
> telosb.
> The first error that jumps out at me is msp430.h is not being found, but I
> do have it at
> /usr/lib/gcc/msp430/4.5.3/plugin/include/config/msp430/msp430.h. Any idea as
> to why the build system is not finding this. Am I missing an environment
> variable or what? Or any other ideas as to what is going wrong?
>
> Versions I have installed now:
> msp430-gcc: 4.5.3-20110811
> msp430-libc-tinyos: 20110612-20110811
> msp430-binutils-tinyos: 2.21.1-20110811
>
> I'll be very surprised if this problem is specific to my system, as I would
> have thought it was fairly standard (on Ubuntu 10.04 64-bit).
>
> Thanks,
> Kev
>
>
>
> On Fri, Aug 19, 2011 at 1:23 AM, Eric Decker  wrote:
>
>>
>>
>> On Thu, Aug 18, 2011 at 12:54 PM, Kevin Daly wrote:
>>
>>> Hi,
>>>
>>> Moving this to tinyos-help, as I'm sure it is is a more appropriate
>>> location for this question.
>>>
>>> In practical terms, for those of us who use msp430-gcc, but are not
>>> platform maintainers, what does this change to watchdog timer behaviour
>>> mean? Is there some change needed to the core platform files before this
>>> version of msp430-gcc can be used?
>>>
>>
>> It depends on your platform code.   Peter put in modifications for
>> existing platforms that preserves the existing old toolchain behaviour.
>>  Namely it disables the watchdog.
>>
>> In practice for production systems, the watchdog should get used because
>> it protects against the code going south in a major way.   But for the
>> current trunk it is disabled.  This was inherited from the way the old
>> toolchain worked.
>>
>> In the SVN trunk, the code is there for the shimmer, span, and telosb
>> platforms.   Those are the ones I checked.  I'm pretty sure that Peter got
>> all the major msp430 platforms supported in the trunk.
>>
>>
>>
>>> The package manager on my linux box just updated the msp430-gcc version
>>> to 4.x when I wasn't paying attention, so, what do I need to do to stop the
>>> watchdog timer from breaking all my apps? Is there a flag I can add to the
>>> makefile re-disable the watchdog timer if it proves problematic, or do I
>>> need to disable it in Boot.booted() (and if so exaclty how), or if I did
>>> want to tickle it, what is the easiest way to do this? I'll go read through
>>> the msp430f1611 user guide in the morning, but i'm on a fairly tight
>>> deadline at the moment so any advice is welcome.
>>>
>>
>> If you are using the main trunk you should be okay.   Or take a look at
>> the main trunk and search for WDTCTL.   You'll see where to put it if you
>> aren't on the main trunk.
>>
>> Take a look at tos/platforms/shimmer2/PlatformP.nc, look for WDTCTL.
>>
>>
>>> Incidentally, if it matters, I'm primarily using telosbs and tmotes, with
>>> a few shimmers scattered around.
>>>
>>> I could revert back to the version 3.x msp430-gcc, but the hardware
>>> multiplier fix could be fairly compelling for me.
>>>
>>
>> It would be better to use the new toolchain.   The more time we get on it
>> the better.   It also has significantly better optimization.
>>
>>
>>> Thanks in advance,
>>> Kevin
>>>
>>> On Thu, Aug 18, 2011 at 5:51 PM, Peter Bigot  wrote:
>>>
 To save time and questions, I'd like to remind those responsible for
 MSP430-based platforms that watchdog is NOT disabled on startup 
 anymore,
 and that hardware multiply support should be fully 
 stableand
  -mdisable-hwmul should be removed from any Makefiles or other places
 they might be hiding.

 There is a bug in the original LTS-20110716 mspgcc release that affects
 multiplication when using emulation instead of the hardware multiplier (in
 other words, -mdisable-hwmul will generate bad code while removing it will
 not).  This was discovered in the last few days and is probably not in the
 uploaded tool

Re: [Tinyos-help] hi

2011-08-19 Thread scatram...@gmail.com
I guess you haven't set the environment already.

Try this before compiling:

export TOSROOT="/opt/tinyos-2.1.1"
export TOSDIR="$TOSROOT/tos"
export MAKERULES="$TOSROOT/support/make/Makerules"

BR,
Davide


On 19 Aug 2011, at 10:42, Rakshitha GB wrote:

> hello ... i need help in deploying Blink application on telosb..
> 
> i hv executed the command make telosb, and also   make telosb reinstall 
> bsl,/dev/ttyUSB0
> 
> nd d error am getting is   make: *** No rule to make target `telosb'.  Stop..
> 
> am in badly need of help
> 
> Thank u..
> 
> ___
> 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] PowerTossimZ

2011-08-19 Thread OMNIA MEZGHANI


Hi,
I have the powercurses.exe file in the powercurses directory and I have 
installed libncurses-dev (for the curses.h library); I also compiled 
powercurses.c but the same error  "bash: ./powercurses: No such file or 
directory" exist 
I need your help please
thank you
 
 
 
 
 
 
 
 
 
 
 
 


 
 


 -Telecharger gratuitement DollarBarre et gagner plein d'argent
-passez votre annonce gratuitement ici
(offre d'omploi, voiture, immobilier, ventes&achats, location, 
business&affaire...)





Date: Fri, 19 Aug 2011 16:04:25 +0800
From: fajar...@yahoo.co.id
Subject: Re: [Tinyos-help] PowerTossimZ
To: tinyos-help@millennium.berkeley.edu; mezghani_omnia...@hotmail.com

Hi, make sure you have a powercurses.exe file in the working directory. 
Since the file needs curses library (curses.h), maybe you need to recompile 
powercurses.c  for your environment. 

Fjr.


Dari: OMNIA MEZGHANI 
Judul: [Tinyos-help] PowerTossimZ
Kepada: tinyos-help@millennium.berkeley.edu
Tanggal: Kamis, 18 Agustus, 2011, 10:57 PM






Hi ,
I need your help, I followed the Readme.txt of the PowerTossimZ but I encounter 
a problem with  the last instruction 'cat EnergyPowerCurses.txt | ./powercurses 
11'. I also tried './powercurses (num_motes_simulation) < 
EnergyPowerCurses.txt' but the same error is shown "bash: ./powercurses: No 
such file or directory" 
can you help me please 
   



___
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] error asm

2011-08-19 Thread Amin Amin
Hi all,

I used a library which contains a code of asm (assembler) in tinyos
2.1.0. When i try to make simulation by 'make micaz sim', i have this
error:

error:unknow register name 'r' in 'asm'

Am in badly need for help, can any one help me please.

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] TOSSIM, TinyOs 1.x

2011-08-19 Thread Yazeed ncl
Hi all,
My name is Yazeed.
I am trying to simulate a replay attack on TinySec. The first problem that I
face is that the TOSSIM has already 3 users and I would like to use just one
of them to send more than one message (thus replay attack).
I am wondering If I can make a user send or receive more than one message ?
and how ?

Please help me

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

Re: [Tinyos-help] Has anyone used AVRISP mk2 with tinyos?

2011-08-19 Thread Bíró András
Sorry, thats my mistake, I forgot to install libusb-dev before
compiling avrdude. Here are the recompiled packages with usb support:
http://shell.sch.bme.hu/~biroandris/pkg/
They will also be in the repository soon.

Andris

2011/8/19 soahil shuaib :
> Dear Janos Sallai,
> As per the command line you mentioned, i entered the following to compile
> and install the Blink application on my platform:
>
> PROGRAMMER=avrdude make rcb128rfa1 install,1 avrispmkii,usb
>
> It worked fine and the application compiled. But when it came to avrdude
> programming the platform, the following was the output and it ended in an
> error:
>
> installing rcb128rfa1 binary using avrispmkii
> avrdude -cavrispmkII -Pusb -U hfuse:w:0x99:m -pm128rfa1 efuse:w:0xff:m
> -C/etc/avrdude/avrdude.conf  -U flash:w:build/rcb128rfa1/main.srec.out-123:a
> avrdude was compiled without usb support.
>
> avrdude done.  Thank you.
>
> make: *** [program] Error 1
>
> It appears that avrdude does not recognizes the usb. I am using a linux
> distro and tinyos was installed using stanford repository.
> Any help or suggestion would be really appreciated.
> Thanks,
> Sohail
>
>
>
>

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


Re: [Tinyos-help] PowerTossimZ

2011-08-19 Thread OMNIA MEZGHANI

thank you I resolved the problem, now it is working the graphic
thank you Fjr 



   
 
 
 
 
 
 
 
 
 
 
 
 


 
 


 -Telecharger gratuitement DollarBarre et gagner plein d'argent
-passez votre annonce gratuitement ici
(offre d'omploi, voiture, immobilier, ventes&achats, location, 
business&affaire...)





From: mezghani_omnia...@hotmail.com
To: tinyos-help@millennium.berkeley.edu
Subject: RE: [Tinyos-help] PowerTossimZ
Date: Fri, 19 Aug 2011 16:07:02 +0100









Hi,
I have the powercurses.exe file in the powercurses directory and I have 
installed libncurses-dev (for the curses.h library); I also compiled 
powercurses.c but the same error  "bash: ./powercurses: No such file or 
directory" exist 
I need your help please
thank you
 
 
 
 
 
 
 
 
 
 
 
 


 
 


 -Telecharger gratuitement DollarBarre et gagner plein d'argent
-passez votre annonce gratuitement ici
(offre d'omploi, voiture, immobilier, ventes&achats, location, 
business&affaire...)





Date: Fri, 19 Aug 2011 16:04:25 +0800
From: fajar...@yahoo.co.id
Subject: Re: [Tinyos-help] PowerTossimZ
To: tinyos-help@millennium.berkeley.edu; mezghani_omnia...@hotmail.com

Hi, make sure you have a powercurses.exe file in the working directory. 
Since the file needs curses library (curses.h), maybe you need to recompile 
powercurses.c  for your environment. 

Fjr.


Dari: OMNIA MEZGHANI 
Judul: [Tinyos-help] PowerTossimZ
Kepada: tinyos-help@millennium.berkeley.edu
Tanggal: Kamis, 18 Agustus, 2011, 10:57 PM






Hi ,
I need your help, I followed the Readme.txt of the PowerTossimZ but I encounter 
a problem with  the last instruction 'cat EnergyPowerCurses.txt | ./powercurses 
11'. I also tried './powercurses (num_motes_simulation) < 
EnergyPowerCurses.txt' but the same error is shown "bash: ./powercurses: No 
such file or directory" 
can you help me please 
   



___
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] Read from UART0, send through radio with telosb

2011-08-19 Thread M C
Hi!


I'm trying to use a telosb mote to receive data from a device to the
UART0Tx and Rx via the pins in the 10-pin expansion port.

Until now, I've used the Oscilloscope, the TestSerial and other
examples, but the end result is the same: I can receive data via UART0
_or_ receive/send data via radio. I can't have radio and UART
communication at the same time.

Is there anyone that has some code (that could provide) that can
receive data from UART0 and send it to the radio? The examples only
work with the USB connection.


Any help would be greatly appreciated!


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


Re: [Tinyos-help] Wrong printed value

2011-08-19 Thread Geo Gkolfin
Thanks for your answer!
Actually it almost worked!
%lu prints 3354000128 instead of 3354000112.
%lx prints c7e9fb00 which is 3354000128 hex.
This can drive you crazy! Any ideas please?

On Thu, Aug 18, 2011 at 12:58 AM, Michael Schippling wrote:

> That is a little odd...
>
> I guess the implicit casting is trying to help you by
> returning the largest value for the uint16 when converting
> from a too-big float. When you change to uint32 you
> should get 0xC7E9FAF0 in your integer (which is what
> my Widows calculator shows as the correct conversion
> for decimal 354000112). Then, because the top bit is
> set and you asked for a signed decimal output "%ld"
> you should get a negative value, but it's off by 16...
>  -940967168d == 0xC7E9FB00
> so I'm not sure what is going on.
>
> Try printing %lu or %lx and see what you get.
>
> MS
>
> Geo Gkolfin wrote:
>
>> Hello!
>>
>> I am using telosb motes and tinyos-2.1.0. I have an application in which
>> some floating point operations are done and I wish to print (using
>> PrintfClient) only the decimal part of the result. Since the printed value
>> is not what it should be -it is always 65535- I wrote a simple program where
>> I have:
>>
>> float y;
>> uint16_t x;
>>
>>  y=4354.542134509;
>>  x=y;
>> printf("int(4354.542134509)=%**u\n",x);
>> printfflush();
>>
>> I run
>> java net.tinyos.tools.PrintfClient -comm serial@/dev/ttyUSB0:telosb
>>
>> and I get the 4354!
>>
>> If I change the value stored in y to:
>> y=3354000112.542134509 then the printf returns 65535 -the same value as in
>> my application!  So I guess this is because the value does not "fit" into a
>> uint16_t. I change x definition to uint32_t and %u to %ld (make is okay with
>> that), but then the printed value is -940967168!
>> What is the problem?
>>
>> Thanks in advance,
>> Georgia
>>
>>
>> --**--**
>> 
>>
>> __**_
>> 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] Wrong printed value

2011-08-19 Thread Eric Decker
On Fri, Aug 19, 2011 at 11:32 AM, Geo Gkolfin  wrote:

> Thanks for your answer!
> Actually it almost worked!
> %lu prints 3354000128 instead of 3354000112.
> %lx prints c7e9fb00 which is 3354000128 hex.
> This can drive you crazy! Any ideas please?
>

Without explicitly stepping through the code and seeing what it is doing, we
would be guessing.

>
> On Thu, Aug 18, 2011 at 12:58 AM, Michael Schippling wrote:
>
>> That is a little odd...
>>
>> I guess the implicit casting is trying to help you by
>> returning the largest value for the uint16 when converting
>> from a too-big float. When you change to uint32 you
>> should get 0xC7E9FAF0 in your integer (which is what
>> my Widows calculator shows as the correct conversion
>> for decimal 354000112). Then, because the top bit is
>> set and you asked for a signed decimal output "%ld"
>> you should get a negative value, but it's off by 16...
>>  -940967168d == 0xC7E9FB00
>> so I'm not sure what is going on.
>>
>> Try printing %lu or %lx and see what you get.
>>
>> MS
>>
>> Geo Gkolfin wrote:
>>
>>> Hello!
>>>
>>> I am using telosb motes and tinyos-2.1.0. I have an application in which
>>> some floating point operations are done and I wish to print (using
>>> PrintfClient) only the decimal part of the result. Since the printed value
>>> is not what it should be -it is always 65535- I wrote a simple program where
>>> I have:
>>>
>>> float y;
>>> uint16_t x;
>>>
>>>  y=4354.542134509;
>>>  x=y;
>>> printf("int(4354.542134509)=%**u\n",x);
>>> printfflush();
>>>
>>> I run
>>> java net.tinyos.tools.PrintfClient -comm serial@/dev/ttyUSB0:telosb
>>>
>>> and I get the 4354!
>>>
>>> If I change the value stored in y to:
>>> y=3354000112.542134509 then the printf returns 65535 -the same value as
>>> in my application!  So I guess this is because the value does not "fit" into
>>> a uint16_t. I change x definition to uint32_t and %u to %ld (make is okay
>>> with that), but then the printed value is -940967168!
>>> What is the problem?
>>>
>>> Thanks in advance,
>>> Georgia
>>>
>>>
>>> --**--**
>>> 
>>>
>>> __**_
>>> 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

Re: [Tinyos-help] Wrong printed value

2011-08-19 Thread Geo Gkolfin
There are not so many steps to be made. The functionality is described in my
first mail.


On Fri, Aug 19, 2011 at 9:38 PM, Eric Decker  wrote:

>
>
> On Fri, Aug 19, 2011 at 11:32 AM, Geo Gkolfin  wrote:
>
>> Thanks for your answer!
>> Actually it almost worked!
>> %lu prints 3354000128 instead of 3354000112.
>> %lx prints c7e9fb00 which is 3354000128 hex.
>> This can drive you crazy! Any ideas please?
>>
>
> Without explicitly stepping through the code and seeing what it is doing,
> we would be guessing.
>
>>
>> On Thu, Aug 18, 2011 at 12:58 AM, Michael Schippling 
>> wrote:
>>
>>> That is a little odd...
>>>
>>> I guess the implicit casting is trying to help you by
>>> returning the largest value for the uint16 when converting
>>> from a too-big float. When you change to uint32 you
>>> should get 0xC7E9FAF0 in your integer (which is what
>>> my Widows calculator shows as the correct conversion
>>> for decimal 354000112). Then, because the top bit is
>>> set and you asked for a signed decimal output "%ld"
>>> you should get a negative value, but it's off by 16...
>>>  -940967168d == 0xC7E9FB00
>>> so I'm not sure what is going on.
>>>
>>> Try printing %lu or %lx and see what you get.
>>>
>>> MS
>>>
>>> Geo Gkolfin wrote:
>>>
 Hello!

 I am using telosb motes and tinyos-2.1.0. I have an application in which
 some floating point operations are done and I wish to print (using
 PrintfClient) only the decimal part of the result. Since the printed value
 is not what it should be -it is always 65535- I wrote a simple program 
 where
 I have:

 float y;
 uint16_t x;

  y=4354.542134509;
  x=y;
 printf("int(4354.542134509)=%**u\n",x);
 printfflush();

 I run
 java net.tinyos.tools.PrintfClient -comm serial@/dev/ttyUSB0:telosb

 and I get the 4354!

 If I change the value stored in y to:
 y=3354000112.542134509 then the printf returns 65535 -the same value as
 in my application!  So I guess this is because the value does not "fit" 
 into
 a uint16_t. I change x definition to uint32_t and %u to %ld (make is okay
 with that), but then the printed value is -940967168!
 What is the problem?

 Thanks in advance,
 Georgia


 --**--**
 

 __**_
 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

Re: [Tinyos-help] Wrong printed value

2011-08-19 Thread Michael Schippling
ahI think the number of significant digits for a float is 24 bits
so the cast may be rounding. See:
 http://en.wikipedia.org/wiki/Floating_point#Rounding_modes

MS

Geo Gkolfin wrote:
> There are not so many steps to be made. The functionality is described 
> in my first mail.
> 
> 
> On Fri, Aug 19, 2011 at 9:38 PM, Eric Decker  > wrote:
> 
> 
> 
> On Fri, Aug 19, 2011 at 11:32 AM, Geo Gkolfin  > wrote:
> 
> Thanks for your answer!
> Actually it almost worked!
> %lu prints 3354000128 instead of 3354000112.
> %lx prints c7e9fb00 which is 3354000128 hex.
> This can drive you crazy! Any ideas please?
> 
> 
> Without explicitly stepping through the code and seeing what it is
> doing, we would be guessing. 
> 
> 
> On Thu, Aug 18, 2011 at 12:58 AM, Michael Schippling
> mailto:sc...@santafe.edu>> wrote:
> 
> That is a little odd...
> 
> I guess the implicit casting is trying to help you by
> returning the largest value for the uint16 when converting
> from a too-big float. When you change to uint32 you
> should get 0xC7E9FAF0 in your integer (which is what
> my Widows calculator shows as the correct conversion
> for decimal 354000112). Then, because the top bit is
> set and you asked for a signed decimal output "%ld"
> you should get a negative value, but it's off by 16...
>  -940967168d == 0xC7E9FB00
> so I'm not sure what is going on.
> 
> Try printing %lu or %lx and see what you get.
> 
> MS
> 
> Geo Gkolfin wrote:
> 
> Hello!
> 
> I am using telosb motes and tinyos-2.1.0. I have an
> application in which some floating point operations are
> done and I wish to print (using PrintfClient) only the
> decimal part of the result. Since the printed value is
> not what it should be -it is always 65535- I wrote a
> simple program where I have:
> 
> float y;
> uint16_t x;
> 
>  y=4354.542134509;
>  x=y;
> printf("int(4354.542134509)=%__u\n",x);
> printfflush();
> 
> I run
> java net.tinyos.tools.PrintfClient -comm
> serial@/dev/ttyUSB0:telosb
> 
> and I get the 4354!
> 
> If I change the value stored in y to:
> y=3354000112.542134509 then the printf returns 65535
> -the same value as in my application!  So I guess this
> is because the value does not "fit" into a uint16_t. I
> change x definition to uint32_t and %u to %ld (make is
> okay with that), but then the printed value is -940967168!
> What is the problem?
> 
> Thanks in advance,
> Georgia
> 
> 
> 
> --__--__
> 
> _
> 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 mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] tos-nwprog (over-the-air programming)

2011-08-19 Thread Mohammed Alshaboti
Hi,
I installed tinyos-2.1.1, but tools folder does not exist in $TOOSROOT 

I need to use tos-nwprog tool, but I can't because the whole tools folder does 
not exist

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


[Tinyos-help] TinyOS, TOSSIM

2011-08-19 Thread YAZEED ALKHURAYYIF

Hi all,
My name is Yazeed.
I am trying to simulate a replay attack on TinySec. The first problem that I 
face is that the TOSSIM has already 3 users and I would like to use just one of 
them to send more than one message (thus replay attack).
I am wondering If I can make a user send or receive more than one message ? and 
how ?

please help me

thanks 
Yazzed

--
Regards,

Yazeed ALkhurayyif
MSc Computer Security and Resilience 
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] TinyOS, TOSSIM

2011-08-19 Thread Eric Decker
On Fri, Aug 19, 2011 at 8:24 AM, YAZEED ALKHURAYYIF <
yazeed.alkhuray...@newcastle.ac.uk> wrote:

>
> Hi all,
> My name is Yazeed.
> I am trying to simulate a replay attack on TinySec. The first problem that
> I face is that the TOSSIM has already 3 users


What does that mean?   TOSSIM has 3 users.   Sorry but I am unable to parse
and derive any meaning out of your sentence.



> and I would like to use just one of them to send more than one message
> (thus replay attack).
> I am wondering If I can make a user send or receive more than one message ?
> and how ?
>
> please help me
>
> thanks
> Yazzed
>
> --
> Regards,
>
> Yazeed ALkhurayyif
> MSc Computer Security and Resilience
> ___
> 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

Re: [Tinyos-help] tos-nwprog (over-the-air programming)

2011-08-19 Thread Eric Decker
On Fri, Aug 19, 2011 at 1:23 AM, Mohammed Alshaboti
wrote:

> Hi,
> I installed tinyos-2.1.1, but tools folder does not exist in $TOOSROOT
>

I assume that $TOOSROOT is a typo.   $TOSROOT

I need to use tos-nwprog tool, but I can't because the whole tools folder
> does not exist
>

I poked around a bit.

You are clearly looking in the released version of T2 (2.1.1 release).
 Indeed there is no tools folder.   Any where.   Now I did a search for
nwprog and found tos/lib/net/blip/nwprog.I don't know if that is what
you are looking for.

Now if you go look in the development trunkSVN T2 there is a tools
folder in the top level.   And there is a tools/tinyos/misc/tos-nwprog.
 tos/lib/net/blip/nwprog also exists.


So you probably want to move to the development trunk.  Or at least copy the
files you need from there over to T2.1.1.

http://code.google.com/p/tinyos-main/source/checkout

http://docs.tinyos.net/tinywiki/index.php/Installing_from_SVN/GIT



eric



> Any help will be appreciated
> ___
> 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