Re: [Tinyos-help] Using JAVA techniques for Programming Real Sensor Nodes

2013-02-10 Thread Urs Hunkeler
Hi,

For Java on motes, you might want to look at:
- Sun SPOT: http://www.sunspotworld.com/
- IBM Mote Runner: http://www.zurich.ibm.com/moterunner/

Cheers,
Urs


On 02/10/2013 04:52 PM, idrees hussein wrote:
> I am newbie student in the field of sensor nodes, I am wondering if it
> is possible to use JAVA for programming real sensor nodes or even for
> simulation environment.
>
> Any help from those who have been worked in JAVA for programming real
> Sensor nodes will be highly appreciated in advance.
>
> Idrees
> Kuala Lumpur, Malaysia

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


Re: [Tinyos-help] Sht11 sensors and TOSSIM

2012-12-05 Thread Urs Hunkeler
Hi,

I don't think you can simulate the Sht11 with TOSSIM. As far as I 
remember, in TinyOS 2.x you can only simulate the micaz, which doesn't 
have the Sht11. The command "make telosa" works because it compiles the 
code for the TelosA platform, but you won't be able to simulate it with 
TOSSIM. "make telosb sim" doesn't work. The system was designed to 
support in the future other platforms but currently only supports MicaZ 
[1]. Therefore, the command "make telosb" most likely would succeed as well.

Maybe it is possible to simulate your code using a different simulator 
[2]. Have a look at the following simulators:
- Wsim [3]
- Avrora [4,5]

Cheers,
Urs


[1] http://docs.tinyos.net/tinywiki/index.php/TOSSIM
[2] http://www.cse.wustl.edu/~jain/cse567-11/ftp/sensor/index.html
[3] http://wsim.gforge.inria.fr/tutorial.html
[4] http://compilers.cs.ucla.edu/avrora/
[5] http://sourceforge.net/projects/avrora/


On 12/04/2012 10:39 PM, Resul DOĞAN wrote:
> Hi all
> How can I simulate with Tossim (my code containSht11 sensors)
>   "make telosb sim" and "make micaz sim" gives an error but "make
> telosa" successfully compile.
>
>
>
>
> ___
> 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] Simulator

2012-10-02 Thread Urs Hunkeler
Hi Anandghan,

I have not worked with the Wsim simulation platform. It looks very 
interesting and I think you should try it. Let us know how it works, I 
am sure other people on this mailing list would be very interested to 
know if this works well for the TelosB platform.

Cheers,
Urs


On 10/02/2012 09:16 AM, Anandghan W wrote:
> Hi Urs,
>  Which simulator should i use since there is no standard simulator 
> ? It is necessary for me to simulate the code . I found a simulator 
> Wsim http://wsim.gforge.inria.fr/tutorial.html , have you worked on it?
>
>
> On Tue, Oct 2, 2012 at 12:25 PM, Urs Hunkeler  <mailto:urs.hunke...@epfl.ch>> wrote:
>
> Hi,
>
> 1) As far as I know, and unless there were major improvements that
> were not discussed on the mailing list, TOSSIM does not support
> TelosB (yet). I have extended the Avrora simulator to also
> simulate the TelosB platform (at least partially, but including
> some sensors and the radio interface). These modifications are,
> however, not in the official release.
>
> 2) No, they use different modulations and protocols and are not
> compatible. Bluetooth also uses 2.4GHz, and all three are not
> interoperable.
>
> Cheers,
> Urs
>
>
> On 10/02/2012 06:30 AM, Anandghan W wrote:
>
> Hi ,
>  I am doing a project on Internet of Things . I am new
> to TinyOS
> and hav a few questions
>
> 1) I want to write code for telosb motes and want to simulate
> it . Can i
> do it in TOSSIM ? If not any other simulator ?
> 2) Can i connect to telosb motes using  wifi from my laptop ?
> Since they
> both work on 2.4 GHz
>
> Thanx in advance!
>
> Regards,
> Anandghan
>
>
>

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


Re: [Tinyos-help] Simulator

2012-10-01 Thread Urs Hunkeler
Hi,

1) As far as I know, and unless there were major improvements that were 
not discussed on the mailing list, TOSSIM does not support TelosB (yet). 
I have extended the Avrora simulator to also simulate the TelosB 
platform (at least partially, but including some sensors and the radio 
interface). These modifications are, however, not in the official release.

2) No, they use different modulations and protocols and are not 
compatible. Bluetooth also uses 2.4GHz, and all three are not interoperable.

Cheers,
Urs

On 10/02/2012 06:30 AM, Anandghan W wrote:
> Hi ,
>  I am doing a project on Internet of Things . I am new to TinyOS
> and hav a few questions
>
> 1) I want to write code for telosb motes and want to simulate it . Can i
> do it in TOSSIM ? If not any other simulator ?
> 2) Can i connect to telosb motes using  wifi from my laptop ? Since they
> both work on 2.4 GHz
>
> Thanx in advance!
>
> Regards,
> Anandghan

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


Re: [Tinyos-help] Telosb Simulator in TinyOS.

2012-09-19 Thread Urs Hunkeler
(copy for mailing list without attachment, as it is too big for the 
mailing list)


Hi Lukas,

I've implemented preliminary support for TelosB in Avrora. As far as I 
know it has not been integrated into the official version. I haven't 
worked on it for quite a while, so I am not sure what does work and what 
doesn't. You are welcome to try it out.

The attached patch file is based on avrora beta 1.7.113 (actually, 
probably a pre-release based on CVS). I think since then I did some work 
on implementing the first set of sensors (temperature and humidity), but 
they are probably not included in this patch. I also wanted to send you 
the complete modified source tree, but the archive is 15MB, which is a 
bit too big for e-mail.

Cheers,
Urs


On 09/19/2012 07:40 AM, Lukas.Li wrote:
>
> Hi all,
>
> I need to simulate a large scale of WSN. The nodes are telosb, so I want to
> do a simulation at first. But TOSSIM does not support telosb. Is there any
> other simulator I can use?
>
> Thank you.
>


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


Re: [Tinyos-help] Motelist Limitations

2012-04-07 Thread Urs Hunkeler
Hi Mohsin,

I have noticed that some operating systems do not enumerate all USB 
devices, so it might actually be a problem with your operating system / 
USB hubs. Which operating system are you using? Can you check with your 
OS' tools how many USB devices your OS detects?

Cheers,
Urs


PS: Linux worked best for me :-)


On 04/07/2012 04:01 PM, Mohsin m. Khan wrote:
> Hello,
>
> I wanted to ask about the maximum number of Telosb Motes that
> 'motelist' command can detect. I am using 24 motes connected to
> cascaded usb hubs, but motelist utility will only show 15 motes at
> max.
>
> Regards Mohsin
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] errors in 'make telosb sim'

2011-12-22 Thread Urs Hunkeler
Hi,

I have an experimental extension of the Avrora hardware simulator to 
support the TelosB platform. Why do you need to simulate TelosB?

Cheers,
Urs

On 12/22/2011 01:13 AM, Tao Zheng wrote:
> And is there any simulation tools supporting telosb platform?
>
> Thanks
>
> -Original Message-
> From: mmar...@gmail.com [mailto:mmar...@gmail.com] On Behalf Of Miklos
> Maroti
> Sent: Wednesday, December 21, 2011 4:48 PM
> To: Tao Zheng
> Cc: tinyos-help@millennium.berkeley.edu
> Subject: Re: [Tinyos-help] errors in 'make telosb sim'
>
> tossim works only for the micaz platform.
>
> On Wed, Dec 21, 2011 at 7:46 AM, Tao Zheng  wrote:
>> Hey, all
>>
>>
>>
>> In apps of Blink, I can compile tossim on platform micaz using
>> commands '#make micaz sim'.
>>
>> But when I change platform in telosb, there are some errors as
>> following,
>>
>> root@debian:/opt/tinyos-2.1.1/apps/Blink# make telosb sim
>>
>> mkdir -p simbuild/telosb
>>
>>placing object files in simbuild/telosb
>>
>>writing XML schema to app.xml
>>
>>compiling BlinkAppC to object file sim.o
>>
>> ncc -c -shared -fPIC -o simbuild/telosb/sim.o -g -O0 -O -tossim
>> -fnesc-nido-tosnodes=1000 -fnesc-simulate
>> -fnesc-nido-motenumber=sim_node\(\) -fnesc-gcc=gcc -mdisable-hwmul
>> -Wall -Wshadow -Wnesc-all -target=telosb
>> -fnesc-cfile=simbuild/telosb/app.c
>> -board= -DDEFINED_TOS_AM_GROUP=0x22 -DIDENT_APPNAME=\"BlinkAppC\"
>> -DIDENT_USERNAME=\"root\" -DIDENT_HOSTNAME=\"debian\"
>> -DIDENT_USERHASH=0x0dbc5c03L -DIDENT_TIMESTAMP=0x4ef1806fL
>> -DIDENT_UIDHASH=0x8786a72dL -I/usr/include/python2.6/
>> -Wno-nesc-data-race BlinkAppC.nc   -fnesc-dump=components
>> -fnesc-dump=variables -fnesc-dump=constants -fnesc-dump=typedefs
>> -fnesc-dump=interfacedefs -fnesc-dump=tags -fnesc-dumpfile=app.xml
>>
>> Unknown target telosb
>>
>> Known targets for TinyOS directory /opt/tinyos-2.1.1/tos
>>
>> and the specified include directories are:
>>
>>micaz telosb mica2dot telosa intelmote2 null epic shimmer2 iris
>> shimmer
>> mica2 tinynode eyesIFXv2 eyesIFXv1 mulle
>>
>> make: *** [sim-exe] Error 2
>>
>>
>>
>> I don't know why?
>>
>>
>>
>> Any suggestion is accepted and helpful.
>>
>>
>>
>> Thanks very much.
>>
>>
>> ___
>> Tinyos-help mailing list
>> Tinyos-help@millennium.berkeley.edu
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-he
>> lp
>
>
> ___
> 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] Telosb light sensor specification

2011-11-25 Thread Urs Hunkeler
Hi,

I remember getting values close to 0 (< 50) when it is dark and values 
just slightly greater than 1000 when it is very bright (without any 
conversion). If your values don't change much, I think there is a 
problem with the sensor. You should see a clear drop (50%?) when you 
cover the light sensor with your finger.

Cheers,
Urs

On 11/24/11 7:37 PM, Baudry Arthur wrote:
> Good afternoon everyone,
>
> I use a telosb node equipped with a light sensor, I have succeeded in
> receiving data from the node on my laptop, but for me the data are
> talking non sense because I always get a value next to 4000 (when I
> convert the readings to a decimal value) even if it is dark in my place.
> Is there a way to treat those data, I know that for example for
> temperature data we have to apply a formula to get the real temperature
> value. Does anyone know how to interpret the light data ?
> Have a good day, regards,
>
> --
> Arthur Baudry
> ESEO
>
>
>
> ___
> 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] Question about tmote sky flash storage

2011-11-21 Thread Urs Hunkeler
Hi David,

> If I have a tmote sky mote (telosb), then:
>
> 1. How much storage space is there in flash?
1 MB in the external (i.e., not on the microcontroller, but on the PCB) 
flash. If I remember correctly, this is actually 1024*1024 bytes.
http://memsic.com/support/documentation/wireless-sensor-networks/category/7-datasheets.html?download=152%3Atelosb&start=20

You might also be interested in the relevant tutorial:
http://docs.tinyos.net/tinywiki/index.php/Storage

> 2. If the board is upgraded with a new chip (with ability to access
> more storage space), then how well will TinyOS support this?
If you replace the on-board chip with a different but pin-compatible one 
that also uses the same protocol, you might just have to change a few 
numbers in the code. If you use a chip that is completely different, you 
will have to implement your own driver for the particular chip (but you 
can likely still use the existing drivers as examples of how to do this).

I always wanted to use SD cards for this. They are cheap and, at least 
the older (non-HC ones) have for legacy purposes an SPI interface.

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


Re: [Tinyos-help] Cannot receive packets from serial port

2011-11-21 Thread Urs Hunkeler
Hi,

Thanks for the detailed explanation why you posted off list. I think the 
list server is having a problem.

Could you program the TestSerial test application on the mote, and then 
try the following command on Ubuntu?

screen /dev/ttyUSB0 115200

This would just open the serial port and show garbage if the computer is 
receiving. If you don't receive anything, then it would appear to be a 
hardware or driver error. The TelosB motes seem to have a tendency to 
break connections on the PCB when bent, and this can affect the serial 
port. If the command above shows that you do receive data, then it is a 
software problem and we can investigate further from there on. In any 
case it would be helpful if you could copy/paste the commands and output 
that you used to program the mote and to try to establish the 
connection, e.g., the exact output of:

cd $TOSROOT/tests/TestSerial
make telosb install
java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:telos

Cheers,
Urs


On 11/21/11 9:46 AM, al face wrote:
> Good Morning,
>
> I have to apologize for not fulfilling the mail list rules and contact 
> you personally, but after 5 days waiting for the subscription response 
> I really need to step forward in trying to solve the issue I am 
> facing, and so far I have seen that you are one of the most active 
> "helpers". Therefore, I would appreciate if you still could help me.
>
> My problem is:
>
> Using tinyos 2.1.1, trying both in a virtual machine and in a PC with 
> Ubuntu installed, I'm having the same problem described in 
> "https://www.millennium.berkeley.edu/pipermail/tinyos-help/2007-July/026926.html";.
>
> Besides, as running "motelist" I get that the port is /dev/ttyUSB0, I run:
> $ java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:telos
>
> and I can only see:
> serial@/dev/ttyUSB0:115200: resynchronising
>
> I think that the Telos mote receives because the USB Receive LED (D20) 
> blinks, and also because I have been able to run other applications 
> (i.e., BlinkToRadio) with no problem. I have tried both with TelosA 
> and B. Any idea what can be the problem?
>
> Thanks in advance for any thought and idea.
>
> On Fri, Nov 18, 2011 at 9:57 AM, al face  > wrote:
>
>
>   Hi,
>
> I'm having the same problem described in
> 
> "https://www.millennium.berkeley.edu/pipermail/tinyos-help/2007-July/026926.html";.
>
> The TelosAmote receives because the USB Receive LED (D20) blinks.
> Any idea what can be the problem?
>
>

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


Re: [Tinyos-help] need help in tossim

2011-11-18 Thread Urs Hunkeler
Hi,

I am willing to help you when you have specific questions. But there are 
a few rules that you should follow:
- Write e-mails to the mailing list instead of contacting persons directly
- Have specific questions ("I don't understand X when I try to write a 
program" and not "I need help for programming")
- Show that you have made some effort to get a first idea of a solution

There are very well written tutorials that will be able to explain 
programming in NesC much better than I ever could. If you are a 
beginner, it is really worth spending a few hours reading them:

http://docs.tinyos.net/tinywiki/index.php/TinyOS_Tutorials

There are also example applications that come with the TinyOS 
installation in the "apps" sub-directory.

Cheers,
Urs

On 11/18/11 10:50 AM, Shaloo Dadwal wrote:
> SIR,
>   I need help for codes written in NesC programming language.I am 
> trying to run it with make command.
> Thank You
>
> On Fri, Nov 18, 2011 at 3:08 PM, Urs Hunkeler  <mailto:urs.hunke...@epfl.ch>> wrote:
>
> Hi,
>
> There is a tutorial for this:
>
> http://docs.tinyos.net/tinywiki/index.php/TOSSIM
>
> Cheers,
> Urs
>
>
>
> On 11/17/11 8:04 AM, Shaloo Dadwal wrote:
>
> Sir,
> Please help me in writing and running nesC codes on TOSSIM
> version 2.x.
> thank you
>
>
>
> ___
> 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] MDA300/320 and TelosB

2011-11-18 Thread Urs Hunkeler
Hi,

There is a document about an adapter that you can build. Essentially, 
you can get the hardware to communicate, but you would have to adapt the 
software by yourself.

http://www.tinyos.net/hardware/telos/telos-legacy-adapter.pdf

Cheers,
Urs


On 11/18/11 5:12 AM, Rakshitha GB wrote:
> hi sir/mam,
>
> Is MDA300/320 compatible with telosB mote?
>
>
>
>
> ___
> 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] need help in tossim

2011-11-18 Thread Urs Hunkeler
Hi,

There is a tutorial for this:

http://docs.tinyos.net/tinywiki/index.php/TOSSIM

Cheers,
Urs


On 11/17/11 8:04 AM, Shaloo Dadwal wrote:
> Sir,
> Please help me in writing and running nesC codes on TOSSIM version 2.x.
> thank you
>
>
>
> ___
> 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] Java Problem using Telosb nodes

2011-11-16 Thread Urs Hunkeler
Exactly. TinyOS does not foresee the possibility to run multiple 
applications on the same mote in parallel (other than you writing the 
application logic to do this). Also, TinyOS (at least in the default 
configuration) does not have multi-thread support.

If you just need multiple applications on a mote, but would be fine with 
restarting the mote in order to run a different application, you could 
have a look at Deluge. With Deluge you can define multiple images 
(program binaries) and I think there is an API that allows you to 
restart the mote into a different image.

Cheers,
Urs

On 11/16/11 3:52 PM, Baudry Arthur wrote:
> Hello :),
>
> Yes, but for example in the tutorial if I go the BlinkToRadio 
> directory I do make telosb and make telosb install, then I go to 
> BaseStation and do the same. The program BlinkToRadio will be erased ?
> If I want an application which is going to combine a lot of 
> applications I need to put them in the same directory with the 
> makefile rules which fits to get one unique source code ?
>
>
> On Wed, Nov 16, 2011 at 8:29 AM, Urs Hunkeler  <mailto:urs.hunke...@epfl.ch>> wrote:
>
> Hi again :-),
>
> "make install" compiles the source into the binary form, then
> modifies the binary form to alter the value of some variables
> containing the nodeID, and then programs the binary to the mote
> (erasing a previous program).
>
> "make reinstall" just alters the nodeID values in the binary and
> then programs the binary to the mote (again erasing a previous
> program). It is supposed to be faster than "make install" but only
> works if "make isntall" was executed previously.
>
> I guess the tutorial must be referring to installing the same
> program to multiple motes with different nodeIDs each time.
>
> Cheers,
> Urs
>
>
>
> On 11/16/11 3:04 PM, Baudry Arthur wrote:
>
> Yes sorry I just asked the question too fast. It's working I
> am receiving packet from my nodes. However there is something
> I still don't understand. When you do make telosb install or
> reinstall what is the difference. I mean how does it works if
> you install when are in two different application, do the new
> one erase the previous one ?
> make telosb install,1
> make telos reinstall,2
> is used in the tutorial and I don't understand the difference.
> Thank you for you help once again.
>
> On Wed, Nov 16, 2011 at 1:48 AM, Urs Hunkeler
> mailto:urs.hunke...@epfl.ch>
> <mailto:urs.hunke...@epfl.ch <mailto:urs.hunke...@epfl.ch>>>
> wrote:
>
>Hi,
>
>It depends on the program running on the TelosB. Normally, you
>should soon start to see the packets that the mote is
> sending over
>the serial port, otherwise something is wrong. Do you see data
>when you open the port in a terminal emulator (e.g., "screen
>/dev/ttyUSB0 115200") ?
>
>Cheers,
>Urs
>
>
>On 11/15/11 6:50 PM, Baudry Arthur wrote:
>
>Thank you, your line of command introduced in my .bashrc
>worked but I get stuck on : serial@/dev/ttyUSB0:115200
>    resynchronising
> for a long time I am not sure if I am suppose to wait
> or if
>it is another problem. Thank you anyway to both of you
> for the
>help.
>
>
>On Tue, Nov 15, 2011 at 2:10 AM, Urs Hunkeler
> mailto:urs.hunke...@epfl.ch>
> <mailto:urs.hunke...@epfl.ch <mailto:urs.hunke...@epfl.ch>>
> <mailto:urs.hunke...@epfl.ch <mailto:urs.hunke...@epfl.ch>
> <mailto:urs.hunke...@epfl.ch <mailto:urs.hunke...@epfl.ch>>>>
>
>wrote:
>
>   Hi,
>
>   It looks like the TinyOS Java libraries are not in your
>classpath.
>   There
>   should be a tinyos.jar file somewhere, and the CLASSPATH
>environmental
>   variable should point to it.
>
>   You can try something like:
>
>   export CLASSPATH=.:$TOSROOT/support/sdk/java/tinyos.jar
>   java net.tinyos.tools.Listen -comm
> serial@/dev/ttyUSB0:telosb
>
>   Cheers,
>   Urs
>
>
>   On 11/15/11 3:25 AM, Baudry Arthur wro

Re: [Tinyos-help] Java Problem using Telosb nodes

2011-11-16 Thread Urs Hunkeler
Hi again :-),

"make install" compiles the source into the binary form, then modifies 
the binary form to alter the value of some variables containing the 
nodeID, and then programs the binary to the mote (erasing a previous 
program).

"make reinstall" just alters the nodeID values in the binary and then 
programs the binary to the mote (again erasing a previous program). It 
is supposed to be faster than "make install" but only works if "make 
isntall" was executed previously.

I guess the tutorial must be referring to installing the same program to 
multiple motes with different nodeIDs each time.

Cheers,
Urs


On 11/16/11 3:04 PM, Baudry Arthur wrote:
> Yes sorry I just asked the question too fast. It's working I am 
> receiving packet from my nodes. However there is something I still 
> don't understand. When you do make telosb install or reinstall what is 
> the difference. I mean how does it works if you install when are in 
> two different application, do the new one erase the previous one ?
> make telosb install,1
> make telos reinstall,2
> is used in the tutorial and I don't understand the difference.
> Thank you for you help once again.
>
> On Wed, Nov 16, 2011 at 1:48 AM, Urs Hunkeler  <mailto:urs.hunke...@epfl.ch>> wrote:
>
> Hi,
>
> It depends on the program running on the TelosB. Normally, you
> should soon start to see the packets that the mote is sending over
> the serial port, otherwise something is wrong. Do you see data
> when you open the port in a terminal emulator (e.g., "screen
> /dev/ttyUSB0 115200") ?
>
> Cheers,
> Urs
>
>
> On 11/15/11 6:50 PM, Baudry Arthur wrote:
>
> Thank you, your line of command introduced in my .bashrc
> worked but I get stuck on : serial@/dev/ttyUSB0:115200
> resynchronising
>  for a long time I am not sure if I am suppose to wait or if
> it is another problem. Thank you anyway to both of you for the
> help.
>
>
> On Tue, Nov 15, 2011 at 2:10 AM, Urs Hunkeler
> mailto:urs.hunke...@epfl.ch>
> <mailto:urs.hunke...@epfl.ch <mailto:urs.hunke...@epfl.ch>>>
> wrote:
>
>Hi,
>
>It looks like the TinyOS Java libraries are not in your
> classpath.
>There
>should be a tinyos.jar file somewhere, and the CLASSPATH
> environmental
>variable should point to it.
>
>You can try something like:
>
>export CLASSPATH=.:$TOSROOT/support/sdk/java/tinyos.jar
>java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:telosb
>
>Cheers,
>Urs
>
>
>On 11/15/11 3:25 AM, Baudry Arthur wrote:
> > Thank you for your support.
> > I have compiled listen.java using javac, it worked but if I
> execute
> > the same command as previously :
> > java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:115200
> >
> > Now I get :
> >
> > Exception in thread "main" java.lang.NoClassDefFoundError:
> > net/tinyos/packet/Packetizer
> >  at
>net.tinyos.packet.BuildSource.makeSerial(BuildSource.java:241)
> >  at
>  
>  net.tinyos.packet.BuildSource.makeArgsSerial(BuildSource.java:230)
> >  at
>  
>  net.tinyos.packet.BuildSource.makePacketSource(BuildSource.java:138)
> >  at net.tinyos.tools.Listen.main(Listen.java:56)
> >
> > Any thoughts ?
> >
> > On 11/14/11, Modi, Jenis Ashokkumar <mailto:jenis.m...@email.wsu.edu>
> <mailto:jenis.m...@email.wsu.edu
> <mailto:jenis.m...@email.wsu.edu>>>  wrote:
>
> >> Hi Arthur,
> >> Chech whether Listen class is located at that location, also
>check if it's
> >> java file is available. If java file is available then you need
>to compile
> >> that file.
> >>
> >> Let me know if you are still facing problem .
> >>
> >> Jenis
> >>
> >>
> >>
> >> On Nov 14, 2011, at 5:09 PM, "Baudry
>Arthur" <mailto:arthur.bau...@gmail.com>
> <mailto:arthur.bau...@gmail.com
> <mailto:arthur.bau...@gmail.com>>>
>
> >> wrote:
>

Re: [Tinyos-help] Java Problem using Telosb nodes

2011-11-15 Thread Urs Hunkeler
Hi,

It depends on the program running on the TelosB. Normally, you should 
soon start to see the packets that the mote is sending over the serial 
port, otherwise something is wrong. Do you see data when you open the 
port in a terminal emulator (e.g., "screen /dev/ttyUSB0 115200") ?

Cheers,
Urs

On 11/15/11 6:50 PM, Baudry Arthur wrote:
> Thank you, your line of command introduced in my .bashrc worked but I 
> get stuck on : serial@/dev/ttyUSB0:115200 resynchronising
>  for a long time I am not sure if I am suppose to wait or if it is 
> another problem. Thank you anyway to both of you for the help.
>
>
> On Tue, Nov 15, 2011 at 2:10 AM, Urs Hunkeler  <mailto:urs.hunke...@epfl.ch>> wrote:
>
> Hi,
>
> It looks like the TinyOS Java libraries are not in your classpath.
> There
> should be a tinyos.jar file somewhere, and the CLASSPATH environmental
> variable should point to it.
>
> You can try something like:
>
> export CLASSPATH=.:$TOSROOT/support/sdk/java/tinyos.jar
> java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:telosb
>
> Cheers,
> Urs
>
>
> On 11/15/11 3:25 AM, Baudry Arthur wrote:
> > Thank you for your support.
> > I have compiled listen.java using javac, it worked but if I execute
> > the same command as previously :
> > java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:115200
> >
> > Now I get :
> >
> > Exception in thread "main" java.lang.NoClassDefFoundError:
> > net/tinyos/packet/Packetizer
> >  at
> net.tinyos.packet.BuildSource.makeSerial(BuildSource.java:241)
> >  at
> net.tinyos.packet.BuildSource.makeArgsSerial(BuildSource.java:230)
> >  at
> net.tinyos.packet.BuildSource.makePacketSource(BuildSource.java:138)
> >  at net.tinyos.tools.Listen.main(Listen.java:56)
> >
> > Any thoughts ?
> >
> > On 11/14/11, Modi, Jenis Ashokkumar <mailto:jenis.m...@email.wsu.edu>>  wrote:
> >> Hi Arthur,
> >> Chech whether Listen class is located at that location, also
> check if it's
> >> java file is available. If java file is available then you need
> to compile
> >> that file.
> >>
> >> Let me know if you are still facing problem .
> >>
> >> Jenis
> >>
> >>
> >>
> >> On Nov 14, 2011, at 5:09 PM, "Baudry
> Arthur"mailto:arthur.bau...@gmail.com>>
> >> wrote:
> >>
> >>> Good evening everyone,
> >>>
> >>> I am running on a xubuntu virtual machine on my windows 7
> laptop and I am
> >>> trying to make configure one of my USB port to listen to a serial
> >>> communication coming from telosb node (as the telosb only
> communicate
> >>> through usb I use that usb port as a serial one). I enter this
> command
> >>> when I am in /opt/tinyos-2.1.0/support/sdk/java
> >>>
> >>> java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:115200
> >>>
> >>> as my usb port is at /dev/ttyUSB0
> >>> and the rate of the communication for telosb is 115200
> >>> I get this error:
> >>> Exception in thread "main" java.lang.NoClassDefFoundError:
> >>> net/tinyos/tools/Listen
> >>>
> >>> Does anyone know how to fix this issue ?
> >>>
> >>> --
> >>> Arthur Baudry
> >>> ESEO
> >>>
> >>> ___
> >>> 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
> <mailto:Tinyos-help@millennium.berkeley.edu>
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
>
>
>
> -- 
> Arthur Baudry
> ESEO
>

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


Re: [Tinyos-help] Java Problem using Telosb nodes

2011-11-15 Thread Urs Hunkeler
Hi,

It looks like the TinyOS Java libraries are not in your classpath. There 
should be a tinyos.jar file somewhere, and the CLASSPATH environmental 
variable should point to it.

You can try something like:

export CLASSPATH=.:$TOSROOT/support/sdk/java/tinyos.jar
java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:telosb

Cheers,
Urs


On 11/15/11 3:25 AM, Baudry Arthur wrote:
> Thank you for your support.
> I have compiled listen.java using javac, it worked but if I execute
> the same command as previously :
> java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:115200
>
> Now I get :
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> net/tinyos/packet/Packetizer
>  at net.tinyos.packet.BuildSource.makeSerial(BuildSource.java:241)
>  at net.tinyos.packet.BuildSource.makeArgsSerial(BuildSource.java:230)
>  at 
> net.tinyos.packet.BuildSource.makePacketSource(BuildSource.java:138)
>  at net.tinyos.tools.Listen.main(Listen.java:56)
>
> Any thoughts ?
>
> On 11/14/11, Modi, Jenis Ashokkumar  wrote:
>> Hi Arthur,
>> Chech whether Listen class is located at that location, also check if it's
>> java file is available. If java file is available then you need to compile
>> that file.
>>
>> Let me know if you are still facing problem .
>>
>> Jenis
>>
>>
>>
>> On Nov 14, 2011, at 5:09 PM, "Baudry Arthur"
>> wrote:
>>
>>> Good evening everyone,
>>>
>>> I am running on a xubuntu virtual machine on my windows 7 laptop and I am
>>> trying to make configure one of my USB port to listen to a serial
>>> communication coming from telosb node (as the telosb only communicate
>>> through usb I use that usb port as a serial one). I enter this command
>>> when I am in /opt/tinyos-2.1.0/support/sdk/java
>>>
>>> java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:115200
>>>
>>> as my usb port is at /dev/ttyUSB0
>>> and the rate of the communication for telosb is 115200
>>> I get this error:
>>> Exception in thread "main" java.lang.NoClassDefFoundError:
>>> net/tinyos/tools/Listen
>>>
>>> Does anyone know how to fix this issue ?
>>>
>>> --
>>> Arthur Baudry
>>> ESEO
>>>
>>> ___
>>> 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] Conflicting conversion formulas of telosb internal temperature sensor

