[Tinyos-help] How to restart a TOSSIM simulation TinyOS 2.x

2007-06-11 Thread Marek Jawurek
Hi,

recently I ran into problems with TOSSIM of TinyOS version 1.x which did
not reset completely. Motes did not communicate after the reset
properly. Because of that and because of the fact that most
documentation and development are done for TinyOS 2.x I changed my
application to TinyOS 2.x and tried TOSSIM there.

Someone should change Tutorial 11 and emphasize that without calling
createNoiseModel on every Node there won't be any communication. It was
rather frustrating for me to search through my code and compare it to
sample code until I found the solution in the Mailinglist. Intuitively
it should just work when I connect 2 nodes via Radio.add(). 

But here is my current problems. I want to run several simulations and
the following issues arise:

1. My simulation goes on forever, every call to runNextEvent returns 1
but my motes only react on radio communication which is initiated by
node 1 once and then just rebroadcast. Every time I rebroadcast a
message I also print dbg output. No debug output is created after a
while but runNextEvent still returns new events. 

2. I would like to restart a simulation in Python. That means resetting
everything unique to the last run and to start another run with TOSSIM.
How can I do that ? Using the constructor Tossim([]) apparently a
singleton is passed because the time in the new Tossim object is the
same as before. Deleting the module TOSSIM with 'del TOSSIM' and
re-importing it doesn't work either.


Any clues/ideas are appreciated.

Marek



-- 
Marek Jawurek [EMAIL PROTECTED]

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Packets sent out before adding timestamps

2007-06-11 Thread b90901046

Hi,

I think I've asked this before. I used the SysTimeStamping component  
contributed by Vanderbilt to add timestamp on outgoing packets.  
However what I see in the receiver side is the timestamp value not  
attached on the packet (timestamp value equals to the offset between  
global and local time). This does not happen on every packet but a  
few. I guess it's because when we see the SFD goes high and try to  
write the timestamp back, the packet is already sent out by CC2420. Is  
there any solution to this problem? I use telosb and tinyos-1.x. Thanks.


Tsung-Han Lin
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] [tinyOS_1.X]Audio_playback_MTS310_Microphone

2007-06-11 Thread antonio gonga
Hey all,I'm using micaZ motes and sampling the MTS310 sensorboard microphone.. 
I need some aplication that can help me to play back the audio..and I also want 
to know if its possible to change the audio format from microphone.. someone 
told that the audio from microphone is PCM_10bits length, I drop the last two 
bits to get 8 bits length.antonio
_
Hotmail to go? Get your Hotmail, news, sports and much more! Check out the New 
MSN Mobile! 
http://mobile.msn.com___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] MIG(message interface Generator)

2007-06-11 Thread antonio gonga
Hey all,I'm using tinyos 1-x and micaz motes, I need help regarding to MIG.If 
anyone knows how to use it, feel free to email me.
_
Play free games, earn tickets, get cool prizes! Join Live Search Club. 
http://club.live.com/home.aspx?icid=CLUB_wlmailtextlink___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Compiling contributed code

2007-06-11 Thread Nicolas Esteves

I've already found how to fix this last week but thanks for your response :)

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Timer in TOSSIM

2007-06-11 Thread frenci

Hi,
I'm working with Tossim and tinyos-1.x to write an application for wireless
sensor network.
In my scenario there are two nodes and a base station. These nodes access to
the channel in TDMA mode, so ech node trasmitt/receive only in the
appropriate time slot. To realize it, I set a timer [use TimerC module ] to
establish when a node can turn on the radio and when turn off. Sfortunatly
timer in Tossim has a resolution of 32 msec, so it not fire at the time I
want, but it can fire early or with variable delay !
can anyone help me to resolve this fix ? I don't know another Timer module
to use with Tossim!

Thanks in advance!

Francesca
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] tossim propagation speed

2007-06-11 Thread Alexander Becher
Hi,

* Romain Thouvenin:
I would like to know if/how the propagation time of packets is
simulated in tossim, and how it generally relates to the real world. I
didn't find anything about it on the website but I may have missed it,
I'm not very familiar with the terms.

I'm relaying second hand knowledge: Tossim apparently adds a random
delay of a few simulation cycles before a receive event is processed at
the receiving node. How this delay is calculated, I don't know.

Also, for radio propagation, the delay in the real world will be small.
If sending a packet takes, say, 10 ms, and a node 200 m away receives
it, the propagation delay is approx. 200 m / (2e8 m/s) = 1 us. So medium
propagation can probably be neglected.

Hope this helps,
Alexander

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] PacketLink/RadioBackoff unexpected behavior

2007-06-11 Thread Mayur Maheshwari

Hi David,

It was nice of you that you helped me with the information on blackbook.
However there seems to be problem galore ;)

1. PacketLink
I tried using the PacketLink interface in one of my apps and it fails to
receive the acks. Previously, I was using the PacketAcknowledgements
interface and it was running absolutely fine. However, it seems that the
wasDelivered(msg) event in PacketLink returns FALSE all the time.

I tried testing the app TestPacketLink in \tinyos-
2.x\apps\tests\cc2420\TestPacketLink and the acks were never received and
the Transmitter toggled led0 every 2 secs. Again, I tested the TestAcks in
\tinyos-2.x\apps\tests\cc2420\TestAcks which uses the interface
PacketAcknowledgements and this does gives positive results.

2. RadioBackoff

I tested radiobackoff by having events in an app installed on two motes(A
and B). I initialised the Initial Backoff times as 11 and 300 for both the
motes resp. Now, I installed another app on another mote C which broadcasts
and when A and B receive this broadcast they unicast their messages to C. It
was expected that the message from mote B should be delayed by ~ 300 ms but
I noted both the messages getting into C simultaneously.  To be more clear
on this aspect I recorded the events in a video and played at slower speeds
but to no avail. The Leds on the mote C blink in 2~3 ms delay and I could
not determine which packet went first. Would you be able to share some code
in this regard.

Thank you once again for all the help.
Mayur

--
Mayur Maheshwari([EMAIL PROTECTED])

Karmanye Vadhikaraste Ma Phaleshu Kadachana,
Ma Karma Phala Hetur Bhurmatey Sangostva Akarmani
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] documentation

2007-06-11 Thread Alexander Becher
Hi,

* roberto pagliari:
does anyone know where I can find some documentation regarding the avr C
programming in general, not specifically related to nesc..

maybe take a look at the datasheet of the microcontroller. Or take a
book about microcontroller programming from your favourite library.

