[Tinyos-help] Help with TestNetwork Application

2007-06-06 Thread Murtuza

Hello friends

I have a doubt in TestNetwork Application in tinyos-2.x/apps/tests/TestNetwork
directory. I feel it is a real stupid question to ask but I cant figure out
whats happening in real.

In the file TestNetworkC.nc we have
void sendMessage() {
   TestNetworkMsg* msg = (TestNetworkMsg*)call Send.getPayload(&packet);
   uint16_t metric;
   am_addr_t parent;...

The "call Send.getPayload(&packet) " returns a pointer to the payload region
on the message packet. Isn't it so ? This is pointed out by the pointer
"msg". Now if this is so, where is "packet" being initialized in the first
place. What data or message is being stored in packet and where. There is
declaration of packet as message_t and then its used in the above call. I am
totally confused about how this works. Either I am thinking too far or
completely lost. I wish somebody helps me out soon as I need to work on a
project and I cant work unless I understand this.

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

RE: [Tinyos-help] Compiling Blink for micaz

2007-06-06 Thread M.Soledad Escolar Díaz
Thanks for your reply. I solved this error but I can't compile Blink still
(make pc is ok). 
When I do 'make mica' I get the next error messages:

[EMAIL PROTECTED] Blink]# make mica
compiling Blink to a mica binary
ncc -o build/mica/main.exe -Os -board=micasb -target=mica  -Wall -Wshadow
-DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -finline-limit=10
-fnesc-cfile=build/mica/app.c  Blink.nc -lm 
In file included from /opt/tinyos-1.x/tos/platform/mica/hardware.h:49,
 from /opt/tinyos-1.x/tos/system/tos.h:132:
