[Tinyos-help] ask for help

2011-11-14 Thread 陈哲
 hello 
when i  ues the tinyos2.1.1when i compile the some test on apps .for 
example theadioSenseToLeds. I have the problems as follow:
Traceback (most recent call last):
  File "RadioSenseMsg.py", line 7, in 
import tinyos.message.Message
ImportError: No module named tinyos.message.Message


   thank you very much .  i am a student form  china .   

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

[Tinyos-help] Archlinux Packages

2011-11-14 Thread Petros Makris
>Does anyone have any experience building and using the TinyOS toolchain on
>Arch Linux, particularly with telosb?



I've made a short guide about installing TinyOS 2.1.1 in Archlinux.

It uses the rpms provided by  [
http://docs.tinyos.net/tinywiki/index.php/Installing_TinyOS_2.1.1 ]
except "nesc" which was a big trouble when installed from binary.
Installing nesc 1.3.3-1 from AUR
(Archlinux User Repo) makes a working installation (but it's not thorougly
tested).

You can find the guide in

http://takeda.zapto.org/arch/

Please free to correct/mention any problems. When triple checked I will
upload
those PKGBUILD's in AUR

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

[Tinyos-help] Problem with serial communication using telosa

2011-11-14 Thread Luís Pereira
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



2011/10/27 András Bíró 

> Yes, it worked for me (I also tried all the combinations, only this one
> worked).
>
> ant jar: It regenerates the tinyos.jar file. Apache ant is similar to
> GNU Make, but it's designed for java. You will need ant and javac to
> regenerate the jar file (and mig and ncg, which are part of nesc and
> tinyos-tools).
>
> Andris
>
> 2011/10/27 Luís Pereira :
> > Hi András,
> > I tried out your patch but it didn't work. I test a few combinations of
> the
> > RTS DTS state and none of them work. Did it work for you?
> > What do you mean with ant jar? I don't understand that line.
> > Thanks for your help
> > Luís Pereira
> >
> >
> > On Thu, Oct 27, 2011 at 16:10, András Bíró  wrote:
> >>
> >> Hi Guys,
> >>
> >> Urs, it's not always working in c, I couldn't use it with cutecom.
> >> But since I worked with the JNI libraries recently, I checked what
> >> should be changed, and it was really easy, check the attached patch (I
> >> did the change on the svn version). You can try it with:
> >>
> >> cd $TOSROOT/sdk/java
> >> patch -p1 < telosa.patch
> >> ant jar
> >>
> >> It sets the RTS line and clears the DTR before connecting, it seems
> >> eigther the telosa needs the opposite I thought, or both lines are
> >> inverted.
> >>
> >> Andris
> >>
> >> 2011/10/27 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  >> >> > 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
> >> >>>
> >> >>>

[Tinyos-help] TestNetwork application and MsgReader tool

2011-11-14 Thread Nouha Sghaier
Hello,

I'm using MsgReader tool to parse packets of TestNetwork application. I
installed TestNetwork application on 3 motes MicaZ and I started receiving
messages as follows:

[source=0x1]

[seqno=0x19]

[parent=0x6]


[metric=0x4ee]


[eventdata=0x6]

[hopcount=0x4]

[sendCount=0x1f4]

[sendSuccessCount=0x19]


The problem is that when I use "Listen" tool I have the following output:

00 FF FF F4 01 17 00 05 00 01 00 19 00 06 04 EE 00 06 00 04 01 F4 00
19 00 06 00 00 00 00 00



00 FF FF F4 01 17 00 05 - Serial Header



00 01 00 19 00 06 04 EE - Ctp Header



00 06 00 04 01 F4 00 19 00 06 00 00 00 00 00 - TestNetworkMsg


Results don't coinide!

I studied those 2 results and I note that MsgReader tool parse packets just
after Serial header and do not take into consideration Ctp header.

Can anyone suggest how can I obtain the right result with MsgReader? Can
you please tell me how can I modify am_offset variable?

I reallly need your help.

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

[Tinyos-help] TestNetwork debugging and MsgReader problem!

2011-11-14 Thread Nouha Sghaier
Hello,

I'm using MsgReader tool to parse packets of TestNetwork application. I
installed TestNetwork application on 3 motes MicaZ and I started receiving
messages as follows:

 [source=0x1]

[seqno=0x19]

[parent=0x6]

[metric=0x4ee]

[eventdata=0x6]

[hopcount=0x4]

[sendCount=0x1f4]

[sendSuccessCount=0x19]





The problem is that when I use "Listen" tool I have the following output:



00 FF FF F4 01 17 00 05 00 01 00 19 00 06 04 EE 00 06 00 04 01 F4 00 19 00
06 00 00 00 00 00



00 FF FF F4 01 17 00 05 - Serial Header



00 01 00 19 00 06 04 EE - Ctp Header



00 06 00 04 01 F4 00 19 00 06 00 00 00 00 00 - TestNetworkMsg


Results don't coincide!



I studied those 2 results and I note that MsgReader tool parse packets just
after Serial header and do not take into consideration Ctp header.

Can anyone suggest how can I obtain the right result with MsgReader? Can
you please tell me how can I modify am_offset variable?

I reallly need your help.



Best Regards,

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

[Tinyos-help] tossim error make micaz sim

2011-11-14 Thread azeddine attir
Hello
I have installed tinyos2.1.1 under  Ubuntu 8.04
i write this command : make micaz sim
and i have the following error :
mkdir -p simbuild/micaz
  placing object files in simbuild/micaz
  writing XML schema to app.xml
  compiling BlinkAppC to object file sim.o
ncc -c -shared -fPIC -o simbuild/micaz/sim.o -g -O0 -tossim
-fnesc-nido-tosnodes=1000 -fnesc-simulate
-fnesc-nido-motenumber=sim_node\(\) -fnesc-gcc=gcc -Wall -Wshadow
-Wnesc-all -target=micaz -fnesc-cfile=simbuild/micaz/app.c -board=micasb
-DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=10
-DIDENT_APPNAME=\"BlinkAppC\" -DIDENT_USERNAME=\"attir\"
-DIDENT_HOSTNAME=\"attir-laptop\" -DIDENT_USERHASH=0xe186c405L
-DIDENT_TIMESTAMP=0x4ebaa12aL -DIDENT_UIDHASH=0x7aaac96fL
-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
/usr/lib/ncc/deputy_nodeputy.h:4:20: error: stddef.h: No such file or
directory
/usr/lib/ncc/nesc_nx.h:16:22: error: inttypes.h: No such file or directory
/usr/lib/ncc/nesc_nx.h:235: syntax error before `__nesc_ntoh_uint8'
/usr/lib/ncc/nesc_nx.h:240: syntax error before `__nesc_hton_uint8'
/usr/lib/ncc/nesc_nx.h:242: warning: type defaults to `int' in declaration
of `base'
/usr/lib/ncc/nesc_nx.h:242: `value' undeclared here (not in a function)
/usr/lib/ncc/nesc_nx.h:242: warning: data definition has no type or storage
class
/usr/lib/ncc/nesc_nx.h:243: syntax error before `return'
/usr/lib/ncc/nesc_nx.h:246: syntax error before `__nesc_ntoh_leuint8'
/usr/lib/ncc/nesc_nx.h:251: syntax error before `__nesc_hton_leuint8'
/usr/lib/ncc/nesc_nx.h:253: warning: type defaults to `int' in declaration
of `base'
/usr/lib/ncc/nesc_nx.h:253: redefinition of `base'
/usr/lib/ncc/nesc_nx.h:242: previous declaration of `base'
/usr/lib/ncc/nesc_nx.h:253: `value' undeclared here (not in a function)
/usr/lib/ncc/nesc_nx.h:253: warning: data definition has no type or storage
class
/usr/lib/ncc/nesc_nx.h:254: syntax error before `return'
/usr/lib/ncc/nesc_nx.h:257: syntax error before `__nesc_ntoh_int8'
/usr/lib/ncc/nesc_nx.h:257: syntax error before `__nesc_hton_int8'
...
..

/opt/tinyos-2.1.1/tos/platforms/mica/sim/HilTimerMilliC.nc:51: no match
/opt/tinyos-2.1.1/tos/platforms/mica/sim/HilTimerMilliC.nc:52: cannot find
`Counter'
In component `TimerMilliC':
/opt/tinyos-2.1.1/tos/system/TimerMilliC.nc:44: too many arguments
make: *** [sim-exe] Erreur 1
pleas help me
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Question About TinyOS CC2420 Layers Mismatch (Lpl and Unique) in CC2420RadioC.nc

2011-11-14 Thread Zainan Victor Zhou
Dear Tinyos Community/Core Working Group,

My name is Zainan Victor Zhou, from JHU HiNRG Group. As I am TAing "Network
Embedded System/Sensor" I found that the layers in CC2420RadioC.nc are
mismatched between Lpl and Unique as shown below:

SENDING PART|RECEIVING PART
-
CC2420TInyOSNetworkC|CC2420TInyOSNetworkC
-
UniqueSenderC   |LplC
LinkC   |
|
LplC|UniqueReceive
|
CsmaC   |CsmaC
(Appendix:Code from latest Git mirrorof official tinys repository)


In this layout, the packet sent in LplC maybe be filtered out at
UniqueReceive because it has no valid sequence number. (as packet with
duplicated DSN will be ignored).

I am curious is this mismatch based on some specific consideration or is it
a bug?

Thank you very much!

Zainan Victor Zhou
Johns Hopkins Univ.

Appendix:
Code from latest Git mirrorof official tinys repository
http://git.hinrg.cs.jhu.edu/?p=tinyos-2.x.svn;a=blob;f=tos/chips/cc2420/CC2420RadioC.nc;h=5bbcc086fcf7075f4d9d280432563c33093c4e95;hb=HEAD

100   // Send Layers
101   CC2420TinyosNetworkC.SubSend -> UniqueSendC;
102   UniqueSendC.SubSend -> LinkC;
103   LinkC.SubSend -> LplC.Send;
104   LplC.SubSend -> CsmaC;
105
106   // Receive Layers
107   CC2420TinyosNetworkC.SubReceive -> LplC;
108   LplC.SubReceive -> UniqueReceiveC.Receive;
109   UniqueReceiveC.SubReceive ->  CsmaC;
___
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 Modi, Jenis Ashokkumar
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 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
>> 

[Tinyos-help] Timer 3 registers and IRIS mote

2011-11-14 Thread hafid oussaadi

Hello everybody,
I wrote a  small program to generate a 16 KHz PWM signal on OC3A which 
corresponds to pin 26 on the IRIS 51 pins connector. Assuming that 
fclk_I/O = 7.3728 MHz ,  I use  CTC mode  with OCR3A as TOP value. 
PRR1 &=~(1 << 3); // enable Timer 3
TCCR3B |= (1<<3)|(1<<0); // prescaler=1 
OCR3A=0xE0;  // top value
TCCR3A=0x40 ;// CTC mode with OCR3A as TOP value
TCCR3A &= ~(1 << 6); // stop the signal
I don`t get anything as output. What`s wrong with this code?
BTW, I am using  TimerMillic  to generate this signal for 10 seconds
Regards 
Hafid 
  ___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Full feature Tinyos Application with simulator ?

2011-11-14 Thread salahadin


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


Thanks in Advance 

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

[Tinyos-help] How to read data from an analog sensor with TinyOS-2.x and Mica2

2011-11-14 Thread sofia aparicio

Hello,

I would like to use an analog Omron D6F-V03A1 model air sensor with Tinyos2 and 
Mica2. How can I do that? Is there any example about how to read data from an 
analog sensor?

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

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


[Tinyos-help] designing full feature Tinyos Application with simulator ?

2011-11-14 Thread salahadin
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] debug tinyos source code