Hope that helps,
Alexander

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Time Sync for Tiny OS 2

2007-06-11 Thread Dexma Sensors SL Sensors

Hei!

I'm working for now with Tiny OS 2 and I need a very simple Time Sync
protocol for my application. I've used a very simple broadcast protocol to
achieve that, but I'm would like to know if there's any work already done.

So, does anyone know any implented Time Sync protocol for Tinyos 2?

Thanks!

Xavi
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Problem with Java

2007-06-11 Thread Bernardo Avila Pires

  Hello
   I am currently ** off, so I'll try to be as gentle as possible, as I
humbly ask of you to help me.
Recently, I started trying to get mote to serial communication to work.
It happens that Java is not working (and let me say I hate Java because it
always causes me trouble). I tried 'make' in $TOSROOT/tools/tinyos/java/,
and this is the output:

Making all in env
make[1]: Entrando no diretório `/opt/tinyos-2.x/tools/tinyos/java/env'
gcc -I/usr/include/linux -I/usr/include -shared -fpic -m32
net_tinyos_util_Env.c -olibgetenv.so
In file included from /usr/include/_G_config.h:44,
from /usr/include/libio.h:32,
from /usr/include/stdio.h:72,
from /usr/lib/gcc/i386-redhat-linux/4.1.1/include/jni.h:48,
from net_tinyos_util_Env.h:4,
from net_tinyos_util_Env.c:3:
/usr/include/gconv.h:72: error: expected declaration specifiers or '...'
before 'size_t'
/usr/include/gconv.h:88: error: expected declaration specifiers or '...'
before 'size_t'
/usr/include/gconv.h:97: error: expected declaration specifiers or '...'
before 'size_t'
/usr/include/gconv.h:174: error: expected specifier-qualifier-list before
'size_t'
In file included from /usr/include/stdio.h:72,
from /usr/lib/gcc/i386-redhat-linux/4.1.1/include/jni.h:48,
from net_tinyos_util_Env.h:4,
from net_tinyos_util_Env.c:3:
/usr/include/libio.h:329: error: expected specifier-qualifier-list before
'size_t'
/usr/include/libio.h:361: error: expected declaration specifiers or '...'
before 'size_t'
/usr/include/libio.h:370: error: expected declaration specifiers or '...'
before 'size_t'
/usr/include/libio.h:486: error: expected '=', ',', ';', 'asm' or
'__attribute__' before '_IO_sgetn'
In file included from /usr/lib/gcc/i386-redhat-linux/4.1.1/include/jni.h:48,
from net_tinyos_util_Env.h:4,
from net_tinyos_util_Env.c:3:
/usr/include/stdio.h:308: error: expected declaration specifiers or '...'
before 'size_t'
/usr/include/stdio.h:315: error: expected declaration specifiers or '...'
before 'size_t'
/usr/include/stdio.h:357: error: expected declaration specifiers or '...'
before 'size_t'
/usr/include/stdio.h:359: error: format string argument not a string type
/usr/include/stdio.h:361: error: expected declaration specifiers or '...'
before 'size_t'
/usr/include/stdio.h:610: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'fread'
/usr/include/stdio.h:616: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'fwrite'
/usr/include/stdio.h:638: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'fread_unlocked'
/usr/include/stdio.h:640: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'fwrite_unlocked'
In file included from net_tinyos_util_Env.c:4:
/usr/include/stdlib.h:140: error: expected '=', ',', ';', 'asm' or
'__attribute__' before '__ctype_get_mb_cur_max'
In file included from /usr/include/sys/types.h:133,
from /usr/include/stdlib.h:438,
from net_tinyos_util_Env.c:4:
/usr/include/linux/time.h:10: error: expected specifier-qualifier-list
before 'time_t'
/usr/include/linux/time.h:16: error: expected specifier-qualifier-list
before 'time_t'
In file included from /usr/include/sys/select.h:46,
from /usr/include/sys/types.h:220,
from /usr/include/stdlib.h:438,
from net_tinyos_util_Env.c:4:
/usr/include/bits/time.h:70: error: redefinition of 'struct timeval'
In file included from net_tinyos_util_Env.c:4:
/usr/include/stdlib.h:455: error: expected declaration specifiers or '...'
before 'size_t'
/usr/include/stdlib.h:485: error: expected declaration specifiers or '...'
before 'size_t'
/usr/include/stdlib.h:487: error: nonnull argument with out-of-range operand
number (argument 1, operand 4)
/usr/include/stdlib.h:589: error: expected ')' before '__size'
/usr/include/stdlib.h:591: error: expected ')' before '__nmemb'
/usr/include/stdlib.h:600: error: expected declaration specifiers or '...'
before 'size_t'
In file included from /usr/include/stdlib.h:612,
from net_tinyos_util_Env.c:4:
/usr/include/alloca.h:33: error: expected ')' before '__size'
In file included from net_tinyos_util_Env.c:4:
/usr/include/stdlib.h:617: error: expected ')' before '__size'
/usr/include/stdlib.h:622: error: expected declaration specifiers or '...'
before 'size_t'
/usr/include/stdlib.h:622: error: expected declaration specifiers or '...'
before 'size_t'
/usr/include/stdlib.h:776: error: expected declaration specifiers or '...'
before 'size_t'
/usr/include/stdlib.h:776: error: expected declaration specifiers or '...'
before 'size_t'
/usr/include/stdlib.h:777: error: nonnull argument with out-of-range operand
number (argument 1, operand 5)
/usr/include/stdlib.h:781: error: expected declaration specifiers or '...'
before 'size_t'
/usr/include/stdlib.h:781: error: expected declaration 

Re: [Tinyos-help] Documentation regarding exact contents of the MAC Protocol Data Unit frame

2007-06-11 Thread Alexander Becher
Hi,

* Pedro Almeida:
I'm trying to look for documentation where I can understand the exact
contents, byte by byte, of the MPDU. I've looked into the TEPs and the
source files themselves, butI wasn't completely clear.

the contents depend on your specific platform. For example, for a CC2420
radio, you can read in its datasheet that it uses IEEE 802.15.4 packet
format, and that standard gives you the exact packet format.

Regards,
Alexander

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] tossim propagation speed

2007-06-11 Thread Romain Thouvenin

On 6/11/07, Alexander Becher [EMAIL PROTECTED] wrote:

Hi,

* Romain Thouvenin:
I would like to know if/how the propagation time of packets is
simulated in tossim, and how it generally relates to the real world. I
didn't find anything about it on the website but I may have missed it,
I'm not very familiar with the terms.

I'm relaying second hand knowledge: Tossim apparently adds a random
delay of a few simulation cycles before a receive event is processed at
the receiving node. How this delay is calculated, I don't know.

Also, for radio propagation, the delay in the real world will be small.
If sending a packet takes, say, 10 ms, and a node 200 m away receives
it, the propagation delay is approx. 200 m / (2e8 m/s) = 1 us. So medium
propagation can probably be neglected.

Hope this helps,
Alexander



Thanks for your reply.

I only use TMilli precision with my timers, so I agree that I
shouldn't see any difference between simulation and real world.

Romain
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] struct type

2007-06-11 Thread julien falco

I am trying to set a value to an uint8_t type in a structure. i wrote it the
C way:


struct Command
{
  uint8_t flag;
  uint8_t length;
};

struct Command Cmd1;

   Cmd1.flag = '0';

but at compiling it says that

ReaderControllerM.nc:52: unexpected interface reference in declaration of
`Cmd1.
flag'