2011-11-14 Thread Urs Hunkeler
Hi,

The formula in the internal temperature sensor module might refer to the 
value you'd get when sampling the temperature sensor internal to the 
msp430 microcontroller. For the two SHT11 formulas, I have no idea what 
the second formula refers to, the first one seems to be the one from the 
data sheet (page 9):

http://www.sensirion.com/en/pdf/product_information/Datasheet-humidity-sensor-SHT1x.pdf

Depending on how exact the value should be, you can also measure and 
compensate for the actual battery voltage. If you have the mote plugged 
into a USB port, beware that the on-board voltage converter generates 
some heat, which in turn falsifies the reading (by up to 1 degree Celius).

Cheers,
Urs

On 11/13/11 5:41 PM, Geo Gkolfin wrote:
> Hello!
> I am trying to sample the internal sensor of a telosb mote.
> At TempC.nc I have
>
> module TempC{
> ...
> uses interface Read as Temp;
> ...
> }
>
> and at TempAppC.nc
>
> implementation{
> ...
> components TempC;
> components new SensirionSht11C() as Temp;
> ...
>
> TempC.Temp->Temp.Temperature;
> ...
> }
>
> In TempC.nc I call read() and I print the uint16_t data returned by
> Temp.readDone.
> It is about 6200. In order to convert this value to Celsius I follow the
> instructions given in
> tinyos-2.1.0/tos/chips/msp430/sensors/Msp430InternalTemperatureC.nc
>
> I multiply the value with 1.5 and I divide the result by 4096. Then I
> subtract 0.986 and I divide with 0.00355.
> Unfortunately this formula return a huge value, about 350. No way my
> room is that hot! :-)
>
> On the other hand I found
> (http://www.eecs.iu-bremen.de/wiki/index.php/TinyOS) the following
> conversions formulas:
> -40+0.01*data and
> -38.4+0.0098*data
>
> Those give nicer results, but...which one should I use? Neither of them
> give the exact same result as my thermometer but they are both quite
> close. And why the conversion formula given in
> Msp430InternalTemperatureC.nc does not work?
> Thank 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] designing full feature Tinyos Application with simulator ?

2011-11-14 Thread Urs Hunkeler
Hi,

To answer your second question: I don't know how you could do this with 
TOSSIM. Avrora simulates the hardware devices and allows you to create 
virtual serial ports to which you can connect your back-end applications 
with the user interface.

http://compilers.cs.ucla.edu/avrora/
http://avrora.cvs.sourceforge.net/avrora/

Cheers,
Urs


On 11/10/11 4:22 PM, salahadin wrote:
> Hello all,
>
> I'm new to TinyOS and doing thesis work on a wireless sensor network
> using TinyoS,but I don't have mote to practice on it. My first question
> is where shall I get the mote and which specification is good for
> laboratory (educational purpose.)The second question is, is it possible
> to develop the full application with simulator and integrate with user
> interface that developed with high level language like python/Java.
>
> designing
>
> Thanks in Advance
>
>
>
>
>
> *
>
>
> ***
> *
> *
> **
> *Salahadin Seid*
> **
> "There is no better than adversity. Every defeat, every heartbreak,
> every loss, contains its own seed, its own lesson on how to improve your
> performance the next time." Malcolm X
>
>
> **
>
>
>
> ___
> 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] Problem with serial communication using telosa

2011-11-14 Thread Urs Hunkeler
Hi Luís,

It looks like you use the old version of the build.xml which is just a 
wrapper for the Makefile and which indeed had the problem that it would 
only work to rebuild a system that was previously built. I tried to 
overcome this particular problem by writing a new build.xml. Can you try 
with the version on SVN?

Cheers,
Urs


On 11/8/11 8:07 PM, Luís Pereira wrote:
> Hi again guys,
>
> I was trying to do this patch on an Xubuntu 11.10 of one of my group
> members and after I do the ant jar command it says that cannot find the
> Listen class and so on for the other java programs.
>
> I think is a nesC problem, but i can't find what.
> The output of the ant jar command is in this file http://db.tt/BAKvtmgE.
>
> Thanks for your help.
> Luís Pereira
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Error while running net.tinyos.tools.Listen -- URGENT

2011-11-14 Thread Urs Hunkeler
Hi Jenis,

 From what I have read in the documentation, this seems to be correct. I 
have never worked with the MIB600 before. I think I found one now and 
will be able to test it on Thursday.

Cheers,
Urs


On 11/8/11 8:50 PM, Modi, Jenis Ashokkumar wrote:
> Hi Urs,
>
> Yes, I am using MIB600 from Crossbow. I am able to install application on 
> both my motes properly. But when it comes to reading packets using java 
> Listen, it says that connection refused. I am giving commands like this.
>
> 1. "make mica2 install.1 eprb,192.168.10.500" for installing BlinkToRadio 
> application
> 2. "make mica2 install.2 eprb,192.168.10.500" for installing Basestation 
> application
> 3.  java net.tinyos.tools.Listen -comm network@192.168.10.500:10002
>
>
> Also, when I try to hit telnet command for 192.168.10.500:10002, it did not 
> open the window. It automatically terminated putty blank screen.
>
> Please let me know if I am doing something wrong.
>
> Thanks&  Regards,
> Jenis
>
>
> -Original Message-
> From: tinyos-help-boun...@millennium.berkeley.edu 
> [mailto:tinyos-help-boun...@millennium.berkeley.edu] On Behalf Of Urs Hunkeler
> Sent: Friday, November 04, 2011 12:10 AM
> To: tinyos-help@millennium.berkeley.edu
> Subject: Re: [Tinyos-help] Error while running net.tinyos.tools.Listen -- 
> URGENT
>
> Hi Jenis,
>
>   From what I read I think you are using the MIB600 programming board
> originally from Crossbow?
>
> The connection-refused message means that the program tried to establish
> a TCP connection to the given IP address and port number, and the device
> refused it. Maybe the programming of the second port didn't work
> properly and the MIB600 is somehow misconfigured (did you use 3 zeros
> everywhere?).
>
> Could you give us the exact commands and the exact output for
> programming the mote and then trying to communicate with it ("make
> install" and "java listen" commands)? Also what happens if you try the
> command "telnet 192.168.**. 10002"?
>
> By the way, just as a reference for other people who might be interested
> in the question, I found the user's manual here:
> http://www.cs.ucsb.edu/~nchohan/docs/moteManual.pdf
>
> Cheers,
> Urs
>
>
>
> On 11/3/11 7:18 PM, Modi, Jenis Ashokkumar wrote:
>> Hi Michael,
>>
>> I am trying to find stuff on internet, but it seems there are very
>> few places( or say application's document e.g. Readme.txt) where I
>> can get answer for my query. Most of the readme.txt in application
>> folder specifies syntax for serial/USB device.
>>
>> For the value which I sent which I specified as
>> "192.168.**.***:10002", I am not putting that as a wild card, I am
>> just specifying * here( in the e-mail). When I install application on
>> mote, I am specifying the actual IP address. For example,
>> 192.168.10.23 . If you know the Lantronix device installer, it says
>> that 10001 port is for input and 10002 is for output. Again, you can
>> modify the port number. I have set my port numbers as 10001 and 10002
>> respectively for i/p and o/p, but it does not show me output on that
>> port. :(
>>
>> FYI: I am using mica2 motes, and trying to install basestation and
>> blinktoradio application on motes. I am installing application using
>> this kind of command : make mica2 install.1 eprb,192.168.10.50
>>
>>
>> Thanks&   Regards, JEnis
>>
>> -Original Message- From: Michael Schippling
>> [mailto:sc...@santafe.edu] Sent: Thursday, November 03, 2011 9:30 AM
>> To: Modi, Jenis Ashokkumar Cc: tinyos-help@millennium.berkeley.edu
>> Subject: Re: [Tinyos-help] Error while running
>> net.tinyos.tools.Listen -- URGENT
>>
>> ahha
>>
>> I guess you are using a network base-station/programming adapter. I'm
>> afraid you'll have to find documentation for that adapter. If you
>> send the name and number of that beast maybe someone will know how to
>> use it correctly. I only use serial or USB devices.
>>
>> It will probably boil down to figuring out the network address and
>> port number to use with the -comm argument. I notice that the value
>> you sent: "network@192.168.**.***:10002" has those wild-card *'s
>> which is probably not correct. 192.168... is usually a locally routed
>> net, so that part could be right. Presuming that you used it for
>> programming you should have the right IP address someplace, I just
>> don't know about the :port #.
>>
>> MS
>>
>> Modi, Jenis Ashokkumar wrote:
>>> Hi Mic

Re: [Tinyos-help] tinyos to .NET serial communication

2011-11-14 Thread Urs Hunkeler
Hi,

Sorry, I have never worked with C# or .NET.

Cheers,
Urs

On 11/10/11 3:19 PM, i080253 Ahsan Javed wrote:
> Hi,
> I was searching net for telosb to .NET serial communication. i
> came across an archive where you performed serial communication. Can you
> tell me how you import tinyos.jar library to .NET. Did you translated
> java code to c#?
>
> Thanks...
>
> --
>
> Ahsan Javed
> FAST - NU
> http://www.wethecoders.com
>

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


Re: [Tinyos-help] tinyos to .NET serial communication

2011-11-14 Thread Urs Hunkeler
Hi,

Sorry, I have never worked with C# or .NET.

Cheers,
Urs

On 11/10/11 3:19 PM, i080253 Ahsan Javed wrote:
> Hi,
> I was searching net for telosb to .NET serial communication. i
> came across an archive where you performed serial communication. Can you
> tell me how you import tinyos.jar library to .NET. Did you translated
> java code to c#?
>
> Thanks...
>
> --
>
> Ahsan Javed
> FAST - NU
> http://www.wethecoders.com
>

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


Re: [Tinyos-help] Simulation of client/server cluster model

2011-11-06 Thread Urs Hunkeler
Hi

TOSSIM doesn't have the memory limitations of real WSN hardware, so you 
could write a single big application that contains the code for both the 
special cluster and the rest of the WSN. You then activate one or the 
other code in a simple if() statement testing the nodeID of the motes.

Alternatively, you could use Avrora, which just simulates the hardware 
and is capable of simulating different programs on different motes.

Cheers,
Urs


On 11/5/11 9:50 AM, waqar syed wrote:
> Hi i am new it to TOSSIM
>
> I want to simulate my code for cluster base sensor network in which a
> cluster have different code then the rest. I am using tinyos1.x
>
> I ll be gratefull if you can tell me how to do
>
>
> Regards
>
> Waqar
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Error while running net.tinyos.tools.Listen -- URGENT

2011-11-04 Thread Urs Hunkeler
Hi Jenis,

 From what I read I think you are using the MIB600 programming board 
originally from Crossbow?

The connection-refused message means that the program tried to establish 
a TCP connection to the given IP address and port number, and the device 
refused it. Maybe the programming of the second port didn't work 
properly and the MIB600 is somehow misconfigured (did you use 3 zeros 
everywhere?).

Could you give us the exact commands and the exact output for 
programming the mote and then trying to communicate with it ("make 
install" and "java listen" commands)? Also what happens if you try the 
command "telnet 192.168.**. 10002"?

By the way, just as a reference for other people who might be interested 
in the question, I found the user's manual here:
http://www.cs.ucsb.edu/~nchohan/docs/moteManual.pdf

Cheers,
Urs



On 11/3/11 7:18 PM, Modi, Jenis Ashokkumar wrote:
> Hi Michael,
>
> I am trying to find stuff on internet, but it seems there are very
> few places( or say application's document e.g. Readme.txt) where I
> can get answer for my query. Most of the readme.txt in application
> folder specifies syntax for serial/USB device.
>
> For the value which I sent which I specified as
> "192.168.**.***:10002", I am not putting that as a wild card, I am
> just specifying * here( in the e-mail). When I install application on
> mote, I am specifying the actual IP address. For example,
> 192.168.10.23 . If you know the Lantronix device installer, it says
> that 10001 port is for input and 10002 is for output. Again, you can
> modify the port number. I have set my port numbers as 10001 and 10002
> respectively for i/p and o/p, but it does not show me output on that
> port. :(
>
> FYI: I am using mica2 motes, and trying to install basestation and
> blinktoradio application on motes. I am installing application using
> this kind of command : make mica2 install.1 eprb,192.168.10.50
>
>
> Thanks&  Regards, JEnis
>
> -Original Message- From: Michael Schippling
> [mailto:sc...@santafe.edu] Sent: Thursday, November 03, 2011 9:30 AM
> To: Modi, Jenis Ashokkumar Cc: tinyos-help@millennium.berkeley.edu
> Subject: Re: [Tinyos-help] Error while running
> net.tinyos.tools.Listen -- URGENT
>
> ahha
>
> I guess you are using a network base-station/programming adapter. I'm
> afraid you'll have to find documentation for that adapter. If you
> send the name and number of that beast maybe someone will know how to
> use it correctly. I only use serial or USB devices.
>
> It will probably boil down to figuring out the network address and
> port number to use with the -comm argument. I notice that the value
> you sent: "network@192.168.**.***:10002" has those wild-card *'s
> which is probably not correct. 192.168... is usually a locally routed
> net, so that part could be right. Presuming that you used it for
> programming you should have the right IP address someplace, I just
> don't know about the :port #.
>
> MS
>
> Modi, Jenis Ashokkumar wrote:
>> Hi Michael,
>>
>> Thanks for the reply. I have installed both my motes using RJ 45(or
>> say using IP address) cable only. I cannot use the Serial cable
>> connection to my motes as it can be just connected using RJ 45
>> cable. I am confused about the below lines which is there on
>> http://docs.tinyos.net/tinywiki/index.php/Mote-PC_serial_communication_and_SerialForwarder#BaseStation_and_net.tinyos.tools.Listen
>> . which says that, "BaseStation is receiving your BlinkToRadio
>> packets and sending them to the serial port, so if it is plugged
>> into a PC we can view these packets. The Java tool Listen is a
>> basic packet sniffer: it prints out the binary contents of any
>> packet it hears."
>>
>> So, my question is that, "is it necessary for me to have my mote
>> connected to PC (via serial com port) ? or Is there any mechanism
>> via which I can sniff this packets as I am using RJ 45 cable to
>> connect to my motes? I don't have serial port connection to my
>> motes. "
>>
>> Waiting for your kind reply.
>>
>> Thanks&  Regards, Jenis
>>
>> -Original Message- From: Michael Schippling
>> [mailto:sc...@santafe.edu] Sent: Wednesday, November 02, 2011 9:08
>> AM To: Modi, Jenis Ashokkumar Cc:
>> tinyos-help@millennium.berkeley.edu Subject: Re: [Tinyos-help]
>> Error while running net.tinyos.tools.Listen -- URGENT
>>
>> It's a little unclear, but I'm going to assume that your point 2
>> means that you have installed Basestation on the mica2 that is
>> plugged into the host computer. And further that you are seeing
>> leds blink as one would hope...
>>
>> Then, the error you are getting indicates that Listen is expecting
>> to connect to a network port, usually the SerialForwarder. This is
>> the default behavior, but I always recommend just forgetting about
>> SF and going direct, as it were. To connect Listen to the actual
>> input port you need to set use something like "-comm
>> serial@COM1:mica2" where COM1 is the I/O port your mica2 is plugged
>> int

Re: [Tinyos-help] Run tinyos specific commands from a java program.

2011-11-02 Thread Urs Hunkeler
Hi Ashish,

When executing a process from Java, the process is executed as a binary, 
or at least without any environmental variables set. You could run the 
shell program (e.g., /bin/bash) with the script to execute as an 
argument. In addition, you might want to use absolute paths for the 
binaries executed in the script.

To debug such a problem, it is often helpful to capture stdout and 
stderr of the process you are trying to execute and to see whether the 
process returns an error value when terminating (I am not talking about 
the exception, but about the return value of the process).

Cheers,
Urs


On 11/2/11 12:08 AM, Ashish Sharma wrote:
> Hi,
>
> I have been developing a Java program and some functionality of the
> program is to run tinyos specific commands from within the program.
> Since, we have few lines of codes, I am using shell script and running
> the script from my java program. I am having some problems in
> executing the command 'java Oscilloscope' from my program.
>
> The java code to execute shell script is:
>
> # Java code
>  File file = new
> File("/opt/tinyos-2.x/apps/Oscilloscope/java");
>   String COMMAND= "./run";
>   ProcessBuilder p = new ProcessBuilder(COMMAND);
>   p.directory(file);
>   try {
>   Process startProcess= p.start();
> 
>   } catch (IOException e) {
>   e.printStackTrace();
>   }
> # End of java code.
>
> The script has following commands:
>
> # start of script
> java net.tinyos.sf.SerialForwarder -comm serial@/dev/ttyUSB0:telosb&
> sleep 4
> if cygpath -w />/dev/null 2>/dev/null; then
>CLASSPATH="oscilloscope.jar;$CLASSPATH"
> else
>CLASSPATH="oscilloscope.jar:$CLASSPATH"
> fi
> java Oscilloscope
> # end of script
>
> I cannot see the Oscilloscope program running. The script works fine
> when executed from the terminal but from my java program is only
> executing the SerialForwarder.
>
> Is it because of the classpath command in the script? I also tried to
> execute the script by passing environment variable classpath (as in
> the script), but that too didn't work. What can be the possible cause
> and solution?
>

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


Re: [Tinyos-help] tinyos help

2011-11-01 Thread Urs Hunkeler
Hi Amit,

Please don't contact people directly, send your messages to the mailing 
list.

The description of the problem that you have given is not accurate 
enough to really claim that your problem is similar to problems I might 
have had in the past. Which hardware are you using? Do you check for 
errors in sendDone()? Do you have acknowledgments enabled? How do you 
verify whether the receive() event is called?

Cheers,
Urs


On 11/1/11 6:05 AM, Amit Kumar wrote:
> Hello,
>
> I have developed an application in tinyos, pgm is working fine upto 
> sendmsg.senddone but receivemsg.receive event is not called. I checked 
> your mail regarding similar problem, could you please help me out on this.
>
> Thanks in Advance, I'll be really grateful to you.
>
> Regards,
> amit

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


Re: [Tinyos-help] Simulation tool for TinyOs 2.x?

2011-10-31 Thread Urs Hunkeler
Hi Salahadin,

Depending on your needs you might also be interested in Avrora:
http://compilers.cs.ucla.edu/avrora/

Avrora is a Mote hardware simulator written in Java and simulates the 
behavior of the actual hardware (thus it also runs applications written 
with a different framework than TinyOS). As the name implies, it was 
originally based on the AVR microcontroller family and currently 
supports Mica2 and MicaZ. Drop me a line if you need TelosB support.

Cheers,
Urs

On 10/29/11 11:23 AM, salahadin wrote:
>
> Hello All,
>
> I'm new to Tinyos, I have installed Tinyos 2.x using cygwin. the
> compilation and every thing works fine.
> But since I don't have the mote(hardware) I need to practice using the
> simulation tools. TOSSIM ,TinyVIZ
> are not working for TinyoS2.x,so which tools should I use ?
>
> Thanks in Advance
> *
> *
> **
> *Salahadin Seid*
> **
> "There is no better than adversity. Every defeat, every heartbreak,
> every loss, contains its own seed, its own lesson on how to improve your
> performance the next time." Malcolm X
>
>
> **
>
>
>
> ___
> 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] Problem with serial communication using telosa

2011-10-27 Thread Urs Hunkeler
Hi Luís,
Hi Andris,

As Andris pointed out, if you could control the RTS/DTS lines, you 
should be able to solve this. Actually, this is not a Java problem, as 
Java doesn't have support for the serial port. Java uses a JNI (Java 
Native Interface) library written in C and provided by TinyOS to access 
the serial port. Accessing the handshake lines could be fixed there. Or 
one could tell the JNI library after the connection is made to release 
the reset (by manually overwriting the RTS/DTS lines using the API 
provided by the JNI library).

If it works in C, maybe a simpler solution would be to use the serial 
forwarder written in C (I think there is one) and connect to this serial 
forwarder from the Java programs.

Cheers,
Urs


On 10/27/11 4:14 PM, Luís Pereira wrote:
> Hi Urs,
>
> Thanks for your aswer. So if Java programs work that way, there is 
> nothing I can do to make it work do I?
> Well I could make some C/C++ program to do what I want.
>
> Luís Pereira
>
>
> On Thu, Oct 27, 2011 at 07:39, Urs Hunkeler  <mailto:urs.hunke...@epfl.ch>> wrote:
>
> Hi Luís,
>
> These are interesting findings. I don't think it is a problem
> related to
> Java as a language. It appears to me that the microcontroller is reset
> as soon as the serial port is opened. Maybe the Java programs that you
> have tried set some handshaking lines that cause a reset.
>
> If you look at the schematics:
> http://www.tinyos.net/scoop/special/hardware
>
> You can see (on the last page) that the reset handling differs between
> TelosA and TelosB. If I understand this correctly, a certain
> combination
> of RTS and DTR causes a reset on the TelosA, while on the TelosB one
> needs to send a special sequence RTS and DTR (and possibly other
> handshaking signals).
>
> Cheers,
> Urs
>
>
> On 10/26/11 11:27 PM, Luís Pereira wrote:
> > Hi guys,
> >
> > Following that tip Bíró gave, i found a little program that uses
> rxtx to
> > find and open the usb port. When I run the program it find the
> door and
> > my mote stop blink again. I'm starting to think that the problem
> is with
> > java and usb ports.
> >
> > I have a little program in C that reads data from a serial port.
> When I
> > try to read from the mote it works and I have the following output:
> >
> > Transmission 1:
> > 0x0 0x63 0x6F 0x75 0x6E 0x74 0x3D 0x30 0x30 0x31 0x65 0x2C
> 0x20 0x6C
> > 0x65 0x64 0x3D 0x30 0x30 0x30
> >
> > count=001e, led=000
> >
> > Transmission 2:
> > 0x36 0xD 0xA 0x63 0x6F 0x75 0x6E 0x74 0x3D 0x30 0x30 0x31
> 0x66 0x2C
> > 0x20 0x6C 0x65 0x64 0x3D 0x30
> >
> > 6
> > count=001f, led=0
> >
> > Transmission 3:
> > 0x30 0x30 0x37 0xD 0xA 0x63 0x6F 0x75 0x6E 0x74 0x3D 0x30
> 0x30 0x32
> > 0x30 0x2C 0x20 0x6C 0x65 0x64
> >
> > 007
> > count=0020, led
> >
> > Transmission 4:
> > 0x3D 0x30 0x30 0x0 0x30 0x30 0xD 0xA 0x63 0x6F 0x75 0x6E
> 0x74 0x3D
> > 0x30 0x30 0x32 0x31 0x2C 0x20
> >
> > =
> > count=0021,
> >
> >
> > I'm not synchronizing, only reading data. The first line after
> > "Transmission X:" is the hexadecimal code i read, and the second is
> > converted to text, and as you can see I'm receiving what I'm
> suppose to,
> > so it's something related to java programs right?
> >
> >
> > Luís Pereira
> >
> >
> >
> > ___
> > 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
> <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] Problem with serial communication using telosa

2011-10-26 Thread Urs Hunkeler
Hi Luís,

These are interesting findings. I don't think it is a problem related to 
Java as a language. It appears to me that the microcontroller is reset 
as soon as the serial port is opened. Maybe the Java programs that you 
have tried set some handshaking lines that cause a reset.

If you look at the schematics:
http://www.tinyos.net/scoop/special/hardware

You can see (on the last page) that the reset handling differs between 
TelosA and TelosB. If I understand this correctly, a certain combination 
of RTS and DTR causes a reset on the TelosA, while on the TelosB one 
needs to send a special sequence RTS and DTR (and possibly other 
handshaking signals).

Cheers,
Urs


On 10/26/11 11:27 PM, Luís Pereira wrote:
> Hi guys,
>
> Following that tip Bíró gave, i found a little program that uses rxtx to
> find and open the usb port. When I run the program it find the door and
> my mote stop blink again. I'm starting to think that the problem is with
> java and usb ports.
>
> I have a little program in C that reads data from a serial port. When I
> try to read from the mote it works and I have the following output:
>
> Transmission 1:
> 0x0 0x63 0x6F 0x75 0x6E 0x74 0x3D 0x30 0x30 0x31 0x65 0x2C 0x20 0x6C
> 0x65 0x64 0x3D 0x30 0x30 0x30
>
> count=001e, led=000
>
> Transmission 2:
> 0x36 0xD 0xA 0x63 0x6F 0x75 0x6E 0x74 0x3D 0x30 0x30 0x31 0x66 0x2C
> 0x20 0x6C 0x65 0x64 0x3D 0x30
>
> 6
> count=001f, led=0
>
> Transmission 3:
> 0x30 0x30 0x37 0xD 0xA 0x63 0x6F 0x75 0x6E 0x74 0x3D 0x30 0x30 0x32
> 0x30 0x2C 0x20 0x6C 0x65 0x64
>
> 007
> count=0020, led
>
> Transmission 4:
> 0x3D 0x30 0x30 0x0 0x30 0x30 0xD 0xA 0x63 0x6F 0x75 0x6E 0x74 0x3D
> 0x30 0x30 0x32 0x31 0x2C 0x20
>
> =
> count=0021,
>
>
> I'm not synchronizing, only reading data. The first line after
> "Transmission X:" is the hexadecimal code i read, and the second is
> converted to text, and as you can see I'm receiving what I'm suppose to,
> so it's something related to java programs right?
>
>
> Luís Pereira
>
>
>
> ___
> 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] Problem with serial communication using telosa

2011-10-26 Thread Urs Hunkeler
Hi Luís,

I just had a look. It appears that telosa, telosb and tmote all use the 
same baud rate, and that the platform name for telosa on TinyOS is just 
"telos" (not tmote).

TelosA and TelosB/Tmote are similar, but not identical. It is entirely 
possible that if you compile your programs for the platform "tmote" they 
will install on the TelosA and maybe even blink the LEDs, but that other 
things (like serial communication) will not work. When you compile the 
test programs, did you do a "make telos" (and not "make tmote")? (and 
similarly "make telos install")

If it still doesn't work, could you send us the exact commands that you 
use (make, make install, java ...Listen...) and the output that you get 
for each of the commands (e.g., copy/past the text from your terminal)?

Cheers,
Urs


On 10/25/11 11:48 PM, Luís Pereira wrote:
> Hi Rafael,
>
> well when I run motelist i have:
>
> Reference Device Description
> --  -
> M4MWCK4F /dev/ttyUSB0 Moteiv Telos (Rev A 2004-04-27)
>
> Then i run:
>
> java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:tmote
>
> and i got:
>
> serial@/dev/ttyUSB0:115200: resynchronising
>
> and the leds of the mote stop blinking.
>
> Luís Pereira
>
>
> 2011/10/25 Rafael de Oliveira Costa  >
>
> Hi Luís,
>
> please show what command did you executed.
>
> Rafael de Oliveira Costa,M.Sc. Student
> PPGI - UFRJ
> Rio de Janeiro, RJ, Brazil
> http://www.labnet.nce.ufrj.br 
> "The first step to getting the things you want out of life is this :
> decide what you want", Ben Stein
>
>
>
> 2011/10/24 Luís Pereira  >
>
> Hi All,
>
> I'm starting a project at my school using telosa. I'm trying to
> do the tutorial and i got stuck in lesson 4.
>
> I can't receive data from telosa. When I try
> "java.net.tinyos.tools.Listen" or "java TestSerial" or even the
> serialForwarder programs it shows me the "resynchronizing"
> message and nothing else happens. With the application that the
> mote blinks it's leds in an binary count, when i try to connect
> it stops counting.
>
> I already search in all the mailing list i nothing i found about
> this solve my problem.
>
> Can anyone help me please?
>
> Thanks for your help
> Luís Pereira
>
> ___
> 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 mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Problem with serial communication using telosa

2011-10-26 Thread Urs Hunkeler
Hi Luís,

The FTDI drivers actually only create one serial port (the others were 
probably thinking of the X-Bow MIB520 programming boards for the 
Mica-series of motes).

The telosa platform is distinct from the telosb / tmote platform. If you 
really have a telosa platform, maybe you could try the command:

java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:telosa

I did not verify this, but it is possible that the telosa platform uses 
a different baud-rate than the telosb/tmote platforms (and by specifying 
telosa instead of tmote this should be rectified).

Cheers,
Urs


On 10/25/11 11:48 PM, Luís Pereira wrote:
> Hi Rafael,
>
> well when I run motelist i have:
>
> Reference Device Description
> --  -
> M4MWCK4F /dev/ttyUSB0 Moteiv Telos (Rev A 2004-04-27)
>
> Then i run:
>
> java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:tmote
>
> and i got:
>
> serial@/dev/ttyUSB0:115200: resynchronising
>
> and the leds of the mote stop blinking.
>
> Luís Pereira
>
>
> 2011/10/25 Rafael de Oliveira Costa  >
>
> Hi Luís,
>
> please show what command did you executed.
>
> Rafael de Oliveira Costa,M.Sc. Student
> PPGI - UFRJ
> Rio de Janeiro, RJ, Brazil
> http://www.labnet.nce.ufrj.br 
> "The first step to getting the things you want out of life is this :
> decide what you want", Ben Stein
>
>
>
> 2011/10/24 Luís Pereira  >
>
> Hi All,
>
> I'm starting a project at my school using telosa. I'm trying to
> do the tutorial and i got stuck in lesson 4.
>
> I can't receive data from telosa. When I try
> "java.net.tinyos.tools.Listen" or "java TestSerial" or even the
> serialForwarder programs it shows me the "resynchronizing"
> message and nothing else happens. With the application that the
> mote blinks it's leds in an binary count, when i try to connect
> it stops counting.
>
> I already search in all the mailing list i nothing i found about
> this solve my problem.
>
> Can anyone help me please?
>
> Thanks for your help
> Luís Pereira
>
> ___
> 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 mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Regarding Tiny os & Java

2011-10-18 Thread Urs Hunkeler
Hi,

TinyOS is based on C. Java is only used on the back-end (e.g., 
computer). With TinyOS you cannot use Java on the sensor platforms 
(e.g., motes) themselves. If you are interested in using Java on the 
sensor nodes, you might want to look into IBM's moterunner project:
http://www.zurich.ibm.com/moterunner/

Cheers,
Urs


On 10/18/11 6:23 AM, jyoti patole wrote:
>
>
> Hello sir,
>
> This is jyoti.
>
>  From last few days i have started woking on Tiny OS.
>
> Sir i would like to know , can we use libraries written in JAVA language
> in Tiny OS?
>
> Means whether JAVA is compatible with Tiny OS?
>
> Please Reply.
>
> Thanking you.
>
> --
>
>
>
>
>
>
>
>
>
>
> With Warm Regards
>
> *JYOTI
> 9766319445*
>
>
>
> ___
> 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] IPv6 tunneling

2011-10-17 Thread Urs Hunkeler
Hi Marios,

Have you asked in the Sixxs forums? I don't see why Sixxs would need to 
be able to ping your hosts on the IPv4 network. As long as your 
IPv6-tunnel agent (aiccu) is receiving and answering the server's 
replies, it should work. Sixxs is indeed pinging your end-point, but, as 
far as I know, over IPv6, which should not be controlled or filtered by 
your ISP.

Cheers,
Urs


On 10/17/11 2:50 PM, aggeloko wrote:
> Hi to All,
>
> here's the case. I would like to assign to my WSN global IPv6
> addresses, i.e. someone should be able to ping (or make http requests)
> any of my motes via internet using the IPv6 address of that mote.
>
>   I have static IPv4 address and my network administrator filters ICMP
> packets (thus no pinging available). I tried tunneling with Sixxs but
> with no pinging this doesn't work. I guess I could write a
> web-service, running on my edge-pc, that would resolve any incoming
> requests. However I would like a more "IPv6" solution. Perhaps some
> sort of IPv4-to-IPv6 router would do?
>
> Any ideas?
> Thnx in advance
>
> Marios
> ___
> 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] PacketTim