2011-11-14 Thread Rafael de Oliveira Costa
Hi all,

I need to use a debugger on tinyos source code that i will deploy into a
micaz mote. Its because I need to trace the stack in some point of the
program.

I search about it here at the list but I don't know how to do this. One
useful thing that I see is that exist avr-gdb and to use this you have to
compile your app with a keyword named debug like this: make 
debug. However I can debug if and only if I have a AVR JTAGICE mkII or
similar this is correct ? ( for Atmel processors of course).

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

[Tinyos-help] TinyOS code samples

2011-11-14 Thread Andrew Rudgewick-Brown
Hi,
I’m trying to get hold of some samples of TinyOS code used in real-world 
WSN deployments to analyze for my PhD project.

I'm mainly interested in the configurations and wiring people use, so 
all I really need are the application/configurations and interfaces, I 
don't need the actual code modules themselves so these can be left out 
if the code is sensitive.

Does anyone have any code they’d be willing to let me analyze or know 
where I could find some samples?

Andrew


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


[Tinyos-help] Low power listening application

2011-11-14 Thread Stefano Moret
Hi all,

I'm trying to reduce the power consumption of the the motes for an application.
I modified the Oscilloscope application to sense and transmit data every 10 
mins, and then I reduced the power taking instructions from the Low Power 
Sensing tutorial.
I still have a power consumption higher than expected, although much lower than 
before. I think the reason could lie in a non-proper setting of the 
LPL_INTERVAL time constant. About this, in the LowPowerSensing tutorial:

