Re: [Tinyos-help] Random number

2007-12-11 Thread Vijayant Bhatnagar
i think you can use %x to scale the values from 0 to x. Regards, Vijayant. On Dec 10, 2007 11:59 PM, Paul <[EMAIL PROTECTED]> wrote: > Hi all > > I need to, during startup decides out of NUM_NODES nodes, which of the > NUM_TASKERS nodes will perform certain tasks. > > Previously, I have identifi

Re: [Tinyos-help] Random number

2007-12-11 Thread Vijayant Bhatnagar
e.g.rand()%1000 to scale from 0 to 1000. Vijayant Bhatnagar. On Dec 11, 2007 3:12 AM, Vijayant Bhatnagar <[EMAIL PROTECTED]> wrote: > i think you can use %x to scale the values from 0 to x. > > Regards, > Vijayant. > > On Dec 10, 2007 11:59 PM, Paul <[EMAIL PROTECTED]> wrote: > > > Hi all > > >

Re: [Tinyos-help] using math.h in tinyos 2 for telosb or micaz

2007-12-11 Thread SANG Junjun
It seems that there is no sqrt support for msp430. On Dec 11, 2007 2:47 PM, prashan wanigasekara <[EMAIL PROTECTED]> wrote: > Hi everyone, > > This is my first post to the forum. I am programming in tinyos-2.x. and > using micaz, telosb motes. My problem is > > 1. How to use math.h in tinyos-2.x?

RE: [Tinyos-help]:why does TOS_LOCAL_ADDRESS become 0 not 1?

2007-12-11 Thread Michiel Konstapel
TOS_LOCAL_ADDRESS is set to the ID of each node, either by modifying the program before uploading it to a physical node, or by the simulator. TOSSIM apparently starts numbering at zero. If you run the simulation with two nodes, you'd have one with TOS_LOCAL_ADDRESS equal to 0 and one with TOS_LOCAL

RE: [Tinyos-help] Radio files

2007-12-11 Thread Michiel Konstapel
The nesC compiler looks for components in several directories: - The current directory - Include directories passed on the command line (-I), often by setting the CFLAGS variable in the Makefile - Directories specified in your platform's .platform file @includes -

RE: [Tinyos-help] How to know if radio is receiving?

2007-12-11 Thread Murray, Ben
Low Power Listening makes use of the function that "detects RF power" to extend it's listening period just in case there's something else on the air. I've hit a few problems with it but it will indicate when it detects power (even if that power is un-receivable as a packet) In TinyOS-2.0.2 the fun

Re: [Tinyos-help] Random number

2007-12-11 Thread Aurélien Francillon
Le Tuesday 11 December 2007 05:59:05, vous avez écrit : > Hi all > > I need to, during startup decides out of NUM_NODES nodes, which of the > NUM_TASKERS nodes will perform certain tasks. > > Previously, I have identified these NUM_TASKERS inside the Makefile using > -DTASK_NODE=1, -DTASK_NODE=6, .

[Tinyos-help] interfacing ultrasonic sensor to MICAz over I2C bus

2007-12-11 Thread Han Mingding
Title: interfacing ultrasonic sensor to MICAz over I2C bus Hi all,    I am facing some difficulties interfacing an SRF02 ultrasound sensor to MICAz using I2C bus in TinyOS-2.x. My program allows the MICAz mote to write to the bus but it is unable to read the measurements from the sensor. It

[Tinyos-help] interfacing ultrasonic sensor to MICAz over I2C bus

2007-12-11 Thread md han
Re-posting this due to complications with my mail server. Hi all, I am facing some difficulties interfacing an SRF02 ultrasound sensor to MICAz using I2C bus in TinyOS-2.x. My program allows the MICAz mote to write to the bus but it is unable to read the measurements from the sensor. It see

[Tinyos-help] (no subject)

2007-12-11 Thread sergio mena doce
Hello, I'm a telecommunitaions engineering student from Barcelona (Sorry for my english). I'm working with tinyos 2 and I'm newbie in this. My goal is a tensting of telosb motes communications. I'm using applications from tinyos-2.x/apps/tests/cc2420. I'm going to plot RSSI vs Packet Error Rat

[Tinyos-help] TinyOS Design Questions - (Question-1)

2007-12-11 Thread Faisal Aslam
Hi, I wish to discuss few NesC/TinyOS design related issue. I am not aware if any email list is dedicated to it hence I am sending first one of them here. I will send more such issue later. Problem:- In NesC if I have to use a single command of an interface then I have to implement ALL of it

Re: [Tinyos-help] TinyOS Design Questions - (Question-1)