/opt/tinyos-1.x/tos/platform/avrmote/avrhardware.h: In function
`TOSH_sleep':
/opt/tinyos-1.x/tos/platform/avrmote/avrhardware.h:144: warning: implicit
declaration of function `sbi'
/opt/tinyos-1.x/tos/platform/avrmote/avrhardware.h: In function
`__nesc_atomic_start':
/opt/tinyos-1.x/tos/platform/avrmote/avrhardware.h:155: warning: implicit
declaration of function `inp'
/opt/tinyos-1.x/tos/platform/avrmote/avrhardware.h: In function
`__nesc_atomic_end':
/opt/tinyos-1.x/tos/platform/avrmote/avrhardware.h:162: warning: implicit
declaration of function `outp'
In file included from /opt/tinyos-1.x/tos/system/tos.h:132:
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_SET_RED_LED_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:57: warning: implicit
declaration of function `sbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_CLR_RED_LED_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:57: warning: implicit
declaration of function `cbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_READ_RED_LED_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:57: warning: implicit
declaration of function `inp'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_MAKE_RED_LED_OUTPUT':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:57: warning: implicit
declaration of function `sbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_MAKE_RED_LED_INPUT':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:57: warning: implicit
declaration of function `cbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_SET_YELLOW_LED_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:58: warning: implicit
declaration of function `sbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_CLR_YELLOW_LED_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:58: warning: implicit
declaration of function `cbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_READ_YELLOW_LED_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:58: warning: implicit
declaration of function `inp'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_MAKE_YELLOW_LED_OUTPUT':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:58: warning: implicit
declaration of function `sbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_MAKE_YELLOW_LED_INPUT':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:58: warning: implicit
declaration of function `cbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_SET_GREEN_LED_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:59: warning: implicit
declaration of function `sbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_CLR_GREEN_LED_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:59: warning: implicit
declaration of function `cbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_READ_GREEN_LED_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:59: warning: implicit
declaration of function `inp'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_MAKE_GREEN_LED_OUTPUT':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:59: warning: implicit
declaration of function `sbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_MAKE_GREEN_LED_INPUT':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:59: warning: implicit
declaration of function `cbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function `TOSH_SET_UD_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:61: warning: implicit
declaration of function `sbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function `TOSH_CLR_UD_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:61: warning: implicit
declaration of function `cbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_READ_UD_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:61: warning: implicit
declaration of function `inp'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_MAKE_UD_OUTPUT':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:61: warning: implicit
declaration of function `sbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_MAKE_UD_INPUT':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:61: warning: implicit
declaration of function `cbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_SET_INC_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:62: warning: implicit
declaration of function `sbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOS

[Tinyos-help] (lesson 3 : mote mote radio communication]

2007-06-06 Thread vazoumana fofana

Hello,

i want to know something about lesson 3 Sending and receiving a message. I 
don'tr understand exactly the goal of this application.
i succeeded in compiling and running this application. But when i paused a 
mote, the second mote doesn t act like they said in the tutorial. So i m 
asking some questions. The code contains some commands to send and receive 
message. do i code separately this fonctions or together. ? If i do 
together, it  means that a mote in incrementing its counter , can send and 
receive message ? Is there a mote wich the goal is to receive and the second 
to send ?


Any help can be useful

Thanks.

_
Windows Live Spaces : créez votre blog à votre image ! 
http://www.windowslive.fr/spaces


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


Re: [Tinyos-help] IBM JDK segfaults on libtoscomm.so

2007-06-06 Thread Ákos Maróy
David Gay wrote:
> Hmm, trying this on an x86_64 kernel, I did find one bug which is
> fixed by the following patch (the change to the Makefile is necessary
> to keep Sun's JDK happy at least):

I see the change in the makefile will make it compile in 32-bit mode. If
I'm using 64-bit JDKs (both SUN and IBM), they won't recognize the
shared object if compiled with -m32.

Applying the other change unfortunately does not solve this problem.

Maybe I should try a 32-bit JDK?


Akos

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


Re: [Tinyos-help] IBM JDK segfaults on libtoscomm.so

2007-06-06 Thread Ákos Maróy
So, what I did now is that I downloaded a 32-bit SUN JDK, and compiled
the shared objects for 32bit with -m32, and installed them. I also
uncommented the printf() lines in the read() and write() functions in
the shared object - so that displays what's being written and read.

here I don't get a segfault anymore, but the communication still breaks.
 that is, after downloadting the TestSerial app to the mote, its TX
light starts to blink (it seems it's sending data regulary). As soon as
I start the Java-bases TestSerial app on the laptop, the TX light stops
blinking. Moreover, the mote should display the number received on the
serial interface - and it does not.

Let me note that if I do the very same, but connect to the mote via the
serial forwarder written in C, all works fine...

Here's the output I get on the console when using the java-based setup:

$ make telos install.0 bsl,/dev/ttyUSB0
mkdir -p build/telosa
compiling TestSerialAppC to a telosa binary
ncc -o build/telosa/main.exe -Os -O -mdisable-hwmul -Wall -Wshadow
-DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -target=telosa
-fnesc-cfile=build/telosa/app.c -board=   TestSerialAppC.nc -lm
compiled TestSerialAppC to build/telosa/main.exe
6040 bytes in ROM
 291 bytes in RAM
msp430-objcopy --output-target=ihex build/telosa/main.exe
build/telosa/main.ihex
writing TOS image
tos-set-symbols --objcopy msp430-objcopy --objdump msp430-objdump
--target ihex build/telosa/main.ihex build/telosa/main.ihex.out-0
TOS_NODE_ID=0 ActiveMessageAddressC$addr=0
Could not find symbol ActiveMessageAddressC$addr in
build/telosa/main.exe, ignoring symbol.
Could not find symbol TOS_NODE_ID in build/telosa/main.exe, ignoring symbol.
installing telosa binary using bsl
tos-bsl --telos -c /dev/ttyUSB0 -r -e -I -p build/telosa/main.ihex.out-0
MSP430 Bootstrap Loader Version: 1.39-telos-8
Mass Erase...
Transmit default password ...
Invoking BSL...
Transmit default password ...
Current bootstrap loader version: 1.10 (Device ID: f149)
Adjust SP. Load PC with 0x0C22 ...
Transmit default password ...
Patch for flash programming required!
Load and verify patch ...
Program ...
6266 bytes programmed.
Reset device ...
rm -f build/telosa/main.exe.out-0 build/telosa/main.ihex.out-0
[EMAIL PROTECTED] $ java TestSerial
serial@/dev/ttyUSB0:115200: resynchronising
   ...  read: 03 03 03
Sending packet 0
   ... wrote: 7e 44 0e 00 00 00 00 00 02 00 09 00 00 fc 59 7e
   ...  read: 00
Sending packet 1
   ... wrote: 7e 44 0f 00 00 00 00 00 02 00 09 00 01 94 91 7e
Sending packet 2
   ... wrote: 7e 44 10 00 00 00 00 00 02 00 09 00 02 f9 7f 7e



the output itself differs, here are other stuff I get:

$ java TestSerial
Sending packet 0
   ... wrote: 7e 44 0e 00 00 00 00 00 02 00 09 00 00 fc 59 7e
serial@/dev/ttyUSB0:115200: resynchronising
   ...  read: 0b 0b
   ...  read: 00
Sending packet 1
   ... wrote: 7e 44 0f 00 00 00 00 00 02 00 09 00 01 94 91 7e
Sending packet 2
   ... wrote: 7e 44 10 00 00 00 00 00 02 00 09 00 02 f9 7f 7e


$ java TestSerial
serial@/dev/ttyUSB0:115200: resynchronising
   ...  read: 0b
Sending packet 0
   ... wrote: 7e 44 0e 00 00 00 00 00 02 00 09 00 00 fc 59 7e
   ...  read: 00
Sending packet 1
   ... wrote: 7e 44 0f 00 00 00 00 00 02 00 09 00 01 94 91 7e


maybe the serial port is not reset properly, and some trash remains
there from previous rounds?

anyway, the above bytes read - are they valid TinyOS serial protocol bytes?


Akos

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


Re: [Tinyos-help] the TinyOS 2 serial protocol

2007-06-06 Thread Ákos Maróy
David Gay wrote:
> You just need to replace net/tinyos/packet/SerialByteSource.java. And,
> conveniently, there's already a javacomm implementation, in
> tinyos-1.x/tools/java/net/tinyos/packet/SerialByteSource.java (get it
> from sourceforge CVS if you don't have tinyos 1.x installed), which by
> the look of it should just function as is...

I tried this out, and it works wonderfully, with this IBM JDK:

$ java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build
pxa64dev-20061002a (SR3) )
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux amd64-64
j9vmxa6423-20061001 (JIT enabled)
J9VM - 20060915_08260_LHdSMr
JIT  - 20060908_1811_r8
GC   - 20060906_AA)
JCL  - 20061002



please note that the IBM JDK has official JavaComm support.


here's the output I get, which looks just fine:

$ java TestSerial
serial@/dev/ttyUSB0:115200: resynchronising
Sending packet 0
Received packet sequence number 183
Sending packet 1
Received packet sequence number 184
Sending packet 2
Received packet sequence number 185
Sending packet 3



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


[Tinyos-help] Sensor and actor

2007-06-06 Thread fatima cabot

*
*CALL FOR DEMOS/POSTERS *
*   *
* WSAN 2007 *
*   *
*  September 24 - 26, 2007  *
*  Albacete, Spain  *
*   *
*http://www.i3a.uclm.es/wsan07/ *
*   *
*

[CALL FOR DEMOS/POSTERS]
Demonstrations and posters showing innovative ideas and applications are
solicited. WSAN07 is interested in a wide range of sensor and actor
network related research. Topics include but are not limited to: sensor
technology, hardware platforms, networking, security, middleware,
applications, programming, and architecture. Abstracts of accepted demos
and posters will be published in particular proceedings. Submissions
from both industries and universities are encouraged.

[DEMO AND POSTER SUBMISSION INSTRUCTIONS]
Please send a two-page description of your poster/demo in PDF to
[EMAIL PROTECTED]  with the subject line reading "WSAN Poster
Submission" or "WSAN Demo Submission".
Submissions must conform to the IEEE Transactions style with a 10pt font
formatted for A4 paper (use the a4paper option) and without page numbers.

Please be as specific as possible in describing what you will show. As
for the demo submission, please provide separated text description on
the space, equipment, power supply requirements. Once accepted, at least
one author of posters and demos are expected to be available during the
session.


[IMPORTANT DATES]
Two-page descriptions:  From June 1, 2007 to June 15, 2007
Notification of acceptance: June 20, 2007
Camera-ready abstract:  June 25, 2007
Conference dates:   September 24 - 26, 2007

WSAN 2007 Poster/Demo Co-Chairs
Vicente López Camacho, University of Castilla-La Mancha, Spain
Raul Galindo Moreno, University of Castilla-La Mancha, Spain
Fernando Royo Sanchez, University of Castilla-La Mancha, Spain
Antonio Ortiz Torres, University of Castilla-La Mancha, Spain
Paz Pedrón Pardo, University of Castilla-La Mancha, Spain
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] understaning MultihopOscillator

2007-06-06 Thread Ákos Maróy
I'm not sure I understand how Multihop Oscillator works, after reading
up on the README file that is along with it.

let's suppose I would have motes with the following installed on them:

mote #0 - MultihopOscillator
mote #1 - MultihopOscillator

mote #100 - BaseStation


if so, mote #1 would send sensor readings to mote #0? does mote #0 do
any sensor reading on it's own? would mote #0 send sensor data to mote #100?

and if I connect the java Oscillator app to mote #100, then it would
display all readings?

sorry, this is a bit confusing for me...


Akos

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


[Tinyos-help] mps430 TimerA stops when I use ADC

2007-06-06 Thread Michele Paselli

Hi all,

firstly thanks to everybody replied to my issue on watchdog timer, it was
very helpful to me.
I'm trying now to use the TimerA as a clock generator and to configure the
ADC to get some samples from a sensor. I'm using an msp430f149 and TinyOS
1.0, and ADC and ADCControl interfaces for the ADCC module to access the
ADC12.
To what I understood from some replies (and also looking at the code) the
TimerA is used only when multiple channels or repeat mode are used, so since
I'm using a single channel getData() I would expect not to touch the TimerA.
For the timerA I'm using the MSP430Compare interfaces and I'm setting the
CompareA0 value to 7, the CompareA1 to 4 and I start the timer in up mode.
The problem is that when I call getData() in the application the timer stops
(I can clearly see it on the scope since the function is called after a
period in which the clock is correctly output from port A1). Apparently in
the MPS430ADC12M.nc there's no call to a timerA related function for my
configuration, so I was wondering what is going on. Can somebody help me?
Thanks

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

Re: [Tinyos-help] can't compile MultihopOscilloscope for telosa

2007-06-06 Thread Ákos Maróy
Philip Levis wrote:
> It's allocating too much RAM for the telosa.

I see..

> Compiling for telosb, it looks like the app is allocating 3K of RAM. 2K
> of this is in PoolP, which is the component that allocates packets for
> queues. The default forwarding queue for routing is 12 (it should
> probably be smaller), the UART queue is 10, and most importantly, the
> debugging system has a queue of 20.  The first is defined in
> tos/lib/net/Ctp/CtpP.nc while the second and third are defined in 
> MultihopOscilloscopeAppC.nc.

I lowered the UART queue to 3 and the debug queue to 1, and so it
compiled...

thanks!


Akos

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


[Tinyos-help] Hardware v. Software Acks in TEP 126

2007-06-06 Thread John Hendrie

Hi,

TEP 126 (s5.1) talks about how software acknowledgements are used over
hardware acknowledgements. I'm trying to reproduce the false
acknowledgements situation but I'm not having much success, under what
conditions does this occur?

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


[Tinyos-help] Regarding backhaul connectivity with mib-510

2007-06-06 Thread ankur jain
hi all,
  i developed an application to monitor temperature over a certain area using 
some no. of sensors and i am sending the data thru the gateway to the pc where 
an application running on web server extracts the temp. from packet and writes 
to a file. From this file another application reads temp. and send that reading 
on e-mail to registered users using java mail api's and smtp server. 
   
  the same temp. info i want to sent to the registered mobile-users .For that i 
need some connectivity to the gsm/gprs network with the machine or with the 
gateway using  CELLULAR MODEM. So  i want to ask whether is it possible to 
interface mib-510  with cellular modem .if it  is possible then how??
  Also is it possible that i can use internet connection on my p.c to send the 
data to gsm/gprs network by interfacing with some already available tools or 
software
  Kindly  help me out in this regard as i am totally stuck up with this!!!
  Regards 
  Ankur Jain


-
 Here’s a new way to find what you're looking for - Yahoo! Answers ___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Write Fails in BlackBook Files System

2007-06-06 Thread Mayur Maheshwari

Hi David



It seems that write fails after 18 files have been written. (I am trying to
write a new file every 3 seconds). Any idea why this should happen?



I am using telosb with tinyos 2.0.1


The write app which I am using is as follows:


module WriteCheckC {
 uses interface BBoot;
 uses interface BFileWrite;
 uses interface Boot;
 uses interface Leds;
 uses interface Timer as Timer0;
}

implementation {

uint32_t fileNumber;

char *reverseString(char temp[10])
{
int k=0;
int len = strlen(temp);

while(k<(len+1)/2)
{
 char t = temp[k];
 temp[k] = temp[len-k-1];
 temp[len-k-1] = t;
 k++;
}
temp[len] = '\0';
return temp;
}

char *getString(int i)
{
int j=i;
int k=0;
char temp[10];

while(j)
{
 temp[k] = j%10 + 48;
 j /= 10;
 k++;
}
temp[k] = '\0';

return reverseString(temp);
}

event void Boot.booted() {}

event void BBoot.booted(uint16_t totalNodes, uint8_t totalFiles, error_t
error) {
 call Timer0.startPeriodic(3000);
}

 event void Timer0.fired() {

char *temp;
char file1[20];
temp = getString(fileNumber);
strcpy(file1, "b");
strcat(file1, temp);
call BFileWrite.open(file1, sizeof(uint32_t));
 }

 event void BFileWrite.opened(uint32_t len, error_t error)
 {
 uint16_t sense = 12;
  call Leds.led0Toggle();

  call BFileWrite.append(&sense, sizeof(sense));
 }

 event void BFileWrite.appended(void *data, uint16_t amountWritten, error_t
error)
 {
  call BFileWrite.save();
 }

 event void BFileWrite.saved(error_t error) {
  call BFileWrite.close();
 }

 event void BFileWrite.closed(error_t error) {fileNumber++;
 call Leds.led2Toggle();}

}





Thanks,

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

[Tinyos-help] TOSSIM and sendDone()

2007-06-06 Thread Hugo Sousa

I've searched the archives and still can't get to sendDone to be
signaled in TOSSIM.

I have the topology file and noise file, and the python script is
basically a copy-paste from lesson 11, only with the range of nodes
from 0 to 2, but the sendDone never happens.

I have tinyos cvs updated yesterday.

There are also some methods for configuring a network that I can't
use, for exemple threshold and setThreshold. They don't appear in the
dir(r) listing, but they are mentioned in the lesson

Thanks in advance
Hugo Sousa


---

topo.txt
0   1   -64.71
1   0   -66.06
0   2   -64.71
2   0   -66.06
1   2   -64.71
2   1   -66.06

meyer-heavy.txt
-97
-98
-98
-86
-90
-91
-87
-87
-98
-98
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Question on MultiOscilloscope Application

2007-06-06 Thread Benjamin Madore
Sorry, "tab-space" sends on this webmail client. I need to be more careful
about that. Anyone know how to adjust tab to field behavior in Firefox 2?

On Tue, June 5, 2007 5:44 pm, M A said:
> Hi
>
> I have started learning tinyos-2.x and I have a simple question related to
> MultiOscilloscope function in directory
> tinyos-2.x/apps/MultihopOscilloscope.
> In the file MultioscilloscopeC.nc we declare a message buffer " message_t
> uartbuf ".
 Declaring one yourself is the correct action, however you should also have
a pointer:
message_t * p_uartbuf;

> But I dont understand where is this initialized.
 If you don't initialize it somehow, it won't have anything done to it until
it gets used by part of the radio stack. I believe the stack wipes a buffer
before it uses it.

> We call the
> command SerialSend.getPayload(&uartbuf); in the Recevie.receive() event.
> Thus  basically we are getting the payload from the message stored in
> uartbuf. But I cant figure out where and when a message is being stored in
> uartbuf.

Receive.receive() looks like:
event message_t* receive(message_t* msg, void* payload, uint8_t len);

msg is a pointer to the buffer that the incoming AM message occupies. This
buffer is a message_t. If you want the whole message, you need to swap
pointers so that your buffer becomes part of the stack, and the one on the
stack you keep.

message_t * p_tempMsg; //Message for swap
p_tempMsg = p_uartbuf;
p_uartbuf = msg; //your buffer is now the incoming message

> I guess when Receive.receive returns it returns a buffer for the stack. Is
> it the same buffer? I am confused. Can anyone explain this to me ?
 Now, here's why you declared p_tempMsg:
return p_tempMsg;
 This returns your buffer to the receive interface so it has an empty buffer
to use for the next message. This is so you don't have your message
overwritten when your trying to work with it.

 You may also just want the payload. One way to do that is to allocate:
uint8_t payloadBuffer[DATA_LENGTH]; //I am not 100% sure this is the
const. in 2.x
 Then you can:
memcpy (&payloadBuffer, payload, len);
 in the receive event. Don't forget to:
return msg;
 if you memcpy out your data.

 There are, of course, other ways to copy if you have declare a struct for
your data, but this should get you started.


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

I hope I helped.
-Ben

-- 
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] Active message protocol

2007-06-06 Thread Steve McKown
On Tuesday 05 June 2007 13:46, jose m wrote:
> > On Monday 04 June 2007 13:38, jose m wrote:
> > > Checking out the AMStandard.nc file I see that, if you are transmitting 
a
> > > radio message, the AMStandard component is occupied until the tx is 
done,
> > > and you cannot tx to UART until then. Why? any problem tx to radio and
> > > UART at the same time?
> >
> > On Tuesday 05 June 2007 13:20, Steve McKown wrote:
> > Assuming the radio and serial UART don't share any common resources, their
> > operations can certainly be interleaved.  For example, you can call
> > AMSend.send(...) and then on the very next line call UartStream.send(...).
> > The actual order of execution occurs based upon the TinyOS concurrency
> > model. AMSend.sendDone() and UartStream.sendDone() will be each called as
> > their relevant split-phase operations complete.
> >
> > If you want to learn more about TinyOS concurrency, check out Philip 
Levis'
> > programming guide @
> > http://csl.stanford.edu/~pal/pubs/tinyos-programming.pdf
>
> Thanks! Ok, don't worry, I understand concurrency. However, when you use AM
> protocol, you use AMStandard (not UartStream), and AMStandard doesn't allow
> send radio and uart packets "at the same time", even when the uart (or
> radio) is idle (a variable named "state" is checked). This behavior looks
> intentional... any reason for this?

I'm sorry, I missed the fact you were using TinyOS-2.x and made some bad 
assumptions.  I don't use TinyOS-1.x, but took a quick look at AMStandard.nc.  
I think I have an answer to your question; hopefully someone will jump in and 
correct if I'm wrong.

AMStandard.nc implements a single AM stack instance that just happens to use 
two physical devices internally.  An AM stack has several behavioral rules, 
one of them being that only one send can be pending at a time.  So, to keep 
AMStandard.nc behaviorally consistent, it can't schedule overlapping sends.

In contrast, TinyOS-2.x addressed this issue by creating separate AM stack 
instances for the radio and the uart.  In this way, the components using the 
stacks could schedule a send on each 'simultaneously'.

If you need overlapping sends between devices, I'd be tempted to create 
AMRadio.nc and AMUart.nc, which effectively copy AMStandard.nc but use a 
single device only.  You should poke around in your tos1 distribution, as 
there may already be a better solution available.

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] understaning MultihopOscillator

2007-06-06 Thread Benjamin Madore

On Wed, June 6, 2007 6:15 am, Ákos Maróy said:
> I'm not sure I understand how Multihop Oscillator works, after reading
> up on the README file that is along with it.
>
> let's suppose I would have motes with the following installed on them:
>
> mote #0 - MultihopOscillator
> mote #1 - MultihopOscillator
>
> mote #100 - BaseStation
>
>
> if so, mote #1 would send sensor readings to mote #0? does mote #0 do
> any sensor reading on it's own? would mote #0 send sensor data to mote #100?

Multihop assumes 0 is the sink. This can be changed in the code.

Reading varies app-to-app and I don't know for sure on this one. If it does,
you would have to piggyback the sensor board onto the base station.

> and if I connect the java Oscillator app to mote #100, then it would
> display all readings?

Everything it could hear. I'm not sure how it interacts with the BaseStation
app at node 0. I'm pretty sure MultiHop needs to hear debug info to route
properly.

> sorry, this is a bit confusing for me...
>
>
> Akos



-- 
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] understaning MultihopOscillator

2007-06-06 Thread David Gay

On 6/6/07, Ákos Maróy <[EMAIL PROTECTED]> wrote:

I'm not sure I understand how Multihop Oscillator works, after reading
up on the README file that is along with it.


The README does it seem a bit brief... From reading the code:



let's suppose I would have motes with the following installed on them:

mote #0 - MultihopOscillator
mote #1 - MultihopOscillator

mote #100 - BaseStation


if so, mote #1 would send sensor readings to mote #0? does mote #0 do
any sensor reading on it's own? would mote #0 send sensor data to mote #100?


No. Node 0 is a root (see the last paragraph of the README and the
call to RootControl.setRoot in MultihopOscilloscope.nc), and in
MultihopOscilloscope, root nodes send the received data to the serial
port (see the code for Receive.receive in MultihopOscilloscopeC.nc).


and if I connect the java Oscillator app to mote #100, then it would
display all readings?


No. Connect the Oscilloscope app to mote #0.


sorry, this is a bit confusing for me...


The README should be improved...

David Gay

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


[Tinyos-help] TEP 126 and AES

2007-06-06 Thread Steve McKown
Hi,

TEP 126 in 10.1 states that the CC2420 radio cannot begin encryption at a 
particular offset.  However, v1.3 of the CC2420 data sheet in section 21.5 
specifically states that this is possible, via the SECCTRL1.SEC_TXL and 
SEC_RXL register fields.  Does the comment in 10.1 come from testing real 
parts, reading an older spec, etc.?

PS - We have a project for which we plan to use CC2420 CCM with a 32-bit MIC 
which will start in earnest in the next few weeks.  I would be interested in 
learning how our efforts in this regard can best be coordinated for possible 
inclusion into the new CC2420 stack.  If someone is already working on this, 
perhaps we can collaborate.

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


Re: [Tinyos-help] Help with TestNetwork Application

2007-06-06 Thread Philip Levis

On Jun 6, 2007, at 12:04 AM, Murtuza wrote:


Hello friends

I have a doubt in TestNetwork Application in tinyos-2.x/apps/tests/ 
TestNetwork directory. I feel it is a real stupid question to ask  
but I cant figure out whats happening in real.


In the file TestNetworkC.nc we have
void sendMessage() {
TestNetworkMsg* msg = (TestNetworkMsg*)call Send.getPayload 
(&packet);

uint16_t metric;
am_addr_t parent;...

The "call Send.getPayload(&packet) " returns a pointer to the  
payload region on the message packet. Isn't it so ? This is pointed  
out by the pointer "msg". Now if this is so, where is "packet"  
being initialized in the first place. What data or message is being  
stored in packet and where. There is declaration of packet as  
message_t and then its used in the above call. I am totally  
confused about how this works. Either I am thinking too far or  
completely lost. I wish somebody helps me out soon as I need to  
work on a project and I cant work unless I understand this.




Please read TEP 116: it explains how the getPayload call works. All  
this is doing is setting the application payload. When you call Send,  
the routing layer sets the layer 3 payload. When the routing layer  
calls AMSend, the link layer sets the layer 1 + 2 payloads, filling  
in the complete packet.


Phil

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


Re: [Tinyos-help] Hardware v. Software Acks in TEP 126

2007-06-06 Thread Philip Levis

On Jun 6, 2007, at 5:40 AM, John Hendrie wrote:


Hi,

TEP 126 (s5.1) talks about how software acknowledgements are used over
hardware acknowledgements. I'm trying to reproduce the false
acknowledgements situation but I'm not having much success, under what
conditions does this occur?


It's very very rare. The net2 WG has seen it when running CTP over 80  
node networks, where the occurance rate is something like 1 in 4,000  
data packets. Evidence suggests that it may be caused by corrupted  
packets that pass CRC, but it could also be a node A overhearing an  
ACK intended for another node B. They are what prevent CTP from being  
able to consistently achieve 3 9s (99.9%) or more of reliability at  
very low data rates.


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


Re: [Tinyos-help] TOSSIM and sendDone()

2007-06-06 Thread Philip Levis

On Jun 6, 2007, at 7:16 AM, Hugo Sousa wrote:


I've searched the archives and still can't get to sendDone to be
signaled in TOSSIM.

I have the topology file and noise file, and the python script is
basically a copy-paste from lesson 11, only with the range of nodes
from 0 to 2, but the sendDone never happens.

I have tinyos cvs updated yesterday.

There are also some methods for configuring a network that I can't
use, for exemple threshold and setThreshold. They don't appear in the
dir(r) listing, but they are mentioned in the lesson

Thanks in advance
Hugo Sousa


---

topo.txt
0   1   -64.71
1   0   -66.06
0   2   -64.71
2   0   -66.06
1   2   -64.71
2   1   -66.06

meyer-heavy.txt
-97
-98
-98
-86
-90
-91
-87
-87
-98
-98


Is this the length of the trace you're feeding, or are you feeding  
the entire trace? It needs to be at least 100 entries long or so for  
noise simulation to work effectively.


Try enabling the dbg mode "TossimPacketModelC". This is where CSMA is  
going on. It should give you a hint on what's going on.


Phil

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


Re: [Tinyos-help] understaning MultihopOscillator

2007-06-06 Thread Philip Levis

On Jun 6, 2007, at 8:31 AM, Benjamin Madore wrote:



On Wed, June 6, 2007 6:15 am, Ákos Maróy said:
I'm not sure I understand how Multihop Oscillator works, after  
reading

up on the README file that is along with it.

let's suppose I would have motes with the following installed on  
them:


mote #0 - MultihopOscillator
mote #1 - MultihopOscillator

mote #100 - BaseStation


if so, mote #1 would send sensor readings to mote #0? does mote #0 do
any sensor reading on it's own? would mote #0 send sensor data to  
mote #100?


Multihop assumes 0 is the sink. This can be changed in the code.

Reading varies app-to-app and I don't know for sure on this one. If  
it does,

you would have to piggyback the sensor board onto the base station.


and if I connect the java Oscillator app to mote #100, then it would
display all readings?


Everything it could hear. I'm not sure how it interacts with the  
BaseStation
app at node 0. I'm pretty sure MultiHop needs to hear debug info to  
route

properly.


The answers above are for 1.x; the question was about 2.0.

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


Re: [Tinyos-help] Compiling Blink for micaz

2007-06-06 Thread Michael Schippling

I think those -- sbi(), cbi(), etc -- are in
\usr\local\avr\include\avr\sfr_defs.h
so you're still not getting the right AVR includes for some reason.
MS


M.Soledad Escolar Díaz wrote:

Thanks for your reply. I solved this error but I can't compile Blink still
(make pc is ok). 
When I do 'make mica' I get the next error messages:


[EMAIL PROTECTED] Blink]# make mica
compiling Blink to a mica binary
ncc -o build/mica/main.exe -Os -board=micasb -target=mica  -Wall -Wshadow
-DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -finline-limit=10
-fnesc-cfile=build/mica/app.c  Blink.nc -lm 
In file included from /opt/tinyos-1.x/tos/platform/mica/hardware.h:49,

 from /opt/tinyos-1.x/tos/system/tos.h:132:
/opt/tinyos-1.x/tos/platform/avrmote/avrhardware.h: In function
`TOSH_sleep':
/opt/tinyos-1.x/tos/platform/avrmote/avrhardware.h:144: warning: implicit
declaration of function `sbi'
/opt/tinyos-1.x/tos/platform/avrmote/avrhardware.h: In function
`__nesc_atomic_start':
/opt/tinyos-1.x/tos/platform/avrmote/avrhardware.h:155: warning: implicit
declaration of function `inp'
/opt/tinyos-1.x/tos/platform/avrmote/avrhardware.h: In function
`__nesc_atomic_end':
/opt/tinyos-1.x/tos/platform/avrmote/avrhardware.h:162: warning: implicit
declaration of function `outp'
In file included from /opt/tinyos-1.x/tos/system/tos.h:132:
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_SET_RED_LED_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:57: warning: implicit
declaration of function `sbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_CLR_RED_LED_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:57: warning: implicit
declaration of function `cbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_READ_RED_LED_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:57: warning: implicit
declaration of function `inp'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_MAKE_RED_LED_OUTPUT':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:57: warning: implicit
declaration of function `sbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_MAKE_RED_LED_INPUT':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:57: warning: implicit
declaration of function `cbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_SET_YELLOW_LED_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:58: warning: implicit
declaration of function `sbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_CLR_YELLOW_LED_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:58: warning: implicit
declaration of function `cbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_READ_YELLOW_LED_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:58: warning: implicit
declaration of function `inp'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_MAKE_YELLOW_LED_OUTPUT':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:58: warning: implicit
declaration of function `sbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_MAKE_YELLOW_LED_INPUT':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:58: warning: implicit
declaration of function `cbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_SET_GREEN_LED_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:59: warning: implicit
declaration of function `sbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_CLR_GREEN_LED_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:59: warning: implicit
declaration of function `cbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_READ_GREEN_LED_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:59: warning: implicit
declaration of function `inp'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_MAKE_GREEN_LED_OUTPUT':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:59: warning: implicit
declaration of function `sbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_MAKE_GREEN_LED_INPUT':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:59: warning: implicit
declaration of function `cbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function `TOSH_SET_UD_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:61: warning: implicit
declaration of function `sbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function `TOSH_CLR_UD_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:61: warning: implicit
declaration of function `cbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_READ_UD_PIN':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:61: warning: implicit
declaration of function `inp'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_MAKE_UD_OUTPUT':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:61: warning: implicit
declaration of function `sbi'
/opt/tinyos-1.x/tos/platform/mica/hardware.h: In function
`TOSH_MAKE_UD_INPUT':
/opt/tinyos-1.x/tos/platform/mica/hardware.h:61: warning: implicit
declaration of function `cbi'
/opt/tinyos-1.x/tos/platform/mica/hardw