- what is the LPL_INTERVAL time constant doing?
- Which is the relationship between LPL_INTERVAL and the SAMPLING_INTERVAL? If 
I sense every 10 mins, which should be a correct value for LPL_INTERVAL?

Thanks, regards
Stefano



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


[Tinyos-help] one bug in C C2420

2011-11-14 Thread zhengxiangwei

Hi,
I am running tinyos on micaz with Hardware ack(open packetlink layer to 
retransmit) .
   I find a a problem.
  When CC2420 transmit a packet, m_state turns  S_SFD  and  then break. When 
node receive a new packet m_state turns to S_EFD   and S_ACK_WAIT. In this way 
As node is not in ACK_WAIT state, it can receive a ack packet but cannot really 
handle the ack packet. Thus I see the node retransmit the packet all the time.
  I do not know whether it is a bug.

 BUT when I comment   
  if ( call SFD.get() ) {

  break;
the node works normally.
 Do you meet such problem?
 Thank you.




 Napoleon


source code of CC2420TransmitP:
  case S_SFD:
m_state = S_EFD;
sfdHigh = TRUE;
// in case we got stuck in the receive SFD interrupts, we can reset
// the state here since we know that we are not receiving anymore
m_receiving = FALSE;
call CaptureSFD.captureFallingEdge();
call PacketTimeStamp.set(m_msg, time32);
if (call PacketTimeSyncOffset.isSet(m_msg)) {
   uint8_t absOffset = 
sizeof(message_header_t)-sizeof(cc2420_header_t)+call 
PacketTimeSyncOffset.get(m_msg);
   timesync_radio_t *timesync = (timesync_radio_t 
*)((nx_uint8_t*)m_msg+absOffset);
   // set timesync event time as the offset between the event time and 
the SFD interrupt time (TEP  133)
   *timesync  -= time32;
   call CSN.clr();
   call TXFIFO_RAM.write( absOffset, (uint8_t*)timesync, 
sizeof(timesync_radio_t) );
   call CSN.set();
   //restoring the event time to the original value
   *timesync  += time32;
}

if ( (call CC2420PacketBody.getHeader( m_msg ))->fcf & ( 1 << 
IEEE154_FCF_ACK_REQ ) ) {
  // This is an ack packet, don't release the chip's SPI bus lock.
  abortSpiRelease = TRUE;
}
releaseSpiResource();
call BackoffTimer.stop();

if ( call SFD.get() ) {
  break;
}
/** Fall Through because the next interrupt was already received */

  case S_EFD:
sfdHigh = FALSE;
call CaptureSFD.captureRisingEdge();
//xiangwei
if ( (call CC2420PacketBody.getHeader( m_msg ))->fcf & ( 1 << 
IEEE154_FCF_ACK_REQ ) ) {
 m_state = S_ACK_WAIT;
 call BackoffTimer.start( CC2420_ACK_WAIT_DELAY );
} else {
  signalDone(SUCCESS);
}

if ( !call SFD.get() ) {
  break;
}
/** Fall Through because the next interrupt was already received */
  ___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Receive and Send messages

2011-11-14 Thread Xiaowei
Hi folks,

I'm using tinyos 2.x on telosb mote. Is there any way that can make a mote
listen for while before it starts to transmit packets? More specifically,
the mote acts as basestation (like the app in apps/tutorials) for a while
and then begins to broadcast messages at a certain rate. BaseStation app in
apps/tutorials seems able to send packets besides listening to the radio,
how should I implement this?
I tried to add the following (mostly) to BaseStation to send packets,
didn't work.

BaseStationP.RadioSend -> ActiveMessageC;
call RadioSend.send(AM_BROADCAST_ADDR, &pkt, 12);

What's the right way to do this?


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

Re: [Tinyos-help] mig issue failed parsing RssiDemoMessages.h

2011-11-14 Thread Jakob Bieling
Hi George,

  I do not have a solution, but I thought I'd share our findings. We are facing 
the same problem on Ubuntu 11. But the identical code compiles on Debian5 and 
Ubuntu 10 machines. The error we get is similar to yours, but not identical:

two source files specified (PLATFORM_NULL and TOSH_DATA_LENGTH=100)
..

  Due to time constraints, we did not dig deeper into this, as we are able to 
take the class files from the Debian machine. But maybe this info helps you 
find the actual cause of the error.

Best,
Jakob


On Nov 7, 2011, at 3:08 PM, George Smart wrote:

> Hi.  I am trying to build the Java program to go with the RssiDemo.  I
> have all the nodes programmed and can read binary data from the nodes
> via terminal program. When it comes to running the Java PC program, I
> just can't seem to get it to compile! I get the following errors:
> 
> george@box:/opt/tinyos-2.1.1/apps/tutorials/RssiDemo/java$ sudo make
> mig java -target=null -java-classname=RssiMsg ../RssiDemoMessages.h
> RssiMsg -o RssiMsg.java
> two source files specified (PLATFORM_NULL and NESC=131)
> failed to parse message file ../RssiDemoMessages.h
> make: *** [RssiMsg.java] Error 1
> george@box:/opt/tinyos-2.1.1/apps/tutorials/RssiDemo/java$
> 
> I just don't have enough experience to fix it.  If anyone can offer any
> suggestions, that would be great. I'm running Ubuntu 11.10, 64-bit with
> the proper Oracle Java 7 suite. I had a good around and a search this
> mailing list but I couldn't find an answer to this.
> 
> Thanks in Advance.
> 
> George Smart
> Ph.D Student, E&EE, UCL.

-- 
net.cs.bonn.edu/bieling



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] two source files specified (PLATFORM_MICAZ and BOARD_MICASB)