2011-07-22 Thread Urs Hunkeler
Hi Nihsad,

Unfortunately, I am not a specialist for time synchronization. I am sure 
there are people much more experienced in this area on the mailing list 
(which is why it's always a good idea to send messages to the mailing list).

I can only point you to the PacketTimeStamp interface 
($TOSROOT/tos/interfaces/PacketTimeStamp.nc). It is provided by the 
ActiveMessageC component 
($TOSROOT/tos/platforms/telosa/ActiveMessageC.nc) (and no, telosa is not 
a mistake, the telosb code is based on the telosa code).

Cheers,
Urs

On 7/22/11 10:52 AM, nishad kamdar wrote:
> hello,
> i am trying to implement TPSN on telsb motes .
> i have obtained the SFDtimestamp but i am not able to append it to my 
> original message to be sent .
> can you help me on that???
>
> thanks,
> nihsad

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


Re: [Tinyos-help] Sensor node Programming guidance for beginners

2011-07-20 Thread Urs Hunkeler
Hi,

Have you looked at the tutorials?
http://docs.tinyos.net/tinywiki/index.php/TinyOS_Tutorials

In my opinion, the tutorials are very well done to get you started 
actually using TinyOS to program real devices. To actually do the tasks 
described in the tutorials, you'll also need to install the TinyOS 
environment (in case you haven't already done so):
http://docs.tinyos.net/tinywiki/index.php/Getting_started

Also note that TinyOS provides some helpful functionality, but in order 
to store and transport your data you'll have to write your own 
applications (for instance based on the examples in the tutorials).

Cheers,
Urs


On 7/20/11 11:09 AM, Sarita Agrawal wrote:
> Hello,
>
> I am new to the field of sensor nodes. I am trying to learn from TinyOS
> programming manual, but not able to get idea on how exactly I can start
> writing my own applications e.g. to store some data in sensor node and
> reading the same at base station etc..
>
> Regards.
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] create file

2011-07-05 Thread Urs Hunkeler
Hi,

Flash is a non-volatile type of memory that is available on most of the 
sensors on which TinyOS runs. If you want to store data on an embedded 
system, you typically write it to flash.

I assume that you want to use access to a file in order to control a 
simulation (not run a program on an actual sensor)? I am not familiar 
with mobility models or simulations. There are experts on both subjects 
on the tinyos mailing list. I recommend that you describe what you want 
to do (e.g., making a simulation with a given mobility pattern that is 
stored in a text file), and ask the mailing list about how others would 
implement this.

Cheers,
Urs

On 7/5/11 12:13 PM, Akila Kiki wrote:
> what do you want to say by writing to flash,can you give me some 
> explanation,
> have you documentation about mobility models;thank you
>
>
> --- En date de : *Mar 5.7.11, Urs Hunkeler //* a 
> écrit :
>
>
> De: Urs Hunkeler 
> Objet: Re: [Tinyos-help] create file
> À: "Akila Kiki" 
> Cc: Tinyos-help@millennium.berkeley.edu
> Date: Mardi 5 juillet 2011, 9h50
>
> Hi,
>
> Why do you want to write to a text file? TinyOS on embedded sensor
> hardware currently does not really support file systems. You might
> want to have a look at writing to Flash:
> http://docs.tinyos.net/tinywiki/index.php/Storage
>
> Cheers,
> Urs
>
>
> On 7/5/11 11:02 AM, Akila Kiki wrote:
> > Hi, I want to create a text file in nesc to write inside but I
> do not
> > arrive, could you help me, thank you very much
>

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


Re: [Tinyos-help] create file

2011-07-05 Thread Urs Hunkeler
Hi,

Why do you want to write to a text file? TinyOS on embedded sensor 
hardware currently does not really support file systems. You might want 
to have a look at writing to Flash:
http://docs.tinyos.net/tinywiki/index.php/Storage

Cheers,
Urs


On 7/5/11 11:02 AM, Akila Kiki wrote:
> Hi, I want to create a text file in nesc to write inside but I do not
> arrive, could you help me, thank you very much
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Compiling toscomm and getenv

2011-07-05 Thread Urs Hunkeler
Hi Rodrigo,

You would need to compile the tools in $TOSROOT/tools directory. If I 
remember correctly, this directory is not installed by default on 
Windows. You can find the contents of this directory in the subversion 
repository.

I am not too familiar with Windows and I have never worked on a 64-bit 
Windows system before, so my help and understanding for the problems 
might be limited. I think most people with 64-bit windows have simply 
installed a 32-bit JDK and used the 32-bit libraries. If you do manage 
to compile a 64-bit version of the libraries, could you send me a copy?

Cheers,
Urs


On 7/4/11 5:50 PM, roman wrote:
>
> Dear all,
>
> In order to launch our Java-based TinyOS front-end system* in a 64 bits
> Windows environment, it seems I need to compile getenv and toscomm.
>
> How I can comple these dlls in the latest version of TOS2?
>
> Thanks!
> Rodrigo
>
> *A small in-house project in our lab.
> ___
> 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] getenv JNI libray

2011-05-13 Thread Urs Hunkeler
Hi,

Not all functionality can be implemented in Java, and in TinyOS access 
to operating system variables (getenv) and to the serial port (toscomm) 
are implemented as native libraries. Why getenv is necessary, I don't 
know. In any case, if you do not want to install the TinyOS environment, 
you could simply use the TinyOS .jar file from the link below. This is a 
version that will try to extract the native libraries from the .jar file 
if they are not installed, and thus the Java libraries should work 
without installing the full TinyOS environment.

http://tinyos-main.googlecode.com/svn/trunk/support/sdk/java/tinyos.jar

Cheers,
Urs

On 5/13/11 11:24 AM, hayet nasri wrote:
>
>   Good Morning
>   I'm working on a project "management of WSN. I find in Internet a project
> "Octopus: A Dashboard for Sensor Networks Visual Control" it's a good job.
> it helps me very much.
> But there's one thing I do not understand: when I execute the code  java in
> netbeans on ubuntu  it appears in the output message
>   "getenv JNI library not found. Env.getenv Will not work
> (Run the tos-install-jni tool, see man tos-install-jni for more details)
>
> sf @ localhost: 9002 Died - exiting (java.net.ConnectException: Connection
> refused)
> Java Result: 2 "
>   can you help me please.
> I would appreciate your help. thank you in advance.
>
>

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


Re: [Tinyos-help] about getting battery-level of telosb mote

2011-04-05 Thread Urs Hunkeler
Hi,

Use the VoltageC component:

   components new VoltageC();

It offers a Read interface. The calculate the actual voltage, 
divide the value by 4096 and multiply by 3. E.g., if the read(..) event 
gives you the value rawVolt: realVolt = rawVolt * 3 / 4096.

Cheers,
Urs


On 04/05/2011 01:08 PM, hayet nasri wrote:
>
> hello all
> I am working on a project to manage WSN with SNMP. I would know how can i
> get the level of battery of telosb mote. So is there a way to do so?
> thanks
>
> hayet nasri

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


Re: [Tinyos-help] Toscomm JNI library was not found

2011-03-30 Thread Urs Hunkeler
Hi Rafelia,

This was the output I was looking for. It says that you have installed 
the TinyOS Java native libraries just fine and they are loading ok.

Now we have to figure out why it's not working when you try to run the 
TestSerial application. It could be that somehow there are different 
Java versions on your system and when you run the TestSerial application 
it uses a different JVM. What is the exact command you use when you try 
to run the TestSerial application?

If you run the tosruntime.jar file by downloading it and then 
double-clicking it, can you run it from the command line (java -jar 
tosruntime.jar) to see whether it gives you a different result?

Cheers,
Urs


On 03/30/2011 03:49 PM, Rafelia Tjandra wrote:
> Hi Urs...
>
> Not too sure if you can read the jar file i´ve send you.
>
> In any case here are the details:
>
> *CLASSPATH: /opt/tinyos-2.x/support/sdk/java/tinyos.jar:.
>
> Operating System: Linux (i386) - 2.6.28-19-generic
>
> Java Version: 1.5.0_19 - Sun Microsystems Inc.
> Installation base: /usr/lib/jvm/java-1.5.0-sun-1.5.0.19/jre
>
> Library search path:
> /usr/lib/jvm/java-1.5.0-sun-1.5.0.19/jre/lib/i386/client:/usr/lib/jvm/java-1.5.0-sun-1.5.0.19/jre/lib/i386:/usr/lib/jvm/java-1.5.0-sun-1.5.0.19/jre/../lib/i386:/usr/lib/firefox-3.6.11:/usr/lib/firefox-3.6.11/plugins:/usr/lib/firefox-3.6.11
>
> Found path in JavaHome (medium confidence)
> The recommended path for JNI library extensions is: 
> '/usr/lib/jvm/java-1.5.0-sun-1.5.0.19/jre/lib/i386/client'
>
> Getenv found in 
> '/usr/lib/jvm/java-1.5.0-sun-1.5.0.19/jre/lib/i386/libgetenv.so'
> The getenv library is not in the recommeded location, but should load fine.
>
> Toscomm found in 
> '/usr/lib/jvm/java-1.5.0-sun-1.5.0.19/jre/lib/i386/libtoscomm.so'
> The toscomm library is not in the recommeded location, but should load fine.
> WARNING: Path '/usr/lib/jvm/java-1.5.0-sun-1.5.0.19/jre/../lib/i386' does not 
> exist!
>
> Attempting to load the library 'getenv' via the normal mechanism.
> Loading the library succeeded!
>
> Attempting to load the library 'toscomm' via the normal mechanism.
> Loading the library succeeded!
>
> Attempting to load the library 'getenv' by extracting a resource from the 
> classpath.
> Trying to locate the file 'linux_x86_getenv' in the classpath.
> Temporary file created: '/tmp/getenv8492795690899431095.lib'.
> Library copied successfully. Let's load it.
> Library loaded successfully.
>
> Attempting to load the library 'toscomm' by extracting a resource from the 
> classpath.
> Trying to locate the file 'linux_x86_toscomm' in the classpath.
> Temporary file created: '/tmp/toscomm7561981583295872552.lib'.
> Library copied successfully. Let's load it.
> Library loaded successfully.
>
>
> Cheers
> Rafelia
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Installation error on Mac OS X

2011-03-30 Thread Urs Hunkeler
Hi Yusnaidi,

Thanks for the information. The approach that I am suggesting is not 
very clean, normally it would be better to try to fix the problems that 
you are having, but since my PowerBook is too old for the newest Mac OS 
X, I cannot reproduce your errors or compare with my system.

I therefore can only help you with a hack trying to get rid of the java 
parts of the compilation. I tested this on my system, and it removes the 
java compilation part.

edit the file $TOSROOT/tools/tinyos/Makefile.am and remove "java" in the 
subdirs line.

edit the file $TOSROOT/tools/configure.ac and remove the three lines 
containing "tinyos/java" (towards the end of the file)