[Tinyos-help] RE: SOS on BBFS ;)

2007-06-06 Thread David Moss
Hi Mayur,

 

I see two emails from you.  I'll get to this one first, but I'll probably
need to wait 'till later to get to the next.

 

- does bbfs handles flash access contention itself, or do I need to add a
bool, to allow only single access to bbfs read/write.

 

Blackbook does not queue up requests, and it will only handle one request at
a time.  If a component tries to access Blackbook while Blackbook is
handling another client, the command will return fail.  One simple way to
get around this is put all your Blackbook commands in a spinning task.. but
that could increase your memory footprint.  Another way to do it is to setup
your own arbitration mechanism.  I left this functionality out of Blackbook
because I didn't want to make it mandatory and increase everyone's memory
footprint when not everyone needed the functionality.

 

- does bbfs defines an upper limit on max number of files on flash and/or
max number of open files etc

 

Look in BlackbookConst.h: 

 

/** 

 * The following is the maximum number of files on 

 * our file system

 * 

 * The amount of RAM used by Blackbook to store file info

 * can be expressed by:

 *   MAX_FILES * NODES_PER_FILE * sizeof(node_t)

 */

#ifndef MAX_FILES

#define MAX_FILES 19

#endif

 

 

MAX_FILES defines the maximum number of "file" structures existing in
non-volatile memory - the maximum number of real files you can have.  At
least one of those files is automatically taken by the "bb.cp_" checkpoint
file.

 