2011-11-14 Thread zhengxiangwei

hi,
 I install tinyos in ubuntu 11.10. however there is a problem when make 
micaz cosim in Blink.
   " two source files specified (PLATFORM_MICAZ and BOARD_MICASB)" seems a new 
problem. Is there any solution for that?
Thank you .


   Napoleon
 
error report:
mkdir -p simbuild/micaz
  placing object files in simbuild/micaz
  writing XML schema to app.xml
  compiling BlinkAppC to object file sim.o
ncc -c -shared -fPIC -o simbuild/micaz/sim.o -g -O0 -tossim 
-fnesc-nido-tosnodes=1000 -fnesc-simulate -fnesc-nido-motenumber=sim_node\(\) 
-fnesc-gcc=gcc -Wall -Wshadow -Wnesc-all -target=micaz 
-fnesc-cfile=simbuild/micaz/app.c -board=micasb -DDEFINED_TOS_AM_GROUP=0x22 
--param max-inline-insns-single=10 -DIDENT_APPNAME=\"BlinkAppC\" 
-DIDENT_USERNAME=\"root\" -DIDENT_HOSTNAME=\"zxwmit-Studio-X\" 
-DIDENT_USERHASH=0x047da773L -DIDENT_TIMESTAMP=0x4ebdf365L 
-DIDENT_UIDHASH=0x57009c43L -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
two source files specified (PLATFORM_MICAZ and BOARD_MICASB)
make: *** [sim-exe] Error 1

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