remove the directory $TOSROOT/tools/java (if you haven't done so yet)

Then cd to $TOSROOT/tools (if you haven't done so yet) and issue the 
following commands (if any of the commands gives you errors, don't 
continue and send me the error message):

make distclean
./Bootstrap
./configure --prefix=/stow/repository/tinyos-2.x-tools
make
sudo make install
cd /stow/repository/
sudo stow tinyos-2.x-tools

Cheers,
Urs


On 03/29/2011 06:57 PM, Yusnaidi Md Yusof wrote:
> Hi Urs,
>
> Sorry for the late reply.
>
> I have removed the java directory from the $TOSROOT/tools/tinyos/, and
> followings are the output of the compilation:
>
> 1. ./Bootstrap
> 
> -bash: ./Booststrap: No such file or directory
> ymdyusof-air:tools yusnaidi$ ls
> Bootstrap Makefile.in autom4te.cache config.log configure.ac
>  tinyos
> Makefile README build.xml config.status platforms
> Makefile.am aclocal.m4 config-aux configure release
> ymdyusof-air:tools yusnaidi$ ./Bootstrap
> + aclocal
> + autoconf
> + '[' -d config-aux ']'
> + automake -a -c
> tinyos/Makefile.am:3: required directory tinyos/java does not exist
> configure.ac:125 : required file
> `tinyos/java/Makefile.in' not found
> configure.ac:125 : required file
> `tinyos/java/env/Makefile.in' not found
> configure.ac:125 : required file
> `tinyos/java/serial/Makefile.in' not found
> + set -x
> + cd platforms/mica/uisp
> + ./bootstrap
> + rm -f config.cache src/config.cache
>
>
> 2. ./configure --prefix=/stow/repository/tinyos-2.x-tools
> 
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... config-aux/install-sh -c -d
> checking for gawk... no
> checking for mawk... no
> checking for nawk... no
> checking for awk... awk
> checking whether make sets $(MAKE)... yes
> checking build system type... x86_64-apple-darwin10.7.3
> checking host system type... x86_64-apple-darwin10.7.3
> checking for gcc... gcc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ISO C89... none needed
> checking for style of include used by make... GNU
> checking dependency style of gcc... gcc3
> checking for g++... g++
> checking whether we are using the GNU C++ compiler... yes
> checking whether g++ accepts -g... yes
> checking dependency style of g++... gcc3
> checking for ranlib... ranlib
> checking for perl... /opt/local/bin/perl
> checking for python... /usr/bin/python
> checking for nescc... /stow/bin/nescc
> configure: Default ncc build target is mica
> configure: ...but using a tos/.default-platform file is a better choice
> configure: TinyOS directory is /Users/yusnaidi/tinyos-2.x/tos
> checking for cygwin... no
> checking for JDK location...
> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating platforms/Makefile
> config.status: creating platforms/mica/Makefile
> config.status: creating platforms/mica/cc1000-channelgen/Makefile
> config.status: creating platforms/msp430/Makefile
> config.status: creating platforms/msp430/motelist/Makefile
> config.status: creating platforms/msp430/pybsl/Makefile
> config.status: creating platforms/msp430/pybsl/tos-bsl.1
> config.status: creating platforms/msp430/pybsl/serial/Makefile
> config.status: creating tinyos/Makefile
> config.status: error: cannot find input file: `tinyos/java/Makefile.in'
>
>
> 3. make
> ---
> Making all in platforms
> Making all in mica
> Making all in cc1000-channelgen
> make[3]: Nothing to be done for `all'.
> Making all in uisp
> cd . && /bin/sh ./config.status Makefile
> config.status: creating Makefile
> Making all in src
> cd .. && /bin/sh ./config.status src/Makefile depfiles
> config.status: creating src/Makefile
> config.status: executing depfiles commands
> make all-am
> 

Re: [Tinyos-help] Toscomm JNI library was not found

2011-03-30 Thread Urs Hunkeler
Hi Rafelia,

Which of the approaches in the many posts on this list have you tried? 
What operating system are you using? Which tutorial did you follow when 
installing TinyOS? What is the output from the following commands on 
your system (when you type them in a terminal)?

echo $CLASSPATH
java -version
javac -version
which java
which javac

Could you send us the output from this program?
http://www.schlangenstein.ch/tosruntime.jar

Cheers,
Urs

On 03/30/2011 02:40 PM, Rafelia Tjandra wrote:
> Hi all,
>
> I´m trying to run the TinyOS Tutorial Mote-PC Communication
> (TestSerial). I always get this error: The toscomm JNI library was not
> found.
>
> I know there are many posts here regarding this problem, have read most
> of them, but still can´t get TestSerial running.
>
> Hopefully one of you who reads this post is able to give me some tips
> and tricks.
>
> Thanks a bunch.
>
> Best regards
>
> Rafelia

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


Re: [Tinyos-help] Installation error on Mac OS X

2011-03-28 Thread Urs Hunkeler
-sh -c -d
> "/stow/repository/tinyos-2.x-tools/share/man/man1"
> /usr/bin/install -c -m 644 tos-channelgen.1
> '/stow/repository/tinyos-2.x-tools/share/man/man1'
> Making install in uisp
> Making install in src
> test -z "/stow/repository/tinyos-2.x-tools/bin" || ../config/install-sh
> -c -d "/stow/repository/tinyos-2.x-tools/bin"
> /usr/bin/install -c uisp '/stow/repository/tinyos-2.x-tools/bin'
> make[5]: Nothing to be done for `install-data-am'.
> make[5]: Nothing to be done for `install-exec-am'.
> /bin/sh
> /Users/yusnaidi/tinyos-2.x/tools/platforms/mica/uisp/config/install-sh
> -d /stow/repository/tinyos-2.x-tools/share/doc/uisp-20050519tinyos
> for file in AUTHORS ChangeLog COPYING INSTALL CHANGES CHANGES.old TODO ;
> do \
> echo " /usr/bin/install -c -m 644 $file
> /stow/repository/tinyos-2.x-tools/share/doc/uisp-20050519tinyos/$file"; \
> /usr/bin/install -c -m 644 ./$file
> /stow/repository/tinyos-2.x-tools/share/doc/uisp-20050519tinyos/$file; \
> done
> /usr/bin/install -c -m 644 AUTHORS
> /stow/repository/tinyos-2.x-tools/share/doc/uisp-20050519tinyos/AUTHORS
> /usr/bin/install -c -m 644 ChangeLog
> /stow/repository/tinyos-2.x-tools/share/doc/uisp-20050519tinyos/ChangeLog
> /usr/bin/install -c -m 644 COPYING
> /stow/repository/tinyos-2.x-tools/share/doc/uisp-20050519tinyos/COPYING
> /usr/bin/install -c -m 644 INSTALL
> /stow/repository/tinyos-2.x-tools/share/doc/uisp-20050519tinyos/INSTALL
> /usr/bin/install -c -m 644 CHANGES
> /stow/repository/tinyos-2.x-tools/share/doc/uisp-20050519tinyos/CHANGES
> /usr/bin/install -c -m 644 CHANGES.old
> /stow/repository/tinyos-2.x-tools/share/doc/uisp-20050519tinyos/CHANGES.old
> install: ./CHANGES.old: No such file or directory
> /usr/bin/install -c -m 644 TODO
> /stow/repository/tinyos-2.x-tools/share/doc/uisp-20050519tinyos/TODO
> test -z "/stow/repository/tinyos-2.x-tools/share/man/man1" ||
> config/install-sh -c -d "/stow/repository/tinyos-2.x-tools/share/man/man1"
> /usr/bin/install -c -m 644 uisp.1
> '/stow/repository/tinyos-2.x-tools/share/man/man1'
> make[4]: Nothing to be done for `install-exec-am'.
> make[4]: Nothing to be done for `install-data-am'.
> Making install in msp430
> Making install in motelist
> test -z "/stow/repository/tinyos-2.x-tools/bin" ||
> ../../../config-aux/install-sh -c -d "/stow/repository/tinyos-2.x-tools/bin"
> /usr/bin/install -c motelist '/stow/repository/tinyos-2.x-tools/bin'
> test -z "/stow/repository/tinyos-2.x-tools/share/man/man1" ||
> ../../../config-aux/install-sh -c -d
> "/stow/repository/tinyos-2.x-tools/share/man/man1"
> /usr/bin/install -c -m 644 motelist.1
> '/stow/repository/tinyos-2.x-tools/share/man/man1'
> Making install in pybsl
> Making install in serial
> make[5]: Nothing to be done for `install-exec-am'.
> test -z "/stow/repository/tinyos-2.x-tools/lib/tinyos/serial" ||
> ../../../../config-aux/install-sh -c -d
> "/stow/repository/tinyos-2.x-tools/lib/tinyos/serial"
> /usr/bin/install -c -m 644 __init__.py serialjava.py serialposix.py
> serialutil.py serialwin32.py
> '/stow/repository/tinyos-2.x-tools/lib/tinyos/serial'
> test -z "/stow/repository/tinyos-2.x-tools/bin" ||
> ../../../config-aux/install-sh -c -d "/stow/repository/tinyos-2.x-tools/bin"
> /usr/bin/install -c tos-bsl '/stow/repository/tinyos-2.x-tools/bin'
> test -z "/stow/repository/tinyos-2.x-tools/share/man/man1" ||
> ../../../config-aux/install-sh -c -d
> "/stow/repository/tinyos-2.x-tools/share/man/man1"
> /usr/bin/install -c -m 644 tos-bsl.1
> '/stow/repository/tinyos-2.x-tools/share/man/man1'
> test -z "/stow/repository/tinyos-2.x-tools/share/doc/tinyos-tools-1.2.4"
> || ../../../config-aux/install-sh -c -d
> "/stow/repository/tinyos-2.x-tools/share/doc/tinyos-tools-1.2.4"
> /usr/bin/install -c -m 644 tos-bsl.txt tos-bsl-license.txt
> '/stow/repository/tinyos-2.x-tools/share/doc/tinyos-tools-1.2.4'
> test -z "/stow/repository/tinyos-2.x-tools/lib/tinyos" ||
> ../../../config-aux/install-sh -c -d
> "/stow/repository/tinyos-2.x-tools/lib/tinyos"
> /usr/bin/install -c -m 644 elf.py
> '/stow/repository/tinyos-2.x-tools/lib/tinyos'
> make[4]: Nothing to be done for `install-exec-am'.
> make[4]: Nothing to be done for `install-data-am'.
> make[3]: Nothing to be done for `install-exec-am'.
> make[3]: Nothing to be done for `install-data-am'.
> Making install in tinyos
> Making install in java
> Making install in env
> make[4]: Nothing to be 

Re: [Tinyos-help] Installation error on Mac OS X

2011-03-25 Thread Urs Hunkeler
Hi Yusnaidi,

Ok, the original error message that you showed is caused by the part 
compiling the Java native libraries. However, in this step you should 
also have compiled and installed other TinyOS tools, e.g., ncc. Maybe we 
can go over this part of the installation (installing the tinyos-2.x 
tool set) again?

Did you change the line in configure.ac (something with "-n")?

Can you give me the full output of the following sequence of commands in 
the tools directory?

./Bootstrap
./configure --prefix=/stow/repository/tinyos-2.x-tools
make
sudo make install

This will most likely try to compile the Java native libraries, which 
seems to fail on your system. If this is the only problem, maybe we can 
find a way to not compile them (as you don't need them). (make backups 
before this) Maybe you can delete the folder tinyos/java (in the tools 
directory) and try again.

Cheers,
Urs


On 3/25/11 5:41 PM, Yusnaidi Md Yusof wrote:
> Hi Urs,
>
> Thanks for the advice. It makes me clearer, esp on this stow stuffs..I 
> really new to the Mac world!
>
> Right, I checked in the /stow/bin, and this is what I got:
> lrwxr-xr-x   1 root  admin34 24 Mar 20:37 nescc -> 
> ../repository/nesc-1.3.2/bin/nescc
>
> I guess I got the ncc in /stow/bin right? Is nescc means ncc?
>
> Then, I followed the softlink and check in 
> /stow/repository/nesc-1.3.2/bin/nescc, and this is what I got:
> -rwxr-xr-x   1 root  admin  5317 25 Mar 16:16 nescc.
>
> While in the /stow/bin and in the  
> /stow/repository/nesc-1.3.2/bin/nescc, I issue command:  '$nescc'   
> and I got:
> gcc: no input files
>
> I guess that confirm I got the nesc compilation success and the nesc 
> compiler is running in my machine. Is it?
>
> Then, I checked the PATH by issuing 'echo $PATH', and this is what I got:
> /opt/local/bin:/opt/local/sbin:/stow/bin:/stow/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/texbin:/usr/X11/bin
>
> ..here I guess I can access nescc from any path because the /stow/bin 
> is included in the PATH. Is it?
>
> What I have done so far, is just changing the .profile file and 
> setting the PATH. Is there any other files or system wide files I need 
> to change so the environment variables takes effect?
>
> thank you...
>
> Yusnaidi
>
>
>
>
>
> On Fri, Mar 25, 2011 at 4:00 PM, Urs Hunkeler  <mailto:urs.hunke...@epfl.ch>> wrote:
>
> Hi Yusnaidi,
>
> Yes, you should have nesc installed. And yes, this probably means
> there is a problem with the installation somewhere.
>
> On my Mac the ncc binary is in /stow/bin. If it's not there, check
> whether the compiled version is in
> /stow/repository/nesc-1.3.0/bin. If it's not there, then "make
> install" (or the configure script) did not work properly. If it's
> in the /stow/repository subfolder, but not in /stow/bin, then the
> installation with "sudo stow ..." did somehow not work. If it's in
> /stow/bin, then for some reason the PATH variable is not properly
> set (even though your .profile looks ok); check "echo $PATH".
>
> Cheers,
> Urs
>
>
>
> On 03/25/2011 04:37 PM, Yusnaidi Md Yusof wrote:
>
> Hi Urs,
>
> Yes, I did. I have followed the same link to do the
> installation. This
> is what is did:
>
> 1. I have installed the developer tools.
> 2. I have installed the Macports/Darwin Ports.
> 3. I have installed the Stow.
> 4. I have installed the Tinyos-2.x source from the git.
> 5. I have installed the nesc as outlined in the 'Installing nesc'
> section of the link...which is I have done all these steps:
>
>* Download the nesc-1.3.0 tarball
> 
> <http://superb-east.dl.sourceforge.net/sourceforge/nescc/nesc-1.3.0.tar.gz>
>
>
>  from sourceforge (or whichever is the newest)
>* Install nesc using the standard configure/make/make
> install procedure
>  o cd nesc-1.3.0
>  o ./configure --prefix=/stow/repository/nesc-1.3.0
>  o make
>  o sudo make install
>
>* Run stow to install nesc into standard installation
> directories
>  o cd /stow/repository
>  o sudo stow nesc-1.3.0
>
>
> Does this means I have installed the nesc compiler?
>
> 6. I have installed the avr tools.
> 7. I have installed the msp430 tools as well.
> 8. I have installed the FTDI drivers.
> 9. Then, here comes the problem while ac

Re: [Tinyos-help] Installation error on Mac OS X

2011-03-25 Thread Urs Hunkeler
Hi Yusnaidi,

Yes, you should have nesc installed. And yes, this probably means there 
is a problem with the installation somewhere.

On my Mac the ncc binary is in /stow/bin. If it's not there, check 
whether the compiled version is in /stow/repository/nesc-1.3.0/bin. If 
it's not there, then "make install" (or the configure script) did not 
work properly. If it's in the /stow/repository subfolder, but not in 
/stow/bin, then the installation with "sudo stow ..." did somehow not 
work. If it's in /stow/bin, then for some reason the PATH variable is 
not properly set (even though your .profile looks ok); check "echo $PATH".

Cheers,
Urs


On 03/25/2011 04:37 PM, Yusnaidi Md Yusof wrote:
> Hi Urs,
>
> Yes, I did. I have followed the same link to do the installation. This
> is what is did:
>
> 1. I have installed the developer tools.
> 2. I have installed the Macports/Darwin Ports.
> 3. I have installed the Stow.
> 4. I have installed the Tinyos-2.x source from the git.
> 5. I have installed the nesc as outlined in the 'Installing nesc'
> section of the link...which is I have done all these steps:
>
> * Download the nesc-1.3.0 tarball
>   
> 
>   from sourceforge (or whichever is the newest)
> * Install nesc using the standard configure/make/make install procedure
>   o cd nesc-1.3.0
>   o ./configure --prefix=/stow/repository/nesc-1.3.0
>   o make
>   o sudo make install
> * Run stow to install nesc into standard installation directories
>   o cd /stow/repository
>   o sudo stow nesc-1.3.0
>
> Does this means I have installed the nesc compiler?
>
> 6. I have installed the avr tools.
> 7. I have installed the msp430 tools as well.
> 8. I have installed the FTDI drivers.
> 9. Then, here comes the problem while accomplishing the section
> 'Installing the Tinyos-2.x toolset', where you help me on the tinyos.jar
> stuff...I guess, I have successfully solved the problem in this section
> by following your suggestions.
>
> So, the problem might be in step 5. Do you think after I completing all
> the steps in section 5 above, mean that I have installed the nesc
> compiler? If so, how can I check the nesc has been successfully
> installed in the Mac? Because I tried to run ncc in terminal, but I got
> error messages says: 'command not found'. I suggest the nesc in still
> not installed, right? Please help me...
>
>
> Thank you...
>
> Yusnaidi
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Installation error on Mac OS X

2011-03-25 Thread Urs Hunkeler
Hi Yusnaidi,

It looks like you have not installed everything. My suggestions only 
work to avoid problems with Java, i.e., with the newest tinyos.jar file 
you do not need to compile the TinyOS Java native libraries yourself. 
You still need a complete TinyOS installation to compile the TinyOS code 
(i.e., the programs that will run on the motes).

Did you install the nesc compiler? You'll also need the tools for the 
microcontroller of your platform (e.g., avr tools for MicaZ).

http://docs.tinyos.net/index.php/Installing_tinyos-2.x_on_Mac_OS_X_%28Tiger_%26_Leopard%29

Cheers,
Urs


On 03/25/2011 01:14 PM, Yusnaidi Md Yusof wrote:
> Hi Urs,
>
> I have changed the classpath to use the explicit classpath. I also had
> saved the tinyos.jar file the one you gave in the link to
> /tinyos-2.x/support/sdk/java/. I have checked the classpath by issuing
> command echo $CLASSPATH and got the following output:
> .:/Users/yusnaidi/tinyos-2.x/support/sdk/java/tinyos.jar.
>
> I then compile the Blink application but still got these errors:
> 
> /bin/sh: tos-ident-flags: command not found
> mkdir -p build/micaz
> compiling BlinkAppC to a micaz binary
> ncc -o build/micaz/main.exe -Os -fnesc-separator=__ -Wall -Wshadow
> -Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb
> -DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=10
> -fnesc-dump=wiring -fnesc-dump='interfaces(!abstract())'
> -fnesc-dump='referenced(interfacedefs, components)'
> -fnesc-dumpfile=build/micaz/wiring-check.xml BlinkAppC.nc -lm
> make: ncc: No such file or directory
> make: *** [exe0] Error 1
> --
>
> I really confused of two errors from the above compilation errors
> messages: 1. "/bin/sh: tos-ident-flags: command not found" and 2. "make:
> ncc: No such file or directory". What that suppose to mean?
>
> Thanks.
>
> Yusnaidi.
>
>
> On Fri, Mar 25, 2011 at 10:45 AM, Urs Hunkeler  <mailto:urs.hunke...@epfl.ch>> wrote:
>
> Hi Yusnaidi,
>
> You need to add the tinyos.jar file in the class path. If you do not
> specify the .jar file, Java will only look for class files in the
> given directory, it will not automatically add the .jar files.
> Replace the path to your tinyos directory with the absolute path to
> the tinyos.jar file (including tinyos.jar at the end).
>
> If you use the latest tinyos.jar file (downloaded from my link) you
> do not need to install anything else. You will get some warnings,
> but everything should work.
>
> Assuming you have overwritten the old tinyos.jar file, set the
> CLASSPATH explicitely to:
>
> export
> CLASSPATH=.:/Users/yusnaidi/tinyos-2.x/support/sdk/java/tinyos.jar
>
> And let us know how it works.
>
>
> Cheers,
> Urs
>
>
>
> On 03/25/2011 11:26 AM, Yusnaidi Md Yusof wrote:
>
> Hi Urs,
>
> I have set the classpath accordingly and when I issue command 'echo
> $CLASSPATH', I got the following output:
> :/Users/yusnaidi/tinyos-2.x/support/sdk/java. I guess that is
> correct,
> which I assume the system knows to find the tinyos.jar classfile in
> following that path. Do I?
>
> Then, I also had replace the existing tinyos.jar file in the
> 'tinyos-2.x/support/sdk/java/' folder with the tinyos.jar file
> you gave
> through the link. I observed that this new tinyos.jar file has
> additional classes in the '/net/tinyos/util' which two of them are:
> macosx_universal_getenv.lib and macosx_universal_toscomm.lib.
>
> Assuming all sets, I then, try to compile the Blink application
> in the
> /tinyos-2.x/apps/Blink folder. However, I got these errors:
> --
> /bin/sh: tos-ident-flags: command not found
> mkdir -p build/micaz
> compiling BlinkAppC to a micaz binary
> ncc -o build/micaz/main.exe -Os -fnesc-separator=__ -Wall -Wshadow
> -Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c
> -board=micasb
> -DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=10
> -fnesc-dump=wiring -fnesc-dump='interfaces(!abstract())'
> -fnesc-dump='referenced(interfacedefs, components)'
> -fnesc-dumpfile=build/micaz/wiring-check.xml BlinkAppC.nc -lm
> make: ncc: No such file or directory
> make: *** [exe0] Error 1
> ---
>
> Do I still missed something? Do I still need to do the 'make'
> a

Re: [Tinyos-help] Installation error on Mac OS X

2011-03-25 Thread Urs Hunkeler
Hi Yusnaidi,

You need to add the tinyos.jar file in the class path. If you do not 
specify the .jar file, Java will only look for class files in the given 
directory, it will not automatically add the .jar files. Replace the 
path to your tinyos directory with the absolute path to the tinyos.jar 
file (including tinyos.jar at the end).

If you use the latest tinyos.jar file (downloaded from my link) you do 
not need to install anything else. You will get some warnings, but 
everything should work.

Assuming you have overwritten the old tinyos.jar file, set the CLASSPATH 
explicitely to:

export CLASSPATH=.:/Users/yusnaidi/tinyos-2.x/support/sdk/java/tinyos.jar

And let us know how it works.


Cheers,
Urs


On 03/25/2011 11:26 AM, Yusnaidi Md Yusof wrote:
> Hi Urs,
>
> I have set the classpath accordingly and when I issue command 'echo
> $CLASSPATH', I got the following output:
> :/Users/yusnaidi/tinyos-2.x/support/sdk/java. I guess that is correct,
> which I assume the system knows to find the tinyos.jar classfile in
> following that path. Do I?
>
> Then, I also had replace the existing tinyos.jar file in the
> 'tinyos-2.x/support/sdk/java/' folder with the tinyos.jar file you gave
> through the link. I observed that this new tinyos.jar file has
> additional classes in the '/net/tinyos/util' which two of them are:
> macosx_universal_getenv.lib and macosx_universal_toscomm.lib.
>
> Assuming all sets, I then, try to compile the Blink application in the
> /tinyos-2.x/apps/Blink folder. However, I got these errors:
> --
> /bin/sh: tos-ident-flags: command not found
> mkdir -p build/micaz
> compiling BlinkAppC to a micaz binary
> ncc -o build/micaz/main.exe -Os -fnesc-separator=__ -Wall -Wshadow
> -Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb
> -DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=10
> -fnesc-dump=wiring -fnesc-dump='interfaces(!abstract())'
> -fnesc-dump='referenced(interfacedefs, components)'
> -fnesc-dumpfile=build/micaz/wiring-check.xml BlinkAppC.nc -lm
> make: ncc: No such file or directory
> make: *** [exe0] Error 1
> ---
>
> Do I still missed something? Do I still need to do the 'make' and intall
> the native libraries in the '/tinyos-2.x/tools' folder?
>
> BTW, I have also renamed both macosx_universal_getenv.lib and
> macosx_universal_toscomm.lib files to new name: libtoscomm.jnilib and
> libgetenv.jnilib. Is this is what I should do? Then, where can I copy
> them? because when I issue command "tos-locate-jre --jni", I got ths
> error: "-bash: tos-locate-jre: command not found". How can I solve this?
>
> Many thanks for your kind help.
>
> Yusnaidi
>
>
>
> On Thu, Mar 24, 2011 at 4:44 PM, Urs Hunkeler  <mailto:urs.hunke...@epfl.ch>> wrote:
>
> Hi Yusnaidi,
>
> I've had problems previously compiling on the Mac myself. My
> particular problems are with the gnu make, which seems to ignore
> environmental variables for some reason (I'm not an expert on gnu
> make). So I cannot really help you with the error messages. If you
> just want to use the libraries, you can use the tinyos.jar.
>
> If you decide to use tinyos.jar, you don't even have to install any
> libraries. The latest version will automatically extract the native
> libraries to a temporary file and load it from there (ignore the
> warnings, or read them to understand how it works). All you have to
> do is include tinyos.jar in your classpath (e.g., by adding a line
> like "export CLASSPATH=/my/path/to/tinyos.jar:${CLASSPATH}" to the
> appropriate startup script).
>
> If you want to properly install the native libraries, rename them to
> libtoscomm.jnilib and libgetenv.jnilib. You can then copy them to
> the directory shown by "tos-locate-jre --jni".
>
> If you want to know more, can you download and run the following
> program, then send me its output?
> http://www.schlangenstein.ch/tosruntime.jar
>
> Cheers,
> Urs
>
>
>
> On 03/24/2011 05:17 PM, Yusnaidi Md Yusof wrote:
>
> Hi Urs,
> What I meant was I got so many error messages after issuing the
> './configure', 'make', and 'sudo make install' commands.
> Do I missed settings any enviroment variables possibly? or etc...
> I am a bit confuse where I can use the tinyos.jar file. I have
> uncompressed the file and found that there are two universal files
> located in the tinyos->net->tinyos->util folder which are:
> macosx_unive

Re: [Tinyos-help] Installation error on Mac OS X

2011-03-24 Thread Urs Hunkeler
Hi Yusnaidi,

I've had problems previously compiling on the Mac myself. My particular 
problems are with the gnu make, which seems to ignore environmental 
variables for some reason (I'm not an expert on gnu make). So I cannot 
really help you with the error messages. If you just want to use the 
libraries, you can use the tinyos.jar.

If you decide to use tinyos.jar, you don't even have to install any 
libraries. The latest version will automatically extract the native 
libraries to a temporary file and load it from there (ignore the 
warnings, or read them to understand how it works). All you have to do 
is include tinyos.jar in your classpath (e.g., by adding a line like 
"export CLASSPATH=/my/path/to/tinyos.jar:${CLASSPATH}" to the 
appropriate startup script).

If you want to properly install the native libraries, rename them to 
libtoscomm.jnilib and libgetenv.jnilib. You can then copy them to the 
directory shown by "tos-locate-jre --jni".

If you want to know more, can you download and run the following 
program, then send me its output?
http://www.schlangenstein.ch/tosruntime.jar

Cheers,
Urs


On 03/24/2011 05:17 PM, Yusnaidi Md Yusof wrote:
> Hi Urs,
> What I meant was I got so many error messages after issuing the
> './configure', 'make', and 'sudo make install' commands.
> Do I missed settings any enviroment variables possibly? or etc...
> I am a bit confuse where I can use the tinyos.jar file. I have
> uncompressed the file and found that there are two universal files
> located in the tinyos->net->tinyos->util folder which are:
> macosx_universal_getenv, and macosx_universal_toscomm. Is these are the
> files you are referring as the macosx_universal_*.lib files? And to what
> name should I rename it?
> thanks
> Yusnaidi
> On Thu, Mar 24, 2011 at 10:47 AM, Urs Hunkeler  <mailto:urs.hunke...@epfl.ch>> wrote:
>
> Hi Yusnaidi,
>
> I don't know about your problem, as I currently don't have a Mac OS
> X system with the latest OS to play with. However, I did compile the
> libraries for different systems, and the libraries included in the
> latest tinyos.jar should support Mac OS X on PPC, Intel 32-bit and
> Intel 64-bit platforms. If you don't absolutely want to compile the
> libraries yourself, you can use the latest tinyos.jar and see how
> this works for you:
> http://tinyos-main.googlecode.com/svn/trunk/support/sdk/java/tinyos.jar
>
> You can also download the macosx_universal_*.lib files, rename them
> to lib*.jnilib and manually put them in the right folders. The files
> are universal binaries for Mac OS X supporting the aforementioned
> processors.
>
> Cheers,
> Urs
>
>
> On 03/24/2011 12:11 AM, Yusnaidi Md Yusof wrote:
>
> Hi,
>
> I really stucked here. Please give me a help...
>
> I want to install tinyos-2.x (downloaded from git source) onto
> my Mac OS
> X snow leopard. I have successfully install all the macports,
> AVR tools,
> etc but when come to a stage to 'make' and 'make install' in the
> $TOSROOT/tools dir, I got the following errors:
>
> g++ -O2 -bundle
> "-I/System/Library/Frameworks/JavaVM.framework/Headers" \
> -o libtoscomm.jnilib NativeSerial_darwin.cpp
> NativeSerial_darwin.cpp: In member function 'void
> NativeSerial::errno_wrap(bool, const char*)':
> NativeSerial_darwin.cpp:77: error: 'strerror' was not declared
> in this scope
> NativeSerial_darwin.cpp: In static member function 'static
> std::string
> NativeSerial::getTOSCommMap()':
> NativeSerial_darwin.cpp:504: error: 'getenv' was not declared in
> this scope
> make[3]: *** [libtoscomm.jnilib] Error 1
> make[2]: *** [all-recursive] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all-recursive] Error 1
>
> I really have no idea what is wrong here. Please help me.
>
> thanks
>
> Yusnaidi
>
>
>
> ___
> 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] Installation error on Mac OS X

2011-03-24 Thread Urs Hunkeler
Hi Yusnaidi,

I don't know about your problem, as I currently don't have a Mac OS X 
system with the latest OS to play with. However, I did compile the 
libraries for different systems, and the libraries included in the 
latest tinyos.jar should support Mac OS X on PPC, Intel 32-bit and Intel 
64-bit platforms. If you don't absolutely want to compile the libraries 
yourself, you can use the latest tinyos.jar and see how this works for you:
http://tinyos-main.googlecode.com/svn/trunk/support/sdk/java/tinyos.jar

You can also download the macosx_universal_*.lib files, rename them to 
lib*.jnilib and manually put them in the right folders. The files are 
universal binaries for Mac OS X supporting the aforementioned processors.

Cheers,
Urs

On 03/24/2011 12:11 AM, Yusnaidi Md Yusof wrote:
> Hi,
>
> I really stucked here. Please give me a help...
>
> I want to install tinyos-2.x (downloaded from git source) onto my Mac OS
> X snow leopard. I have successfully install all the macports, AVR tools,
> etc but when come to a stage to 'make' and 'make install' in the
> $TOSROOT/tools dir, I got the following errors:
>
> g++ -O2 -bundle "-I/System/Library/Frameworks/JavaVM.framework/Headers" \
> -o libtoscomm.jnilib NativeSerial_darwin.cpp
> NativeSerial_darwin.cpp: In member function 'void
> NativeSerial::errno_wrap(bool, const char*)':
> NativeSerial_darwin.cpp:77: error: 'strerror' was not declared in this scope
> NativeSerial_darwin.cpp: In static member function 'static std::string
> NativeSerial::getTOSCommMap()':
> NativeSerial_darwin.cpp:504: error: 'getenv' was not declared in this scope
> make[3]: *** [libtoscomm.jnilib] Error 1
> make[2]: *** [all-recursive] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all-recursive] Error 1
>
> I really have no idea what is wrong here. Please help me.
>
> thanks
>
> Yusnaidi
>
>
>
> ___
> 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] Java CLASSPATH problem again

2011-03-15 Thread Urs Hunkeler
Hi,

Unless you need to be compatible with older versions of Java you do not 
need to compile for version 1.4 (simply remove the -target and -source 
options).

How did you install TinyOS? Clearly, your installation seems to be 
missing some files for the TinyOS Java libraries and tinyos.jar seems to 
be incomplete. Can you try the latest tinyos.jar from and let us know if 
this works?
https://tinyos-main.googlecode.com/svn/trunk/support/sdk/java/tinyos.jar

Cheers,
Urs


On 03/15/2011 10:43 AM, Flemming Nyboe wrote:
> Hello,
>
> After following advice in e.g.
>
> http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/msg36117.html
>
> Java still has problems finding packages/symbols, when compiling TestSerial
>
> If is set CLASSPATH to the .jar file, it cannot find the packages:
>
> -
>
> FNE@21TT14J /opt/tinyos-2.x/apps/tests/TestSerial
>
> $ printenv CLASSPATH
>
> c:\cygwin\opt\tinyos-2.x\support\sdk\java\tinyos.jar;.
>
> FNE@21TT14J /opt/tinyos-2.x/apps/tests/TestSerial
>
> $ make tinynode
>
> mkdir -p build/tinynode
>
> javac -target 1.4 -source 1.4 *.java
>
> TestSerial.java:35: package net.tinyos.message does not exist
>
> import net.tinyos.message.*;
>
> 
>
> -
>
> If is set CLASSPATH to the java path, it finds the packages, but not the
> symbols:
>
> 
>
> FNE@21TT14J /opt/tinyos-2.x/apps/tests/TestSerial
>
> $ printenv CLASSPATH
>
> c:\cygwin\opt\tinyos-2.x\support\sdk\java;.
>
> FNE@21TT14J /opt/tinyos-2.x/apps/tests/TestSerial
>
> $ make tinynode
>
> mkdir -p build/tinynode
>
> javac -target 1.4 -source 1.4 *.java
>
> c:\cygwin\opt\tinyos-2.x\support\sdk\java\net\tinyos\message\Message.java:84:
> cannot find symbol
>
> symbol : class SerialPacket
>
> location: class net.tinyos.message.Message
>
> private SerialPacket serialPacket;
>
> 
>
> -
>
> Additional info:
>
> -
>
> FNE@21TT14J /opt/tinyos-2.x/support/sdk/java
>
> $ ls -l
>
> total 174
>
> -rw-r--r-- 1 FNE mkgroup-l-d 432 Aug 31 2007 Makefile
>
> -rw-r--r-- 1 FNE mkgroup-l-d 2750 Jul 12 2006 Makefile.include
>
> -rw-r--r-- 1 FNE mkgroup-l-d 565 Aug 15 2007 build.xml
>
> drwxr-xr-x+ 3 FNE mkgroup-l-d 0 Jan 28 13:41 net
>
> -rwxr-xr-x 1 FNE mkgroup-l-d 168939 Mar 19 2010 tinyos.jar
>
> FNE@21TT14J /opt/tinyos-2.x/support/sdk/java
>
> $ which java
>
> /cygdrive/c/Program Files/Java/jdk1.6.0_23/bin/java
>
> FNE@21TT14J /opt/tinyos-2.x/support/sdk/java
>
> $ java -version
>
> java version "1.6.0_23"
>
> Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
>
> Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)
>
> FNE@21TT14J /opt/tinyos-2.x/support/sdk/java
>
> $ which javac
>
> /cygdrive/c/Program Files/Java/jdk1.6.0_23/bin/javac
>
> --
>
> Any suggestions?
>
> Is “javac -target 1.4 -source 1.4 *.java” wrong, when my actual java
> version is higher?
>
> Regards Flemming
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] TinyOS Simulator

2011-03-02 Thread Urs Hunkeler
Hi Parisa,

I'm not aware of a simulator for the shimmer platform. I have added 
support for the TelosB platform to the Avrora project. As they have some 
hardware in common (cc2420, msp430), maybe you can take this as a basis 
and add/modify the things you need and which are specific to the shimmer 
platform.

Cheers,
Urs

On 3/2/11 2:06 PM, Parisa Panjideh wrote:
> Hi all,
>
> I am looking for a TinyOS simulator for shimmer platforms. Does anyone
> have a hint?
>
> Thanks for your assistance!
>
> Best regards
>
> Parisa
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Problem calling an external interrupt INT1 tinyos-2.x

2011-02-02 Thread Urs Hunkeler
Hi Sofia,

Have you tried to use the Int1 interface provided by the 
HplAtm128InterruptC component? This might not be the recommended way (I 
think you should not use Hpl* components), but I think it works much 
better than trying to access the interrupt vectors directly.

Cheers,
Urs


On 02/02/2011 09:21 AM, sofia aparicio wrote:
> Hello,
>
> Using AVR_ATOMIC_HANDLER(SIG_INTERRUPT1) I get the same error:
>
> In component `UltrasoundControlM':
> /opt/tinyos-2.x_Cricket_iris/tos/platforms/iris/UltrasoundControlM.nc:834:
> redef
> inition of `__vector_2'
> /opt/tinyos-2.x_Cricket_iris/tos/chips/atm128/pins/HplAtm128InterruptSigP.nc:51:
> previous declaration of `__vector_2'
> make: *** [exe0] Error 1
>
> Do you what is the problem?
>
> Thank you!
>
> Sofia
>
>
>
>  > Date: Tue, 1 Feb 2011 22:51:08 +0100
>  > Subject: Re: [Tinyos-help] Problem calling an external interrupt INT1
> tinyos-2.x
>  > From: mmar...@math.u-szeged.hu
>  > To: aparicioso...@hotmail.com
>  > CC: tinyos-help@millennium.berkeley.edu
>  >
>  > Hi Sofia,
>  >
>  > Use
>  >
>  > AVR_ATOMIC_HANDLER(SIG_INTERRUPT1) {
>  > }
>  >
>  > Miklos
>  >
>  >
>  > On Tue, Feb 1, 2011 at 1:21 PM, sofia aparicio
>  >  wrote:
>  > >
>  > > Hello,
>  > >
>  > > I would like to define an external interrupt in INT1 pin. When I
> call the
>  > > interrupt a get an error message.
>  > > 1) If I use :
>  > > ISR(INT1_vect){
>  > > }
>  > > I get the following error:
>  > > In component `UltrasoundControlM':
>  > >
> /opt/tinyos-2.x_Cricket_iris/tos/platforms/iris/UltrasoundControlM.nc:823:
>  > > use (
>  > > ), not (void), for 0-argument functios
>  > >
> /opt/tinyos-2.x_Cricket_iris/tos/platforms/iris/UltrasoundControlM.nc:823:
>  > > use (
>  > > ), not (void), for 0-argument functios
>  > >
> /opt/tinyos-2.x_Cricket_iris/tos/platforms/iris/UltrasoundControlM.nc:823:
>  > > redef
>  > > inition of `__vector_2'
>  > >
> /opt/tinyos-2.x_Cricket_iris/tos/platforms/iris/UltrasoundControlM.nc:823:
>  > > previ
>  > > ous declaration of `__vector_2'
>  > > make: *** [exe0] Error 1
>  > >
>  > >
>  > > 2) If I use:
>  > > SIGNAL(SIG_INTERRUPT1){
>  > > }
>  > > I get the same error.
>  > >
>  > > 3) I had the same problem with timers and I have solved it doing the
>  > > following-
>  > > In UltrasoundControlM.nc file:
>  > > module UltrasoundControlM {
>  > > provides {
>  > > interface UltrasoundControl;
>  > > }
>  > > uses {
>  > > interface HplAtm128Compare as Compare3A;
>  > > }
>  > > }
>  > > implementation {
>  > > async event void Compare3A.fired(){
>  > > }
>  > > }
>  > >
>  > > In UltrasoundControlAppM.nc file:
>  > > configuration UltrasoundControlAppM {
>  > > provides {
>  > > interface UltrasoundControl;
>  > > }
>  > > }
>  > > implementation
>  > > {
>  > > components UltrasoundControlM;
>  > > UltrasoundControl=UltrasoundControlM;
>  > > components HplAtm128Timer3C;
>  > > UltrasoundControlM.Compare3A->HplAtm128Timer3C.Compare[0];
>  > > }
>  > >
>  > > Do you know how can I call the external interrupt in INT1 pin?
>  > >
>  > > Thank you very much.
>  > >
>  > > Sofia
>  > > ___
>  > > 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 mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] CFLAGS Changes during make command