The maximum number of files you can have open at any given time is dependent
upon how many BFileRead(), BFileWrite(), BDictionary(), etc. instances there
are.  If your application needs to have 18 files open for reading/writing
simultaneously, it can by making 18 new BFile*() components.

 

- does bbfs have any issues with the same file being opened/read/write
simultaneously

 

Blackbook can have a single file open for reading and writing at the same
time.  As you write to the file through BFileWrite(), you can be reading
that data back out of BFileRead().

 

-David

 

 

 

 

 

 

  _  

From: Mayur Maheshwari [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 05, 2007 12:17 PM
To: David Moss; tinyos-help@millennium.berkeley.edu
Subject: SOS on BBFS ;)

 

Hi David,

 

I am using bbfs but have been facing a few problems. Your inputs will help a
lot.

 

- does bbfs handles flash access contention itself, or do I need to add a
bool, to allow only single access to bbfs read/write.

- does bbfs defines an upper limit on max number of files on flash and/or
max number of open files etc

- does bbfs have any issues with the same file being opened/read/write
simultaneously

 

I am reading a lot of files and sending over radio (while writing continues
simultaneously). It seems that bbfs open of a file fails after sometime and
every other bbfs operations fails too. 

 

It will help a lot it you can share some test code where multiple read,
write and delete happen simultaneously.

 

Thanks,

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

[Tinyos-help] RE: Write Fails in BlackBook Files System

2007-06-06 Thread David Moss
Yup - just like I explained in that last email, by default Blackbook offers
19 MAX_FILES (BlackbookConst.h).  One of those files is taken up by the
checkpoint file (bb.cp_).  So that leaves you with 18 files.  Without
deleting some files, you'll be stuck.

 

If you want to increase the number of files the file system can hold,
increase the MAX_FILES definition.

 

-David

 

 

  _  