[Tinyos-help] Conflicting conversion formulas of telosb internal temperature sensor

2011-11-14 Thread Geo Gkolfin
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] Change adc prescaler for accelerometer sampling operation

2011-11-14 Thread Kushal Sarkara
Hello,

I am using TinyOS 2.1.1 on Ubuntu 9.10 with MicaZ motes. I am looking to
alter the value of the prescaler while sampling the X axis of the
accelerometer on the mts300 sensorboard.

After doing some digging, I found the
file /tos/sensorboards/mts300/AccelP.nc which returns the value of the
prescaler for configuring the Adc, the getdata() function for which leads
me back to the /tos/chips/atm128/adc/Atm128AdcP.nc file.

The code in the AccelP.nc file that I am referring to is as follows:
*
*
* async command uint8_t ConfigX.getPrescaler() {*
*return ATM128_ADC_PRESCALE;*
*  }*
*
*
Will it suffice to change the returned value to, for example,
*ATM128_ADC_PRESCALE_32
(*as provided in the /tos/chips/atm128/adc/Atm128Adc.h) if I want to use
the adc prescaler (32)?

Thanks in advance,
Kushal
___
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] 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 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 

[Tinyos-help] How to read data from an analog sensor

2011-11-14 Thread sofia aparicio

Hello,