What does it mean? How to give a value to a byte in tinyos in general, and
what are the types? I am actually trying to go a bit further with the struct
and do something like this below, but since i am already stucked with a
simple one...:

struct Command
{
  uint8_t flag[2];
  uint8_t length[4];
};

thanks guys.
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] struct type

2007-06-11 Thread Gideon Spreeth

Declare Cmd1 just by saying:

Command Cmd1;

julien falco wrote:




I am trying to set a value to an uint8_t type in a structure. i wrote 
it the C way:  



struct Command
{
   uint8_t flag;
   uint8_t length;  
};


struct Command Cmd1;

Cmd1.flag = '0';

but at compiling it says that

ReaderControllerM.nc:52: unexpected interface reference in declaration 
of `Cmd1.

flag'

What does it mean? How to give a value to a byte in tinyos in general, 
and what are the types? I am actually trying to go a bit further with 
the struct and do something like this below, but since i am already 
stucked with a simple one...:


struct Command
{
   uint8_t flag[2];  
   uint8_t length[4];
};


thanks guys.




___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] struct type

2007-06-11 Thread julien falco

it doesnt work (i declared struct and not typedef struct) and anyway it did
not work with typedef struct either! there must be someting else... :-(



On 6/11/07, Gideon Spreeth [EMAIL PROTECTED] wrote:


Declare Cmd1 just by saying:

Command Cmd1;

julien falco wrote:



 I am trying to set a value to an uint8_t type in a structure. i wrote
 it the C way:


 struct Command
 {
uint8_t flag;
uint8_t length;
 };

 struct Command Cmd1;

 Cmd1.flag = '0';

 but at compiling it says that

 ReaderControllerM.nc:52: unexpected interface reference in declaration
 of `Cmd1.
 flag'

 What does it mean? How to give a value to a byte in tinyos in general,
 and what are the types? I am actually trying to go a bit further with
 the struct and do something like this below, but since i am already
 stucked with a simple one...:

 struct Command
 {
uint8_t flag[2];
uint8_t length[4];
 };

 thanks guys.


 

 ___
 Tinyos-help mailing list
 Tinyos-help@Millennium.Berkeley.EDU

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


___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] struct type

2007-06-11 Thread Gideon Spreeth

I see sorry,
another way you might try is

struct
{
  uint8_t flag;
  uint8_t length;
} Command;

this definitely works for me.  All other thing i see that might be 
different..



julien falco wrote:


it doesnt work (i declared struct and not typedef struct) and anyway 
it did not work with typedef struct either! there must be someting 
else... :-(




On 6/11/07, *Gideon Spreeth* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Declare Cmd1 just by saying:

Command Cmd1;

julien falco wrote:



 I am trying to set a value to an uint8_t type in a structure. i
wrote
 it the C way:


 struct Command
 {
uint8_t flag;
uint8_t length;
 };

 struct Command Cmd1;

 Cmd1.flag = '0';

 but at compiling it says that

 ReaderControllerM.nc :52: unexpected interface reference in
declaration
 of `Cmd1.
 flag'

 What does it mean? How to give a value to a byte in tinyos in
general,
 and what are the types? I am actually trying to go a bit further
with
 the struct and do something like this below, but since i am already
 stucked with a simple one...:

 struct Command
 {
uint8_t flag[2];
uint8_t length[4];
 };

 thanks guys.





 ___
 Tinyos-help mailing list
 Tinyos-help@Millennium.Berkeley.EDU
mailto:Tinyos-help@Millennium.Berkeley.EDU

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




___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] struct type

2007-06-11 Thread julien falco

ok thanks,
that's better. but i still have to problem of  initializing i have tried
with:

typedef struct Command
{
  uint8_t flag;
}Command;

Command Cmd;


Cmd = '0'; =0x00; ={0}; =0 and so on
Cmd.flag =''0' same as above and so on...
but nothing work, i always get an error of type

ReaderControllerM.nc :52: warning: type defaults to `int' in declaration of
`Cmd1'
ReaderControllerM.nc:52: conflicting types for `Cmd1'
ReaderControllerM.nc:50: previous declaration of `Cmd1'

Is there any rule that I am missing?? (declaring typedef outside module
etc?)
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Detect if mote is connected to serial port - micaz

2007-06-11 Thread Hugo Sousa

Hi all,

Can anyone tell me how do I check if a micaz mote is connected to the
serial port? The solutions i've found here in the list are about other
motes, not micaz. I've search similar named files (uart*, serial*) but
can't find what I need. Any help is appreciated

Thanks in advance
Hugo
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


AW: [Tinyos-help] struct type

2007-06-11 Thread Ole Bischoff
Hi Julien,

 

try:

typedef struct MyCommand {

   uint8_t flag;

   uint8_t length;   

} MyCommand;

 

MyCommand Cmd1;

 

And set the value (Cmd1.flag = 0;) in an executable environment (e.g.:
function, event, command), because otherwise the complier thinks that Cmd1
is a interface with the command flag. 

I think you don't have to use '0' for the assignment, just 0 or FALSE
without the apostrophe.

Don't use command as an identifier, because it is already a nesC keyword.

 

Also take a look at http://nescc.sourceforge.net/papers/nesc-ref.pdf
(Language Reference Manual from Phil Levis)

 

Regards,

OLE

 

  _  

Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von julien
falco
Gesendet: Montag, 11. Juni 2007 14:56
An: tinyos-help@Millennium.Berkeley.EDU
Betreff: [Tinyos-help] struct type

 

 



I am trying to set a value to an uint8_t type in a structure. i wrote it the
C way:   


struct Command
{
   uint8_t flag;
   uint8_t length;   
};

struct Command Cmd1;

Cmd1.flag = '0';

but at compiling it says that 

ReaderControllerM.nc:52: unexpected interface reference in declaration of
`Cmd1.
flag'

What does it mean? How to give a value to a byte in tinyos in general, and
what are the types? I am actually trying to go a bit further with the struct
and do something like this below, but since i am already stucked with a
simple one...: 

struct Command
{
   uint8_t flag[2];   
   uint8_t length[4]; 
};

thanks guys.



___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] struct type