From: Mayur Maheshwari [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 06, 2007 6:59 AM
To: David Moss; tinyos-help@millennium.berkeley.edu
Subject: Write Fails in BlackBook Files System

 

 

Hi David

 

It seems that write fails after 18 files have been written. (I am trying to
write a new file every 3 seconds). Any idea why this should happen? 

 

I am using telosb with tinyos 2.0.1

 

The write app which I am using is as follows:

 

module WriteCheckC {
  uses interface BBoot;
  uses interface BFileWrite;
  uses interface Boot;
  uses interface Leds;
  uses interface Timer as Timer0;
}

implementation {

 uint32_t fileNumber;

 char *reverseString(char temp[10])
{
 int k=0;
 int len = strlen(temp);

 while(k<(len+1)/2)
 {
  char t = temp[k];
  temp[k] = temp[len-k-1];
  temp[len-k-1] = t;
  k++;
 }
 temp[len] = '\0'; 
 return temp;
} 

char *getString(int i)
{
 int j=i;
 int k=0;
 char temp[10];

 while(j)
 {
  temp[k] = j%10 + 48;
  j /= 10;
  k++;
 }
 temp[k] = '\0';

 return reverseString(temp);
}

 event void Boot.booted() {}

 event void BBoot.booted(uint16_t totalNodes, uint8_t totalFiles, error_t
error) {
  call Timer0.startPeriodic(3000);
 }

  event void Timer0.fired() {

 char *temp;
 char file1[20];
 temp = getString(fileNumber);
 strcpy(file1, "b");
 strcat(file1, temp);
 call BFileWrite.open(file1, sizeof(uint32_t));
  }

  event void BFileWrite.opened(uint32_t len, error_t error) 
  {
  uint16_t sense = 12;
   call Leds.led0Toggle();

   call BFileWrite.append(&sense, sizeof(sense));
  }

  event void BFileWrite.appended(void *data, uint16_t amountWritten, error_t
error) 
  {
   call BFileWrite.save();
  }

  event void BFileWrite.saved(error_t error) {
   call BFileWrite.close();
  }

  event void BFileWrite.closed(error_t error) {fileNumber++; 
  call Leds.led2Toggle();}

}

 

 

Thanks,

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

[Tinyos-help] tinyos for telos rev-b

2007-06-06 Thread nirfan
Hi

I am trying to run blink application for telos Rev-b in tinyos and getting
error message. Can anybody suggest me what should I do

regards
Nazish

Error message:

 compiling Blink to a telos binary
ncc -o build/telos/main.exe -O -mdisable-hwmul
-I/opt/tinyos-1.x/tos/lib/CC2420R
adio -I/opt/tinyos-1.x/tos/lib/Flash -Wall -Wshadow
-DDEF_TOS_AM_GROUP=0x7d -Wne
sc-all -target=telos -fnesc-cfile=build/telos/app.c -board=
-I%T/lib/Deluge -Wl,
--section-start=.text=0x1a00,--defsym=_reset_vector__=0x1100
-DIDENT_PROGRAM_NAM
E=\"Blink\" -DIDENT_USER_ID=\"nirfan\" -DIDENT_HOSTNAME=\"zag0\"
-DIDENT_USER_HA
SH=0x2e6fb4fdL -DIDENT_UNIX_TIME=0x4666e068L -DIDENT_UID_HASH=0x20d0bb94L
Blink.
nc -lm
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s: Assembler messages:
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:332: Error:
unrecognized sy
mbol type ""
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:332: Error: junk at
end of
line, first unrecognized character is `$'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:336: Error: unknown
opcode
`msp430clockm$set_dco_calib:'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:338: Error: unknown
pseudo-
op: `.l__framesize_msp430clockm'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:339: Error: unknown
pseudo-
op: `.l__frameoffset_msp430clockm'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:353: Error: expected
comma
after name `MSP430ClockM' in .size directive
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:357: Error:
unrecognized sy
mbol type ""
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:357: Error: junk at
end of
line, first unrecognized character is `$'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:361: Error: unknown
opcode
`timerm$settimer:'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:363: Error: unknown
pseudo-
op: `.l__framesize_timerm'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:364: Error: unknown
pseudo-
op: `.l__frameoffset_timerm'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:438: Error: expected
comma
after name `TimerM' in .size directive
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:442: Error:
unrecognized sy
mbol type ""
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:442: Error: junk at
end of
line, first unrecognized character is `$'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:446: Error: unknown
opcode
`timerm$localtime$read:'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:448: Error: unknown
pseudo-
op: `.l__framesize_timerm'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:449: Error: unknown
pseudo-
op: `.l__frameoffset_timerm'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:494: Error: expected
comma
after name `TimerM' in .size directive
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:498: Error:
unrecognized sy
mbol type ""
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:498: Error: junk at
end of
line, first unrecognized character is `$'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:502: Error: unknown
opcode
`timerm$inserttimer:'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:504: Error: unknown
pseudo-
op: `.l__framesize_timerm'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:505: Error: unknown
pseudo-
op: `.l__frameoffset_timerm'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:546: Error: expected
comma
after name `TimerM' in .size directive
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:550: Error:
unrecognized sy
mbol type ""
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:550: Error: junk at
end of
line, first unrecognized character is `$'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:554: Error: unknown
opcode
`timerm$setnextshortevent:'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:556: Error: unknown
pseudo-
op: `.l__framesize_timerm'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:557: Error: unknown
pseudo-
op: `.l__frameoffset_timerm'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:703: Error: expected
comma
after name `TimerM' in .size directive
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:707: Error:
unrecognized sy
mbol type ""
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:707: Error: junk at
end of
line, first unrecognized character is `$'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:711: Error: unknown
opcode
`timerm$executetimers:'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:713: Error: unknown
pseudo-
op: `.l__framesize_timerm'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:714: Error: unknown
pseudo-
op: `.l__frameoffset_timerm'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:829: Error: expected
comma
after name `TimerM' in .size directive
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:1191: Error:
unrecognized s
ymbol type ""
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg68CQ.s:1191: Error: junk at
end of
 line, first unrecognized character is `$'
/cygdrive/c/DOCUME~1/nirfan/LOCALS~1/Temp/ccZg6

RE: [Tinyos-help] TEP 126 and AES

2007-06-06 Thread David Moss
Hi Steve,

TEP 126 must be incorrect - I documented that information based on someone
else's experiences with enabling encryption, not my own.

A layer that enables hardware encryption would be extremely beneficial to
the TinyOS CC2420 stack.  If you're interested in pursuing this
functionality, let's see how we can get it designed and integrated as an
optional layer in the CC2420 stack.  

-David

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steve
McKown
Sent: Wednesday, June 06, 2007 8:29 AM
To: tinyos-help@Millennium.Berkeley.EDU
Subject: [Tinyos-help] TEP 126 and AES

Hi,

TEP 126 in 10.1 states that the CC2420 radio cannot begin encryption at a 
particular offset.  However, v1.3 of the CC2420 data sheet in section 21.5 
specifically states that this is possible, via the SECCTRL1.SEC_TXL and 
SEC_RXL register fields.  Does the comment in 10.1 come from testing real 
parts, reading an older spec, etc.?

PS - We have a project for which we plan to use CC2420 CCM with a 32-bit MIC

which will start in earnest in the next few weeks.  I would be interested in

learning how our efforts in this regard can best be coordinated for possible

inclusion into the new CC2420 stack.  If someone is already working on this,

perhaps we can collaborate.

Thanks,
Steve
___
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] TOSSIM and sendDone()

2007-06-06 Thread Hugo Sousa

Hi Phil, that's exactly it, thank you! :)

I was just using those values because I'm not yet interested in
simulating a real noise environment. Maybe you should add that
restriction to the tutorial.

Thanks again
Hugo


On 6/6/07, Philip Levis <[EMAIL PROTECTED]> wrote:

On Jun 6, 2007, at 7:16 AM, Hugo Sousa wrote:

> I've searched the archives and still can't get to sendDone to be
> signaled in TOSSIM.
>
> I have the topology file and noise file, and the python script is
> basically a copy-paste from lesson 11, only with the range of nodes
> from 0 to 2, but the sendDone never happens.
>
> I have tinyos cvs updated yesterday.
>
> There are also some methods for configuring a network that I can't
> use, for exemple threshold and setThreshold. They don't appear in the
> dir(r) listing, but they are mentioned in the lesson
>
> Thanks in advance
> Hugo Sousa
>
>
> ---
>
> topo.txt
> 0 1   -64.71
> 1 0   -66.06
> 0 2   -64.71
> 2 0   -66.06
> 1 2   -64.71
> 2 1   -66.06
>
> meyer-heavy.txt
> -97
> -98
> -98
> -86
> -90
> -91
> -87
> -87
> -98
> -98

Is this the length of the trace you're feeding, or are you feeding
the entire trace? It needs to be at least 100 entries long or so for
noise simulation to work effectively.

Try enabling the dbg mode "TossimPacketModelC". This is where CSMA is
going on. It should give you a hint on what's going on.

Phil



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


[Tinyos-help] (no subject)

2007-06-06 Thread Vipin Kashyap
Hi all!

I have been trying to sample adc channels in mda300ca connected with mica2
mote. i am specifically interested in sampling adc channels 0 &1 (or for
that matter any two adc channels). I presume adc channels 0 & 1 are pins
A0 and A1 on MDA300CA. The relevant extract of the code is as below:-

includes sensorboard;
configuration HighFreqADCToRfm {
}
implementation {
  components Main, HighFreqADCToRfmM, LedsC;
  components Sample, MicroTimerM;
  components BufferedLog, ByteEEPROM;
  components GenericComm, ADCC;

HighFreqADCToRfmM.ADCControl -> ADCC.ADCControl;
Sample.ADC0 -> ADCC.ADC[7];// TOS_ADC_VOLTAGE_PORT = 7



module HighFreqADCToRfmM {
  provides {
interface StdControl;
  }
  uses {
interface Leds;
interface Sampling;
interface SendMsg;
interface AllocationReq;
interface ReadData;
interface ADCControl;
  }

module Sample {
  provides interface Sampling;
  uses {
interface LogData;
//async command result_t fastAppend(uint8_t *data, uint8_t n);

// Interface to shutdown external components that will interfere with
// high-speed sampling
interface StdControl as ExternalShutdown;
interface Leds;
interface MicroTimer;
interface ADC as ADC0;
//interface ADC[uint8_t port];// added vk
//interface ADC as CalADC;// added vk
//interface StdControl as ADCControl;// added vk
  }
}

async event result_t MicroTimer.fired() {
if (!--sampleCount)
  {
call MicroTimer.stop();
post done();
  }
else if (sampling || !call ADC0.getData())
  {
call MicroTimer.stop();
post failed();
}
else
  sampling = TRUE;
return SUCCESS;
  }

I want to know the following:

How do I sample channels 0 and 1 on the mda300ca board viz.A0 and A1 and
whether what i am doing is correct?

While using component ADCC and interface ADC how does one pass channel and
excitation information to the ADC?

ADCControl interface has provisions for setting sampling rate. However, if
i am invoking ADC.getData on the firing of MicroTimer.fired event then why
do i need to set the sampling rate? Or can I do without setting the
sampling rate.

When I use ADCC, does it automatically use default excitation voltage or
do I need to provide this from outside? If it is to be done externally,
then will connecting VCC pin to E3.3 pin on mda300ca suffice?

Is ADCC the right choice or do I need to use SamplerC ? If I use SamplerC
then what about the interface to be used to connect to it, since ADC does
not provide channel and sampling rate details.

I have been at it for days trying to get any clues but everything has
proved futile.

I would highly appreciate any help on the matter.

Thanks and regards,

-- 
Vipin Kashyap

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


[Tinyos-help] Sampling ADC channels 0 and 1 on mda300ca (mounted on mica2)

2007-06-06 Thread Vipin Kashyap
Hi all!

Sorry for the repeat post. The earlier one did not have a subject.

I have been trying to sample adc channels in mda300ca connected with mica2
mote. i am specifically interested in sampling adc channels 0 &1 (or for
that matter any two adc channels). I presume adc channels 0 & 1 are pins
A0 and A1 on MDA300CA. The relevant extract of the code is as below:-

includes sensorboard;
configuration HighFreqADCToRfm {
}
implementation {
  components Main, HighFreqADCToRfmM, LedsC;
  components Sample, MicroTimerM;
  components BufferedLog, ByteEEPROM;
  components GenericComm, ADCC;

HighFreqADCToRfmM.ADCControl -> ADCC.ADCControl;
Sample.ADC0 -> ADCC.ADC[7];// TOS_ADC_VOLTAGE_PORT = 7



module HighFreqADCToRfmM {
  provides {
interface StdControl;
  }
  uses {
interface Leds;
interface Sampling;
interface SendMsg;
interface AllocationReq;
interface ReadData;
interface ADCControl;
  }

module Sample {
  provides interface Sampling;
  uses {
interface LogData;
//async command result_t fastAppend(uint8_t *data, uint8_t n);

// Interface to shutdown external components that will interfere with
// high-speed sampling
interface StdControl as ExternalShutdown;
interface Leds;
interface MicroTimer;
interface ADC as ADC0;
//interface ADC[uint8_t port];// added vk
//interface ADC as CalADC;// added vk
//interface StdControl as ADCControl;// added vk
  }
}

async event result_t MicroTimer.fired() {
if (!--sampleCount)
  {
call MicroTimer.stop();
post done();
  }
else if (sampling || !call ADC0.getData())
  {
call MicroTimer.stop();
post failed();
}
else
  sampling = TRUE;
return SUCCESS;
  }

I want to know the following:

How do I sample channels 0 and 1 on the mda300ca board viz.A0 and A1 and
whether what i am doing is correct?

While using component ADCC and interface ADC how does one pass channel and
excitation information to the ADC?

ADCControl interface has provisions for setting sampling rate. However, if
i am invoking ADC.getData on the firing of MicroTimer.fired event then why
do i need to set the sampling rate? Or can I do without setting the
sampling rate.

When I use ADCC, does it automatically use default excitation voltage or
do I need to provide this from outside? If it is to be done externally,
then will connecting VCC pin to E3.3 pin on mda300ca suffice?

Is ADCC the right choice or do I need to use SamplerC ? If I use SamplerC
then what about the interface to be used to connect to it, since ADC does
not provide channel and sampling rate details.

I have been at it for days trying to get any clues but everything has
proved futile.

I would highly appreciate any help on the matter.

Thanks and regards,

-- 
Vipin Kashyap


-- 
Vipin Kashyap
Roll# 05307415
M Tech (Electronic Systems)
Hostel-9, Room# 294
Ph# +91-9969031997

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


[Tinyos-help] Error TOSSIM [sim-exe] Error 2

2007-06-06 Thread Latro 2000

Hello.
When I try to compile Blink Application to TOSSIM, I get the error showed 
below. It seems I have an environment variable wrong, but I was looking for 
it, so, It seems ok. I'm using tinyos 2.0.1, Win XP SP2 + Cygwin.


TOSROOT=/opt/tinyos-2.x
TOSDIR=/opt/tinyos-2.x/tos
MAKERULES=/opt/tinyos-2.x/support/make/Makerules
CLASSPATH='C:\cygwin\opt\tinyos-2.x\support\sdk\java\tinyos.jar;.'
PATH='/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/WINDOWS/system32:/
cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/Archivos de 
programa/Java/jdk1.6.0_01/bin:/cygdrive/c/Archivos de 
programa/Java/jdk1.6.0_01/jre

/bin:/cygdrive/c/Archivos de programa/QuickTime/QTSystem/:/opt/msp430/bin'

$ ncc --version
ncc: 1.2.1
nescc: 1.2.8a
gcc: gcc (GCC) 3.3.3 (cygwin special)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I'll appreciate your help.

cheers, Latro

++
[EMAIL PROTECTED] /opt/tinyos-2.x/apps/Blink
$ make telosb sim
mkdir -p build/telosb
 placing object files in build/telosb
 writing XML schema to app.xml
 compiling BlinkAppC to object file sim.o
ncc -c -DUSE_DL_IMPORT -fpic  -o build/telosb/sim.o -g -O0 -O -tossim 
-fnesc-nid
o-tosnodes=1000 -fnesc-simulate -fnesc-nido-motenumber=sim_node\(\)   
-mdisable-
hwmul -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -target=telosb 
-fnesc-cf
ile=build/telosb/app.c -board=  -Wno-nesc-data-race BlinkAppC.nc   
-fnesc-dump=c
omponents -fnesc-dump=variables -fnesc-dump=constants -fnesc-dump=typedefs 
-fnes

c-dump=interfacedefs -fnesc-dump=tags -fnesc-dumpfile=app.xml
Unknown target telosb
Known targets for TinyOS directory /opt/tinyos-2.x/tos
and the specified include directories are:
 eyesIFXv1 eyesIFXv2 intelmote2 mica2 mica2dot micaz null telosa telosb 
tinynod

e
make: *** [sim-exe] Error 2
+++

_
Llamadas gratis de PC a PC con Windows Live Messenger en Prodigy/MSN 
www.prodigy.msn.com


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


[Tinyos-help] Writing to tinynode via usbserial converter

2007-06-06 Thread Shane Clark
I am trying to program a tinynode using tinyos-1.x and it is not working
through my usb-serial converter. I get the error below:

compiled Blink to build/tinynode/main.exe
3126 bytes in ROM
  42 bytes in RAM
msp430-objcopy --output-target=ihex build/tinynode/main.exe
build/tinynode/main.ihex
writing TOS image
cp build/tinynode/main.ihex build/tinynode/main.ihex.out
found mote on /dev/ttyUSB0 (using bsl,auto)
installing tinynode binary using bsl
tos-bsl --telos -c /dev/ttyUSB0 -r -e -I -p build/tinynode/main.ihex.out
MSP430 Bootstrap Loader Version: 1.39-telos-8
Mass Erase...

An error occoured:
Timeout
make: *** [program] Error 1

I know that the node is being detected because it throws a "no mote
found" error if I physically unplug it. Does anyone have experience with
programming a tinynode in this manner and know what I'm doing wrong?

Thanks,

-Shane

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


Re: [Tinyos-help] sending packets via Tython

2007-06-06 Thread Faisal Karim
Hi Sarfraz

Thanks. Things worked out fine and now im able to send messages via tython (at 
least tython prompt says send msg :)  Now the problem arises that node 20 is 
not receiving the message following is my code

abc.nc

configuration abc {
}
implementation {

components GenericComm;

abcM.ReceiveMsg -> GenericComm.ReceiveMsg[AM_FK_MSG]; 
}


abcM.nc

module abcM {
  provides {
interface StdControl;
  }
  uses {
.
interface ReceiveMsg;
  }
}
implementation {
..

 event TOS_MsgPtr ReceiveMsg.receive(TOS_MsgPtr m) {   
  dbg(DBG_TEMP, "Msg Recd from:%d\n", packet->senderId);
..  
return m;
  }
 }

The receive() message is never called I put some DBG statements in init () etc 
and they are called. Can you please help in this regard. 
If u want I can send you all code.

Looking Forward



Regards 
Faisal Karim 




- Original Message 
From: Sarfraz Nawaz <[EMAIL PROTECTED]>
To: Faisal Karim <[EMAIL PROTECTED]>
Cc: tinyos help
 
Sent: Wednesday, June 6, 2007 8:23:18 AM
Subject: Re: [Tinyos-help] sending packets via Tython

Lets say the packet structure is defined as



typedef struct myPacket {

   uint16_t senderId;

   uint16_t someData;

}



then use mig to generate the corresponding java class file. At tython prompt 
issue these commands



from simcore import *;

import myPacket;



myMsg = myPacket();

myMsg.set_senderId(0);

myMsg.set_someData(11);



comm.sendRadioMessage(20, sim.getTossimTime()+10, myMsg);



These commans import necessary stuff, create the packet, set corresponding 
fields and send the packet to node 20.

On 6/5/07, Faisal Karim <
[EMAIL PROTECTED]> wrote:


Hi Sarfaraz

 

Thanks again. But how to set the sender ID for
comm.sendRadioMessage() coz three arguments accepted by this
method dont specify who is sender.

 

Looking forward for your early reply

 



Regards 
Faisal Karim 


   






- Original Message 
From: Sarfraz Nawaz <
[EMAIL PROTECTED]>
To: Faisal Karim <[EMAIL PROTECTED]>
Cc: tinyos help <
tinyos-help@millennium.berkeley.edu>
Sent: Tuesday, June 5, 2007 2:51:49 AM
Subject: Re: [Tinyos-help] sending packets via Tython

Its
the simulation environment that is sending the packets not the base
station node. Though you can set the sender ID to be 0 and have the
receiving node believe that the packet came from node 0.


On 6/4/07, Faisal Karim <[EMAIL PROTECTED]
> wrote: 


Hi Sarfaraz 

Thanks
for reply. Thats true but "who" is using these methods
(comm.sendRadioMessage() and comm.sendUARTMessage() ) to send messages
to any node. I assume its base station ie node 0.

Im looking forward to send messages from specific node. Lets say node 2 send 
message to node 10. How we can do by using Tython.

Thanks in advance. 
Looking Forward 


 



Regards 
Faisal Karim 









- Original Message 
From: Sarfraz Nawaz <
 [EMAIL PROTECTED]>
To: Faisal Karim <[EMAIL PROTECTED]>
Cc: tinyos help <
tinyos-help@millennium.berkeley.edu>
Sent: Sunday, June 3, 2007 6:12:12 AM

Subject: Re: [Tinyos-help] sending packets via Tython 

comm.sendRadioMessage()
and comm.sendUARTMessage() are used to send a packet to "any" node in
the network on the uart and radio respectively.


On 6/1/07, Faisal Karim < [EMAIL PROTECTED] 
> wrote:


Hi All

Im
looking forward to send packets from specific node in simulation via
Tython. In Tython manual it is described to send using moteIF(), but
what i understand this is to send some msg from base station ie some
serial port. To send to base station there is a method
comm.sendUARTMessage(), also there is comm.sendRadioMessage() which im
assuming to send msg from base station to specific node via radio as
this method do not describe which node is sending the message.

any comments and help will be highly appreciated

 



Regards 
Faisal Karim 








Get the Yahoo! toolbar and be alerted to new email 
wherever you're surfing. 

___
Tinyos-help mailing list

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











Get the free Yahoo! toolbar 
and rest assured with the added security of spyware protection. 









  Ready for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 












   

Yahoo! oneSearch: Finally, mobile search 
that gives answers, not web links. 
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Writing to tinynode via usbserial converter

2007-06-06 Thread Maxime Muller - s h o c k f i s h /

try the following:
cd $TOSROOT/apps/Blink/
tos-bsl --invert-reset -c /dev/ttyUSB0 -r -e -I -p build/tinynode/main.ihex
supposing /dev/ttyUSB0 is the right device

cheers,
maxime

I am trying to program a tinynode using tinyos-1.x and it is not working
through my usb-serial converter. I get the error below:

compiled Blink to build/tinynode/main.exe
3126 bytes in ROM
  42 bytes in RAM
msp430-objcopy --output-target=ihex build/tinynode/main.exe
build/tinynode/main.ihex
writing TOS image
cp build/tinynode/main.ihex build/tinynode/main.ihex.out
found mote on /dev/ttyUSB0 (using bsl,auto)
installing tinynode binary using bsl
tos-bsl --telos -c /dev/ttyUSB0 -r -e -I -p build/tinynode/main.ihex.out
MSP430 Bootstrap Loader Version: 1.39-telos-8
Mass Erase...

An error occoured:
Timeout
make: *** [program] Error 1

I know that the node is being detected because it throws a "no mote
found" error if I physically unplug it. Does anyone have experience with
programming a tinynode in this manner and know what I'm doing wrong?

Thanks,

-Shane

___
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] Writing to tinynode via usbserial converter

2007-06-06 Thread Shane Clark
Thanks! That did the job quite nicely. I will have to look at what those
switches do.

-Shane

On Wed, 2007-06-06 at 21:12 +0200, Maxime Muller - s h o c k f i s h /
wrote:
> try the following:
> cd $TOSROOT/apps/Blink/
> tos-bsl --invert-reset -c /dev/ttyUSB0 -r -e -I -p build/tinynode/main.ihex
> supposing /dev/ttyUSB0 is the right device
> 
> cheers,
> maxime
> > I am trying to program a tinynode using tinyos-1.x and it is not working
> > through my usb-serial converter. I get the error below:
> >
> > compiled Blink to build/tinynode/main.exe
> > 3126 bytes in ROM
> >   42 bytes in RAM
> > msp430-objcopy --output-target=ihex build/tinynode/main.exe
> > build/tinynode/main.ihex
> > writing TOS image
> > cp build/tinynode/main.ihex build/tinynode/main.ihex.out
> > found mote on /dev/ttyUSB0 (using bsl,auto)
> > installing tinynode binary using bsl
> > tos-bsl --telos -c /dev/ttyUSB0 -r -e -I -p build/tinynode/main.ihex.out
> > MSP430 Bootstrap Loader Version: 1.39-telos-8
> > Mass Erase...
> >
> > An error occoured:
> > Timeout
> > make: *** [program] Error 1
> >
> > I know that the node is being detected because it throws a "no mote
> > found" error if I physically unplug it. Does anyone have experience with
> > programming a tinynode in this manner and know what I'm doing wrong?
> >
> > Thanks,
> >
> > -Shane
> >
> > ___
> > 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] How to use MIG with telosb for tinyos1.x

2007-06-06 Thread Javed, Huma
Hi

Hope some body would help me out on this. I am trying to generate Java
file automatically using MIG. I created a Makefile in
java/tools/net/tintos/multisend. Then I typed make pc in apps/MultiSend.
Nothing happened no .java file was created. My make file is given
below. Can any one please tell me what am I doing wrong. Any help would
be much appreciated.

Cheers Huma

TOS = $(shell ncc -print-tosdir)

PACKAGE = net.tinyos.multisend

APP = $(TOS)/../apps/MultiSend

MIG = mig java

 

# List of message classes to build

MSGS = MultiMsg.java

 

INITIAL_TARGETS = $(MSGS)

OTHER_CLEAN = cleanmig

 

ROOT = ../../..

include $(ROOT)/Makefile.include

 

MultiMsg.java:

$(MIG) -java-classname=$(PACKAGE).MultiMsg $(APP)/MultiMsg.h
MultiMsg -o $@

$(JAVAC) $@

 

cleanmig:

rm -f $(MSGS)

 

 

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

[Tinyos-help] WSAN2007:CALL FOR DEMOS/POSTERS

2007-06-06 Thread Mari Paz

[Apologies if you receive multiple copies of this e-mail]

*
*CALL FOR DEMOS/POSTERS *
*   *
* WSAN 2007 *
*   *
*  September 24 - 26, 2007  *
*  Albacete, Spain  *
*   *
*http://www.i3a.uclm.es/wsan07/ *
*   *
*

[CALL FOR DEMOS/POSTERS]
Demonstrations and posters showing innovative ideas and applications are 
solicited. WSAN07 is interested in a wide range of sensor and actor 
network related research. Topics include but are not limited to: sensor 
technology, hardware platforms, networking, security, middleware, 
applications, programming, and architecture. Abstracts of accepted demos 
and posters will be published in particular proceedings. Submissions 
from both industries and universities are encouraged.


[DEMO AND POSTER SUBMISSION INSTRUCTIONS]
Please send a two-page description of your poster/demo in PDF to 
[EMAIL PROTECTED]  with the subject line reading "WSAN Poster 
Submission" or "WSAN Demo Submission".
Submissions must conform to the IEEE Transactions style with a 10pt font 
formatted for A4 paper (use the a4paper option) and without page numbers.


Please be as specific as possible in describing what you will show. As 
for the demo submission, please provide separated text description on 
the space, equipment, power supply requirements. Once accepted, at least 
one author of posters and demos are expected to be available during the 
session.



[IMPORTANT DATES]
Two-page descriptions:  From June 1, 2007 to June 15, 2007
Notification of acceptance: June 20, 2007
Camera-ready abstract:  June 25, 2007
Conference dates:   September 24 - 26, 2007

WSAN 2007 Poster/Demo Co-Chairs
Vicente López Camacho, University of Castilla-La Mancha, Spain
Raul Galindo Moreno, University of Castilla-La Mancha, Spain
Fernando Royo Sanchez, University of Castilla-La Mancha, Spain
Antonio Ortiz Torres, University of Castilla-La Mancha, Spain
Paz Pedrón Pardo, University of Castilla-La Mancha, Spain

___
Info-ab mailing list
[EMAIL PROTECTED]
https://al-basit.dsi.uclm.es/mailman/listinfo/info-ab

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


[Tinyos-help] Question about MultiOscilloscope Application

2007-06-06 Thread M A

Hi

I have started learning tinyos-2.x and I have a simple question related to
MultiOscilloscope function in directory tinyos-2.x/apps/MultihopOscilloscope.
In the file MultioscilloscopeC.nc we declare a message buffer " message_t
uartbuf ". But I dont understand where is this initialized. We call the
command SerialSend.getPayload(&uartbuf); in the Recevie.receive() event.
Thus  basically we are getting the payload from the message stored in
uartbuf. But I cant figure out where and when a message is being stored in
uartbuf.

I guess when Receive.receive returns it returns a buffer for the stack. Is
it the same buffer? I am confused. Can anyone explain this to me ?

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

[Tinyos-help] Help , error when compiling

2007-06-06 Thread Chittal, Sandeep U
Hi,
 
I am getting the following error when compiling:
 
Can't execute /usr/lib/ncc/nesc-compile.
make: *** [exe0] Error 1
 
What does this error mean and how can it be rectified?
 
Warm regards,
Sandeep.
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] IBM JDK segfaults on libtoscomm.so

2007-06-06 Thread David Gay

On 6/2/07, Ákos Maróy <[EMAIL PROTECTED]> wrote:

Aurélien Francillon wrote:
> IIRC (not sure), i tracked it back to some known regression of gcc 4.1.x ...
>  it works fine with gcc-3.x

I tried with gcc-3.x, and while it doesn't crash - it doesn't work either.


A bit more investigation here. As Aurelien said, the code generated by
gcc 4.1.2 for libtoscomm.so is definitely wrong, and that is what is
causing the crashes (it goes and reads data from below the bottom of
the stack...).


From this message and your most recent message, it seems like there's

some separate problem that's causing misbehaviour. The mote should
continue transmitting irrespective of what it receives via its serial
port.

David Gay

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


Re: [Tinyos-help] IBM JDK segfaults on libtoscomm.so

2007-06-06 Thread David Gay

On 6/6/07, Ákos Maróy <[EMAIL PROTECTED]> wrote:

[EMAIL PROTECTED] $ java TestSerial
serial@/dev/ttyUSB0:115200: resynchronising
   ...  read: 03 03 03
Sending packet 0
   ... wrote: 7e 44 0e 00 00 00 00 00 02 00 09 00 00 fc 59 7e
   ...  read: 00
Sending packet 1
   ... wrote: 7e 44 0f 00 00 00 00 00 02 00 09 00 01 94 91 7e
Sending packet 2
   ... wrote: 7e 44 10 00 00 00 00 00 02 00 09 00 02 f9 7f 7e



the output itself differs, here are other stuff I get:

$ java TestSerial
Sending packet 0
   ... wrote: 7e 44 0e 00 00 00 00 00 02 00 09 00 00 fc 59 7e
serial@/dev/ttyUSB0:115200: resynchronising
   ...  read: 0b 0b
   ...  read: 00
Sending packet 1
   ... wrote: 7e 44 0f 00 00 00 00 00 02 00 09 00 01 94 91 7e
Sending packet 2
   ... wrote: 7e 44 10 00 00 00 00 00 02 00 09 00 02 f9 7f 7e


$ java TestSerial
serial@/dev/ttyUSB0:115200: resynchronising
   ...  read: 0b
Sending packet 0
   ... wrote: 7e 44 0e 00 00 00 00 00 02 00 09 00 00 fc 59 7e
   ...  read: 00
Sending packet 1
   ... wrote: 7e 44 0f 00 00 00 00 00 02 00 09 00 01 94 91 7e


maybe the serial port is not reset properly, and some trash remains
there from previous rounds?

anyway, the above bytes read - are they valid TinyOS serial protocol bytes?


No. They should look very similar to the written bytes (packets are
delimited by 0x7e bytes).

David Gay

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


[Tinyos-help] Flash Storage Help

2007-06-06 Thread Ian Welch

I have a few questions regarding flash storage. I'm using the MICA2DOT mote.
I'm trying to store 3 sample sets of 7-bytes each (21 bytes total) to a
AT45DB Log storage every 10ms.

In TEP:103 it claims that the smallest block that can be written to the
AT45DB is 257B (I'm assuming this is bytes not bits) so
when I perform the function

call LogWrite.write(mydata, 21)

Is this actually writing 256bytes to memory or just the 21 bytes? Or does it
store the data in RAM until 256 bytes of information has been written to
FLASH before actually writing it to FLASH. I'm asking because I have time
sensitive application and the time it takes to write data to FLASH (5ms for
256Bytes) I believe is throwing my data off.

Any information would be great

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

[Tinyos-help] TinyDB

2007-06-06 Thread Spidernet Lists

Hi,
Can we use TinyDB for TinyOS-2.x?


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


Re: [Tinyos-help] sending packets via Tython

2007-06-06 Thread Sarfraz Nawaz

Have you started GenericComm?

On 6/7/07, Faisal Karim <[EMAIL PROTECTED]> wrote:


Hi Sarfraz

Thanks. Things worked out fine and now im able to send messages via tython
(at least tython prompt says send msg :)  Now the problem arises that node
20 is not receiving the message following is my code

abc.nc

configuration abc {
}
implementation {

components GenericComm;

abcM.ReceiveMsg -> GenericComm.ReceiveMsg[AM_FK_MSG];
}


abcM.nc

module abcM {
  provides {
interface StdControl;
  }
  uses {
.
interface ReceiveMsg;
  }
}
implementation {
..

 event TOS_MsgPtr ReceiveMsg.receive(TOS_MsgPtr m) {
  dbg(DBG_TEMP, "Msg Recd from:%d\n", packet->senderId);
..
return m;
  }
}

The receive() message is never called I put some DBG statements in init ()
etc and they are called. Can you please help in this regard.
If u want I can send you all code.

Looking Forward


Regards
Faisal Karim

- Original Message 
From: Sarfraz Nawaz <[EMAIL PROTECTED]>
To: Faisal Karim <[EMAIL PROTECTED]>
Cc: tinyos help 
Sent: Wednesday, June 6, 2007 8:23:18 AM
Subject: Re: [Tinyos-help] sending packets via Tython

Lets say the packet structure is defined as

typedef struct myPacket {
   uint16_t senderId;
   uint16_t someData;
}

then use mig to generate the corresponding java class file. At tython
prompt issue these commands

from simcore import *;
import myPacket;

myMsg = myPacket();
myMsg.set_senderId(0);
myMsg.set_someData(11);

comm.sendRadioMessage(20, sim.getTossimTime()+10, myMsg);

These commans import necessary stuff, create the packet, set corresponding
fields and send the packet to node 20.

On 6/5/07, Faisal Karim < [EMAIL PROTECTED]> wrote:
>
>  Hi Sarfaraz
>
> Thanks again. But how to set the sender ID for comm.sendRadioMessage() coz
> three arguments accepted by this method dont specify who is sender.
>
> Looking forward for your early reply
>
>  Regards
> Faisal Karim
>
>
>
> - Original Message 
> From: Sarfraz Nawaz < [EMAIL PROTECTED]>
> To: Faisal Karim <[EMAIL PROTECTED]>
> Cc: tinyos help < tinyos-help@millennium.berkeley.edu>
> Sent: Tuesday, June 5, 2007 2:51:49 AM
> Subject: Re: [Tinyos-help] sending packets via Tython
>
> Its the simulation environment that is sending the packets not the base
> station node. Though you can set the sender ID to be 0 and have the
> receiving node believe that the packet came from node 0.
>
> On 6/4/07, Faisal Karim <[EMAIL PROTECTED] > wrote:
> >
> >  Hi Sarfaraz
> >
> > Thanks for reply. Thats true but "who" is using these methods (
> > comm.sendRadioMessage() and comm.sendUARTMessage() ) to send messages
> > to any node. I assume its base station ie node 0.
> >
> > Im looking forward to send messages from specific node. Lets say node
> > 2 send message to node 10. How we can do by using Tython.
> >
> > Thanks in advance.
> > Looking Forward
> >
> >  Regards
> > Faisal Karim
> >
> >
> >
> > - Original Message 
> > From: Sarfraz Nawaz < [EMAIL PROTECTED]>
> > To: Faisal Karim <[EMAIL PROTECTED]>
> > Cc: tinyos help < tinyos-help@millennium.berkeley.edu>
> > Sent: Sunday, June 3, 2007 6:12:12 AM
> > Subject: Re: [Tinyos-help] sending packets via Tython
> >
> > comm.sendRadioMessage() and comm.sendUARTMessage() are used to send a
> > packet to "any" node in the network on the uart and radio respectively.
> >
> > On 6/1/07, Faisal Karim < [EMAIL PROTECTED] > wrote:
> > >
> > >  Hi All
> > >
> > > Im looking forward to send packets from specific node in simulation
> > > via Tython. In Tython manual it is described to send using moteIF(), but
> > > what i understand this is to send some msg from base station ie some 
serial
> > > port. To send to base station there is a method comm.sendUARTMessage(),
> > > also there is comm.sendRadioMessage() which im assuming to send msg
> > > from base station to specific node via radio as this method do not 
describe
> > > which node is sending the message.
> > >
> > > any comments and help will be highly appreciated
> > >
> > >  Regards
> > > Faisal Karim
> > >
> > >
> > > --
> > > Get the Yahoo! toolbar and be alerted to new email
> > > 
wherever
> > > you're surfing.
> > >
> > > ___
> > > Tinyos-help mailing list
> > > Tinyos-help@Millennium.Berkeley.EDU
> > > https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> > >
> > >
> >
> >
> >
> > --
> > Get the free Yahoo! toolbar
> > 
and
> > rest assured with the added security of spyware protection.
> >
>
>
>
> --
> Ready for the edge of your seat? Check out tonight's top 
pickson Yahoo! TV.
>



--
Get the fre