I would like to use an analog Omron D6F-V03A1 model air 
sensor with Tinyos2 and Mica2. How can I do that? Is there any example 
about how to read data from an analog sensor?

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

Re: [Tinyos-help] mig issue failed parsing RssiDemoMessages.h

2011-11-14 Thread András Bíró
Hi guys,

1.3.2 and older versions of nesc has this bug when tries to compile
with gcc 4.6. You can do eighter of these solutions:
-add option -target=iris (or telos or whatever mote you're using, it
doesn't really matter, the generated code is the same) to the mig
command to use avr-gcc or msp430-gcc instead of gcc.
-update nesc to 1.3.3. (from here:
http://tinyos.stanford.edu/tinyos/dists/ubuntu/pool/main/n/nesc/,
http://tinyos.stanford.edu/tinyos/dists/cygwin/ or from source)
-use the patch from here (the bug is in a perl script, so you don't
need to recompile anything):
http://sourceforge.net/tracker/?func=detail&aid=3153727&group_id=56288&atid=480036

Andris

On Fri, Nov 11, 2011 at 1:05 PM, Jakob Bieling  wrote:
> Hi George,
>
>  I do not have a solution, but I thought I'd share our findings. We are 
> facing the same problem on Ubuntu 11. But the identical code compiles on 
> Debian5 and Ubuntu 10 machines. The error we get is similar to yours, but not 
> identical:
>
> two source files specified (PLATFORM_NULL and TOSH_DATA_LENGTH=100)
> ..
>
>  Due to time constraints, we did not dig deeper into this, as we are able to 
> take the class files from the Debian machine. But maybe this info helps you 
> find the actual cause of the error.
>
> Best,
> Jakob
>
>
> On Nov 7, 2011, at 3:08 PM, George Smart wrote:
>
>> Hi.  I am trying to build the Java program to go with the RssiDemo.  I
>> have all the nodes programmed and can read binary data from the nodes
>> via terminal program. When it comes to running the Java PC program, I
>> just can't seem to get it to compile! I get the following errors:
>>
>> george@box:/opt/tinyos-2.1.1/apps/tutorials/RssiDemo/java$ sudo make
>> mig java -target=null -java-classname=RssiMsg ../RssiDemoMessages.h
>> RssiMsg -o RssiMsg.java
>> two source files specified (PLATFORM_NULL and NESC=131)
>> failed to parse message file ../RssiDemoMessages.h
>> make: *** [RssiMsg.java] Error 1
>> george@box:/opt/tinyos-2.1.1/apps/tutorials/RssiDemo/java$
>>
>> I just don't have enough experience to fix it.  If anyone can offer any
>> suggestions, that would be great. I'm running Ubuntu 11.10, 64-bit with
>> the proper Oracle Java 7 suite. I had a good around and a search this
>> mailing list but I couldn't find an answer to this.
>>
>> Thanks in Advance.
>>
>> George Smart
>> Ph.D Student, E&EE, UCL.
>
> --
> net.cs.bonn.edu/bieling
>
>
> -BEGIN PGP SIGNATURE-
>
> iQIcBAEBAgAGBQJOvQ9wAAoJEHEm4kjjmybAHqgQAK3IuTxGazUPOlKJmyextSZp
> uTi6XI1W0M82pr9CG63uvpuzM4FXfJmIQ9JrajgyK0QufjFDC1vF+QgkX0+VW+vU
> XyoFGMTrofnLUbc7siY+CbnAD13mKX1ByLvYOkMgjHm1vjurIwnBJRIx1ryzySBr
> lzE+p5D/MkP+tTYYfdGQVvn7JC7qZ6sGobI3liXBQItx3gkVVjXuEu4X2xILjsZq
> AsfCdp4UiigUTpjINMvayfxOoVSuvMkm9Z0e5NjsQc8JZWPxxCXJTogy3Ijadwiy
> afx2Y33K4WYJ80dOFkbSI4ENcJCNYV/mQQGNqQA4DmQDOY3ylsQShvDpfUSpI/N5
> aefY0ElR/190B7JICeR1XnHCLhbZ0pVmNRXszeuVREuqc3DatDTLACPaEc2B3v+D
> jiM4oueDsK4Ls/rdiHW+I0o431mFLnjwphFF78PhzQKtceXZFsOoCyMnI6uee/ee
> aPNmq0U/LJTORqUS5iGuUufPTwl+vsNOL/6SbqEoMCCQvZ3MO4mRIlCA4zBdYa24
> RahQm9CeA6okAlZRnVISlZxXHSIxcI/Hau1IeZjHNs/YbPCe+58dp/ScJR2sndiS
> eD2lXV79EBkOxsbkV5Sb9nDbMase+iwGk01DcqQFTpfA6Kr7GrDyItk+VjidoBSM
> Sj66KGeDoq5hEhkv5W3h
> =/v5d
> -END PGP SIGNATURE-
>
> ___
> 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 András Bíró
Hi Georgia,

This is not an internal temperature sensor, it's a Sensirion SHT21
Humidity/temperature sensor, so you should use the formula from its
datasheet: 
http://www.sensirion.com/en/pdf/product_information/Datasheet-humidity-sensor-SHT1x.pdf


Andris

On Sun, Nov 13, 2011 at 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] Archlinux Packages

2011-11-14 Thread Petros Makris
The link is *http://gazela.di.uoa.gr/arch*

I didn't use the svn version because It wouldn't compile for tinynodes.


On Tue, Nov 8, 2011 at 20:50, Petros Makris  wrote:

> >Does anyone have any experience building and using the TinyOS toolchain on
> >Arch Linux, particularly with telosb?
>
>
>
> I've made a short guide about installing TinyOS 2.1.1 in Archlinux.
>
> It uses the rpms provided by  [
> http://docs.tinyos.net/tinywiki/index.php/Installing_TinyOS_2.1.1 ]
> except "nesc" which was a big trouble when installed from binary.
> Installing nesc 1.3.3-1 from AUR
> (Archlinux User Repo) makes a working installation (but it's not thorougly
> tested).
>
> You can find the guide in
>
> http://takeda.zapto.org/arch/
>
> Please free to correct/mention any problems. When triple checked I will
> upload
> those PKGBUILD's in AUR
>
> Regards,
> Pet
>
>


-- 

-Pet
___
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] 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] 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] Timer 3 registers and IRIS mote