2007-12-11 Thread Aurélien Francillon
Le Tuesday 11 December 2007 14:05:23 Faisal Aslam, vous avez écrit : > Hi, > > I wish to discuss few NesC/TinyOS design related issue. I am not aware > if any email list is dedicated to it hence I am sending first one of > them here. I will send more such issue later. > > Problem:- In NesC if I hav

[Tinyos-help] capturing printf output on the pc without the CRC? chars

2007-12-11 Thread Murray, Ben
(MicaZ, TinyOS-2.0.2, WinXP, Cygwin) I'm using the printf library to output data from a mote connected via a mib510 on the serial port, COM1. It all works quite nicely except that there is a lot of garbage coming out of the terminal programs I have tried using to record the data with. I can more or

Re: [Tinyos-help] TinyOS Design Questions - (Question-1)

2007-12-11 Thread Faisal Aslam
I do not think that "default" keyword could solve following problem. regards, Faisal Aurélien Francillon wrote: Le Tuesday 11 December 2007 14:05:23 Faisal Aslam, vous avez écrit : Hi, I wish to discuss few NesC/TinyOS design related issue. I am not aware if any email list is dedicated to

RE: [Tinyos-help] capturing printf output on the pc without the CRC?chars

2007-12-11 Thread Siirtola Harri
What you see is much more than just the CRC. It's the whole TinyOS packet. Take a look at xserve or just listen app to see what they output. Regards, Harri -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Murray, Ben Sent: Tuesday, December 11, 2

Re: [Tinyos-help] capturing printf output on the pc without the CRC? chars

2007-12-11 Thread Urs Hunkeler
Hi Ben, The garbage that you are seeing is the TinyOS message framing. The output is really intended to be displayed with the PrintfClient. The tutorial explains this in more detail: http://www.tinyos.net/tinyos-2.x/doc/html/tutorial/lesson15.html Cheers, Urs Murray, Ben schrieb: > (MicaZ, TinyO

RE: [Tinyos-help] TinyOS Design Questions - (Question-1)

2007-12-11 Thread Janos Sallai
>Problem:- In NesC if I have to use a single command of an interface then >I have to implement ALL of its event. Even though, I am not interested >in any one of those events. Those empty functions with nothing in them >make a programmers code cumbersome for no reason. May be you do not find >it a p

RE: [Tinyos-help] capturing printf output on the pc without the C RC? chars

2007-12-11 Thread Murray, Ben
thanks for the quick reply! I remember reading that now but I think I had no $TOSROOT\apps\tests\TestPrintf folder as referred to in the tutorial, and was in a hurry so just bashed on and used a terminal program which did well enough as a quick fix. ... I have now downloaded TestPrintf and after a

Re: [Tinyos-help] message using UART

2007-12-11 Thread ashrafalqudah
Thank you Michael… I appreciate your help …  .   Regarding the middleman.. I have peevishly cutoff the serial forwarder and I  used my own C# application but I couldn’t calculate the CRC, therefore I faced many problems. So I want to use serial forwarder  I guess that .. I shouldn’t calculate the

[Tinyos-help] TinyOS and standard C libraries

2007-12-11 Thread Ville-Pekka Seppä
Hi, I would like to do some basic signal processing on the a telosb mote and was wondering if I could use Gnu Scientific Library (GSL) with TinyOS. Is it possible to use any standard C libraries (math.h?) with TinyOS at all, because they don't provide "interfaces" or other NesC stuff ? Ville

[Tinyos-help] Help: UART rx function

2007-12-11 Thread [EMAIL PROTECTED]
Hello! I have to send and receive with the UART extention of my tmote-sky. I have a functionaly interfate that change the TTL signal with the RS-232 standard of the pc. To send data from the tmote there aren't problems. There are some problems with the receive the packet of byte... This progr

RE: [Tinyos-help] Tunit setup on osx: serial port in tos-bsl problem

2007-12-11 Thread David Moss
Looks like you have a space between bsl, and the com port identifier You can see from the tos-bsl line TUnit is trying to execute that it doesn't know what's going on: tos-bsl --telosb -c ?-r -e -I -p build/telosb/main.ihex.out-0 Note the ? in that line is supposed to be the

[Tinyos-help] Radio Interferometric Positioning (RIP)

2007-12-11 Thread Khew U-Wei
Hi everyone, I would like to ask if anyone is familiar with the Radio Interferometric Positioning (RIP) application for Mica2. I have some problems localizing and measuring the nodes. The Java GUI that I am using is the RipsDisplay by Vanderbilt University. Hope to hear from you soon. Thank you.

Re: [Tinyos-help] TinyOS Design Questions - (Question-1)