2011-01-26 Thread Urs Hunkeler
Hi,

Try "CFLAGS=-DTOSH_DATA_LENGTH=102 make micaz" (btw, you need to 
recompile an application for the modification of the message length to 
take effect, reinstalling it won't change the program)

Cheers,
Urs

On 1/26/11 2:14 PM, laptop...@gmx.de wrote:
> Hallo together,
>
> here comes perhaps a quit simple question.
> Currently I am working with tinyos-2.1.0. Here you can find under 
> /apps/BaseStation the basic files to setup a new basestation. Due to our 
> normal project we need a different message-length than default to be used.
>
> we just added in the Makefile which can be found inthe above mentioned folder 
> the following line:
>
> CFLAGS += -DTOSH_DATA_LENGTH = 102
>
> In the next step we install the BaseStation with the following command:
>
> make iris install mib510./dev/ttyUSB0
>
> Everthing runs as expected and works fine.
>
> Now the QUESTION:
> Is it possible to add the CFLAGS in the command line when send the 
> make-command? Idea: the basic apps defined by tinyos do not need to be 
> changed in Makefiles.
> So I am looking something like the following command:
>
> make iris install "CFLAGS += -DTOSH_DATA_LENGTH=102" mib510./dev/ttyUSB0
>
> Can anyone help me or send me the comand I am looking for?
>
> Thanks a lot,
> Conny

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


[Tinyos-help] On TelosB, are interrupts used for CCA?

2011-01-25 Thread Urs Hunkeler
Hi,

I'm currently implementing the TelosB platform on the Avrora simulator. 
Their code for the radio simulation makes it difficult to trigger 
interrupts when the channel becomes clear. From my current work I can 
tell that the TinyOS 2.x code on the TelosB waits for an interrupt when 
turning the radio on (the CCA pin apparently indicates that the 
oscillator started up). Are interrupts also used for the actual 
clear-channel assessment, or would the code also work if the simulation 
did not generate interrupts for CCA?

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


Re: [Tinyos-help] application compilation error

2011-01-17 Thread Urs Hunkeler
Modify the environmental PATH variable to include the exact path to your 
JDK1.6 installation. It should then use the latest Java version (which 
should be able to handle Java class files compiled with an older 
version). Also javac should then work. Sorry, I can't tell you exactly 
how to do this as I am not very familiar with Windows. Try google with 
"windows path environmental variables" ...

Cheers,
Urs


On 1/17/11 1:57 PM, lue ikhong wrote:
> any clue how to solve the version confusion problem?
>
> On Mon, Jan 17, 2011 at 6:47 PM, lue ikhong  <mailto:lueikh...@gmail.com>> wrote:
>
> ya java version is 1.5.0_22. for the javac, it says"
> bash:javac:command not found". why is that? i think they chose the
> wrong version as what u say, because previously i installed java
> 1.6 which is the latest version, then i unisintalled it and get
> the older version which is 1.5, as the tinyos only for 1.4 and 1.5.
>
>
> On Mon, Jan 17, 2011 at 5:20 PM, Urs Hunkeler
> mailto:urs.hunke...@epfl.ch>> wrote:
>
> Hi,
>
> Please try to run the commands on the command line to find the
> version that is actually used (as stated in the previous
> mails, the commands are "java -version" and "javac -version").
> Sometimes there are multiple versions of Java installed
> without you knowing and somehow the wrong version gets chosen.
>
> Cheers,
> Urs
>
>
> On 01/17/2011 09:55 AM, lue ikhong wrote:
>
> i was running on windows 7 64 bit using cygwin. but now,
> im trying to
> run it on my another pc which is window xp 32bit, and the
> same problem
> occured.
> my java version is J2SE DK 5.0 update 22. and i dont know
> about the javac.
>     sorry,i am very new in this field, as i dont have any
> background on
> computer science.
>
>
> On Mon, Jan 17, 2011 at 12:11 AM, Urs Hunkeler
> mailto:urs.hunke...@epfl.ch>
> <mailto:urs.hunke...@epfl.ch
> <mailto:urs.hunke...@epfl.ch>>> wrote:
>
>Hi,
>
>Usually, that's more like a problem with a version
> mismatch of Java
>itself. It's even possible that you compile your
> programs with one
>version and try to run it with a different version.
>
>Are you running Linux or Windows? Which version?
>What versions of javac and java do you have? ("javac
> -version" and
>"java -version")?
>Is there any additional information to the error (like
> class file
>version numbers)?
>Why does Blink need Java?
>
>Cheers,
>Urs
>
>
>
>On 01/17/2011 04:31 AM, lue ikhong wrote:
>
>hi,
>i am a beginner in tinyos. i am using windows 7
> 64-bit OS.
>whenever i
>want to compile application for tinynode,for
> example Blink,
>there would
>be error like below:
>
>$make tinynode
>
>
>..exception in thread "main"
>java.lang.UnsupportedClassVersionError:Bad version
> number in
>.class file
>at java.lang.Classloader.defineClass1
>at java.lang.classloader.defineclass
>at java
> .security.secureclassloader.defineclass
>at java.net.URLClassloader.defineClass
>..etc,etc.
>make:***{exe0} Error 1
>
>
>is it the problem with my jdk? i had installed both
> 32-bit and
>64 bit
>version of jdk 1.5 to my program files(x86) and
> program files
>respectively.
>
>
>anyone could help me to solve this, please.
>
>
>
>
>

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


Re: [Tinyos-help] How to send a message bigger than 2kb

2011-01-17 Thread Urs Hunkeler
Hi Loïc,

If you use a high-level protocol there might be some support there, 
otherwise you'll have to implement splitting the message yourself.

Cheers,
Urs


On 01/17/2011 10:09 AM, Pfister Loic wrote:
> Hi,
>
> I need to send a message of 2560 bits --> 320 bytes.
>
>  From what I read in the mailing list, you are able to send packet up to
> 114 byte with an iris mote.
>
> So I will need to send three packets to transmit my full message.
>
> So is there any function that split my packet in three automatically ?
> Or Will I need to implement by myself to split the packet in three, and
> rebuilt it on the other size ?
>
> Thanks a lot in advance
>
> loic
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] application compilation error

2011-01-17 Thread Urs Hunkeler
Hi,

Please try to run the commands on the command line to find the version 
that is actually used (as stated in the previous mails, the commands are 
"java -version" and "javac -version"). Sometimes there are multiple 
versions of Java installed without you knowing and somehow the wrong 
version gets chosen.

Cheers,
Urs

On 01/17/2011 09:55 AM, lue ikhong wrote:
> i was running on windows 7 64 bit using cygwin. but now, im trying to
> run it on my another pc which is window xp 32bit, and the same problem
> occured.
> my java version is J2SE DK 5.0 update 22. and i dont know about the javac.
> sorry,i am very new in this field, as i dont have any background on
> computer science.
>
>
> On Mon, Jan 17, 2011 at 12:11 AM, Urs Hunkeler  <mailto:urs.hunke...@epfl.ch>> wrote:
>
> Hi,
>
> Usually, that's more like a problem with a version mismatch of Java
> itself. It's even possible that you compile your programs with one
> version and try to run it with a different version.
>
> Are you running Linux or Windows? Which version?
> What versions of javac and java do you have? ("javac -version" and
> "java -version")?
> Is there any additional information to the error (like class file
> version numbers)?
> Why does Blink need Java?
>
> Cheers,
> Urs
>
>
>
> On 01/17/2011 04:31 AM, lue ikhong wrote:
>
> hi,
> i am a beginner in tinyos. i am using windows 7 64-bit OS.
> whenever i
> want to compile application for tinynode,for example Blink,
> there would
> be error like below:
>
> $make tinynode
>
>
> ..exception in thread "main"
> java.lang.UnsupportedClassVersionError:Bad version number in
> .class file
> at java.lang.Classloader.defineClass1
> at java.lang.classloader.defineclass
> at java .security.secureclassloader.defineclass
> at java.net.URLClassloader.defineClass
> ..etc,etc.
> make:***{exe0} Error 1
>
>
> is it the problem with my jdk? i had installed both 32-bit and
> 64 bit
> version of jdk 1.5 to my program files(x86) and program files
> respectively.
>
>
> anyone could help me to solve this, please.
>
>

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


Re: [Tinyos-help] application compilation error

2011-01-17 Thread Urs Hunkeler
Hi,

Usually, that's more like a problem with a version mismatch of Java 
itself. It's even possible that you compile your programs with one 
version and try to run it with a different version.

Are you running Linux or Windows? Which version?
What versions of javac and java do you have? ("javac -version" and "java 
-version")?
Is there any additional information to the error (like class file 
version numbers)?
Why does Blink need Java?

Cheers,
Urs


On 01/17/2011 04:31 AM, lue ikhong wrote:
> hi,
> i am a beginner in tinyos. i am using windows 7 64-bit OS. whenever i
> want to compile application for tinynode,for example Blink, there would
> be error like below:
>
> $make tinynode
>
>
> ..exception in thread "main"
> java.lang.UnsupportedClassVersionError:Bad version number in .class file
> at java.lang.Classloader.defineClass1
> at java.lang.classloader.defineclass
> at java .security.secureclassloader.defineclass
> at java.net.URLClassloader.defineClass
> ..etc,etc.
> make:***{exe0} Error 1
>
>
> is it the problem with my jdk? i had installed both 32-bit and 64 bit
> version of jdk 1.5 to my program files(x86) and program files respectively.
>
>
> anyone could help me to solve this, please.
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Compilation problem

2011-01-12 Thread Urs Hunkeler
Hi,

I don't know what version is recommended, but mine here is 4.1.2. Maybe 
you should update :-)

Cheers,
Urs