2011-11-14 Thread Janos Sallai
Hafid,

Most probably, the MCU goes to sleep and the timer is not ticking. To
prevent the MCU from sleeping, implement the McuPowerOverride
interface and wire it to McuSleepC.

Janos

On Wed, Nov 9, 2011 at 10:05 PM, hafid oussaadi  wrote:
> Hello everybody,
> I wrote a  small program to generate a 16 KHz PWM signal on OC3A which
> corresponds to pin 26 on the IRIS 51 pins connector. Assuming that fclk_I/O
> = 7.3728 MHz ,  I use  CTC mode  with OCR3A as TOP value.
> PRR1 &=~(1 << 3); // enable Timer 3
> TCCR3B |= (1<<3)|(1<<0); // prescaler=1
> OCR3A=0xE0;  // top value
> TCCR3A=0x40 ;// CTC mode with OCR3A as TOP value
> TCCR3A &= ~(1 << 6); // stop the signal
> I don`t get anything as output. What`s wrong with this code?
> BTW, I am using  TimerMillic  to generate this signal for 10 seconds
> Regards
> Hafid
>
> ___
> 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] Change adc prescaler for accelerometer sampling operation

2011-11-14 Thread Michael Schippling
Changing the return value will have no effect on the ADC.
There used to be an interface for this that was actually
documented in the code:
ADCControl.setSamplingRate(uint8_t rate);
The name may have changed to setPrescaler() or something
more obvious.