2007-12-11 Thread Faisal Aslam
Thank you. Now your solution will work. However, I am not sure what you mean by this line though "/This should work if the *provider* of the interface implements the default handlers for the event/". Furthermore, it is not necessary bad design always when you have such a problems. For example

Re: [Tinyos-help] TinyOS Design Questions - (Question-1)

2007-12-11 Thread John Griessen
Janos Sallai wrote: Problem:- In NesC if I have to use a single command of an interface then I have to implement ALL of its event. You can wire the functions one by one, Alternatively, if it's a recurrent problem, you can also create a glue component Furthermore, if it's a recurrent pr

Re: [Tinyos-help] basestation & uart0 on a telosb mote

2007-12-11 Thread Peter de Cauwer
Ariel, thanks for your response. I have studied your application and understand the code. The problem is that we need basestation because that mote receives sensor data from another mote via the radio and needs to bridge it to the expansion headers. So what modifications are required so that base

Re: [Tinyos-help] Random number

2007-12-11 Thread Michael Schippling
I "think" that the nodeID is used as the random seed so each node should get a different sequence of values. However they probably won't change from run to run. You might need to hack into the random() function and add some noise from an open ADC channel or something... MS Paul wrote: Hi all I

Re: [Tinyos-help] TinyOS and standard C libraries

2007-12-11 Thread Michael Schippling
If you have the source for the libs you should be able to compile them for which ever controller you are using. There is standard C lib function support, meaning most of "libc". But you might have to stub some things out, like printf() probably. Search this list for advice on linking in C functio

Re: [Tinyos-help] using math.h in tinyos 2 for telosb or micaz

2007-12-11 Thread Michael Schippling
For the MSP there is: opt/msp430/msp430/include/math.h which contains: extern float sqrtf _PARAMS((float)); (note the 'f' for float rather than double)... however it is in a "#ifndef _REENT_ONLY" block which may or may not be def'ed... And for the AVR: usr/avr/include/math.h has:

Re: [Tinyos-help] Listen program and statistics ?

2007-12-11 Thread Michael Schippling
Anything is (im)possible with software...just a little Java-foo is needed. Look into the MIG tool for generating message classes, I believe it is covered in the tutorial. With the right class you can parse the message and send data to any file you like using standard Java streams. Or you can hac

Re: [Tinyos-help] Help: UART rx function

2007-12-11 Thread Michael Schippling
I'm not sure exactly how the UART works, or whether it's different for various platforms...but...I think there is an event you can implement to get bytes as they arrive so you don't have to do your own interrupt checking...e.g. tos/interfaces/HPLUART.nc has put() and get() that hides the lowlevel

[Tinyos-help] DAC

2007-12-11 Thread n subhash
can somebody give me some info about DAC i.e how to use them and how an digital signal can be converted to analog signal for the display in CRO thanks in advance ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://www.millennium.ber

Re: [Tinyos-help] Radio files

2007-12-11 Thread Michael Schippling
To get a better view of where stuff comes from (assuming your program compiles...) put this in the Makefile: PFLAGS += -v then ncc will print all the source (but not header...g) files with their full path in the order they are used. MS Michiel Konstapel wrote: The nesC compiler look

Re: [Tinyos-help] interfacing ultrasonic sensor to MICAz over I2C bus

2007-12-11 Thread Kevin Klues
What version of tinyos are your using? There was a bug in the arbiters from about mid august ujtil mid spetember, so if you checked out from cvs during this time period, but never updated since, you may have the bug still. Kevin On Dec 11, 2007 3:37 AM, Han Mingding <[EMAIL PROTECTED]> wrote: >

Re: [Tinyos-help] message using UART

2007-12-11 Thread Michael Schippling
BCastInject _should_ format messages correctly and do the CRC, but I've not used it so I can't swear to how to go about it. As I said I suspect there is something wrong with your message formatting, so check though the whole thing. SerialForwarder, to my knowledge does just that, forward, so if t

[Tinyos-help] tinyos-1.x-tools.rpm cannot locate java

2007-12-11 Thread rodolfo de paz
Hello all, I have change my OS to Suse Linux 10.3 and when I am trying to install tinyos-1.x I have the following error: rpm output: Cannot locate java - is it installed? error: %post(tinyos-tools-1.1.0-1.i386) scriptlet failed, exit status 1 I don't know where it the problem. I checked the sys

Fwd: [Tinyos-help] Help: UART rx function