On 01/12/2011 09:12 AM, trilok i wrote:
>
> Hi ,
>
> Yes, I am using linux and my avr-gcc version is 3.4.3
>
>
>  > Date: Tue, 11 Jan 2011 22:22:09 +0100
>  > Subject: Re: [Tinyos-help] Compilation problem
>  > From: mmar...@math.u-szeged.hu
>  > To: itri...@hotmail.com
>  > CC: tinyos-help@millennium.berkeley.edu
>  >
>  > Probably your avr compiler is not the latest. Are you using linux? Miklos
>  >
>  > On Tue, Jan 11, 2011 at 6:08 AM, trilok i  wrote:
>  > >
>  > > Hi,
>  > >
>  > > I was able to compile for telosb but when I compile for micaz and
> iris it is
>  > > giving following messages. Can anyone sort out my problem...
>  > > previously it was not there .
>  > >
>  > >
>  > > compiling BlinkAppC to a micaz binary
>  > >
>  > > ncc -o build/micaz/main.exe -Os -Wall -Wshadow -Wnesc-all
>  > > -target=micaz -fnesc-cfile=build/micaz/app.c -board=
>  > > micasb -DDEFINED_TOS_AM_GROUP=0x22 --param
>  > > max-inline-insns-single=10 -DIDENT_PROGRAM_NAME=\"BlinkAppC\" -D
>  > > IDENT_USER_ID=\"root\" -DIDENT_HOSTNAME=\"mahesh-desktop\"
>  > > -DIDENT_USER_HASH=0xb57d440dL -DIDENT_UNIX_TIME=0x4d
>  > > 2be1ecL -DIDENT_UID_HASH=0xe927ba74L -fnesc-dump=wiring
>  > > -fnesc-dump='interfaces(!abstract())' -fnesc-dump='refe
>  > > renced(interfacedefs, components)'
>  > > -fnesc-dumpfile=build/micaz/wiring-check.xml BlinkAppC.nc -lm
>  > > /tmp/cce9hzjE.s: Assembler messages:
>  > > /tmp/cce9hzjE.s:34: Error: unrecognized symbol type ""
>  > > /tmp/cce9hzjE.s:34: Error: junk at end of line, first unrecognized
> character
>  > > is `0'
>  > > /tmp/cce9hzjE.s:34: Error: unknown opcode `firetimers'
>  > > /tmp/cce9hzjE.s:35: Error: unknown opcode `virtualize'
>  > > /tmp/cce9hzjE.s:35: Error: junk at end of line, first unrecognized
> character
>  > > is `0'
>  > > /tmp/cce9hzjE.s:48: Error: `)' required
>  > >
>  > >
>  > > Thanks & Regards,
>  > > I.Trilok.
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] problem with java tool

2011-01-05 Thread Urs Hunkeler
Hi,

I'm not familiar with this problem. The error message might mean that 
the serial port is already in use. Is there anything already accessing 
the serial port? Maybe you have another program trying to communicate 
with the same mote at the same time?

You could try to see whether the serial port was opened by another 
program with the command:

sudo lsof | grep "/dev/ttyUSB0"

Cheers,
Urs

On 12/30/10 9:53 AM, rihab.cha...@ceslab.org wrote:
> Hi!
>
> I'm a master student. I'm developing a sniffer application of 6LowPAN
> packets. To do so, I use blip implementation. I installed blip on two
> motes: a router and a host. But when I capture packets using "java
> net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:telosb", I get a problem.
> I get this exception:
>
> Exception in thread "Thread-0" java.lang.Exception: TOSComm JNI library
> runtime error: read: Resource temporarily unavailable
>   at net.tinyos.comm.TOSCommJNI.NativeSerial_read__SWIG_1(Native Method)
>   at net.tinyos.comm.NativeSerial.read(NativeSerial.java:195)
>   at 
> net.tinyos.comm.TOSSerial$SerialInputStream.gather(TOSSerial.java:163)
>   at
> net.tinyos.comm.TOSSerial$SerialInputStream.available(TOSSerial.java:183)
>   at 
> net.tinyos.packet.SerialByteSource.readByte(SerialByteSource.java:111)
>   at net.tinyos.packet.Packetizer.readFramedPacket(Packetizer.java:271)
>   at net.tinyos.packet.Packetizer.run(Packetizer.java:227)
>   at java.lang.Thread.run(Thread.java:636)
>
> Please help!
> Great thanks!
> ___
> 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] JNI Library not found, Lesson 4

2011-01-05 Thread Urs Hunkeler
Hi,

The library file should be called libgetenv.so on Linux. Which operating 
system are you using?

The TinyOS Java libraries in the SVN repository contain the native 
libraries for the most common operating systems (Linux, Mac, Windows) 
and no additional installation is necessary. If you don't get it to 
work, you might want to try this version (make sure the tinyos.jar file 
is in your classpath):
http://tinyos-main.googlecode.com/svn/trunk/support/sdk/java/tinyos.jar

Cheers,
Urs

On 1/5/11 12:00 PM, Mitii wrote:
>
>
>
> Hi,
> I did all these 4 steps, but still same error. when i run the code which
> guys recommended before i get this error :
>
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no getenv in
> java.library.path
> what is this getenv ? if it means this file :libgetenv-32.so ,  i copied it
> before so whats wrong ??!!!
>
>
>
>
>
> Manthan wrote:
>>
>> Hi guys
>> I got the same error while running TestSerial on both Windows and Ubuntu.
>> On Ubuntu:
>>   1.   locate the jni path using
>>   tos-locate-jre --jni
>> this gives /usr/lib/jvm/java-1.5.0-sun/jre/lib/i386
>> the path where tinyos looks for the jni library
>>
>> 2.   go to /usr/lib/tinyos on terminal
>>   type : cp libtoscomm-32.so
>> /usr/lib/jvm/java-1.5.0-sun/jre/lib/i386
>>   and type :cp libgetenv-32.so /usr/lib/jvm/java-1.5.0-sun/jre/lib/i386
>>
>> 3.  go to your app (TestSerial)
>> type tos-install-jni
>>
>> I got : Installing 32-bit Java JNI code in
>> /usr/lib/jvm/java-1.5.0-sun/jre/lib/i386 ...
>> done.
>>
>> 4 with the jni library installed
>>type :  java TestSerial -comm serial@:(iris,micaz
>> ,etc)
>>
>> it will wok.
>>
>
>
>

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


Re: [Tinyos-help] on TOSSIM

2010-12-14 Thread Urs Hunkeler
Hi,

The reason you did not get any answer from me is that I simply don't 
know. I am not very familiar with TOSSIM (and certainly not Python), and 
I don't even use Windows (I use Mac and GNU/Linux).

Instead of TOSSIM you could try Avrora. The documentation is a bit 
outdated and I recommend you download the source code from CVS and 
compile the program yourself. All you need is Java, which you should 
have installed for TinyOS anyway.
http://compilers.cs.ucla.edu/avrora/

Cheers,
Urs

On 12/14/2010 01:34 PM, Sain Saginbekov wrote:
> Dear Dr. U. Hunkeler,
>
> I am trying to learn TOSSIM, but stopped when compiling ready programs in 
> ../apps directory.
>
> I posted the follwoing message on tinyos-help, but have not received any 
> answers..
>
> When compiling files in /tinyos2-x/apps directory with"make micaz sim"  i 
> have the many line errors like:
>
> ...
> ...
> ../lib/tossim/tossim_wrap.cxx: 7141 ..
> ../lib/tossim/tossim_wrap.cxx: 7141 ..
> ../lib/tossim/tossim_wrap.cxx: 7141 ..
> ../lib/tossim/tossim_wrap.cxx: 7141 ..
> ../lib/tossim/tossim_wrap.cxx: 7147 error: pyModule_getDict
> ../lib/tossim/tossim_wrap.cxx: 7141 error:  SWIG_Python_Install etc
>
> I have read suggestions on tinyos.net. It says that I have to install SWIG or 
> download another version of python.
> I downloaded Python2.6 and
>   SWIG.
>
> My question is in  which folder should I install SWIG/Python2.6? How to 
> connect it to TOSSIM? How to set paths, etc?
> Which versions are suitable for 64 bit Windows 7?
>
> Thank you
>
> Sincerely,
> Sain Saginbekov
>
>

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


Re: [Tinyos-help] Compile TestSerial application error!

2010-12-13 Thread Urs Hunkeler

Hi,

Sorry, your error messages appear with what looks like Chinese symbols, 
which I don't understand. Therefore I really have no idea what the error is.


Cheers,
Urs

On 12/13/2010 03:41 AM, hongliping7123 wrote:

Yes, I have change the CLASSPATH as you said, and when I type the
command "*echo $CLASSPATH" in Cygwin*, the answer
is*"C:\cygwin\opt\tinyos-2.x\support\sdk\java\tinyos.jar;."*
Also, When I compile TestSerial application, the errors are less than
before.* But there are still some errors:*
*
*
*administra...@hongliping /opt/tinyos-2.x/apps/tests/TestSerial*
*$ make telosb*
*mkdir -p build/telosb*
*javac -target 1.4 -source 1.4 *.java*
*TestSerial.java:35: ?? net.tinyos.message ??*
*import net.tinyos.message.*;*
*^*
*TestSerial.java:39: ??*
*?? ?? MessageListener*
*public class TestSerial implements MessageListener {*
* ^*
*TestSerial.java:41: ??*
*?? ?? MoteIF*
*?? ?? TestSerial*
* private MoteIF moteIF;*
* ^*
*TestSerial.java:43: ??*
*?? ?? MoteIF*
*?? ?? TestSerial*
* public TestSerial(MoteIF moteIF) {*
* ^*
*TestSerial.java:68: ??*
*?? ?? Message*
*?? ?? TestSerial*
* public void messageReceived(int to, Message message) {*
* ^*
*TestSerialMsg.java:7: ?? net.tinyos.message ??*
*public class TestSerialMsg extends net.tinyos.message.Message {*
* ^*
*TestSerialMsg.java:67: ?? net.tinyos.message ??*
* public TestSerialMsg(net.tinyos.message.Message msg, int base_offset) {*
* ^*
*TestSerialMsg.java:76: ?? net.tinyos.message ??*
* public TestSerialMsg(net.tinyos.message.Message msg, int base_offset, int*
*ta_length) {*
* ^*
*TestSerial.java:100: ??*
*?? ?? MoteIF*
*?? ?? TestSerial*
* MoteIF mif = new MoteIF(phoenix);*
* ^*
*TestSerial.java:100: ??*
*?? ?? MoteIF*
*?? ?? TestSerial*
* MoteIF mif = new MoteIF(phoenix);*
* ^*
*TestSerialMsg.java:18: ??*
*??  amTypeSet(int)*
*?? ?? TestSerialMsg*
* amTypeSet(AM_TYPE);*
* ^*
*TestSerialMsg.java:24: ??*
*??  amTypeSet(int)*
*?? ?? TestSerialMsg*
* amTypeSet(AM_TYPE);*
* ^*
*TestSerialMsg.java:33: ??*
*??  amTypeSet(int)*
*?? ?? TestSerialMsg*
* amTypeSet(AM_TYPE);*
* ^*
*TestSerialMsg.java:42: ??*
*??  amTypeSet(int)*
*?? ?? TestSerialMsg*
* amTypeSet(AM_TYPE);*
* ^*
*TestSerialMsg.java:51: ??*
*??  amTypeSet(int)*
*?? ?? TestSerialMsg*
* amTypeSet(AM_TYPE);*
* ^*
*TestSerialMsg.java:60: ??*
*??  amTypeSet(int)*
*?? ?? TestSerialMsg*
* amTypeSet(AM_TYPE);*
* ^*
*TestSerialMsg.java:69: ??*
*??  amTypeSet(int)*
*?? ?? TestSerialMsg*
* amTypeSet(AM_TYPE);*
* ^*
*TestSerialMsg.java:78: ??*
*??  amTypeSet(int)*
*?? ?? TestSerialMsg*
* amTypeSet(AM_TYPE);*
* ^*
*TestSerialMsg.java:134: ??*
*??  getUIntBEElement(int,int)*
*?? ?? TestSerialMsg*
* return (int)getUIntBEElement(offsetBits_counter(), 16);*
* ^*
*TestSerialMsg.java:134: ??*
*?? getUIntBEElement*
*?? int*
* return (int)getUIntBEElement(offsetBits_counter(), 16);*
* ^*
*TestSerialMsg.java:141: ??*
*??  setUIntBEElement(int,int,int)*
*?? ?? TestSerialMsg*
* setUIntBEElement(offsetBits_counter(), 16, value);*
* ^*
*21 *
*make: *** [TestSerial.class] Error 1*
*I don't know how to correct it ! I hope that you can gave me some
suggestion!*
*Thank you for your **appreciation!*
*with regards*
* hongliping*
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] compile TestSerial application error!

2010-12-11 Thread Urs Hunkeler
.java:18: ??
??  amTypeSet(int)
?? ?? TestSerialMsg
 amTypeSet(AM_TYPE);
 ^
TestSerialMsg.java:24: ??
??  amTypeSet(int)
?? ?? TestSerialMsg
 amTypeSet(AM_TYPE);
 ^
TestSerialMsg.java:33: ??
??  amTypeSet(int)
?? ?? TestSerialMsg
 amTypeSet(AM_TYPE);
 ^
TestSerialMsg.java:42: ??
??  amTypeSet(int)
?? ?? TestSerialMsg
 amTypeSet(AM_TYPE);
 ^
TestSerialMsg.java:51: ??
??  amTypeSet(int)
?? ?? TestSerialMsg
 amTypeSet(AM_TYPE);
 ^
TestSerialMsg.java:60: ??
??  amTypeSet(int)
?? ?? TestSerialMsg
 amTypeSet(AM_TYPE);
 ^
TestSerialMsg.java:69: ??
??  amTypeSet(int)
?? ?? TestSerialMsg
 amTypeSet(AM_TYPE);
 ^
TestSerialMsg.java:78: ??
??  amTypeSet(int)
?? ?? TestSerialMsg
 amTypeSet(AM_TYPE);
 ^
TestSerialMsg.java:134: ??
??  getUIntBEElement(int,int)
?? ?? TestSerialMsg
 return (int)getUIntBEElement(offsetBits_counter(), 16);
 ^
TestSerialMsg.java:134: ??
?? getUIntBEElement
?? int
 return (int)getUIntBEElement(offsetBits_counter(), 16);
 ^
TestSerialMsg.java:141: ??
??  setUIntBEElement(int,int,int)
?? ?? TestSerialMsg
 setUIntBEElement(offsetBits_counter(), 16, value);
 ^
28 
make: *** [TestSerial.class] Error 1*
*
*I hope that you can tell me how I can solute these questions!*
*Thank you for your**appreciation!*
*
*with regards
hongliping.*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*

At 2010-12-09 15:11:20??"Urs Hunkeler"  wrote:

>Hi,
>
>This means that the TinyOS Java libraries are not found. Maybe the
>classpath is not set correctly, or the libraries are not compiled.
>Usually, the libraries are in $TOSROOT/support/sdk/java/ or
>$TOSROOT/support/sdk/java/tinyos.jar (you can use either).
>
>What is the output of the command "echo $CLASSPATH"?
>Which operating system are you using?
>How did you install TinyOS?
>
>Cheers,
>Urs
>
>On 12/09/2010 03:38 AM, hongliping7123 wrote:
>>  TestSerial.java:35: package net.tinyos.message does not exist
>>  import net.tinyos.message.*;
>>  ^
>>  TestSerial.java:39: cannot find symbol
>>  symbol: class MessageListener
>>  public class TestSerial implements MessageListener {
>>  ^
>>  TestSerial.java:41: cannot find symbol
>>  symbol : class MoteIF
>>  location: class TestSerial
>>  private MoteIF moteIF;
>>  ^
>>  TestSerial.java:43: cannot find symbol
>>  symbol : class MoteIF
>>  location: class TestSerial
>>  public TestSerial(MoteIF moteIF) {
>>  ^
>>  TestSerial.java:68: cannot find symbol
>>  symbol : class Message
>>  location: class TestSerial
>>  public void messageReceived(int to, Message message) {
>>  ^
>>  TestSerialMsg.java:7: package net.tinyos.message does not exist
>>  public class TestSerialMsg extends net.tinyos.message.Message {
>>  ^
>>  TestSerialMsg.java:67: package net.tinyos.message does not exist
>>  public TestSerialMsg(net.tinyos.message.Message msg, int base_offset) {
>>  ^
>>  TestSerialMsg.java:76: package net.tinyos.message does not exist
>>  public TestSerialMsg(net.tinyos.message.Message msg, int base_offset, int da
>>  ta_length) {
>>  ^
>>  TestSerial.java:100: cannot find symbol
>>  symbol : class MoteIF
>>  location: class TestSerial
>>  MoteIF mif = new MoteIF(phoenix);
>>  ^
>>  TestSerial.java:100: cannot find symbol
>>  symbol : class MoteIF
>>  location: class TestSerial
>>  MoteIF mif = new MoteIF(phoenix);
>>  ^
>>  TestSerialMsg.java:18: cannot find symbol
>>  symbol : method amTypeSet(int)
>>  location: class TestSerialMsg
>>  amTypeSet(AM_TYPE);
>>  ^
>>  TestSerialMsg.java:24: cannot find symbol
>>  symbol : method amTypeSet(int)
>>  location: class TestSerialMsg
>>  amTypeSet(AM_TYPE);
>>  ^
>>  TestSerialMsg.java:33: cannot find symbol
>>  symbol : method amTypeSet(int)
>>  location: class TestSerialMsg
>>  amTypeSet(AM_TYPE);
>>  ^
>>  TestSerialMsg.java:42: cannot find symbol
>>  symbol : method amTypeSet(int)
>>  location: class TestSerialMsg
>>  amTypeSet(AM_TYPE);
>>  ^
>>  TestSerialMsg.java:51: cannot find symbol
>>  symbol : method amTypeSet(int)
>>  location: class TestSerialMsg
>>  amTypeSet(AM_TYPE);
>>  ^
>>  TestSerialMsg.java:60: cannot find symbol
>>  symbol : method amTypeSet(int)
>>  location: class TestSerialMsg
>&

Re: [Tinyos-help] Ask for help [[Errno 84] Invalid or incomplete multibyte or wide character]

2010-12-11 Thread Urs Hunkeler
Hi,

I don't actually know what happens there, I've never had any similar 
problems. From the expression "multi-byte character" I would guess it 
has to do with unicode. Do you use any extended character sets for your 
default environment (e.g., is the system language something else than 
English)? You mention xubuntu. Do you run the XubunTOS image in a 
virtual machine?

Cheers,
Urs


On 12/10/10 7:30 AM, Xi wrote:
>
> HI, All
>
> I am new to tinyos 2. And I try to learn tinyos 2 from the sample programs.
> However, I ran into a problem when I tried to run the sample program
> TestSerial on xubuntu.
>
> I can compile and install the sample program Blink on my tesloB sensors. And
> the program runs well. So I guess the sensor has no problem. When  I
> compile another sample program TestSerial, there is still no problem.  But I
> got the complain "[Errno 84] Invalid or incomplete multibyte or wide
> character" when I try to install the problem.
>
> I tries all what I can do, but the problem is still there and I am so
> frustrated. Any suggestion or comment would be greatly appreciated.
>
> Best Regards
>
> Xi

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


Re: [Tinyos-help] CCA on

2010-12-09 Thread Urs Hunkeler
Hi Miklos,

Thanks for the clarification.

Cheers,
Urs

On 12/09/2010 09:50 AM, Miklos Maroti wrote:
> Hi Urs,
>
> During the random back-off time we do nothing. After the timer
> expires, then we do CCA and if the channel is free, then we send the
> message. If the channel is busy, then we go another round of random
> back-off (congested). On the TelosB the random back-off time was up to
> 8 ms the last time I have checked. IRIS uses 4 ms now.
>
> Best,
> Miklos
>
> On Thu, Dec 9, 2010 at 9:42 AM, Urs Hunkeler  wrote:
>> Hi,
>>
>> My bad, I mixed CCA (clear channel assessment) up with random back-off
>> time. I think that the original question was rather about the random
>> back-off time (used for the CSMA in the default MAC protocol used by
>> TinyOS), during which (please correct me if I'm wrong here) the channel
>> is continuously checked to see whether it is busy, and if so, the timer
>> for the random back-off is suspended while the channel is sensed to be busy.
>>
>> Cheers,
>> Urs
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] CCA on

2010-12-09 Thread Urs Hunkeler
Hi,

My bad, I mixed CCA (clear channel assessment) up with random back-off 
time. I think that the original question was rather about the random 
back-off time (used for the CSMA in the default MAC protocol used by 
TinyOS), during which (please correct me if I'm wrong here) the channel 
is continuously checked to see whether it is busy, and if so, the timer 
for the random back-off is suspended while the channel is sensed to be busy.

Cheers,
Urs

On 12/09/2010 09:20 AM, Miklos Maroti wrote:
> Hi Guys!
>
> On the RF230 we perform an instantaneous RSSI based CCA check, but you
> can enable the hardware CCA which takes around 16 microseconds.
>
> Miklos
>
> On Thu, Dec 9, 2010 at 7:55 AM, Urs Hunkeler  wrote:
>>   From my tests on a TelosB (CC2420 radio) it varies linearly between 1ms
>> and 10ms (when the channel is free, in principle the radio is already in
>> receive mode while the message is being copied to the radio's memory,
>> but I don't think this is used as the CCA). The duration on an Iris mote
>> (RF230 radio) is shorter, but I haven't measured the details.
>>
>> The duration of the CCA is definitely configured by TinyOS, as I managed
>> to shorten it. You might have to dig into the lower levels of the radio
>> interface.
>>
>> Cheers,
>> Urs
>>
>>
>>
>> On 12/08/2010 10:46 PM, TheMrOrange wrote:
>>> from my tests cc2420 is in rx mode for 8msec if the channel is empty
>>>
>>> Davide
>>>
>>> On 08/dic/10, at 20:53, Eric Decker wrote:
>>>
>>>>
>>>>
>>>> On Wed, Dec 8, 2010 at 12:27 PM, wasif masood>>> <mailto:rwmas...@gmail.com>>  wrote:
>>>>
>>>>
>>>>  Hi all,
>>>>
>>>>  can anyone tell me how long does a sender sense(in msec) the
>>>>  channel if I use CCA enabled transmission? is this mention anywhere?
>>>>
>>>>
>>>> I think that is buried down in the radio h/w but I am not sure. You
>>>> might want to take a look at the h/w specs for the radio you are
>>>> using.
>>>>
>>>> eric
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] a basic question of tossim working

2010-12-08 Thread Urs Hunkeler
Hi,

I'm not too familiar with TOSSIM myself, but I think it should all be 
explained in the tutorials:
http://docs.tinyos.net/index.php/TOSSIM

Cheers,
Urs

On 12/09/2010 08:18 AM, niraj nake wrote:
> Hello all,
> I jst want to run blink application using tossim simulator...
>
> on ubuntu 10.1
> I hv installed tinyos 2.1.0
>
> after running command 'make micaz sim'
> what r the nxt steps to follow plz let me know plz
>
> Thanksa lot.!!
>
> --
> Regards ,
> Niraj B. Nake
> B.Tech.(I.T.)
> College of Engineering ,
> Pune
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Duplicate data from EasyCollection

2010-12-08 Thread Urs Hunkeler
Hi,

I think your two questions might be related. I had a similar problem
once where it turned out that the ACKs were received too late. In my
case it helped to enable hardware acknowledgments. You can try this by
adding the following line to your Makefile:
CFLAGS+=-DCC2420_HW_ACKNOWLEDGEMENTS

Then rebuild the application with the following command:
"make clean && make micaz"

(Use the "make clean" to ensure that the app will be completely rebuilt).

Cheers,
Urs

On 12/09/2010 08:12 AM, cui wrote:
> I modified the apps/EasyCollection to add a counter in the message, and 
> I found that the Root received every message for many times(about 30).
> Is that normal and how can I avoid this.
> part of my code
> -
> module NodeC {
> uses interface Boot;
> uses interface SplitControl as RadioControl;
> uses interface StdControl as RoutingControl;
> uses interface Send;
> uses interface Leds;
> uses interface Timer;
> uses interface RootControl;
> uses interface Receive;
> }
> implementation {
> message_t packet;
> bool sendBusy = FALSE;
> uint16_t counter = 0;
> event void Boot.booted() {
> call RadioControl.start();
> }
> event void RadioControl.startDone(error_t err) {
> if (err != SUCCESS)
> call RadioControl.start();
> else {
> call RoutingControl.start();
> call Timer.startPeriodic(2000);
> }
> }
> event void RadioControl.stopDone(error_t err) {}
> void sendMessage() {
> SensorMsg* msg =
> (SensorMsg*)call Send.getPayload(&packet, sizeof(SensorMsg));
> msg->nodeid = TOS_NODE_ID;
> msg->sensorType = SENSOR_TYPE_SOUND;
> msg->data = counter++;
> if (call Send.send(&packet, sizeof(SensorMsg)) != SUCCESS)
> call Leds.led0On();
> else
> sendBusy = TRUE;
> }
> event void Timer.fired() {
> if (!sendBusy) {
> call Leds.led2Toggle();
> sendMessage();
> }
> }
> event void Send.sendDone(message_t* m, error_t err) {
> if (err != SUCCESS)
> call Leds.led0On();
> sendBusy = FALSE;
> }
> }
> 
> module RootC {
> uses interface Boot;
> uses interface SplitControl as RadioControl;
> uses interface SplitControl as SerialControl;
> uses interface StdControl as RoutingControl;
> uses interface AMSend as UartAMSend;
> uses interface AMPacket as UartAMPacket;
> uses interface Packet as UartPacket;
> uses interface Leds;
> uses interface Timer;
> uses interface RootControl;
> uses interface Receive;
> }
> implementation {
> message_t packet;
> SensorMsg *sensorMsg;
> bool UartSendBusy = FALSE;
> event void Boot.booted() {
> call RadioControl.start();
> call SerialControl.start();
> }
> event void RadioControl.startDone(error_t err) {
> if (err != SUCCESS)
> call RadioControl.start();
> else {
> call RoutingControl.start();
> call RootControl.setRoot();
> }
> }
> event void RadioControl.stopDone(error_t err) {}
> event void SerialControl.startDone(error_t error) {
> if( error == SUCCESS ) {
> call Leds.led0Toggle();
> } else {
> call SerialControl.start();
> call Leds.led2Toggle();
> }
> }
> event void SerialControl.stopDone(error_t err) {};
> event void UartAMSend.sendDone(message_t *msg, error_t err) {
> if(&packet==msg) {
> UartSendBusy = FALSE;
> }
> }
> event void Timer.fired() {
> }
> event message_t*
> Receive.receive(message_t* msg, void* payload, uint8_t len) {
> SensorMsg *btrpkt = (SensorMsg *)call UartPacket.getPayload(&packet, NULL);
> sensorMsg = (SensorMsg*)payload;
> btrpkt->nodeid = sensorMsg->nodeid;
> btrpkt->sensorType = sensorMsg->sensorType;
> btrpkt->data = sensorMsg->data;
> call Leds.led1Toggle();
> if( (call UartAMSend.send(AM_BROADCAST_ADDR, &packet, 
> sizeof(SensorMsg)))==SUCCESS) {
> UartSendBusy = TRUE;
> }
> return msg;
> }
> 2010-12-09
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] compile TestSerial application error!

2010-12-08 Thread Urs Hunkeler

Hi,

This means that the TinyOS Java libraries are not found. Maybe the 
classpath is not set correctly, or the libraries are not compiled. 
Usually, the libraries are in $TOSROOT/support/sdk/java/ or 
$TOSROOT/support/sdk/java/tinyos.jar (you can use either).


What is the output of the command "echo $CLASSPATH"?
Which operating system are you using?
How did you install TinyOS?

Cheers,
Urs

On 12/09/2010 03:38 AM, hongliping7123 wrote:

TestSerial.java:35: package net.tinyos.message does not exist
import net.tinyos.message.*;
^
TestSerial.java:39: cannot find symbol
symbol: class MessageListener
public class TestSerial implements MessageListener {
^
TestSerial.java:41: cannot find symbol
symbol : class MoteIF
location: class TestSerial
private MoteIF moteIF;
^
TestSerial.java:43: cannot find symbol
symbol : class MoteIF
location: class TestSerial
public TestSerial(MoteIF moteIF) {
^
TestSerial.java:68: cannot find symbol
symbol : class Message
location: class TestSerial
public void messageReceived(int to, Message message) {
^
TestSerialMsg.java:7: package net.tinyos.message does not exist
public class TestSerialMsg extends net.tinyos.message.Message {
^
TestSerialMsg.java:67: package net.tinyos.message does not exist
public TestSerialMsg(net.tinyos.message.Message msg, int base_offset) {
^
TestSerialMsg.java:76: package net.tinyos.message does not exist
public TestSerialMsg(net.tinyos.message.Message msg, int base_offset, int da
ta_length) {
^
TestSerial.java:100: cannot find symbol
symbol : class MoteIF
location: class TestSerial
MoteIF mif = new MoteIF(phoenix);
^
TestSerial.java:100: cannot find symbol
symbol : class MoteIF
location: class TestSerial
MoteIF mif = new MoteIF(phoenix);
^
TestSerialMsg.java:18: cannot find symbol
symbol : method amTypeSet(int)
location: class TestSerialMsg
amTypeSet(AM_TYPE);
^
TestSerialMsg.java:24: cannot find symbol
symbol : method amTypeSet(int)
location: class TestSerialMsg
amTypeSet(AM_TYPE);
^
TestSerialMsg.java:33: cannot find symbol
symbol : method amTypeSet(int)
location: class TestSerialMsg
amTypeSet(AM_TYPE);
^
TestSerialMsg.java:42: cannot find symbol
symbol : method amTypeSet(int)
location: class TestSerialMsg
amTypeSet(AM_TYPE);
^
TestSerialMsg.java:51: cannot find symbol
symbol : method amTypeSet(int)
location: class TestSerialMsg
amTypeSet(AM_TYPE);
^
TestSerialMsg.java:60: cannot find symbol
symbol : method amTypeSet(int)
location: class TestSerialMsg
amTypeSet(AM_TYPE);
^
TestSerialMsg.java:69: cannot find symbol
symbol : method amTypeSet(int)
location: class TestSerialMsg
amTypeSet(AM_TYPE);
^
TestSerialMsg.java:78: cannot find symbol
symbol : method amTypeSet(int)
location: class TestSerialMsg
amTypeSet(AM_TYPE);
^
TestSerialMsg.java:134: cannot find symbol
symbol : method getUIntBEElement(int,int)
location: class TestSerialMsg
return (int)getUIntBEElement(offsetBits_counter(), 16);
^
TestSerialMsg.java:134: inconvertible types
found : getUIntBEElement
required: int
return (int)getUIntBEElement(offsetBits_counter(), 16);
^
TestSerialMsg.java:141: cannot find symbol
symbol : method setUIntBEElement(int,int,int)
location: class TestSerialMsg
setUIntBEElement(offsetBits_counter(), 16, value);
^
21 errors
make: *** [TestSerial.class] Error 1
I thought it may be the problem with java configuration,so I tried to
properly configure the java installation, but still the same error message.
I will appreciate for any suggestion regarding this.
Thank you.
with regards
hongliping.
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Packet.getPayload() on variable length header

2010-12-08 Thread Urs Hunkeler
That's correct. Without knowing the actual contents of the header it 
will not be possible to calculate the length. You can either do the 
calculations yourself at a higher layer, or you could implement your own 
interface and handle the header in your module. I suggest the latter if 
this is a more complex project.

If you handle the header in a separate module, you could have a special 
method getPayload(message_t* msg, ), where ) {
   myHeader_t* header = (myHeader_t*)Packet.getPayload(msg);
   if(header->msgType != ) return ERROR;
   header->myValue = ;
   return SUCCESS;
}

Cheers,
Urs

On 12/09/2010 05:54 AM, Xiaohui Liu wrote:
> But there is a nx_union field in "your_header_t", which makes
> sizeof(your_header_t) to be the header length when it contains the
> longest member in the union. And when header comes without the longest
> member, your approach is likely to be problematic, right?
>
> On Wed, Dec 8, 2010 at 2:07 PM, wasif masood  > wrote:
>
> your header should be the part of the actual payload, then it could
> look like this:
>
> command void* Packet.getPayload(message_t* msg, uint8_t len) {
> void* payload = call SubPacket.getPayload(msg, len +
> sizeof(your_header_t)*no_of_entries);
>
> if (payload != NULL) {
> payload += sizeof(your_header_t)*no_of_entries
> }
> return payload;
> }
>
>
> On Wed, Dec 8, 2010 at 7:19 PM, Xiaohui Liu  > wrote:
>
> Hi everyone,
>
> My packet has the following format:
> lower-layer header | my header | payload
>
> There exists a nx_union filed in the header, thus the header
> length is not fixed and the typical implementation of
> Packet.getPayload() may not work:
>
> command void* Packet.getPayload(message_t* msg, uint8_t len) {
> uint8_t* payload = call SubPacket.getPayload(msg, len +
> sizeof(data_header_t));
> if (payload != NULL) {
> payload += sizeof(data_header_t);
> }
> return payload;
> }
>
> Can anyone give me some suggestion on how Packet.getPayload()
> can be implemented on variable length header? Thanks.
>
> --
> -Xiaohui Liu
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Hoe to find TinyOS version

2010-12-08 Thread Urs Hunkeler
Hi,

If you installed Moteworks, you're using TinyOS 1.x. I don't know how to 
determine the exact version, but in any case it might well be a special 
version provided by Crossbow.

Cheers,
Urs

On 12/09/2010 04:48 AM, SHIVASANKAR GANESAN wrote:
>
> Hi
>
> How to find TinyOS version.
>
> I installed tinyOS by Moteworks Software package.
> **
> *With regards*
> *Sivasankar*
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] CCA on

2010-12-08 Thread Urs Hunkeler
 From my tests on a TelosB (CC2420 radio) it varies linearly between 1ms 
and 10ms (when the channel is free, in principle the radio is already in 
receive mode while the message is being copied to the radio's memory, 
but I don't think this is used as the CCA). The duration on an Iris mote 
(RF230 radio) is shorter, but I haven't measured the details.

The duration of the CCA is definitely configured by TinyOS, as I managed 
to shorten it. You might have to dig into the lower levels of the radio 
interface.

Cheers,
Urs



On 12/08/2010 10:46 PM, TheMrOrange wrote:
> from my tests cc2420 is in rx mode for 8msec if the channel is empty
>
> Davide
>
> On 08/dic/10, at 20:53, Eric Decker wrote:
>
>>
>>
>> On Wed, Dec 8, 2010 at 12:27 PM, wasif masood > > wrote:
>>
>>
>> Hi all,
>>
>> can anyone tell me how long does a sender sense(in msec) the
>> channel if I use CCA enabled transmission? is this mention anywhere?
>>
>>
>> I think that is buried down in the radio h/w but I am not sure. You
>> might want to take a look at the h/w specs for the radio you are
>> using.
>>
>> eric
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Hi, something about transmission power

2010-12-08 Thread Urs Hunkeler
Hi,

It depends on the type of radio you use. E.g., with the CC2420 (MicaZ, 
TelosB) there is a CC2420Packet interface which has a function called 
setPower(..). With the RF230 (Iris) the RF230ActiveMessageC component 
offers an interface of type PacketField called PacketTransmitPower which 
allows to do the same thing.

If you need more information, can you tell us which version of TinyOS 
(1.x or 2.x) and which hardware platform you're using?

Cheers,
Urs

On 12/08/2010 09:56 AM, 徐瑞涛 wrote:
> Hi,
>
> I have the same question with you( my name is 徐瑞涛 ), and I checked
> the packet interface but it can't help me. So I want to know how to
> adjust transmission power at run time ?
>
> Looking forward to your reply.
>
> Best Regards,
> Ruitao Xu
>
> 在 2010年12月5日 下午1:29,徐经纬  >写道:
>
> ok,I have done it, thanks very much
>
>
> 在 2010年12月5日 上午10:58,tarun sharma  >写道:
>
> look in to packet interface, it allows you to decide
> transmission power of each packet at run time.
>
> 2010/12/4 徐经纬  >
>
> Hi all:
> I want to change transmission power frequently. But the only
> way to change this power I known is set the power on
> makefile. Is there any other methods to set the transmission
> power more convenient? At lest we don't need to compile and
> install program every time. If there is a way, plz show me. Thx
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] (no subject)

2010-12-07 Thread Urs Hunkeler
Hi Vino,

Have you correctly setup your TinyOS environment (does your shell call 
tinyos.sh on launch)? What is the output of:

echo $TOSROOT

Cheers,
Urs

On 12/08/2010 05:30 AM, vino . wrote:
> Hi
> I'am getting the following error while typing in simple blink application
>  >
>  > make micaz
>  >
>  > make: *** [exe0]Error 1
>  >
>  > i'am not able to fix it help me
>  >
>  > Regards
>  > Vino
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Reg:Std Deviation of Gaussian Noise

2010-12-07 Thread Urs Hunkeler
Hi,

This is specific to TinyOS 2.x, this functionality was not available in 
TinyOS 1.x (and XMesh). If you want to use it, you will have to either 
implement it yourself (you can have a look at the TinyOS 2.x source 
code) or migrate to TinyOS 2.x.

Cheers,
Urs

On 12/07/2010 10:14 AM, SHIVASANKAR GANESAN wrote:
>
> Hi
>
> That module is not available in my system.I searched my system.What to do.
> **
> *With regards*
> *Sivasankar*
>
>
> --- On *Tue, 7/12/10, Urs Hunkeler //* wrote:
>
>
> From: Urs Hunkeler 
> Subject: Re: [Tinyos-help] Reg:Std Deviation of Gaussian Noise
> To: "SHIVASANKAR GANESAN" ,
> "tinyos-help@Millennium.Berkeley.EDU"
> 
> Date: Tuesday, 7 December, 2010, 1:01 PM
>
> Hi,
>
> On my system it's in
> $TOSROOT/tos/chips/cc2420/control/CC2420ControlC.nc. It's not an
> interface, it's a module which provides an interface of Read
> which is named ReadRssi.
>
> Please post your questions to the mailing list.
>
> Cheers,
> Urs
>
>
>
> On 12/07/2010 05:27 AM, SHIVASANKAR GANESAN wrote:
>  > Hi
>  >
>  > I can't find CC2420ControlC file in my system,I have only
> CC2420Control
>  > file and others(like CC2420RadioC..).
>  >
>  > I am using Tiny OS V2.0 with Mote works v2.0F.
>  >
>  > *With regards*
>  > *Sivasankar*
>  >
>  >
>  > --- On *Mon, 6/12/10, Urs Hunkeler / >/* wrote:
>  >
>  >
>  > From: Urs Hunkeler  >
>  > Subject: Re: [Tinyos-help] Reg:Std Deviation of Gaussian Noise
>  > To: "SHIVASANKAR GANESAN"  >,
>  > tinyos-help@Millennium.Berkeley.EDU
> 
>  > Date: Monday, 6 December, 2010, 12:17 PM
>  >
>  > Hi,
>  >
>  > As I said in my previous mail, read the RSSI value from
> CC2420ControlC.
>  > As this value is the signal strength your radio receives while not
>  > actually receiving a message, this is the background noise.
>  >
>  > Cheers,
>  > Urs
>  >
>  > On 12/6/10 7:26 AM, SHIVASANKAR GANESAN wrote:
>  > >
>  > > How to sample background Noise.
>  > >
>  > > **
>  > > *With regards*
>  > > *Sivasankar*
>  > >
>  > >
>  > > --- On *Fri, 3/12/10, Urs Hunkeler / 
>  >  >>/* wrote:
>  > >
>  > >
>  > > From: Urs Hunkeler  
>  >  >>
>  > > Subject: Re: [Tinyos-help] Reg:Std Deviation of Gaussian Noise
>  > > To: "SHIVASANKAR GANESAN"  
>  >  >>
>  > > Cc: "tinyos-help@Millennium.Berkeley.EDU
> 
>  >  >"
>  > >  
>  >  >>
>  > > Date: Friday, 3 December, 2010, 2:06 PM
>  > >
>  > > Hi,
>  > >
>  > > The CC2420ControlC has a ReadRssi interface, which allows you to
>  > > read the RSSI while not actively receiving any message. You could
>  > > sample the background noise for a while, and then use standard
>  > > statistical methods to determine the noise level and the standard
>  > > deviation.
>  > >
>  > > Cheers,
>  > > Urs
>  > >
>  > > On 12/03/2010 07:54 AM, SHIVASANKAR GANESAN wrote:
>  > > > Hi
>  > > > How to measure Std Deviation of the Gaussian Noise,I need that
>  > > value for
>  > > > my experiment(I am using Micaz mote).
>  > > > **
>  > > > *With regards*
>  > > > *Sivasankar*
>  > >
>  > >
>  >
>  >
>
>

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


Re: [Tinyos-help] Reg:Std Deviation of Gaussian Noise

2010-12-06 Thread Urs Hunkeler
Hi,

On my system it's in 
$TOSROOT/tos/chips/cc2420/control/CC2420ControlC.nc. It's not an 
interface, it's a module which provides an interface of Read 
which is named ReadRssi.

Please post your questions to the mailing list.

Cheers,
Urs



On 12/07/2010 05:27 AM, SHIVASANKAR GANESAN wrote:
> Hi
>
> I can't find CC2420ControlC file in my system,I have only CC2420Control
> file and others(like CC2420RadioC..).
>
> I am using Tiny OS V2.0 with Mote works v2.0F.
>
> *With regards*
> *Sivasankar*
>
>
> --- On *Mon, 6/12/10, Urs Hunkeler //* wrote:
>
>
> From: Urs Hunkeler 
> Subject: Re: [Tinyos-help] Reg:Std Deviation of Gaussian Noise
> To: "SHIVASANKAR GANESAN" ,
> tinyos-help@Millennium.Berkeley.EDU
> Date: Monday, 6 December, 2010, 12:17 PM
>
> Hi,
>
> As I said in my previous mail, read the RSSI value from CC2420ControlC.
> As this value is the signal strength your radio receives while not
> actually receiving a message, this is the background noise.
>
> Cheers,
> Urs
>
> On 12/6/10 7:26 AM, SHIVASANKAR GANESAN wrote:
>  >
>  > How to sample background Noise.
>  >
>  > **
>  > *With regards*
>  > *Sivasankar*
>  >
>  >
>  > --- On *Fri, 3/12/10, Urs Hunkeler / >/* wrote:
>  >
>  >
>  > From: Urs Hunkeler  >
>  > Subject: Re: [Tinyos-help] Reg:Std Deviation of Gaussian Noise
>  > To: "SHIVASANKAR GANESAN"  >
>  > Cc: "tinyos-help@Millennium.Berkeley.EDU
> "
>  >  >
>  > Date: Friday, 3 December, 2010, 2:06 PM
>  >
>  > Hi,
>  >
>  > The CC2420ControlC has a ReadRssi interface, which allows you to
>  > read the RSSI while not actively receiving any message. You could
>  > sample the background noise for a while, and then use standard
>  > statistical methods to determine the noise level and the standard
>  > deviation.
>  >
>  > Cheers,
>  > Urs
>  >
>  > On 12/03/2010 07:54 AM, SHIVASANKAR GANESAN wrote:
>  > > Hi
>  > > How to measure Std Deviation of the Gaussian Noise,I need that
>  > value for
>  > > my experiment(I am using Micaz mote).
>  > > **
>  > > *With regards*
>  > > *Sivasankar*
>  >
>  >
>
>

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


Re: [Tinyos-help] Power profiling for MicaZ nodes

2010-12-06 Thread Urs Hunkeler
Hi,

I think it should be possible to modify Avrora to simulate also clock 
drift. Maybe the effort of doing so would be smaller than measure the 
exact execution times on a real mote.

Whether you'll need to dig deep into TinyOS or whether it'll be enough 
to do this at the application level probably depends on the 
implementation details of your application and the accuracy of the 
results you need. I personally think it would most likely be enough to 
do this at the application level. In any case, the following trick might 
be useful: if you need to modify TinyOS code, you can just copy the 
relevant .nc files into your local application directory and modify it 
there, without modifying the TinyOS repository for all other 
applications. When compiling your program, the compiler will give 
preference to files in your application directory before searching for 
the files in the TinyOS source tree.

How about the following approach: use a simulator like Avrora (maybe 
with a clock-drift modification) for the primary tests, and use a 
current integrator to measure the energy consumption of real devices in 
a real network to validate your simulation results.

Cheers,
Urs

On 12/6/10 8:11 AM, Aylin Kantarci wrote:
> Thanks for your help.
> I examined Avrora. As far as I have seen, it is useful before porting
> the app. to the actual nodes. However, we want to measure the energy on
> actual nodes by software. We are working on clock synchronization and my
> assistan says that it is not possible to test our program with
> simulators because clocks in a simulator tool are perfect. We will
> either do this on our program or on source code of Tiny OS by getting
> the time when a unit is switched on and off. Is the 1st approach (on our
> oen program) sufficient in your opinion?
> Regards
>
> 06 Aralık 2010 08:52 tarihinde Urs Hunkeler  <mailto:urs.hunke...@epfl.ch>> yazdı:
>
> Hi,
>
> The Avrora project does cycle-accurate simulations of programs
> running on MicaZ and should give you a good estimation of the power
> consumption of your programs.
> http://compilers.cs.ucla.edu/avrora/
>
> If you want to do your own measurements, I think both Avrora and
> PowerTOSSIM did measurements, and how they did it would certainly be
> described somewhere. The common approach would be to toggle an IO
> pin of the mote whenever a component is activated/deactivated, and
> then to measure the timings with an oscilloscope.
>
> Cheers,
> Urs
>
>
> On 12/5/10 10:05 PM, Aylin Kantarci wrote:
>
>
> Hello,
>
> We have MicaZ motes. We want to measure power consumption of our
> clock
> synchronization code by software. We want to do this by
> measuring the
> duration a componrnt is switched on. Is doing this in our code
> sufficient, or should we do this in the whole TİnyOS source code. If
> this is the case is there aynyone who did this already?
>
> Regards
> --
> Doç. Dr./Assoc. Prof. Dr. Aylin KANTARCI
> Bilgisayar Muhendisliği Bölümü/Computer Engineering Department
> Ege Universitesi/Ege University
> Tel: 232-3115316
> Fax: 232-3399405
> http: efe.ege.edu.tr/~kantarci <http://efe.ege.edu.tr/~kantarci>
> <http://efe.ege.edu.tr/~kantarci>
>
>
>
>
> --
> Doç. Dr./Assoc. Prof. Dr. Aylin KANTARCI
> Bilgisayar Muhendisliği Bölümü/Computer Engineering Department
> Ege Universitesi/Ege University
> Tel: 232-3115316
> Fax: 232-3399405
> http: efe.ege.edu.tr/~kantarci <http://efe.ege.edu.tr/~kantarci>
>
>
>
>
> ___
> 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] Power saving on TelosB

2010-12-06 Thread Urs Hunkeler
Hi,

You can turn off the radio with the stop() function of the SplitControl 
interface provided by AcitveMessageC (and similarly turn the radio on 
with the start() function of the same interface). Make sure you do not 
enable low-power operation of the radio stack, as otherwise TinyOS will 
use low-power listening (LPL) and will turn on and off the radio 
automatically.

For the microcontroller, TinyOS turns it on and off (actually, switches 
between different power states) automatically. It'll be difficult to put 
the microcontroller into the lowest power state for extended periods of 
time as the event queue in TinyOS wakes up regularly. However it is 
possible to override the power-saving behavior to keep the 
microcontroller turned on all the time.

Power-saving features are described in the tutorials:
http://docs.tinyos.net/index.php/Writing_Low-Power_Applications

Cheers,
Urs




On 12/5/10 11:09 PM, Andrea Lucibello wrote:
> Hi, I am a student who is beginning to work with sensors TelosB. In
> particular I'am studying the energy-saving techniques of these devices.
> I want to write a software that totally turn off the radio for a period
> of time. After It must do the same thing but with also off the cpu. So I
> can measure with a multimeter the consumption of energy. How can I do
> It? Thank you very much
>
>
> Best regards
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Power profiling for MicaZ nodes

2010-12-05 Thread Urs Hunkeler
Hi,

The Avrora project does cycle-accurate simulations of programs running 
on MicaZ and should give you a good estimation of the power consumption 
of your programs.
http://compilers.cs.ucla.edu/avrora/

If you want to do your own measurements, I think both Avrora and 
PowerTOSSIM did measurements, and how they did it would certainly be 
described somewhere. The common approach would be to toggle an IO pin of 
the mote whenever a component is activated/deactivated, and then to 
measure the timings with an oscilloscope.

Cheers,
Urs

On 12/5/10 10:05 PM, Aylin Kantarci wrote:
>
> Hello,
>
> We have MicaZ motes. We want to measure power consumption of our clock
> synchronization code by software. We want to do this by measuring the
> duration a componrnt is switched on. Is doing this in our code
> sufficient, or should we do this in the whole TİnyOS source code. If
> this is the case is there aynyone who did this already?
>
> Regards
> --
> Doç. Dr./Assoc. Prof. Dr. Aylin KANTARCI
> Bilgisayar Muhendisliği Bölümü/Computer Engineering Department
> Ege Universitesi/Ege University
> Tel: 232-3115316
> Fax: 232-3399405
> http: efe.ege.edu.tr/~kantarci 
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Reg:Std Deviation of Gaussian Noise

2010-12-05 Thread Urs Hunkeler
Hi,

As I said in my previous mail, read the RSSI value from CC2420ControlC. 
As this value is the signal strength your radio receives while not 
actually receiving a message, this is the background noise.

Cheers,
Urs

On 12/6/10 7:26 AM, SHIVASANKAR GANESAN wrote:
>
> How to sample background Noise.
>
> **
> *With regards*
> *Sivasankar*
>
>
> --- On *Fri, 3/12/10, Urs Hunkeler //* wrote:
>
>
> From: Urs Hunkeler 
> Subject: Re: [Tinyos-help] Reg:Std Deviation of Gaussian Noise
> To: "SHIVASANKAR GANESAN" 
> Cc: "tinyos-help@Millennium.Berkeley.EDU"
> 
> Date: Friday, 3 December, 2010, 2:06 PM
>
> Hi,
>
> The CC2420ControlC has a ReadRssi interface, which allows you to
> read the RSSI while not actively receiving any message. You could
> sample the background noise for a while, and then use standard
> statistical methods to determine the noise level and the standard
> deviation.
>
> Cheers,
> Urs
>
> On 12/03/2010 07:54 AM, SHIVASANKAR GANESAN wrote:
> > Hi
> > How to measure Std Deviation of the Gaussian Noise,I need that
> value for
> > my experiment(I am using Micaz mote).
> > **
> > *With regards*
> > *Sivasankar*
>
>

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


Re: [Tinyos-help] BlinkToRadio: Two telosb motes can't communicate. Need Help!

2010-12-05 Thread Urs Hunkeler
Hi,

I think you must have had quite an old version of the TinyOS source 
tree. Incompatibilities like this don't appear often. In general, there 
are two choices available: the official release and current SVN. The 
official release contains tested code and is updated relatively rarely 
(maybe once a year?). The SVN always contains the latest changes, but 
sometimes something might temporarily not work. If you use SVN you 
should have an easy way of updating your source tree so that if 
something doesn't work you first try updating it and see whether this 
solves your issue. If you use the release version, you should not have 
to worry about updates. That being said, SVN is usually fine.

Cheers,
Urs

On 12/4/10 10:11 AM, 徐瑞涛 wrote:
> Hi Urs,
>
>  First of all, It works. Many thanks for your test.
>
>  YES, YOU ARE RIGHT. My BlinkToRadio is rev 5244, and my cc2420 
> radio stack is an old rev.
> And now, I update the cc2420 radio stack to rev 5244, It works.
>  It means that new rev BlinkToRadio is not compatible with the old 
> rev cc2420 radio.
>
>  Now I update the whole T2 source tree to rev 5244 to keep all 
> thing consistent.
>  And did you have any suggestion about how to maintain a source tree?
>  Keep everything latest or just hold an everything-looks-fine rev 
> ? I don't want the same situation
> to come up again.
>
>  At last but not least, thanks again.
>
> Best Regards.
> Ruitao Xu
>
>
> 2010/12/3 Urs Hunkeler  <mailto:urs.hunke...@epfl.ch>>
>
> Hi,
>
> Thanks for the program files. I think they should help us a lot to
> track down the problem.
>
> When I do "make telosb install" (or reinstall), it will just copy
> the .ihex file instead of changing the symbols, so there seems to
> be a difference between your setup and mine. In any case, from the
> tests I did now this should not be relevant.
>
> I just tried with the BlinkToRadio program. Your binary version
> (installed with the bsl command) does indeed not work on my motes.
> I then recompiled your version of the BlinkToRadio program, and it
> works fine. I tested this on two different systems (GNU/Linux and
> Mac) and it works on both. I then upgraded my TinyOS source tree
> to revision 5244, and it still works. So my guess is there is
> something not working with your installation.
>
> I compared the generated app.c files, and they are quite a bit
> different. From what I can see, I doubt you are really using
> revision 5244. From your app.c file, the declaration of
> timesync_footer_t is a struct. This was changed in Revision 5221
> to nx_struct (as found while checking the revision history of
> tos/chips/cc2420/CC2420TimeSyncMessage.h). So my guess is your
> system somehow uses an old TinyOS source tree (maybe there is
> another copy of the source tree and your compiler doesn't use the
> one you'd like it to use).
>
> Another problem could be different versions of the hardware
> libraries. The libraries for the msp430 microcontroller are not
> part of TinyOS but rather of the compiler. Maybe your system has a
> different version of the compiler that somehow does not work as
> intended with the current version of TinyOS.
>
> Cheers,
> Urs
>
>
> On 12/03/2010 10:40 AM, 徐瑞涛 wrote:
>
> Hi,
>
> Actually, I use the three different ID for three nodes. At
> most case,
> only receiving mote(0) and sending mote(1) is open.
>
> I haven't try allocate ID explicitly for receiving mote. But
> by default,
> it really is 1. The following output from make telosb install will
> confirm this.
>
> writing TOS image
> tos-set-symbols --objcopy msp430-objcopy --objdump msp430-objdump
> --target ihex build/telosb/main.ihex build/telosb/main.ihex.out-1
> *TOS_NODE_ID=1 ActiveMessageAddressC__addr=1*
> installing telosb binary using bsl
> tos-bsl --telosb -c /dev/ttyUSB3 -r -e -I -p
> build/telosb/main.ihex.out-1
> 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 ...
> 13016 bytes programmed.
> Reset device ...
> rm -f build/telosb/main.exe.out-1 build/telosb/main.ihex.out-1
>
> And the attachment including the standard BlinkToRadio (intactly),
> my S

Re: [Tinyos-help] Problem with Basestation

2010-12-05 Thread Urs Hunkeler
Hi Zainab,

The serial port of the programming board (I assume mib510?) is connected 
to U(S)ART0 of the microcontroller. If you want to use the programming 
board or if you want to connect directly to the microcontroller (over 
the expansion connector) depends on your external device. If your device 
is compatible with the RS232 voltage levels, then it's probably much 
easier to simply use the programming board. If your device uses TTL 
voltage levels (actually 0 and 3V as the microcontroller uses 3V, but 5V 
can easily be downconverted), you'd probably want to connect directly to 
the mote.

To gain access to the UART interface, you can use the Atm128Uart0C 
component. This component is also used by the packet interface used by 
TinyOS for communicating with the serial forwarder. You can wire to it 
with something like:

   components Atm128Uart0C as Uart;
   components CounterMicro32C;
   Uart.Counter  -> CounterMicro32C;
   MyApp.UartStdCtrl -> Uart0; // interface of type StdControl
   MyApp.UartByte-> Uart0; // interface of type UartByte

Cheers,
Urs

On 12/5/10 3:36 PM, Zainab Noorbhaiwala wrote:
> Yes Urs thats exactly what i wish to do. So if i write my application 
> using interface UartByte, do i still connect the serial input to the 
> mote through the serial port of the programming board? Is that 
> internally connected to UARTRXD0? Or should i connect directly to the 
> UARTRXD0? I guess my question here is how do i know which UART port im 
> listening on? I assume there is USARTX0 and UARTRX0 right?
> Is there any example which i can refer to?
> Thank you so much again!
>
> On Sat, Dec 4, 2010 at 5:33 PM, Urs Hunkeler  <mailto:urs.hunke...@epfl.ch>> wrote:
>
> Hi Zainab,
>
> If I understand you correctly, you use the default Basestation
> application on both motes, except that the 2. mote is modified to
> use 2400bps on the serial interface, and an external device is
> sending 12-byte data messages to this 2. mote?
>
> The basestation expects to receive packets on the serial port that
> are formatted in a special way. I assume you have no control over
> the external device (hence you need to run at 2400bps)? You will
> most likely need to write your own application (you cannot use the
> default basestation application). Your application will have to
> listen to the raw serial interface provided in Atm128Uart0C (you
> probably want to use the UartByte or UartStream interface, I think
> UartByte is easier).
>
> Cheers,
> Urs
>
>
> On 12/4/10 3:43 PM, Zainab Noorbhaiwala wrote:
>
> Dear Urs,
> Thank you so much for your reply. This is what my setup is
> now.(a little different from my previous post)
> In my application i have information coming in at 2400bps from
> a device serially. The packets coming in have a format of
> *12-byte ASCII string*.   I interfaced this with one mote with
> Basestation serially.(using mib510 serial board) I changed the
> baudrate in hardware.h for this mote to 2400bps and acc
> changed the $TOSROOT/tos/chips/atm128/Atm128UartP.nc. The
> other mote is running basestation and is connected to the PC.
> This is running at original baudrate 57600bps. And i start
> Listen on the PC.
> (Earlier instead of the serial device i had connected a PC to
> mote 1 and ran Testserial by command java TestSerial -comm
> serial@/dev/ttyS0:2400 changed the baud rate to 2400bps on
> this mote and could see the packets by Listen on the other PC )
> With the new setup i cannot see anything with Listen. I
> understand i need to process the packets coming in. I'm not
> sure how to do that? Any help would be great!
>
> On Sat, Dec 4, 2010 at 2:27 AM, Urs Hunkeler
> mailto:urs.hunke...@epfl.ch>
> <mailto:urs.hunke...@epfl.ch <mailto:urs.hunke...@epfl.ch>>>
> wrote:
>
>Hi Zainab,
>
>If I understand your description correctly (sorry, I am not too
>familiar with the BaseStation application), the LEDs
> indicate that
>one BaseStation is sending packets, but the other is not
> receiving
>them. In that case I don't think this is a problem with the
> baud
>rate. Maybe there is a problem with NodeIDs? Could you give
> us the
>exact commands you are using to send messages and to listen for
>them so that we could try to replicate your setup?
>
>If you need to send at baud rate different from the default one
>you'll nee

Re: [Tinyos-help] ADC Readings and VREF

2010-12-04 Thread Urs Hunkeler
Hi Francesco,

At a quick glance your calculations appear to be correct. If the effort 
is small to change the resistors, it's worth a try.

I also have been thinking, and maybe the simple model of the battery is 
not enough to explain the phenomenon you see. I suspect that the 
microcontroller turning on and off while sampling the sensor could also 
be a problem. You can force the microcontroller to stay on during the 
sampling by overriding the default behavior of the power management. 
You'll have to wire an additional interface for this:

components McuSleepC;
McuSleepC.McuPowerOverride -> YourApplication;

In your application, you need to implement the McuPowerOverride interface:

module ... {
   // ...
   provides interface McuPowerOverride;
   // ...
}
implementation {
   uint8_t sensorSampling = 0;
   // ...
   async command mcu_power_t McuPowerOverride.lowestState() {
 // WARNING: this code is specific to the Atmel microcontrollers
 // Should run on Mica2, MicaZ, and Iris
 if(sensorSampling == 0) {
   // we can allow the MCU to sleep
   return ATM128_POWER_DOWN;
 } else {
   // MCU needs to remain active
   return ATM128_POWER_IDLE;
 }
   }
   // when starting to sample the sensor
   sensorSampling = 1;
   // sample sensor
   // when done sampling sensor
   sensorSampling = 0;
   // ...
}

Cheers,
Urs


On 12/4/10 11:14 AM, Francesco Ficarola wrote:
> Urs, in the meantime I thought:
>
> Since I use a weathstone bridge
> (http://en.wikipedia.org/wiki/Wheatstone_bridge) with:
> - R1 and R3: 1.2 kOhm resistors
> - R2: 470 Ohm potentiometer
> - Rx: 354 Ohm strain gauge
>
> the equivalent resistance of the bridge is (with potentiometer in max
> resistance):
> [1/Re] = [1/(1200+470)] + [1/(1200+354)] -->  Re = 804.95 Ohm, right?
>
> Now, since I = V / R, the current consumption of this bridge is:
>
> I = 3 V / 804.95 Ohm = 3.7 mA
>
> So, assuming that the battery resistance is 3 Ohm, the voltage
> fluctuations are about 3.7 mA * 3 Ohm = 11.1 mV.
>
> Now, if I increase the values of resistors, for example:
> - R1 and R3: 10 kOhm resistors
> - R2: 10 kOhm potentiometer
> - Rx: 354 Ohm strain gauge
>
> the equivalent resistance of this bridge will be (with potentiometer in
> max resistance):
>
> [1/Re] = [1/(1+1)] + [1/(1+354)] -->  Re = 6822,17 Ohm
>
> So the current consumption is:
>
> I = 3 V / 6822,17 Ohm = 0.4 mA
>
> In this case the voltage fluctuations are about 0.4 mA * 3 Ohm = 1.2 mV.
>
> Thanks to this value I should solve the problem in my ADC readings
> because a level of the quantization is greater then 2 mV.
>
>
> Do you think the reasoning is correct?
>
> Greetings,

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


Re: [Tinyos-help] Problem with Basestation

2010-12-04 Thread Urs Hunkeler
Hi Zainab,

If I understand you correctly, you use the default Basestation 
application on both motes, except that the 2. mote is modified to use 
2400bps on the serial interface, and an external device is sending 
12-byte data messages to this 2. mote?

The basestation expects to receive packets on the serial port that are 
formatted in a special way. I assume you have no control over the 
external device (hence you need to run at 2400bps)? You will most likely 
need to write your own application (you cannot use the default 
basestation application). Your application will have to listen to the 
raw serial interface provided in Atm128Uart0C (you probably want to use 
the UartByte or UartStream interface, I think UartByte is easier).

Cheers,
Urs

On 12/4/10 3:43 PM, Zainab Noorbhaiwala wrote:
> Dear Urs,
> Thank you so much for your reply. This is what my setup is now.(a 
> little different from my previous post)
> In my application i have information coming in at 2400bps from 
> a device serially. The packets coming in have a format of *12-byte 
> ASCII string*.   I interfaced this with one mote with Basestation 
> serially.(using mib510 serial board) I changed the baudrate in 
> hardware.h for this mote to 2400bps and acc changed 
> the $TOSROOT/tos/chips/atm128/Atm128UartP.nc. The other mote is 
> running basestation and is connected to the PC. This is running at 
> original baudrate 57600bps. And i start Listen on the PC.
> (Earlier instead of the serial device i had connected a PC to mote 1 
> and ran Testserial by command java TestSerial -comm 
> serial@/dev/ttyS0:2400 changed the baud rate to 2400bps on this mote 
> and could see the packets by Listen on the other PC )
> With the new setup i cannot see anything with Listen. I understand i 
> need to process the packets coming in. I'm not sure how to do that? 
> Any help would be great!
>
> On Sat, Dec 4, 2010 at 2:27 AM, Urs Hunkeler  <mailto:urs.hunke...@epfl.ch>> wrote:
>
> Hi Zainab,
>
> If I understand your description correctly (sorry, I am not too
> familiar with the BaseStation application), the LEDs indicate that
> one BaseStation is sending packets, but the other is not receiving
> them. In that case I don't think this is a problem with the baud
> rate. Maybe there is a problem with NodeIDs? Could you give us the
> exact commands you are using to send messages and to listen for
> them so that we could try to replicate your setup?
>
> If you need to send at baud rate different from the default one
> you'll need indeed to change the program. hardware.h seems to be
> the only place where this can be changed (which is not nice as it
> would change it for every node you'll program, not just for the
> one where you need a different baudrate). Also I'm not sure the
> current TinyOS implementation supports anything other than
> 57600bps (Mica2, MicaZ, Iris) and 19200bps (Mica2Dot). You might
> want to have a look at $TOSROOT/tos/chips/atm128/Atm128UartP.nc
> (and in particular at lines 70-73).
>
> Why do you need a different baudrate? The baudrate defines the
> length of the individual bits on the serial port. You are not
> required to send a sequence of bytes without pauses, you can just
> wait in between. I also think that TinyOS waits for an
> acknowledgment when sending, so if you need time to process the
> received data before the mote should send the next packet, you can
> just delay the acknowledgment.
>
> Cheers,
> Urs
>
>
>
> On 12/3/10 11:01 PM, Zainab Noorbhaiwala wrote:
>
>
> Hi All,
> I am using Basestation for one of my applications. I have two
> motes with
> Basestation running on them and I use Testserial to send
> serial data to
> one of the motes and Listen on the other mote to test what I
> receive .
> But the red LED blinks indicating the packets are dropped and
> I don't
> see anything on Listen. I'm using mica2 motes and set the radio
> frequency 91640.
> When I program one mote with blinktoradio and the other with
> basestation
> it runs fine.(radio frequency 91640)
> What could be the problem? I now need to send serial data at
> 2400bps. Do
> I need to change the baud rate in the platform-specific file
> of mica2
> (hardware.h)?
> Any help would be greatly appreciated!
> Thanks,
> Zainab
>
>
>
>
> -- 
> Zainab
>

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


Re: [Tinyos-help] Retransmit

2010-12-04 Thread Urs Hunkeler
It's been a long time since I last did anything in TinyOS 1.x. The 
TOS_Msg structure has an element called "ack" (of type uint8_t). Maybe 
this is a boolean that will be set to something different from 0 if an 
ack has been received? In TinyOS 2.x sendDone is only called once an Ack 
has been received or the timeout has expired. If this is also the 
behavior of TinyOS 1.x, then you could check the ack field in the 
sendDone function:

event result_t sendDone(TOS_MsgPtr msg, result_t success) {
   if(!success || msg->ack == 0) {
 // post retransmission job
   } else {
 // post job to send next message
   }
}

Again, it's too long that I last did anything with TinyOS 1.x, so no 
guarantee that this actually works.

Cheers,
Urs


On 12/4/10 1:48 PM, lucky eyes wrote:
>
> Thanks for reply
> In Tinyos 1.x there are only 2 commands in MacControl interface
>
> 1.enableAck() and 2. disableAck()
>
> I think wasAck() will be in tinyos 2.0.I want to know how to retransmit
> in tinyos 1.x when false is received in message->ack
>
> A.Q.Ansari
>
>
>  > Date: Sat, 4 Dec 2010 10:19:38 +0100
>  > From: et...@uni-potsdam.de 
>  > To: engr_aqans...@hotmail.com
>  > Subject: Re: [Tinyos-help] Retransmit
>  >
>  > The interface offers a command wasAcked, that tells you if the ack was
>  > received. If the return is false you can/ have to resubmit your message.
>  >
>  > Quoting lucky eyes :
>  >
>  > >
>  > >
>  > > Hi,
>  > >
>  > > I am using Tinyos 1.x and I have successfully enabled acknowledge
>  > > using MacControl.enableAck() but can anybody tell me how to
>
>  > > retransmit a message if sent message is not acknowledged
>  > >
>  > > A.Q.Ansari
>  >
>  >
>  >
>
>
>
> ___
> 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] Performing of TOS 2.x

2010-12-04 Thread Urs Hunkeler
Hi,

"make pc" was for TinyOS 1.x, in TinyOS 2.x it is "make micaz sim".

I recommend reading the documentation for TOSSIM in TinyOS 2.x, as quite 
a view things have changed:
http://docs.tinyos.net/index.php/TOSSIM

Cheers,
Urs


On 12/4/10 12:37 PM,  Edel A. Rodriguez Sanchez wrote:
> Hi.!
>
> I have this error message when I try to compile any thing on TOS 2.x
> administra...@ciberland /opt/tinyos-2.x/apps/Blink
> $ make pc
> /opt/tinyos-2.x/support/make/Makerules:164: ***
>
> Usage: make  
> make  help
>
> Valid targets: all clean eyesIFX eyesIFXv1 eyesIFXv2 intelmote2 mica2
> mica2dot micaz null telos telosa telosb tinynode tmote
> Valid extras: appdoc bnp docs ident_flags nowiring sim sim-fast
> tos_image verbose wiring
>
> Welcome to the TinyOS make system!
>
> You must specify one of the valid targets and possibly some combination
> of the extra options. Many targets have custom extras and extended help,
> so be sure to try "make  help" to learn of all the available
> features.
>
> Global extras:
>
> docs : compile additional nescdoc documentation
> tinysec : compile with TinySec secure communication
>
> ERROR, "pc ident_flags tos_image bnp" does not specify a valid target. Stop.
> If I put a known target then I get this message error:
> $ make mica2
> mkdir -p build/mica2
> compiling BlinkAppC to a mica2 binary
> ncc -o build/mica2/main.exe -Os -finline-limit=10 -Wall -Wshadow
> -Wnesc-all-target=mica2 -fnesc-cfile=build/mica2/app.c -board=micasb
> -DIDENT_PROGRAM_NAME=\"BlinkAppC\" -DIDENT_USER_ID=\"Administrador\"
> -DIDENT_HOSTNAME=\"CIBERLAND\" -
> DIDENT_USER_HASH=0x21d82c4bL -DIDENT_UNIX_TIME=0x4cf9bfcfL
> -DIDENT_UID_HASH=0x486089a8L -fnesc-dump=wiring
> -fnesc-dump='interfaces(!abstract())'
> -fnesc-dump='referenced(interfacedefs, components)'
> -fnesc-dumpfile=build/mica2/wiring-check.xm
> l BlinkAppC.nc -lm
> Unknown target mica2
> Known targets for TinyOS directory /opt/tinyos-2.x/tos are:
> none.
> make: *** [exe0] Error 2
> Thanks beforehand
>
>
> Edel Angel Rodríguez Sánchez
> Facultad de Informática
> *Universidad de Granma. Cuba*
>
> 
> Universidad de Granma. Bayamo, M.N. Cuba
> *http://www.udg.co.cu*
>
> Participe en el III Congreso Cubano de Desarrollo Local
> 9 al 11 de marzo de 2011
> *http://www.udg.co.cu/congreso*
>
> Tiempo: *http://www.udg.co.cu/mrtg/weather/weather.html*
> Imagenes desde el satelite:
> *http://www.udg.co.cu/mrtg/weather/map/today-Bayamo-CUXX0001.jpg*
>
>
> 
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Problem with Basestation

2010-12-03 Thread Urs Hunkeler
Hi Zainab,

If I understand your description correctly (sorry, I am not too familiar 
with the BaseStation application), the LEDs indicate that one 
BaseStation is sending packets, but the other is not receiving them. In 
that case I don't think this is a problem with the baud rate. Maybe 
there is a problem with NodeIDs? Could you give us the exact commands 
you are using to send messages and to listen for them so that we could 
try to replicate your setup?

If you need to send at baud rate different from the default one you'll 
need indeed to change the program. hardware.h seems to be the only place 
where this can be changed (which is not nice as it would change it for 
every node you'll program, not just for the one where you need a 
different baudrate). Also I'm not sure the current TinyOS implementation 
supports anything other than 57600bps (Mica2, MicaZ, Iris) and 19200bps 
(Mica2Dot). You might want to have a look at 
$TOSROOT/tos/chips/atm128/Atm128UartP.nc (and in particular at lines 70-73).

Why do you need a different baudrate? The baudrate defines the length of 
the individual bits on the serial port. You are not required to send a 
sequence of bytes without pauses, you can just wait in between. I also 
think that TinyOS waits for an acknowledgment when sending, so if you 
need time to process the received data before the mote should send the 
next packet, you can just delay the acknowledgment.

Cheers,
Urs


On 12/3/10 11:01 PM, Zainab Noorbhaiwala wrote:
>
> Hi All,
> I am using Basestation for one of my applications. I have two motes with
> Basestation running on them and I use Testserial to send serial data to
> one of the motes and Listen on the other mote to test what I receive .
> But the red LED blinks indicating the packets are dropped and I don't
> see anything on Listen. I'm using mica2 motes and set the radio
> frequency 91640.
> When I program one mote with blinktoradio and the other with basestation
> it runs fine.(radio frequency 91640)
> What could be the problem? I now need to send serial data at 2400bps. Do
> I need to change the baud rate in the platform-specific file of mica2
> (hardware.h)?
> Any help would be greatly appreciated!
> Thanks,
> Zainab
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] query for flood time synchronization protocol

2010-12-03 Thread Urs Hunkeler
Hi,

I have not tried ftsp myself, so this is just a guess from looking at 
the code. I think this is a library and not a stand-alone program. You 
need to write your own program that uses time synchronization. Your 
program needs to wire the MainC component to TimeSyncC (Boot and Init 
interfaces), it will then probably need to start the time 
synchronization process (StdControl interface), after which it can read 
the global time (GlobalTime interface). The other interfaces 
(TimeSyncInfo, TimeSyncMode, and TimeSyncNotify) are optional.

Cheers,
Urs

On 12/4/10 6:12 AM, Prakash Tekchandani wrote:
>
> hi everyone,
>
> I need to synchronize motes before sending data to Base mote.
>
> I referred "The Flooding Time Synchronization Protocol" paper and
> downloaded the code from
> http://tinyos.cvs.sourceforge.net/tinyos/tinyos-2.x/tos/lib/ftsp/
>  but
> i am not able to compile it , might be due to absence of Makefile. i
> tried to make Makefile but still not compiling.
>
>
> After compiling following errors occurred:
>
> r...@prakash-desktop:/opt/tinyos-2.x/apps/timesyn# make micaz -Ia/sim
> mkdir -p build/micaz
> compiling TestTimeSyncC to a micaz binary
> ncc -o build/micaz/main.exe -Os -finline-limit=10 -Wall -Wshadow
> -Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb
> -DIDENT_PROGRAM_NAME=\"TestTimeSyncC\" -DIDENT_USER_ID=\"root\"
> -DIDENT_HOSTNAME=\"prakash-desktop\" -DIDENT_USER_HASH=0x9fea1243L
> -DIDENT_UNIX_TIME=0x4cf9b96bL -DIDENT_UID_HASH=0x43c8f673L
> -fnesc-dump=wiring -fnesc-dump='interfaces(!abstract())'
> -fnesc-dump='referenced(interfacedefs, components)'
> -fnesc-dumpfile=build/micaz/wiring-check.xml TestTimeSyncC.nc -lm
> In component `TestTimeSyncC':
> TestTimeSyncC.nc:29: component Main not found
> In file included from TimeSyncC.nc:64,
> from TestTimeSyncC.nc:29:
> In component `TimeSyncMessageC':
> TimeSyncMessageC.nc:75: component CC2420TimeSyncMessageC not found
> TimeSyncMessageC.nc:77: no match
> TimeSyncMessageC.nc:79: cannot find `Receive'
> TimeSyncMessageC.nc:80: cannot find `Snoop'
> TimeSyncMessageC.nc:81: no match
> TimeSyncMessageC.nc:82: no match
> TimeSyncMessageC.nc:83: no match
> TimeSyncMessageC.nc:84: no match
> TimeSyncMessageC.nc:85: no match
> TimeSyncMessageC.nc:86: no match
> TimeSyncMessageC.nc:87: no match
> TimeSyncMessageC.nc:88: no match
> TimeSyncMessageC.nc:91: no match
> TimeSyncMessageC.nc:92: no match
> In component `TestTimeSyncC':
> TestTimeSyncC.nc:29: component TimerC not found
> TestTimeSyncC.nc:29: component GenericComm not found
> In file included from TimeSyncDebuggerC.nc:35,
> from TestTimeSyncC.nc:29:
> In C file:
> TimeSyncDebuggerM.nc:28: C file trace not found
> In file included from TimeSyncDebuggerC.nc:35,
> from TestTimeSyncC.nc:29:
> In component `TimeSyncDebuggerM':
> TimeSyncDebuggerM.nc:37: too few arguments to interface `GlobalTime'
> TimeSyncDebuggerM.nc:39: interface ReceiveMsg not found
> TimeSyncDebuggerM.nc:43: interface SendMsg not found
> TimeSyncDebuggerM.nc:45: too few arguments to interface `Timer'
> TimeSyncDebuggerM.nc:47: interface TimeStamping not found
> TimeSyncDebuggerM.nc:53: syntax error before `msg'
> TimeSyncDebuggerM.nc:71: syntax error before `StdControl'
> TimeSyncDebuggerM.nc:73: warning: type defaults to `int' in declaration
> of `reporting'
> TimeSyncDebuggerM.nc:73: conflicting types for `reporting'
> TimeSyncDebuggerM.nc:69: previous declaration of `reporting'
> TimeSyncDebuggerM.nc:73: warning: data definition has no type or storage
> class
> TimeSyncDebuggerM.nc:74: syntax error before `return'
> TimeSyncDebuggerM: `StdControl.start' not implemented
> TimeSyncDebuggerM: `StdControl.stop' not implemented
> TimeSyncDebuggerM: `Timer.fired' not implemented
> In file included from TestTimeSyncC.nc:29:
> In component `TimeSyncDebuggerC':
> TimeSyncDebuggerC.nc:39: component NoLeds not found
> TimeSyncDebuggerC.nc:45: component l not found
> TimeSyncDebuggerC.nc:45: syntax error before `ClockTimeStampingC'
> TimeSyncDebuggerC.nc:50: cannot find `ReceiveMsg'
> TimeSyncDebuggerC.nc:54: cannot find `SendMsg'
> TimeSyncDebuggerC.nc:56: cannot find `Timer'
> TimeSyncDebuggerC.nc:59: no match
> TimeSyncDebuggerC.nc:60: cannot find `TimeStampingC'
> In component `TestTimeSyncC':
> TestTimeSyncC.nc:31: cannot find `StdControl'
> TestTimeSyncC.nc:32: cannot find `StdControl'
> TestTimeSyncC.nc:33: cannot find `StdControl'
> TestTimeSyncC.nc:34: cannot find `StdControl'
> make: *** [exe0] Error 1
> i have made make file as
> COMPONENT=TestTimeSyncC
> include $(MAKERULES)
>
> thanks.
> Prakash Tekchandani
> Atal Bihari Vajpayee-
> Indian Institute of Information Technology & Management, Gwalior
> Morena Link Road, Gwalior-474010
> MP, India
> Mob No.: +91-9826072876
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/li