2007-06-11 Thread julien falco

Thank you guys. Solved it. I wasn't trying to do it in an 'executable
environment' and thus the problem mentioned by Ole appeared.

Cheers,

Julien



On 6/11/07, Ole Bischoff [EMAIL PROTECTED] wrote:


 Hi Julien,



try:

typedef struct MyCommand {

   uint8_t flag;

   uint8_t length;

} MyCommand;



MyCommand Cmd1;



And set the value (Cmd1.flag = 0;) in an executable environment (e.g.:
function, event, command), because otherwise the complier thinks that Cmd1
is a interface with the command flag.

I think you don't have to use '0' for the assignment, just 0 or FALSE
without the apostrophe.

Don't use command as an identifier, because it is already a nesC
keyword.



Also take a look at http://nescc.sourceforge.net/papers/nesc-ref.pdf(Language 
Reference Manual from Phil Levis)



Regards,

OLE


 --

*Von:* [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] *Im Auftrag von *julien falco
*Gesendet:* Montag, 11. Juni 2007 14:56
*An:* tinyos-help@Millennium.Berkeley.EDU
*Betreff:* [Tinyos-help] struct type







I am trying to set a value to an uint8_t type in a structure. i wrote it
the C way:


struct Command
{
   uint8_t flag;
   uint8_t length;
};

struct Command Cmd1;

Cmd1.flag = '0';

but at compiling it says that