MS


Kushal Sarkara wrote:
> Hello,
> 
> I am using TinyOS 2.1.1 on Ubuntu 9.10 with MicaZ motes. I am looking to 
> alter the value of the prescaler while sampling the X axis of the 
> accelerometer on the mts300 sensorboard.
> 
> After doing some digging, I found the 
> file /tos/sensorboards/mts300/AccelP.nc which returns the value of the 
> prescaler for configuring the Adc, the getdata() function for which 
> leads me back to the /tos/chips/atm128/adc/Atm128AdcP.nc file.
> 
> The code in the AccelP.nc file that I am referring to is as follows:
> /
> /
> / async command uint8_t ConfigX.getPrescaler() {/
> /return ATM128_ADC_PRESCALE;/
> /  }/
> /
> /
> Will it suffice to change the returned value to, for 
> example, /ATM128_ADC_PRESCALE_32 (/as provided in 
> the /tos/chips/atm128/adc/Atm128Adc.h) if I want to use the adc 
> prescaler (32)?
> 
> Thanks in advance,
> Kushal
> 
> 
> 
> 
> ___
> 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] Java Problem using Telosb nodes

2011-11-14 Thread Baudry Arthur
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

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

2011-11-14 Thread Baudry Arthur
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
>
>


-- 
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] Help me for creating cluster based network in TinyOS

2011-11-14 Thread Khushbu Shah
Dear All
I am doing my final sem MTech project on wireless sensor network. I want to
try some application in TinyOS in which have to create cluster based
network. ClusterHead election process should be based on combination of
residual energy and distance from each node.
Can anybody give me some basic code via which I can move ahead?
Example:
I want to make network of appx. 50 nodes and out of which 5 nodes are
clusterhead based on any criteria and then some events are detected by
individual cluster and data is sent to the base station.

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

[Tinyos-help] About Tiny os installation on i5 architecture

2011-11-14 Thread jyoti patole
Hi all

Can any one tell me how do i install Tiny os on i5 processor architecture?

Bcoz the rpm available are for i386 architecutre.

Please help


-- 










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