Re: [Tinyos-help] class Packetizer error

2010-12-03 Thread Urs Hunkeler
Hi Biyan,

Is there a file called Packetizer.java in your 
/opt/tinyos-2.x/support/sdk/java/net/tinyos/packet directory? If it's 
missing, your source tree is not complete. If it's there, maybe Java 
won't find it because it searches for it in a path it constructs based 
on the package name. Why do you want to compile the Java sources in the 
packet subdirectory? Try calling make from the 
/opt/tinyos-2.x/support/sdk/java directory. Alternatively, for building 
the TinyOS libraries you can also try ant instead of make (you might 
need to install Apache ant). The command with ant would be "ant compile".

Cheers,
Urs


On 12/3/10 10:49 PM, Biyan Li wrote:
> I have found someone reported this error before:
>
> http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/msg29779.html
>
> Anybody knows the answer of it?
>
> Thanks,
> biyan
>
> ___
> 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] ADC Readings and VREF

2010-12-03 Thread Urs Hunkeler
Hi Francesco,

You could measure the voltage of the batteries and use this value in 
your further calculations (I think VoltageC gives you the current voltage).

It might be possible that some batteries have a higher internal 
resistance than others. If your sensors draw a lot of power, this could 
lead to fluctuations in the supply voltage (which you would not have 
with good batteries or a lab power supply). If you have an oscilloscope, 
you could measure the voltage at the battery terminals while sampling 
your sensors. I'm not an expert on electronics (MS will know more about 
this), but maybe putting a huge capacity in parallel to the batteries 
might help.