2007-12-11 Thread Ariel Mauricio Nunez Gomez
(I always forget to hit reply all) :( -- Forwarded message -- From: Ariel Mauricio Nunez Gomez <[EMAIL PROTECTED]> Date: Dec 11, 2007 3:42 PM Subject: Re: [Tinyos-help] Help: UART rx function To: [EMAIL PROTECTED] Yes, Mciahel is right, please check the message I posted on a rece

Re: [Tinyos-help] tinyos-1.x-tools.rpm cannot locate java

2007-12-11 Thread Michael Schippling
search this list for advice on "locate-jre" which never seems to work correctly. That's how the installers usually find java. Also, I'm not too happy with /usr/bin/java unless it is a link to something like "...jdk1.5.0_07/bin/java", because one usually has a specific JDK installed someplace othe

[Tinyos-help] Re: Measure Telosb Help

2007-12-11 Thread Roman Lim
Hi Miguel I'd suggest you use the latest tinyos-2.x from cvs repository. There was a bug that lacked some current in sleep mode (see http://tinyos.cvs.sourceforge.net/tinyos/tinyos-2.x/tos/platforms/telosb/MotePlatformC.nc?revision=1.3&view=markup). An updated power trace can be found at http://ti

[Tinyos-help] can I use pin 8 (I2C Data) on Tmote as Digital I/O pin?

2007-12-11 Thread yicheng
Hi Folks, I want to use pin 8, which is I2C data pin on Tmote sky as a digital I/O pin, is it possible? Here is my code example: Configuration file: Myapp.digitOut -> MSP430GeneralIOC.Port31; Implementation file: uses interface MSP430GeneralIO as digitOut; init function: ca

Re: [Tinyos-help] can I use pin 8 (I2C Data) on Tmote as Digital I/O pin?

2007-12-11 Thread Michael Schippling
Unfortunately the two I2C pins are shared with the radio so it's best (IMHO) to avoid using them...if you need more I/O the SVS "connector" has one more usable pin and you could solder into where the onboard sensors go too. MS yicheng wrote: Hi Folks, I want to use pin 8, which is I2C data

Re: [Tinyos-help] handelling of Hidden Terminal in TOSSIM

2007-12-11 Thread Philip Levis
On Dec 9, 2007, at 7:35 AM, Ms Mesho wrote: hello, I have noticed that in TOSSIM, if a mote is busy receiving a packet, then a newly received packet will be discarded, however, the fisrt packet will be received successfuly. Does this means that collissions are not possible in TOSSIM? at

Re: [Tinyos-help] TinyOS Design Questions - (Question-1)

2007-12-11 Thread Philip Levis
On Dec 11, 2007, at 10:04 AM, Faisal Aslam wrote: Thank you. Now your solution will work. However, I am not sure what you mean by this line though "/This should work if the *provider* of the interface implements the default handlers for the event/". Furthermore, it is not necessary bad des

Re: [Tinyos-help] Listen program and statistics ?

2007-12-11 Thread Peizhao Hu
the best way is to follow one of the example provided by TinyOS and write a small java program to collect this data in text files and import them to Excels. other way is to connect the sensor outputs to MatLab. Search the mailing list for an answer. regards; Peizhao Mona.baher wrote: Hi Al

[Tinyos-help] Input stuck high

2007-12-11 Thread Elle Mills
Im using D0 input on mda300, but it seems to be stuck high. Why would an input be stuck high? How do I clear it so I can use it? Thanks ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/l

Re: [Tinyos-help] using math.h in tinyos 2 for telosb or micaz

2007-12-11 Thread SANG Junjun
Yes. sqrtf is available. Thanks. On Dec 12, 2007 3:26 AM, Michael Schippling <[EMAIL PROTECTED]> wrote: > For the MSP there is: > opt/msp430/msp430/include/math.h > which contains: > extern float sqrtf _PARAMS((float)); > (note the 'f' for float rather than double)... however it is in a >

[Tinyos-help]: how to read message from the serial port of a pc??

2007-12-11 Thread Renee Azhen
Dear all: I want to transmit image via my sensor node the image was stored in a pc which is connectted to a telosb node, so I want to install a program into the node to read image from the pc, and then tranmit it via the wsn network to another node. but now I don't know how to read messag

Re: [Tinyos-help] Input stuck high

2007-12-11 Thread Urs Hunkeler
Hi, I think most logical inputs are high by default because of the internal circuit they use, especially if they can also be used as outputs. If you want to signal a low on the input, you have to pull it down (you might need an appropriate resistor). In the MDA User Manual ( http://www.xbow.com/S

[Tinyos-help] about Interrup of FIFOP in cc2420

2007-12-11 Thread jiwen zhang
Hello all: Maybe we know that standard micaz links PE6/int6 of atmega128 to FIFOP of cc2420, now our designed mote use PE7/int7 to links with FIFOP and other places are same with micaz. I am using tinyos2.x, and modify files HplCC2420InterruptsC.nc(InterruptFIFOPC.Atm128Interrupt -> Interrupts.