ReaderControllerM.nc:52: unexpected interface reference in declaration of
`Cmd1.
flag'

What does it mean? How to give a value to a byte in tinyos in general, and
what are the types? I am actually trying to go a bit further with the struct
and do something like this below, but since i am already stucked with a
simple one...:

struct Command
{
   uint8_t flag[2];
   uint8_t length[4];
};

thanks guys.


___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Mica2 ADC.getData and ADC.dataReady problems

2007-06-11 Thread Henry Chang

Hello Philip Levis,


Good morning !

I have saw you done the watchdog mechanism in MICA2 on the web. May I ask
two implementation questions in this field?
1. Where we can implement your code in MICA2 ? Can we put the code inside
the Surge_Reliable app. which provided in TinyOS.
2. Can we send these watchdog result information over the network? (to the
sink)

Many Thanks,

Henry
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Output Data by Telos Mote?

2007-06-11 Thread Steve McKown
Hi,

On Friday 08 June 2007 10:40, Eukrit Kraikosol wrote:
 Hi I'm a newbie here trying to do a project about Telos Mote and TinyOS.

 I've an idea about my project that I would like to ask you if it is
 possible or not.
 The idea is I want to use telos mote equipped with some kind of wired web
 camera via USB port
 And another mote at desktop PC. By doing this I can make the web-cam to be
 wireless by the mote wireless network.

 So my question is, is it possible to use the first mote to control the
 camera?
 Or may be the clearer question is, is it possible to use USB port to
 transmit data out to the a device apart from using the data collection with
 PC?

Let me rephrase what you are asking to be sure I am clear.  You have a USB 
webcam you wish to attach to one mote.  A second mote attaches to a PC.  The 
two motes communicate wirelessly.  This configuration allows for control of 
the camera.

There are several challenges, as I see them.  First, the USB connector on 
Telos compatible motes uses an FTDI chip, which AFAIK can only operate in USB 
device mode.  Webcams also operate in USB device mode.  Hence, the two won't 
be able to communicate without some hardware modifications.

If control of the radio implies streaming picture data, you have some 
bandwidth challenges.  Webcam picture data is pretty significant in 
comparison to the telosb's performance.  Even if the intent is to process 
picture data down into something more manageable in size, the telosb 
performance is going to be a limiting factor.  CMU created the CMUCam2, a 
camera board for robotic applications that includes an on-board processor and 
uses a serial interface.  A camera such as this might be easier to work with.  
Acroname.com sells a couple of implementations.

A final word of caution is energy consumption.  Whether you attempt to stream 
picture data, or process picture data and send smaller data sets to the PC, 
the camera-capable mote is going to be using a lot more energy than in a 
typical mote application.  This is the easiest problem to solve assuming you 
can use line power or a much larger battery pack to power the thing.

Hope this helps,
Steve
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] [tinyos-1.x] No replies!!

2007-06-11 Thread Steve McKown
On Friday 08 June 2007 23:38, vipin kashyap wrote:
 Though I have personally not tried switching over to tinyos-2.x, i have
 nevertheless seen quite a few people struggling to do so around me. I must
 say that the transition is far from smooth. People have had trouble
 compiling their first apps like Blink on tinyos-2.x platform and that's
 what's kept me from making the switch.

Yes, TinyOS is quite a bit harder to install than a standard Windows 
application.  Not following the instructions exactly can lead to problems, 
and in the past the documentation has left out certain details that AFAIK 
have all been corrected.  We've had a number of people on staff go through 
this process and reach a working system.

We initially evaluated tos1 and tos2 over a year ago and chose tos2 even 
though it was still in beta because of the subtle improvements in nesC that 
yielded significant programming benefits in the TinyOS core code.

My personal opinion is that the only reason to stick with tos1 is that you 
have some pre-existing applications developed in it.  I think those still 
working through an initial learning curve with TinyOS would benefit greatly 
from biting the bullet and going to tos2.  All of our boards use an msp430 
right now, so my opinion mightn't apply as well to avr-based designs.

Steve
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] [tinyOS_1.X]Audio_playback_MTS310_Microphone

2007-06-11 Thread Michael Schippling

You can use the java.media classes to write a standard audio format file,
I say glibly, not having done it myself...

I have also noticed that Adobe Audition has an option for reading in a
text file, which I assume would be a list of samples. Other audio edit
programs may have such features as well.

MS

antonio gonga wrote:

Hey all,

I'm using micaZ motes and sampling the MTS310 sensorboard microphone.. I 
need some aplication that can help me to play back the audio..
and I also want to know if its possible to change the audio format from 
microphone.. someone told that the audio from microphone is PCM_10bits 
length, I drop the last two bits to get 8 bits length.


antonio




Hotmail to go? Get your Hotmail, news, sports and much more! Check out 
the New MSN Mobile http://mobile.msn.com





___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] struct type

2007-06-11 Thread Michael Schippling

Well, that works for me...as long as I'm careful where I put the typedef.
In a header file or inside the implementation{} block works.

Try reducing the problem to the minimum amount of code, perhaps there
is something else interfering with the definition or declaration.
Maybe a name overlap? Try different names?

MS

julien falco wrote:

ok thanks,
that's better. but i still have to problem of  initializing i have tried 
with:


 typedef struct Command
{
   uint8_t flag;   
}Command;


Command Cmd;


Cmd = '0'; =0x00; ={0}; =0 and so on
Cmd.flag =''0' same as above and so on...
 but nothing work, i always get an error of type

ReaderControllerM.nc :52: warning: type defaults to `int' in declaration 
of `Cmd1'

ReaderControllerM.nc:52: conflicting types for `Cmd1'
ReaderControllerM.nc:50: previous declaration of `Cmd1'

Is there any rule that I am missing?? (declaring typedef outside module 
etc?)





___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: AW: [Tinyos-help] struct type

2007-06-11 Thread Philip Levis

On Jun 11, 2007, at 7:23 AM, Ole Bischoff wrote:



Also take a look at http://nescc.sourceforge.net/papers/nesc- 
ref.pdf (Language Reference Manual from Phil Levis)




David Gay wrote the language reference manual.

Phil
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] How to restart a TOSSIM simulation TinyOS 2.x

2007-06-11 Thread Philip Levis

On Jun 11, 2007, at 1:49 AM, Marek Jawurek wrote:


Hi,

recently I ran into problems with TOSSIM of TinyOS version 1.x  
which did

not reset completely. Motes did not communicate after the reset
properly. Because of that and because of the fact that most
documentation and development are done for TinyOS 2.x I changed my
application to TinyOS 2.x and tried TOSSIM there.

Someone should change Tutorial 11 and emphasize that without calling
createNoiseModel on every Node there won't be any communication. It  
was

rather frustrating for me to search through my code and compare it to
sample code until I found the solution in the Mailinglist. Intuitively
it should just work when I connect 2 nodes via Radio.add().

But here is my current problems. I want to run several simulations and
the following issues arise:

1. My simulation goes on forever, every call to runNextEvent returns 1
but my motes only react on radio communication which is initiated by
node 1 once and then just rebroadcast. Every time I rebroadcast a
message I also print dbg output. No debug output is created after a
while but runNextEvent still returns new events.


Does your application have any timers in it? As long as your  
application is doing anything, TOSSIM will simulate it... Among other  
things, having timers means that there's a 32kHz clock running, for  
the interface LocalTime.




2. I would like to restart a simulation in Python. That means  
resetting
everything unique to the last run and to start another run with  
TOSSIM.

How can I do that ? Using the constructor Tossim([]) apparently a
singleton is passed because the time in the new Tossim object is the
same as before. Deleting the module TOSSIM with 'del TOSSIM' and
re-importing it doesn't work either.



Hm. The current TOSSIM implementation doesn't support doing this.  
While you can turn motes on and off to reset their internal state,  
other pieces of state will remain, such as the radio topology. You  
could fork within Python to get separate instances...


Phil


___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Can anyone tell me the concept of AMType

2007-06-11 Thread Steve McKown
On Sunday 10 June 2007 14:20, Murtuza wrote:
 I am working on tinyos-2.x and i have a very simple question to ask. Though
 I read the TEPs etc I still cant figure out what AMType means. The
 tutorials too dont tell what it is. Can anyone tell me what it is?

Others have used the analogy that the AM type field is analogous to the port 
field in the TCP and UDP IP protocols.  Pretty good, I think.

 I want to write a code in which a receiving mote receives data from
 different other motes running different codes on them and sending out data
 packets which are not identical i.e different messages being sent.

You can assign different AM type values to different application-level 
messages.  I think this is what you are attempting below.

 How can I have multiple receive events at the receiver mote. I saw the
 BaseStation code and it implements a queue of receive events. But how can I
 distinguish between various received messages without looking at the
 payload or their IDs. Can I give a separate AMType to different messages
 coming out from different motes using AMPacket.setType(). I used this
 function to set the type to one of the motes but it did not work. It still
 sends packets with type 06. The motes which I use always send out messages
 with type 06. Why is it so?

You might want to use the AMSend and Receive interfaces.  I'm pretty sure 
there's a tutorial that covers this.  You'd have wiring similar to:

configuration MyComponentC {
  provides {
interface AMSend as Msg1Send;
interface Receive as Msg1Recv;
interface AMSend as Msg2Send;
interface Receive as Msg2Recv;
  }
}
implementation {
  enum {
APP_MSG1 = 1,
APP_MSG2 = 2
  };

  components new AMSenderC(APP_MSG1) as Send1;
  Msg1Send = Send1;

  components new AMSenderC(APP_MSG2) as Send2;
  Msg2Send = Send2;

  components new AMReceiver(APP_MSG1) as Recv1;
  Msg1Recv = Recv1;

  components new AMReceiver(APP_MSG2) as Recv2;
  Msg2Recv = Recv2;
}

A module could then use Msg1Send.send() to send a message with its type set to 
APP_MSG1, and Msg2Send.send() for type set to APP_MSG2.  Similarly, messages 
received with type set to APP_MSG1 would be received via the 
Msg1Recv.receive() event and APP_MSG2 messages received via 
Msg2Recv.receive().

All the best,
Steve
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Documentation regarding exact contents of the MAC Protocol Data Unit frame

2007-06-11 Thread Pedro Almeida

Hello, Alexander;

I'm using a micaz, so it is CC2420 indeed.
I've looked into the Zigbee specification, 802.15.4 frame formats and
understood (I believe, even if lightly) the frame formats.
But I am not sure of what the 32 bytes I receive are, exactly. Is it the
complete PPDU? There is a group (Address Information) that is from 0 to 20
bytes, and I dont know if they're there and if yes, how many. Neither do I
know for sure if I am actually receiving, within those 32 bytes, the SHR and
PHR of the PPDU or if I only get the MPDU. That is the difference between
understanding if the 32 bytes are caused by the inclusion of the SHR and PHR
in the frames i'm reading from the serial port or if I'm only getting 32
bytes because of the 20 bytes from the Address Information in the MPDU.
Sounds confusing because i'm confused too!

Thank you for your reply, Alexander;

Sincerely,
Pedro


On 6/11/07, Alexander Becher [EMAIL PROTECTED] wrote:


Hi,

* Pedro Almeida:
I'm trying to look for documentation where I can understand the exact
contents, byte by byte, of the MPDU. I've looked into the TEPs and the
source files themselves, butI wasn't completely clear.

the contents depend on your specific platform. For example, for a CC2420
radio, you can read in its datasheet that it uses IEEE 802.15.4 packet
format, and that standard gives you the exact packet format.

Regards,
Alexander

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Msp430CounterMicroC error (TinyOS 2.x / cygwin)

2007-06-11 Thread Mehedi Bakht

Hi,

I am working with tmotes and using TinyOS2.x on cygwin.

I want to get current time in microseconds. My code for that is as follows
(in the file LoggerC.nc):

Line 15: components new CounterToLocalTimeC(TMicro);
Line 17: components Msp430CounterMicroC;
Line 31: CounterToLocalTimeC.Counter - Msp430CounterMicroC;

When I do make tmote, I get the following error:

In component 'LoggerC':
LoggerC.nc:31: no match

Can any please help me to get rid of this error?

Thanks,

--Mehedi
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] MEP-SYS / MoteView 1.2 Problems

2007-06-11 Thread ognjen popovic

Hello Giri,

you helped me before by letting me know that MEP-SYS components are
preprogrammed with low power version of Xmesh, which I didn't know.

My MEP-SYS is acting very strangely. Like you told me before, i tried to
power-cycle the motes, but they kept that strange timing when sending data (
everything disrupted when i tried to change the Data Rate for All motes ).
I couldn't make them return to original state. I tried to turn them ON, and
OFF, but nothing changed.
If you are interested to look at database here is the link to exported
file:http://spreadsheets.google.com/pub?key=pwdlNhtbqezJtBaw98a8cdQ

I left them turned OFF  for 3-4 days, and now, when I turn them on again and
start the moteview, nothing happens, just the xserve command prompt window
opens, but no data is received.
The MoteView is running for 3-4 hours but no data is received.
do you have any idea how can I fix this problem?
Also one of the things that's confusing me is that the base station readings
are so strange, acctually I'm not sure, should it be any readings from the
base station itself?


Is there any way to return the motes in original state?


Regards,

Ognjen
http://spreadsheets.google.com/pub?key=pwdlNhtbqezJtBaw98a8cdQ


On 6/5/07, Giri Baleri [EMAIL PROTECTED] wrote:


 Hello Ogenjen,

Your settings seem correct. Make sure you are using
\MoteView\xmesh\mica2\XMeshBase_433_lp.exe app from MoteView 1.2.B that is
contained on the CD. The settings are
 Node ID = 0
GroupID = 125
Radio Band = 433 MHz
Channel Number = CHANNEL_00

When I said power cycle, I meant tuning the nodes OFF and ON.

If you want to change something in the Mote firmware, you should first
make changes in the nesC/TinyOS code, recompile it and then reprogram the
nodes.

I hope that helps,
Giri



 --
*From:* ognjen popovic [mailto:[EMAIL PROTECTED]
*Sent:* Tuesday, June 05, 2007 11:03 AM
*To:* Giri Baleri
*Subject:* Re: [Tinyos-help] MEP-SYS / MoteView 1.2 Problems


 Hello Giri,
Settings I used for the Base Station are: Node ID=0, Group ID = 125 (0xfd)
, RF band= 433 MHz, RF Channel = CHANNEL_00 ) I asked the xbow support about
the RF channel.

I read somewhere about LowPower mode cann't be used for reprogramming the
motes, but I wasn't sure.

I'm not really sure what does it mean power-cycle? If you could explain it
little more?
I tried to turn off all motes, and turn them on again, but nothing
changed.
It's not really most clear to me how could I change something with motes,
if they don't support the commands?

Thank you,

Ognjen Popovic






On 6/5/07, Giri Baleri [EMAIL PROTECTED] wrote:

  Hello Ognjen,

 The MEP nodes in the MEP-SYS are programmed with XMesh 1.2 firmware and
 the low power version of the app doesn't support the commands (eg. change
 data rates). You can power-cycle the MEP nodes to get them back to original
 configuration ( i.e. data once every 3 minutes).

 For your base station, what node ID, group ID, RF band and RF channel
 did you use?

 The MEP410s and MEP510s operate in low power mode and can not be
 reprogrammed over the air (especially since they run XMesh 1.2).

 Regards,
 Giri Baleri
 Crossbow Technology, Inc

  --
 *From:* [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED] *On Behalf Of *ognjen
 popovic
 *Sent:* Tuesday, June 05, 2007 9:39 AM
 *To:* tinyos-help@Millennium.Berkeley.EDU
 *Subject:* [Tinyos-help] MEP-SYS / MoteView 1.2 Problems


  Hello,
 I work on the MEP-SYS enviromental system from crossbow. With the
 enviromental system came the MoteView 1.2.
 I tried to change Data Rate of motes.
 Beofre that , motes periodically sent their data exactly every 3
 minutes. But when I tried to change the Data Rate to 6 minutes, they lost
 their synchronisation , and now some motes are sending data 10 times per
 minute, and some almost never.

 I tried to reprogramm the Base Station (MBR 410) (with XMesh_Base_lp),
 but after some time, led 1 and 2 turned on, and led 3 blinks every 30
 seconds.
 Does anyone have some experience with these devices, and is there a way
 I could return the system into the original state?

 I'm not sure how te reprogramm the motes ( MEP 410 and  MEP 510) over
 the air, and any instructions would be more then useful.

 Regards,

 Ognjen Popovic



___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Re: Msp430CounterMicroC error (TinyOS 2.x / cygwin)

2007-06-11 Thread Mehedi Bakht

Sorry for asking help before investigating deeper myself. It was a minor
issue of two counters having different size_types. Using TransformCounterC
has solved the problem.

Thanks,
-Mehedi

On 6/11/07, Mehedi Bakht [EMAIL PROTECTED] wrote:


Hi,

I am working with tmotes and using TinyOS2.x on cygwin.

I want to get current time in microseconds. My code for that is as follows
(in the file LoggerC.nc):

Line 15: components new CounterToLocalTimeC(TMicro);
Line 17: components Msp430CounterMicroC;
Line 31: CounterToLocalTimeC.Counter - Msp430CounterMicroC;

When I do make tmote, I get the following error:

In component 'LoggerC':
LoggerC.nc:31: no match

Can any please help me to get rid of this error?

Thanks,

--Mehedi

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Dollar symbol in identifiers

2007-06-11 Thread sescolar
Hello all,

i'm trying to invoke one function from a C file which has been generated
with the option -fnesc-cfile of the nesc compiler.  Each one of the
functions prototypes in this C file uses the dollar symbol in order to
separate the component names and the final function invoked, for example,
PhotoTempM$InternalTempADC$getData().

I have automatically generated a header file for the C file and included
into my application.  However, when I compile my application for the 'pc'
platform I get the next error:

[EMAIL PROTECTED] make pc

mkdir -p build/pc
compiling Ejemplo to a pc binary
ncc -o build/pc/main.exe -g -O0 -pthread -fnesc-nido-tosnodes=1000
-fnesc-simulate -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all
-target=pc -fnesc-cfile=build/pc/app.c -board=micasb
-DIDENT_USER_ID=\root\ -DIDENT_HOSTNAME=\comodin\
-DIDENT_USER_HASH=0x28ea6fa8L -DIDENT_UNIX_TIME=0x466e0205L
-DIDENT_UID_HASH=0x107262b2L -I../../include
-I/opt/tinyos-1.x/tos/platform/avrmote/ 
-I/opt/tinyos-1.x/usr/local/avr/include/avr Ejemplo.nc -lm
../../lib/libdrv.a
gcc-_fnesc-gcc=gcc-specs=/usr/local/lib/ncc/tdspecs-_fnesc-include=nesc_nx-I/usr/local/lib/ncc-DPLATFORM_PC-DBOARD_MICASB-_fnesc-include=tos-obuild/pc/main.exe-g-O0-pthread-_fnesc-nido-tosnodes=1000-_fnesc-simulate-Wall-Wshadow-DDEF_TOS_AM_GROUP=0x7d-_Wnesc-all-_fnesc-cfile=build/pc/app.c-DIDENT_USER_ID=root-DIDENT_HOSTNAME=comodin-DIDENT_USER_HASH=0x28ea6fa8L-DIDENT_UNIX_TIME=0x466e0205L-DIDENT_UID_HASH=0x107262b2LEjemplo.nc-lm../../lib/libdrv.a-_fnesc-target=pc-_fnesc-simulate-I../../include-I/opt/tinyos-1.x/tos/platform/avrmote/-I/opt/tinyos-1.x/usr/local/avr/include/avr-I/opt/tinyos-1.x/tos/sensorboards/micasb-I/opt/tinyos-1.x/tos/platform/pc-I/opt/tinyos-1.x/tos/interfaces-I/opt/tinyos-1.x/tos/types-I/opt/tinyos-1.x/tos/system-DNESC=127-fdollars-in-identifiersnesC
does not support $ in identifiersIn file included from EjemploM.nc:13,
../../lib/libdrv.a(drv_sensor.o)(.text+0x347): In function
`read_sensor_temperature':
: undefined reference to `PhotoTempM$InternalTempADC$getData'
collect2: ld returned 1 exit status
make: *** [exe0] Error 1

I have read that the nesc compiler does not support dollar in identifiers,
could be that the problem? The 'PhotoTempM$InternalTempADC$getData' symbol
exists in the object file and therefore, I do not understand which is the
problem, can someone help me?

Other question, knows someone how this C file is generated from a nc file?
Why the '$' symbol is used to separate the component names?

Thank you very much and regards,
Soledad Escolar.

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Problem with Surge en MIB600

2007-06-11 Thread projet19 projet19


Hi,


We have a problem testing Surge Application.


First we program every motes :



   
   - The mote 0 with TOSBASE Programm

   
   - Mote 1 with Surge App

   
   - Mote 2 with Surge App



with the followings commands lines:



   
  make micaz install.0 eprb,MIB600_IP_ADRESS

   
  make micaz install.1 eprb,MIB600_IP_ADRESS

   
  make micaz install.1 eprb,MIB600_IP_ADRESS


These commands lines result successfully.


Second, we do the command: 


 


export
[EMAIL PROTECTED]


 


Third, we start SerialForwarder with : 


 


java net.tinyos.sf.SerialForwarder -comm 
network@MIB600_IP_ADRESS:10002


So the SerialForwarder GUI appears, and we can see the packet read rising...


Finally, when we when to launch Surge GUI, with the command: 



java
net.tinyos.surge MainClass 125



but we have a NullPointerException on the line:


mote = new MoteIF(PrintStreamMessenger.err, 
group_id);



So how it doesn't work ?


Thank you very much,


Regards,




Tony GOMES and Ahmed DEHBI











   

Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, 
photos  more. 
http://mobile.yahoo.com/go?refer=1GNXIC___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Documentation regarding exact contents of the MAC Protocol Data Unit frame

2007-06-11 Thread Steve McKown
On Friday 08 June 2007 13:21, Pedro Almeida wrote:
 Hello;

 I'm trying to look for documentation where I can understand the exact
 contents, byte by byte, of the MPDU. I've looked into the TEPs and the
 source files themselves, butI wasn't completely clear.

 I'm using now the TestNetwork demo, where I receive 32 bytes per message,
 of which I know little about, except for the contents of the message_t
 itself:

 typedef nx_struct TestNetworkMsg {
 nx_am_addr_t source;
 nx_uint16_t seqno;
 nx_am_addr_t parent;
 nx_uint16_t metric;
 nx_uint16_t data;
 nx_uint8_t hopcount;
 nx_uint16_t sendCount;
 nx_uint16_t sendSuccessCount;
 } TestNetworkMsg;

 That are not, by far, 32 bytes.
 So far I understood the MPDU is made of

 2 bytes - Frame Control
 1 byte - Data Sequence Number
 4 to 20 bytes - Address Information
 n bytes - Data Payload
 2 bytes - Frame Check Sequence

 which adds 5 bytes of the SHR and 1 byte of the PHR. So what exactly are
 those 32 bytes??? Which ones are the payload (MSDU) and which ones are not
 (and what are they?)?

 An example of the 32 bytes is as follows:

 7E 45 00 FF FF 00 00 13 00 EE 00 01 00 00 00 07 80 EE 00 07 00 80 00 00 00
 00 20 00 00 53 63 7E

The data above looks like an active message (AM) delivered via a serial 
physical layer.  The hint are the 0x7E bytes, which are sync bytes.  If this 
output came from the PC, then you should be able to map it to the 
serial_packet_t in $TOSDIR/lib/serial/Serial.h.  The payload are delivered 
within the frame appropriate for the link on which the data is sent.  Hence, 
one sees the serial headers and not the radio headers.

I haven't played with Collection or the TestNetwork app, so I can't help out 
there.  But I can provide some info on how the CC2420 component populates the 
802.15.4 compatible frame.  You can see the mapping in the cc2420_header_t 
structure in $TOSDIR/chips/cc2420/CC2420.h.  The physical radio frame looks 
like this:

preamble + sfd + cc2420_header_t + app_data + FCS (crc)

In terms of 802.15.4, the second field of cc2420_header_t, fcf, is the first 
field of the MAC header.  The last field of cc2420_header_t, type, is 
actually part of the MAC payload.  The current radio stack has the cc2420 
generate the FCS (crc) automatically.

In terms of addressing, short addresses with the 802.15.4 PAN ID Compression 
is set, so the address info consists of pan_id + dest_addr + source_addr.  
You can see these fields in the cc2420_header_t structure.  The fcf is set in 
CC2420CsmaP.nc's Send.send() implementation, where length, dsn and source are 
also set (destination has already been set in the header by this time).

All the best,
Steve


 Help!

 Thank you!!!

 Pedro


 !DSPAM:4669af84166828120612385!
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


RE: [Tinyos-help] CC1000 Channels

2007-06-11 Thread Benjamin Madore
I have altered TOS_Base to change frequencies.

When I have it change frequencies, it never resumes forwarding.

I added:

PFLAGS += -I/opt/tinyos-1.x/tos/contrib/rincon/tos/platform/mica2

to my makefile, but I haven't been able to confirm it's actually using the
rincon stack.I'm not sure I'm getting the contrib. files to include
properly. I tried altering several to generate errors, and nothing changed.

The app is in /workspace/Base (I use the Eclipse plugin)

I used the LEDs to debug, and the change frequency call is returning correctly.

I'm calling

call CC1000Control.TunePreset(action);

where action is the preset number sent over the UART from the packet.

Should I be turning on and off the radio?

What I'd really appreciate is a pointer to someone else who has done
something similar with Mica2 motes, and has it working.

(TinyOS 1.x, Cygwin, Mica2 motes, 433Mhz)

-Ben

On Wed, May 2, 2007 3:13 pm, David Moss said:
 The preset table is actually in the CC1000Const.h file.  You'll see it's an
 array of register values starting with:

 static const prog_uchar CC1K_Params[6][31] = {
  
 };

 There are two functions you can call in your application in TinyOS 1.x to
 adjust the frequency through the CC1000Control interface:

   command result_t TunePreset(uint8_t freq);

   command uint32_t TuneManual(uint32_t DesiredFreq);

 The difference between TunePreset and TuneManual is that TuneManual actually
 calculates what the CC1000 register values should be, and the TunePreset
 contains pre-calculated values.

 The problem is the default CC1000 stack is broken when it comes to changing
 frequencies at runtime.  So if you plan on doing runtime frequency changes,
 you should really be using Rincon's CC1000 stack (stable but unsupported) in
 tinyos-1.x/contribs/rincon/tos/lib/CC1000Radio

 -David

-- 
The difference between the right word and the almost right word is really a
large matter- it's the difference between a lightning bug and the lightning.
-Twain

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


RE: [Tinyos-help] CC1000 Channels

2007-06-11 Thread David Moss
The problem you describe sounds like it's not pulling in the right files
during compile time.  In your Makefile, try using CFLAGS instead of PFLAGS.

CFLAGS += -I/opt/tinyos-1.x/tos/contrib/rincon/tos/platform/mica2 
(or whatever directory you're using)

If the compiler can't find that and your other files are missing, then the
compiler will generate an error and at least you'll know.

You shouldn't need to restart the radio after changing its frequency once
everything is pulled in correctly.

Also, be sure to verify the CC1000Const.h is using 433 MHz - I'm using 900
MHz, so I know what I uploaded to contribs won't be automatically compatible
with your hardware.

-David




-Original Message-
From: Benjamin Madore [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 11, 2007 4:14 PM
To: David Moss
Cc: tinyos-help@millennium.berkeley.edu
Subject: RE: [Tinyos-help] CC1000 Channels

I have altered TOS_Base to change frequencies.

When I have it change frequencies, it never resumes forwarding.

I added:

PFLAGS += -I/opt/tinyos-1.x/tos/contrib/rincon/tos/platform/mica2

to my makefile, but I haven't been able to confirm it's actually using the
rincon stack.I'm not sure I'm getting the contrib. files to include
properly. I tried altering several to generate errors, and nothing changed.

The app is in /workspace/Base (I use the Eclipse plugin)

I used the LEDs to debug, and the change frequency call is returning
correctly.

I'm calling

call CC1000Control.TunePreset(action);

where action is the preset number sent over the UART from the packet.

Should I be turning on and off the radio?

What I'd really appreciate is a pointer to someone else who has done
something similar with Mica2 motes, and has it working.

(TinyOS 1.x, Cygwin, Mica2 motes, 433Mhz)

-Ben

On Wed, May 2, 2007 3:13 pm, David Moss said:
 The preset table is actually in the CC1000Const.h file.  You'll see it's
an
 array of register values starting with:

 static const prog_uchar CC1K_Params[6][31] = {
  
 };

 There are two functions you can call in your application in TinyOS 1.x to
 adjust the frequency through the CC1000Control interface:

   command result_t TunePreset(uint8_t freq);

   command uint32_t TuneManual(uint32_t DesiredFreq);

 The difference between TunePreset and TuneManual is that TuneManual
actually
 calculates what the CC1000 register values should be, and the TunePreset
 contains pre-calculated values.

 The problem is the default CC1000 stack is broken when it comes to
changing
 frequencies at runtime.  So if you plan on doing runtime frequency
changes,
 you should really be using Rincon's CC1000 stack (stable but unsupported)
in
 tinyos-1.x/contribs/rincon/tos/lib/CC1000Radio

 -David

-- 
The difference between the right word and the almost right word is really a
large matter- it's the difference between a lightning bug and the lightning.
-Twain


___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] where is the function came from?

2007-06-11 Thread abdullah borhanuddin

hi..

i have a question.

where can i find init(), start(), and stop() function in StdControl.nc?

TQ
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help