Cheers,
Urs

On 12/2/10 7:11 PM, Francesco Ficarola wrote:
> Michael Schippling ha scritto:
>> Yes I believe the IRIS has 10 bit ADCs, so your formula is correct.
>>
>> I don't know about the IRIS specifically, but in general the Vref
>> IS the VCC battery on these boards, so noodling around with software
>> settings will probably not make much difference. The one advantage
>> here is: if your sensor runs off the same batteries and is ratio-
>> metric (some kind of voltage divider) the ratio of Vref to sensor
>> will remain constant as Vcc changes.
>
> Ok, thanks a lot for your help. ;)
>
>> Interesting about the different kind of batteries.
>> Are the Duracells fresh? Does the node's power usage vary,
>> say by using the radio or something?
>>
>> MS
>
> Yes, the Duracells are fresh. The voltage is 1.6V for each battery.
> The node periodically reads ADC value by a circuit with a strain gauge
> and when the current value is higher or lower than a certain threshold
> the node sends a broadcast alert to other nodes of the network and then
> it returns to sleeping state. I can not understand why this difference
> between types of batteries. Have you any idea?
>
> Greetings,
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] ADC Readings and VREF

2010-12-03 Thread Urs Hunkeler
Hi Francesco,

The potentiometer (probably used as a voltage divider?) might amount for 
up to (3V / 450 Ohm =) ~6mA, not that much but it's already on the order 
of the power consumption of the microcontroller. If the total power 
consumption for sampling the sensors is around 10mA and the batteries 
have an internal resistance of approximately 3 Ohm, that might account 
for fluctuations of the supply voltage of up to 30mV. I don't know 
whether your noise is bigger than that. In any case you'll probably have 
to ask an electronic expert. If at your university or company you have a 
technician (one with a soldering iron) you might want to ask him. They 
often have surprising insights based on practical experience rather than 
theoretical knowledge.

Cheers,
Urs

>  Hi Urs.
>
>  Those photos are only examples and there is no sensor connected to
>  show the connections of the oscilloscope or multimeter. They show
>  only the configuration with the multimeter and with the oscilloscope
>  for the measurements. However the mote is connected to the circuit
>  composed by strain gauge, Weathstone bridge and Amp Op when I
>  measured power consumption.
>
>  Here two photos of the sensor node connected to the circuit:
>  http://img89.imageshack.us/img89/9756/dsc0752w.jpg
>  http://img262.imageshack.us/img262/7789/breakoutboardmontatamin.jpg
>
>  Greetings,


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


Re: [Tinyos-help] BlinkToRadio: Two telosb motes can't communicate. Need Help!

2010-12-03 Thread Urs Hunkeler
Hi,

Thanks for the program files. I think they should help us a lot to track 
down the problem.

When I do "make telosb install" (or reinstall), it will just copy the 
.ihex file instead of changing the symbols, so there seems to be a 
difference between your setup and mine. In any case, from the tests I 
did now this should not be relevant.

I just tried with the BlinkToRadio program. Your binary version 
(installed with the bsl command) does indeed not work on my motes. I 
then recompiled your version of the BlinkToRadio program, and it works 
fine. I tested this on two different systems (GNU/Linux and Mac) and it 
works on both. I then upgraded my TinyOS source tree to revision 5244, 
and it still works. So my guess is there is something not working with 
your installation.

I compared the generated app.c files, and they are quite a bit 
different. From what I can see, I doubt you are really using revision 
5244. From your app.c file, the declaration of timesync_footer_t is a 
struct. This was changed in Revision 5221 to nx_struct (as found while 
checking the revision history of 
tos/chips/cc2420/CC2420TimeSyncMessage.h). So my guess is your system 
somehow uses an old TinyOS source tree (maybe there is another copy of 
the source tree and your compiler doesn't use the one you'd like it to use).

Another problem could be different versions of the hardware libraries. 
The libraries for the msp430 microcontroller are not part of TinyOS but 
rather of the compiler. Maybe your system has a different version of the 
compiler that somehow does not work as intended with the current version 
of TinyOS.

Cheers,
Urs

On 12/03/2010 10:40 AM, 徐瑞涛 wrote:
> Hi,
>
> Actually, I use the three different ID for three nodes. At most case,
> only receiving mote(0) and sending mote(1) is open.
>
> I haven't try allocate ID explicitly for receiving mote. But by default,
> it really is 1. The following output from make telosb install will
> confirm this.
>
> writing TOS image
> tos-set-symbols --objcopy msp430-objcopy --objdump msp430-objdump
> --target ihex build/telosb/main.ihex build/telosb/main.ihex.out-1
> *TOS_NODE_ID=1 ActiveMessageAddressC__addr=1*
> installing telosb binary using bsl
> tos-bsl --telosb -c /dev/ttyUSB3 -r -e -I -p build/telosb/main.ihex.out-1
> 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 ...
> 13016 bytes programmed.
> Reset device ...
> rm -f build/telosb/main.exe.out-1 build/telosb/main.ihex.out-1
>
> And the attachment including the standard BlinkToRadio (intactly),
> my SendingMote and ReceivingMote code.
> There is only one difference between SendingMote and RecevingMote:
> whether call send command when radio start successfully.
>
> Best Regards,
> Ruitao Xu
>
>
>
> 在 2010年12月3日 下午5:11,Urs Hunkeler  <mailto:urs.hunke...@epfl.ch>>写道:
>
> Hi,
>
> If you use all three motes, maybe you could try giving them different
> IDs (instead of having two receiving nodes with the same ID).
>
> Did you try to explicitly give the NodeID to the sending mote (instead
> of relying that the default ID is ok)? I remember that the nodeID is set
> in two different places, and if by chance they differ for some reason
> when not set explicitly, maybe a mote refuses to send (or receive) a
> message?
>
> There is a special packet sniffer application in the contribution tree
> of TinyOS:
> 
> http://tinyos.cvs.sourceforge.net/viewvc/tinyos/tinyos-2.x-contrib/tub/apps/PacketSniffer_802_15_4/
>
> Maybe I should have mentioned it: The idea for you to send me your code
> is so that I don't have to update my TinyOS installation and can see
> whether it works with an older version. Best is if you could send me
> your program folders with the compiled version (the build directory) as
> well, so I can first try your binaries before trying to compile the
> application.
>
> Cheers,
> Urs
>
> On 12/03/2010 09:55 AM, 徐瑞涛 wrote:
>  > Hi Urs,
>  >
>  > FIrst of all, many thanks for your help.
>  >
>  > 1) Receiving mote always get the TOS_NODE_ID=0, and Sending mote
> always
>  > use the
>  > default TOS_NODE_ID, it's 1.
>  > Programming commands looks like:
>  > make telosb install,0 # for receiving mote
>  > make telosb install # for sending mote
>  >
>  > 2) I always send the broadcast pkt.
>  > 3) I have three telosb motes. With each mote programmed the standard
>  > Bli

Re: [Tinyos-help] BlinkToRadio: Two telosb motes can't communicate. Need Help!

2010-12-03 Thread Urs Hunkeler
Hi,

If you use all three motes, maybe you could try giving them different
IDs (instead of having two receiving nodes with the same ID).

Did you try to explicitly give the NodeID to the sending mote (instead
of relying that the default ID is ok)? I remember that the nodeID is set
in two different places, and if by chance they differ for some reason
when not set explicitly, maybe a mote refuses to send (or receive) a
message?

There is a special packet sniffer application in the contribution tree
of TinyOS:
http://tinyos.cvs.sourceforge.net/viewvc/tinyos/tinyos-2.x-contrib/tub/apps/PacketSniffer_802_15_4/

Maybe I should have mentioned it: The idea for you to send me your code
is so that I don't have to update my TinyOS installation and can see
whether it works with an older version. Best is if you could send me
your program folders with the compiled version (the build directory) as
well, so I can first try your binaries before trying to compile the
application.

Cheers,
Urs

On 12/03/2010 09:55 AM, 徐瑞涛 wrote:
> Hi Urs,
> 
> FIrst of all, many thanks for your help.
> 
> 1) Receiving mote always get the TOS_NODE_ID=0, and Sending mote always 
> use the
> default TOS_NODE_ID, it's 1.
> Programming commands looks like:
> make telosb install,0 # for receiving mote
> make telosb install # for sending mote
> 
> 2) I always send the broadcast pkt.
> 3) I have three telosb motes. With each mote programmed the standard 
> BlinkToRadio app,
> I tested BlinkToRadio under C(3, 2) different combinations. Any mote 
> never blink.
> I really suspect that it's hardware problem. Because these three motes 
> never received any
> pkt and this is the first time that I test whether they can communicate 
> with each other since I
> bought them.
> 
> 4) No any receive event has been signaled, so I think sniffer is also 
> unable to receive pkt.
> I tried to programme the BaseStation app to the receiving mote, but it 
> CAN'T receive any pkt.
> (Serial communication is OK. I can send bytes to mote and mote can echo 
> thoes bytes.)
> 
> If BlinkToRadio(on rev 5244) runs correctly on your telosb motes, it's 
> probable my motes's
> problem.
> 
> Here's my code for Receiving Mote: (based on BlinkToRadio, just make 
> little change)
> Sending Mote just use the BlinkToRadio source intactly.
> 
> event void AMControl.startDone(error_t err) {
> if (err == SUCCESS) {
> * // call Timer0.startPeriodic(TIMER_PERIOD_MILLI); # no need to send 
> periodically*
> }
> else {
> call AMControl.start();
> }
> }
> 
> event message_t* Receive.receive(message_t* msg, void* payload, uint8_t 
> len){
> if (len == sizeof(BlinkToRadioMsg)) {
> BlinkToRadioMsg* btrpkt = (BlinkToRadioMsg*)payload;
> * //setLeds(btrpkt->counter);
> call Leds.led0Toggle(); # when receiving, just toggle led0*
> }
> return msg;
> }
> 
> 
> On Fri, Dec 3, 2010 at 4:25 PM, Urs Hunkeler  <mailto:urs.hunke...@epfl.ch>> wrote:
> 
> Hi,
> 
> This gets difficult to debug. Here are just a couple of ideas:
> 
> Do you use different NodeIDs for the different motes?
> 
> Do you send messages to a specific NodeID or do you send messages as
> broadcasts?
> 
> Have you tried with other motes? (in case there is a hardware problem)
> 
> Have you tried to reverse the roles of the mote? (in case one of the
> motes can't send but can receive, or vice versa)
> 
> If you have MicaZ motes (they have the same radio and can
> communicate), does your program work on the MicaZ motes? If so, does
> it work with a MicaZ and a TelosB mote?
> 
> If you have a sniffer, do you see data transmissions from the
> sending mote? (If yes, could you send us a trace?) If you don't have
> a dedicated sniffer, but you have additional motes, there are
> sniffer programs available for TelosB and MicaZ.
> 
> If this still doesn't help you can send me your program and I'll try
> it on TelosB motes here.
> 
> Cheers,
> Urs
> 
> 
> On 12/03/2010 08:13 AM, 徐瑞涛 wrote:
> 
> Hi Urs:
> 
> I add the following line to the Makefile
> 
> CFLAGS += -DCC2420_DEF_RFPOWER=15 (Because 16 isn't is a valid
> value in
> the datasheet)
> 
> But it doesn't work, either.
> I also increase the send interval to 1024 ms and test again. The
> horrible situation remains.
> 
> Thanks for your help.
> Looking forward to any tip.
> I will try more solution and expect mote receiving correctly
> earlier.
> 
> Best Regards,
> Ruitao Xu
> 
> 
>  

Re: [Tinyos-help] Reg:Max Comm Range

2010-12-03 Thread Urs Hunkeler
We managed to get more than 100m outdoors with special antennas (normal 
antennas for WiFi routers).

Cheers,
Urs

On 12/03/2010 08:07 AM, Manjunath Doddavenkatappa wrote:
>
> It depends on the environmemt. In typical indoor setups, it is less than
> 10m.
>
> We have observed in indoors that although both TelosB and micaZ uses
> same CC2420 radio transceiver and output power, TelosB's range is more
> than double the range of MICAZ. However, I am not sure about the reason,
> may be the antnena design
>
> Manjunath D
>
> 
>
> ***
>
>
> On Fri, 3 Dec 2010, SHIVASANKAR GANESAN wrote:
>
>> Hi
>> What is the Max. communication range for Micaz mote.
>> � With regards Sivasankar
>
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Reg:Std Deviation of Gaussian Noise

2010-12-03 Thread Urs Hunkeler
Hi,

The CC2420ControlC has a ReadRssi interface, which allows you to read 
the RSSI while not actively receiving any message. You could sample the 
background noise for a while, and then use standard statistical methods 
to determine the noise level and the standard deviation.

Cheers,
Urs

On 12/03/2010 07:54 AM, SHIVASANKAR GANESAN wrote:
> Hi
> How to measure Std Deviation of the Gaussian Noise,I need that value for
> my experiment(I am using Micaz mote).
> **
> *With regards*
> *Sivasankar*
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] ADC Readings and VREF

2010-12-03 Thread Urs Hunkeler
Hi Francesco,

Thanks for detailing your measurement setup. From the pictures I don't 
see any additional circuit for your sensors. Do you use an internal 
sensor? If not, do you have the problems when reading ADC values without 
anything connected and you expect it to be constant (since nothing is 
connected)? Just in case, I think the input value of the ADC signal is 
not determined if nothing is connected, and as such you might very well 
see some noise (no idea why different batteries would have a different 
influence on this).

How big is the noise you see?

Cheers,
Urs


On 12/03/2010 09:14 AM, Francesco Ficarola wrote:
> Hi Urs,
>
>> Hi Francesco and Krisa,
>>
>> A battery is usually modeled as a perfect voltage source in series with
>> an internal resistor. (I hope the link works)
>>
>> http://books.google.ch/books?id=bkOMDgwFA28C&lpg=PA9&ots=F2hgSHc2Pt&pg=PA9#v=onepage&q&f=false
>>
>>
>> When the load (power draw by the mote and the sensors) increases, the
>> current over the internal resistor increases and the voltage drop over
>> this internal resistor also increases. The internal resistor and the
>> load together act as a voltage divider, which results in a drop in the
>> apparent supply voltage. Different battery types have different behavior
>> of the internal resistor. What I said in my previous mail is, as far as
>> I understand, essentially the same thing as what Krisa says, just
>> explained in a different way.
>
> Thank you very much for your full explanation, I really appreciate it.
>
>> When you measure your setup in idle mode, there should be hardly any
>> power consumption. I don't know how you connect your sensors, but
>> personally I would expect your sensor to be powered only when you
>> measure it, such that in idle mode it should not consume anything.
>
> For the measurements I connect my sensor in this way...
>
> *** Multimeter ***
> - terminal + of my lab power supply --->  terminal + of my mote
> - terminal - of my mote --->  terminal + of my multimeter
> - terminal - of my multimeter --->  terminal - of my lab power supply
>
> Here a photo: http://img7.imageshack.us/img7/8440/dsc0563u.jpg
> (In the photo the current "18.3 mA" shows the power consumption of the
> transmission, Radio TX)
>
>
> *** Oscilloscope ***
> - terminal + of my lab power supply --->  terminal "1" of 10 Ohm resistor
> - terminal "2" of 10 Ohm resistor --->  terminal + of my mote
> - terminal - of my lab power supply --->  terminal - of my mote
> - terminal + of the oscilloscope --->  terminal "1" of 10 Ohm resistor
> - terminal - of the oscilloscope --->  terminal "2" of 10 Ohm resistor
>
> Here a photo: http://img227.imageshack.us/img227/479/dsc0681g.jpg
>
> The measurements work fine because when I measured the power consumption
> of my MAC the signals respected the protocol policies.
>
> For example: http://img84.imageshack.us/img84/9553/dsc0704705.jpg
>
> In "a" figure there are the preambles during the TX, while in "b" figure
> there is the wake-up interval. Probably the second small signal in "b"
> figure is the power consumption of the MCU for the ADC process; it is
> about 25 mV, that is 2.5 mA beacause the input resistor was 10 Ohm.
>
>> In any case, when the microcontroller is turned on (it is automatically
>> turned off by TinyOS when not used), the mote will consume about 4mA
>> even without reading sensors. That might or might not be a problem for
>> your measurement setup.
>>
>> Using a capacity (which has a much lower internal resistance) would
>> result in the capacity to bridge over a short drop in supply voltage
>> from the battery. The capacity would depend on how long your measurement
>> takes, how much change in supply voltage you can tolerate (the capacity
>> will also discharge during this time) and how much current your setup
>> draws during the measurement. If you don't want to calculate anything
>> (again, I'm not really the expert here), you could try with something as
>> big as possible (>100uF, if possible, try to find something in the range
>> of 1F).
>
> Ok, thanks a lot Hurs. I'll try with a 1F capacity and I'll get you some
> news.
>
>> The battery behavior could also be more complex than the simple voltage
>> source and internal resistor model from above. It is possible that the
>> battery voltage breaks down when under load, and then recovers again
>> after a while (but not immediately) when the load is released. If you
>> don't find any other solution, assuming that the battery will settle
>> after a short while, and assuming that the measurements should be stable
>> over a short while, you could repeat the measurements until they are
>> stable, i.e., while(max deviation over last 3 measurements>  threshold)
>> repeat measurement. If the power source is stable (lab power supply,
>> good batteries), you will only measure a few times, if the power supply
>> is bad (bad batteries) you will measure a bit longer. To make sure you
>> don't get in an infinite loop, you could 

Re: [Tinyos-help] BlinkToRadio: Two telosb motes can't communicate. Need Help!

2010-12-03 Thread Urs Hunkeler
Hi,

This gets difficult to debug. Here are just a couple of ideas:

Do you use different NodeIDs for the different motes?

Do you send messages to a specific NodeID or do you send messages as 
broadcasts?

Have you tried with other motes? (in case there is a hardware problem)

Have you tried to reverse the roles of the mote? (in case one of the 
motes can't send but can receive, or vice versa)

If you have MicaZ motes (they have the same radio and can communicate), 
does your program work on the MicaZ motes? If so, does it work with a 
MicaZ and a TelosB mote?

If you have a sniffer, do you see data transmissions from the sending 
mote? (If yes, could you send us a trace?) If you don't have a dedicated 
sniffer, but you have additional motes, there are sniffer programs 
available for TelosB and MicaZ.

If this still doesn't help you can send me your program and I'll try it 
on TelosB motes here.

Cheers,
Urs

On 12/03/2010 08:13 AM, 徐瑞涛 wrote:
> Hi Urs:
>
> I add the following line to the Makefile
>
> CFLAGS += -DCC2420_DEF_RFPOWER=15 (Because 16 isn't is a valid value in
> the datasheet)
>
> But it doesn't work, either.
> I also increase the send interval to 1024 ms and test again. The
> horrible situation remains.
>
> Thanks for your help.
> Looking forward to any tip.
> I will try more solution and expect mote receiving correctly earlier.
>
> Best Regards,
> Ruitao Xu
>
>
> On Fri, Dec 3, 2010 at 2:07 PM, Urs Hunkeler  <mailto:urs.hunke...@epfl.ch>> wrote:
>
> Hi,
>
> One problem that I encountered personally is that sometimes the
> Moteiv Tmote Skys seem to have difficulties communicating when they
> are too close together (maybe the receiver gets saturated?). If this
> is the case, I found that lowering the transmission power helps. You
> can try this by adding the following line to the Makefile and
> recompiling the application:
>
> CFLAGS += -DCC2420_DEF_RFPOWER=16
>
> To ensure that the program is really recompiled, I recommend the
> following command sequence:
>
> make clean && make tmote
>
> Did you check whether AMSend.send(..) returns any errors?
>
> Cheers,
> Urs
>
>
>
> On 12/3/10 4:24 AM, 徐瑞涛 wrote:
>
>
> Hi everyone, It's a strange problem. I tried my best to fix it,
> but I
> can't.
>
> First of all, I installed BlinkToRadio under T2 source tree on two
> Telosb motes. But two motes didn't have any response both. Three
> Leds
> never be toggled.
>
> ps: T2 Source Tree revision is 5244 and last modified at 2010-06-30
>
> And I want to know the reason: 1) Mote can't send pkt ? 2) Mote
> can't
> receive pkt ? 3) Mote doesn't work ?
>
> So, secondly, I change the BlinkToRadio source a little. Make a mote
> as sending mote and another as receiving mote. And Leds' denotes
> different event:
>
> Led0: When receiving mote received a pkt., code below: event
> message_t* Receive.receive(message_t* msg, void* payload, uint8_t
> len){ if (len == sizeof(BlinkToRadioMsg)) { BlinkToRadioMsg*
> btrpkt =
> (BlinkToRadioMsg*)payload; //setLeds(btrpkt->counter); call
> Leds.led0Toggle(); } return msg; }
>
> Led1: When motes booted successfully! event void Boot.booted() {
> call
> AMControl.start(); call Leds.led1Toggle(); }
>
> Led2: When sending mote sended a pkt successfully event void
> AMSend.sendDone(message_t* msg, error_t err) { if (&pkt == msg) {
> busy = FALSE; if (err == SUCCESS){ call Leds.led2Toggle(); } } }
>
> Under the configuration above, the running results as follow: 1)
> Sending and Receiving motes both start successfully. Because led1
> keep on and led2 blinks periodically, it at least also means
> that the
> sending mote's radio start successfully. And I guess the Receiving
> mote's radio start successfully too. 2) Sending mote can send pkt
> successfully because of led2 blinks periodically.
>
> But the question is why the receiving mote's led0 (when it receive a
> pkt) doesn't blink. It appears that it can't receive any pkt and
> that also can explain why BlinkToRadio doesn't work.
>
> If any of you have met the similar situation or know how to
> solve it,
> please help me.
>
> Best Regards, Ruitao Xu
>
>
>
>
> --
> Be Your Personal Best!

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

  1   2   3   4   5   >