[Tinyos-help] Flash a mote without make

2009-04-23 Thread as2

Hi, if I have an app compiled, can I install it in a mote without a tinyos
full instalation system(Using the files in build/platform)?
Is there any light weight flasher for use in a small linux system?

thanks
-- 
View this message in context: 
http://www.nabble.com/Flash-a-mote-without-make-tp23175416p23175416.html
Sent from the TinyOS - Help mailing list archive at Nabble.com.

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


Re: [Tinyos-help] (no subject)

2009-04-23 Thread Janos Sallai
 Now with the new toolchain I tried to build /apps/Blink with make iris, but I 
 get following error:

 /opt/tinyos-2.x/tos/chips/atm1281/timer/HplAtm1281Timer2AsyncP.nc:222 
 internal compiler error: in start_function, at c-decl.c:6248
 Please submit a full bug report, with preprocessed...

That looks like a gcc bug.

As I wrote before, it has been reported that gcc pre-4.4.0 works OK.
Why don't you try compiling that?

Janos


On Wed, Apr 22, 2009 at 7:25 AM, B.A.f.H. b.a@gmx.net wrote:
 Hi,

 first, I only tried to compile gcc-core-4.3.3 but it stopped with failures, 
 then I compiled the whole toolchain after following instruction
 http://www.mikrocontroller.net/topic/130972#1188040
 Compiling was possible, only avrdude broke with failures.

 Now with the new toolchain I tried to build /apps/Blink with make iris, but I 
 get following error:

 /opt/tinyos-2.x/tos/chips/atm1281/timer/HplAtm1281Timer2AsyncP.nc:222 
 internal compiler error: in start_function, at c-decl.c:6248
 Please submit a full bug report, with preprocessed...

 Can anybody help me?

 thomas

 The cleanest way to go is building an avr-gcc with atmega1284p
 support. The patch was applied late 2007
 (http://gcc.gnu.org/ml/gcc-patches/2007-11/msg01411.html), so a fairly
 recent version of gcc should work. Avr-gcc pre 4.4.0 was reported to
 work well with the tinyos toolchain, so I would opt for that.

 Janos

 On Fri, Apr 17, 2009 at 4:16 AM, B.A.f.H. b.a@gmx.net wrote:
  Hi,
  I have posted yesterday my problem that I need support for the
 ATmega1284P (AVR RZ Raven Eval-Kit) but the avr-gcc used by tinyos doesn't 
 support
 this device.
 
  Is it possible to generate only the c-code and compile it with any other
 c-compiler like IAR or the newest avr-gcc?
  Is the generated c-code compiler independent?
 
  Thanks,
  thomas
  --
  Pt! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit
 allen: http://www.gmx.net/de/go/multimessenger01
  ___
  Tinyos-help mailing list
  Tinyos-help@millennium.berkeley.edu
  https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
 

 --
 Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss 
 für nur 17,95 Euro/mtl.!* 
 http://dslspecial.gmx.de/freedsl-surfflat/?ac=OM.AD.PD003K11308T4569a
 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


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


Re: [Tinyos-help] Flash a mote without make

2009-04-23 Thread Urs Hunkeler
Hi,

If you look in detail at the installation process you will see the 
following steps:
- compiling the actual program into a main.exe file
- modifying some symbols in the binary (node id) and changing the format 
to .srec. This involves platform specific versions of objdump and 
objcopy as well as a TinyOS specific perl script
- Flashing the binary to the mote. Depending on the platform this is 
done with uisp, avr-dude or msp430-bsl (maybe others, too).

So, depending on your platform and your needs, if you can provide the 
final .srec file with the node id already programmed in, you only need 
the actual programmer software, which could be a single binary and 
should run without too much trouble on any small system. If you need to 
modify the node ids you need either perl, objdump, objcopy and the 
TinyOS script (tos-setsymbols or so). If this is too much for you, you 
could probably modify the final .srec file if you know at which offset 
the variables for the node id are.

Cheers,
Urs


as2 wrote:
 Hi, if I have an app compiled, can I install it in a mote without a tinyos
 full instalation system(Using the files in build/platform)?
 Is there any light weight flasher for use in a small linux system?
 
 thanks

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


[Tinyos-help] Carefully play around typecasting

2009-04-23 Thread 王悦
Just a NOTICE, hope to help:)

*Be very careful when using integers of different types in an arithmetic
expression. NesC compiler doesn't seem to convert them into one appropriate
type during evaluation.
*
Because TinyOS doesn't have a full-featured debugging mechanism(though I
appreciate printf, which is really a gift), I used to work in VS2005 before
I transplant the code onto micaz. And recently I wrote something like this:

int8_t i, j;
uint8_t input[SIZE];
uint32_t sum = 0;

for(i = SIZE-1; i = 0; i--){
for(j = 0; j  SIZE; j++){
carry += input[j] * input[i=j+1?i-j-1:SIZE+i-j-1];
}
carry = 8;
}

It works fine in VS2005, yet has trouble on micaz. input[j] *
input[i=j+1?i-j-1:SIZE+i-j-1] can produce negative product though both
operands are unsigned int. I fixed it like this:

carry += (uint32_t)input[j] * (uint32_t)input[i=j+1?i-j-1:SIZE+i-j-1];

While VS2005 is tolerant,  one should still pay attention to coding style in
case of compiler confusion.

-- 
Best Regards

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

[Tinyos-help] tinysec keys

2009-04-23 Thread Amel Badaoui
Hi all,

I used the inteface TinySecControl in an application to get and update the
MAC key after the receive of  a message and before resending it. But when i
start simulation, it stops when trying to get the MACkey. Why is it blocked?

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

Re: [Tinyos-help] startOneShot

2009-04-23 Thread Ittipong Khemapech
I start the timer within the receive() event and *nothing* happens. No
packet is transmitted by the source. I'm pretty sure that the radio is on at
that time.

I posted this problem several weeks ago and still got no reply. That's why I
have to use the InitW2RTimer and it's started in the receivedSFD() event.

Anybody got the same experience?

Thanks,
Ittipong


2009/4/21 Ittipong Khemapech ik.tin...@googlemail.com

 It wasn't me asking about the previous Timer questions. Many thanks for
 your hints. Will try and get back soon.

 Ittipong

 2009/4/21 Michael Schippling sc...@santafe.edu

 I guess this is what you were trying to get at in previous
 Timer questions, right?

 It looks like it should work the way you want. The only thing
 I can see that is questionable is the long atomic {block} for
 your message sending in DataSendTimer.fired(). This might
 block interrupts for too long.

 I would try to simplify the Timer scheme on it's own, flashing
 LEDs or something to see if it works the way you expect, and then
 start adding the radio message drivers back in.

 I think you should also be able to use the receive() method instead
 of starting your first timer, because it is called after the message
 is fully received.

 MS

 Ittipong Khemapech wrote:

 Hi,

 I have been trying to figure the problems out for days. No idea what
 causes it.

 I have a source receiving a packet from the base station. After the SFD
 is received, a timer is called to run to make sure that the reception is
 completed. The source waits for a wait_interval duration to send its data
 packet. So, another timer is used for timing the transmission.

 I am using AlarmToTimer component. The command startOneShot is called.
 What I expect is that the source should send *only after* it receives the
 packet from base station. It seems to me that the source keeps sending.

 Look forward to hear from you soon.

 Thanks,
 Ittipong

 The codes are as follows:

 MyDef.h

 ---

 #ifndef MYDEF_H_
 #define MYDEF_H_

 enum {
   WAIT_TO_RECEIVE = 1024
 };

 #endif
 ==

 SourceAppC.nc

 

 #include MyDef.h   #include DataMsg.h
 #include ControlMsg.h

 configuration SourceAppC {
 }
 implementation {
   components MainC;
   components ActiveMessageC;

   components new AMSenderC(AM_DATAMSG) as AMSenderDataC;
   components new AMReceiverC(AM_CONTROLMSG) as AMReceiverCtrlC;

   components new Alarm32khz32C() as Alarm2Timer;
   components new AlarmToTimerC(T32khz) as W2RTimer;
 components new AlarmToTimerC(T32khz) as SendTimer;

   components CC2420TransmitC;
   components CC2420ActiveMessageC;

   components SourceC as App;

   // Wiring
   App.Boot - MainC;

   App.Packet - AMSenderDataC;
   App.AMPacket - AMSenderDataC;
   App.AMSend - AMSenderDataC;
   App.Receive - AMReceiverCtrlC;

   App.AMControl - ActiveMessageC;;

   App.InitW2RTimer - W2RTimer; App.DataSendTimer - SendTimer;
 W2RTimer.Alarm - Alarm2Timer;
   SendTimer.Alarm - Alarm2Timer;
 App.CC2420Packet - CC2420ActiveMessageC;
   App.RadioTimeStamping - CC2420TransmitC;
   App.CC2420Transmit - CC2420TransmitC;
   }
 =

 SourceC.nc

 --

 #include Timer.h
 #include MyDef.h   #include DataMsg.h
 #include ControlMsg.h

 module SourceC {
   uses {
   interface Boot;
   interface AMSend;
   interface Receive; interface AMPacket;
   interface Packet;
   interface TimerT32khz as InitW2RTimer;
   interface TimerT32khz as DataSendTimer;
   interface RadioTimeStamping; interface SplitControl as
 AMControl;
   interface CC2420Packet; interface
 CC2420Transmit;
   }
 }
 implementation {
   message_t dpkt, cpkt;
   bool sending = FALSE;
   uint16_t pktseq, sentpkts; uint8_t current_tx;
 uint8_t base_addr,
 me;
   uint32_t no_slot, slot_length, slot_start; uint32_t
 wait_interval;

   uint16_t rcv_no;

   task void callInitW2RTimer() {
   call InitW2RTimer.startOneShot(WAIT_TO_RECEIVE);
   }

   task void callDataSendTimer() {
   call DataSendTimer.startOneShot(wait_interval);
   }

   event void Boot.booted() {
   call AMControl.start();
   }

   event void AMControl.startDone(error_t err) {
   if (err != SUCCESS) {
   call AMControl.start();
   }
   }

   event void AMControl.stopDone(error_t err) {
   }

   event void InitW2RTimer.fired() {
   post callDataSendTimer();
   }
   event void DataSendTimer.fired() {

   if (!sending) {
   

[Tinyos-help] help with imote2 and tinyos-1.x

2009-04-23 Thread David Rodenas Herráiz

Hi

I have problems with tinyos-1.x and imote2. I found this post 
http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/msg19542.html 
and my problem is the same. I followed the same steps, at 
http://www.eecs.harvard.edu/~konrad/projects/imote2Camera/IMote2-Installation-Instructions.html.
 

My enviroment is

#uname -a

Linux xubuntu-tos 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686 
GNU/Linux

#xscale-elf-gcc -v

Leyendo especificaciones de /usr/lib/gcc/xscale-elf/3.4.3/specs

Configurado con: ../configure --target=xscale-elf --prefix=/usr --with-gnu-as 
--with-gnu-ld --enable-languages=c

Modelo de hilos: single

gcc versión 3.4.3

The version isn't 3.4.4 as the instruccions, but I think the problem isn't it.

I don't know what to do.

I compile Blink with
#make imote2

and the report messages are 

mkdir -p build/imote2
xscale-elf-as -mcpu=iwmmxt -mfpu=softfpa -defsym BOOTLOADER=1 
/opt/tinyos-1.x/tos/platform/pxa27x/../imote2/flash.s 
/opt/tinyos-1.x/tos/platform/pxa27x/../imote2/binarymover.s 
/opt/tinyos-1.x/tos/platform/pxa27x/barecrt.s 
/opt/tinyos-1.x/tos/platform/pxa27x/mmu_table.s 
/opt/tinyos-1.x/tos/platform/pxa27x/util.s  -o build/imote2/asms.o
cd /opt/tinyos-1.x/tos/platform/pxa27x/lib; make;
make[1]: Entering directory `/opt/tinyos-1.x/beta/platform/pxa27x/lib'
xscale-elf-gcc -g -O2 -Wall -I/opt/tinyos-1.x/tos/platform/pxa27x 
-I/opt/tinyos-1.x/tos/platform/pxa27x/lib/DSP 
-I/opt/tinyos-1.x/tos/platform/pxa27x/lib/   -c -o bufferManagement.o 
bufferManagement.c
In file included from bufferManagement.c:2:
assert.h:8: aviso: se ignora la directiva de atributo `C'
In file included from bufferManagement.c:4:
systemUtil.h:28: aviso: se ignora la directiva de atributo `C'
systemUtil.h:28: aviso: se ignora la directiva de atributo `spontaneous'
xscale-elf-gcc -g -O2 -Wall -I/opt/tinyos-1.x/tos/platform/pxa27x 
-I/opt/tinyos-1.x/tos/platform/pxa27x/lib/DSP 
-I/opt/tinyos-1.x/tos/platform/pxa27x/lib/   -c -o downsample.o downsample.c
xscale-elf-gcc -g -O2 -Wall -I/opt/tinyos-1.x/tos/platform/pxa27x 
-I/opt/tinyos-1.x/tos/platform/pxa27x/lib/DSP 
-I/opt/tinyos-1.x/tos/platform/pxa27x/lib/   -c -o frequency.o frequency.c
xscale-elf-gcc -g -O2 -Wall -I/opt/tinyos-1.x/tos/platform/pxa27x 
-I/opt/tinyos-1.x/tos/platform/pxa27x/lib/DSP 
-I/opt/tinyos-1.x/tos/platform/pxa27x/lib/   -c -o paramtask.o paramtask.c
In file included from paramtask.c:4:
systemUtil.h:28: aviso: se ignora la directiva de atributo `C'
systemUtil.h:28: aviso: se ignora la directiva de atributo `spontaneous'
xscale-elf-gcc -g -O2 -Wall -I/opt/tinyos-1.x/tos/platform/pxa27x 
-I/opt/tinyos-1.x/tos/platform/pxa27x/lib/DSP 
-I/opt/tinyos-1.x/tos/platform/pxa27x/lib/   -c -o profile.o profile.c
xscale-elf-gcc -g -O2 -Wall -I/opt/tinyos-1.x/tos/platform/pxa27x 
-I/opt/tinyos-1.x/tos/platform/pxa27x/lib/DSP 
-I/opt/tinyos-1.x/tos/platform/pxa27x/lib/   -c -o queue.o queue.c
xscale-elf-gcc -g -O2 -Wall -I/opt/tinyos-1.x/tos/platform/pxa27x 
-I/opt/tinyos-1.x/tos/platform/pxa27x/lib/DSP 
-I/opt/tinyos-1.x/tos/platform/pxa27x/lib/   -c -o systemUtil.o systemUtil.c
In file included from systemUtil.c:2:
systemUtil.h:28: aviso: se ignora la directiva de atributo `C'
systemUtil.h:28: aviso: se ignora la directiva de atributo `spontaneous'
xscale-elf-gcc -g -O2 -Wall -I/opt/tinyos-1.x/tos/platform/pxa27x 
-I/opt/tinyos-1.x/tos/platform/pxa27x/lib/DSP 
-I/opt/tinyos-1.x/tos/platform/pxa27x/lib/   -c -o utils.o utils.c
xscale-elf-gcc -g -O2 -Wall -I/opt/tinyos-1.x/tos/platform/pxa27x 
-I/opt/tinyos-1.x/tos/platform/pxa27x/lib/DSP 
-I/opt/tinyos-1.x/tos/platform/pxa27x/lib/   -c -o wmmx.o wmmx.c
xscale-elf-ar  -rvs libimote2.a bufferManagement.o downsample.o frequency.o 
paramtask.o profile.o queue.o systemUtil.o utils.o wmmx.o
r - bufferManagement.o
r - downsample.o
r - frequency.o
r - paramtask.o
r - profile.o
r - queue.o
r - systemUtil.o
r - utils.o
r - wmmx.o
make[1]: Leaving directory `/opt/tinyos-1.x/beta/platform/pxa27x/lib'
compiling Blink to a imote2 binary
ncc -o build/imote2/main.exe -O1 -g -I/opt/tinyos-1.x/tos/lib/CC2420Radio 
-I/opt/tinyos-1.x/tos/lib/Flash -DAUTO_BATTERY_MONITORING=1 -Wall -Wshadow 
-DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -target=imote2 
-fnesc-cfile=build/imote2/app.c -board= -DBOOTLOADER 
-DIDENT_PROGRAM_NAME=\Blink\ -DIDENT_USER_ID=\drodenas\ 
-DIDENT_HOSTNAME=\drodenasPC\ -DIDENT_USER_HASH=0xfeea6a95L 
-DIDENT_UNIX_TIME=0x49efb093L -DIDENT_UID_HASH=0x54910eabL Blink.nc -lm  
build/imote2/asms.o /opt/tinyos-1.x/tos/platform/pxa27x/lib/libimote2.a
In file included from /opt/tinyos-1.x/tos/system/Main.nc:49,
 from Blink.nc:42:
In component `PotC':
/opt/tinyos-1.x/tos/system/PotC.nc:90: component HPLPotC not found
/opt/tinyos-1.x/tos/system/PotC.nc:93: no match
In file included from Blink.nc:42:
In component `Main':
/opt/tinyos-1.x/tos/system/Main.nc:49: component HPLInit not found
/opt/tinyos-1.x/tos/system/Main.nc:52: no match
In file included from 

Re: [Tinyos-help] Help needed

2009-04-23 Thread shirish
My problem is solved, and for future when ever some one gets this problem ,
go to /localization/Makefile and in the place where you find Makerules,
replace that with MakeCalamari...
But again after doing that i am facing one more problem when i do make pc i
receive an error
In component `CalamariSetRangingCmdC':
build/CalamariSetRangingCmdC.nc:20: cannot find `CommandHood_private'
build/CalamariSetRangingCmdC.nc:21: cannot find `NeighborhoodComm'
build/CalamariSetRangingCmdC.nc:22: cannot find `NeighborhoodComm'
make: *** [exe0] Error 1

Need help again..

On Thu, Apr 23, 2009 at 1:51 AM, shirish shirishredd...@gmail.com wrote:

 Hi every one,

 I am new to this mailing list and I am doing a project on localization i
 found out about calamari, i get lots of errors in trying to do so can any
 one please help me, I am running this on xubuntos 2.0, i have set up the
 environment to tinyos 1.x when i go to calamari/localilzation and do make pc
 first i got the error makerules not found, i copied the makerules from the
 apps directory to the calamari directory and it seemed to work but i get
 errors.

 Thanks in advance, looking forward for a reply :)

 sincerely
 shirish.


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

[Tinyos-help] how many time for one ADC convertion in TelosB

2009-04-23 Thread Carmine Ambrosino

Hi all,

I have a question for you,
Do you know how many cycle attempt for ADC convertion for TelosB (MSP430F1611)?

CA Nuova grafica e nuove funzionalità! Crea subito Gratis la tua nuova Casella di Posta  Katamail

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

[Tinyos-help] Can't compile the apps.

2009-04-23 Thread John Smith
Hi everone :) .

I'm new to this.

Here is what happens when I compile the apps folder using cygwin.

$ make
Blink
../Makerules:26: /opt/tinyos-2.x/tos/../apps/Makerules: No such file or
director
y
make[1]: *** No rule to make target
`/opt/tinyos-2.x/tos/../apps/Makerules'.  St
op.
make: *** [all] Error 1

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

Re: [Tinyos-help] Can't compile the apps.

2009-04-23 Thread Ittipong Khemapech
Hi,

Make sure that the compile is conducted under the .../apps/Blink.

Ittipong


2009/4/23 John Smith yoursurrogate...@gmail.com

 Hi everone :) .

 I'm new to this.

 Here is what happens when I compile the apps folder using cygwin.

 $ make
 Blink
 ../Makerules:26: /opt/tinyos-2.x/tos/../apps/Makerules: No such file or
 director
 y
 make[1]: *** No rule to make target
 `/opt/tinyos-2.x/tos/../apps/Makerules'.  St
 op.
 make: *** [all] Error 1

 Why is this happening?

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

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

[Tinyos-help] Time to convert ADC for Telos B

2009-04-23 Thread Carmine Ambrosino

Hi, 
How can I see the time used for one convertion with ADC for Telos B.
thanks everyone
CA Nuova grafica e nuove funzionalità! Crea subito Gratis la tua nuova Casella di Posta  Katamail

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

[Tinyos-help] Help with the printf printfflush()

2009-04-23 Thread Sisu Xi
Dear All:

 Hi. I am following the tutorials on TinyOS Doc. And I have encountered
this problem:

source code:
*uint8_t dummyVar1 = 123;
event void Boot.booted() {
for (; dummyVar1  0; dummyVar1--) {
printf(%u , dummyVar1);
printfflush();
for (j = 0; j  100; j++) {
for (i = 0; i  10; i++) {}
}
}
}  *

here is the output of net.tinyos.tools.PrintfClient:
*Thread[Thread-1,5,main]serial@/dev/ttyUSB0:115200: resynchronising
123 122 121 120 119 118 117 116 115 114 113 112 111 110 109 108 107 106 105
104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81
80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56
55 54 53 52 51 50 49 48 47
*
output of net.tinyos.tools.Listen:
*serial@/dev/ttyUSB0:115200: resynchronising
00 FF FF 00 00 1C 00 64 31 32 33 20 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00
00 FF FF 00 00 1C 00 64 31 32 32 20 31 32 31 20 31 32 30 20 31 31 39 20 31
31 38 20 31 31 37 20 31 31 36 20
00 FF FF 00 00 1C 00 64 31 31 35 20 31 31 34 20 31 31 33 20 31 31 32 20 31
31 31 20 31 31 30 20 31 30 39 20
00 FF FF 00 00 1C 00 64 31 30 38 20 31 30 37 20 31 30 36 20 31 30 35 20 31
30 34 20 31 30 33 20 31 30 32 20
00 FF FF 00 00 1C 00 64 31 30 31 20 31 30 30 20 39 39 20 39 38 20 39 37 20
39 36 20 39 35 20 39 34 20 39 33
00 FF FF 00 00 1C 00 64 20 39 32 20 39 31 20 39 30 20 38 39 20 38 38 20 38
37 20 38 36 20 38 35 20 38 34 20
00 FF FF 00 00 1C 00 64 38 33 20 38 32 20 38 31 20 38 30 20 37 39 20 37 38
20 37 37 20 37 36 20 37 35 20 37
00 FF FF 00 00 1C 00 64 34 20 37 33 20 37 32 20 37 31 20 37 30 20 36 39 20
36 38 20 36 37 20 36 36 20 36 35
00 FF FF 00 00 1C 00 64 20 36 34 20 36 33 20 36 32 20 36 31 20 36 30 20 35
39 20 35 38 20 35 37 20 35 36 20
00 FF FF 00 00 1C 00 64 35 35 20 35 34 20 35 33 20 35 32 20 35 31 20 35 30
20 34 39 20 34 38 20 34 37 00 00 *

Why is this happen? Why doesn't the for loop run to the final state?
Confused by this.  And see from the tools.Listen, Why the prinfflush() does
not perform as expected?   Can anyone help me?  Lots of thanks.

-- 
Yours,
Sisu Xi

Phone: 138-1180-3470
Blog: xisisu.spaces.live.com

This is my future, if I do not fight for it, who will?
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Sensd a message to all node in the   neighborhood

2009-04-23 Thread moadsofiane
Hi,
I am using tossim to my simulations and i want to send a message to a 
neighborhood of the node.
My first question is: How can send this message to the neihbohood of the node?
My secode question: How can I know the node's ID of my neghbors?
Thank you for your help.
Best regards,
Sofiane___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timestamp

2009-04-23 Thread Ittipong Khemapech
Please send your post to the list and try search the archives at
http://www.tinyos.net/scoop/special/support#mailing-lists.

There are a lot of useful hints out there.

If you have got some errors about the missing interfaces, use them and don't
forget to do the wiring.

According to the code, there are some errors that I can't explain to you via
email. You should have a look at the timer. For example, what is the
precision you expect?

Ittipong

2009/4/23 sara so sara.k...@gmail.com

 Hi,
 Thanks for your help but I have tried to follow your small code ... it
 is always complaining about no such interface CC2420TransmitC??
  uses interface RadioTimeStamping; also this interface is not avialable??
 This is my code in case you want to take a look?

 #include Timer.h
 #include CC2420.h
 #include BlinkToRadio.h

 module BlinkToRadioC{
  uses interface Boot;
  uses interface Leds;
  uses interface TimerTMilli as Timer0;

  uses interface Packet;
  uses interface AMPacket;
  uses interface AMSend;
  uses interface Receive;
  uses interface SplitControl as AMControl;
  uses interface RadioTimeStamping;
 implementation {
  message_t pkt;
  bool busy = FALSE;
   uint32_t timertime;
   uint32_t mytimebuf;
   uint32_t transmittime;
  uint8_t mytime[4];
  event void Boot.booted() {
call AMControl.start();
  }

  event void AMControl.startDone(error_t err) {
if (err == SUCCESS) {
  call Timer0.startPeriodic(TIMER_PERIOD_MILLI);
}
else {
  call AMControl.start();
}
  }

  event void AMControl.stopDone(error_t err) {
  }

  event void Timer0.fired() {

if (!busy) {
  BlinkToRadioMsg* btrpkt = (BlinkToRadioMsg*)(call
 Packet.getPayload(pkt, NULL));

if (call AMSend.send(2, pkt, sizeof(BlinkToRadioMsg)) == SUCCESS) {
busy = TRUE;
  }
}
  }

  event void AMSend.sendDone(message_t* msg, error_t err) {
if (pkt == msg) {
  busy = FALSE;
 }
  }

 async event void RadioTimeStamping.transmittedSFD(uint16_t time,
 message_t* p_msg){

  //get the current time and replace the lower half-word with
 SFD-captured timer content:
   timertime= call Timer0.getNow(); //timeget(); is that ok ?

 mytimebuf=(timertime0xUL)((uint32_t)time0xUL))?timertime:(timertime-0x0001UL))0xUL)|((uint32_t)time0xUL));
  transmittime=mytimebuf;
//load the 32-bit timestamp to a uint8_t 4-elements' array:
  for(v=0;v4;v++){
  mytime[v]=(uint8_t)((mytimebuf((3-v)*8))0x00FFUL);
  }
//write the timestamp to the CC2420 RAM:
  call CC2420Transmit.modify(
 offsetof(pkt,timeStamp)+sizeof(message_header_t), mytime, 4);
  }

 async event void RadioTimeStamping.receivedSFD(uint16_t time, message_t*
 p_msg){

 }
 }



 On Thu, Apr 23, 2009 at 10:47 AM, Ittipong Khemapech
 ik.tin...@googlemail.com wrote:
  The ProtocolMsg is an example of user-defined message structure. You may
  declare your own message structure to store information and send it over
 the
  network.
 
  I think you can't access the metadata directly. Please read message_t
 TEP.
 
  Finally, I'm using TinyOS 2.0. I have no idea how it's different from the
  2.1.
 
  Ittipong
 
 
  2009/4/23 sara so sara.k...@gmail.com
 
  Hi,
  Thanks for your help, but what is the ProtocolMsg? I need to include
  the time befor the packet sent, can I just call the cc2420 metadata?
  does tinyos 2.1 support that?
  for example:
   event message_t* Receive.receive( ){
 getting the payload and then read and attche the time in the packet
  filed
 mypkt-timeNow= ((cc2420_metadata_t*)msg-metadata)-time;
  Thank you
  On Wed, Apr 22, 2009 at 7:48 AM, Ittipong Khemapech
  ik.tin...@googlemail.com wrote:
  
  
   -- Forwarded message --
   From: Ittipong Khemapech ik.tin...@googlemail.com
   Date: 2009/2/24
   Subject: Re: [Tinyos-help] Timestamp
   To: Anton ag...@disi.unitn.it
   Cc: tinyos-help tinyos-help@millennium.berkeley.edu
  
  
   Hi,
  
   It works now. Many thanks :-)
  
   Ittipong
  
   2009/2/24 Anton ag...@disi.unitn.it
  
   Hi,
  
   I do timestamps in this way:
  
  
   async event void RadioTimeStamping.transmittedSFD(uint16_t time,
   message_t* p_msg){
  
 //get the current time and replace the lower half-word with
   SFD-captured timer content:
 timertime=timeget();
  
  
  
  
 mytimebuf=(timertime0xUL)((uint32_t)time0xUL))?timertime:(timertime-0x0001UL))0xUL)|((uint32_t)time0xUL));
 transmittime=mytimebuf;
   //load the 32-bit timestamp to a uint8_t 4-elements'
 array:
 for(v=0;v4;v++){
 mytime[v]=(uint8_t)((mytimebuf((3-v)*8))0x00FFUL);
 }
   //write the timestamp to the CC2420 RAM:
 call CC2420Transmit.modify(
   offsetof(ProtocolMsg,timeStamp)+sizeof(message_header_t), mytime, 4);
}
  
  
  
   This works. To use  message_header_t it is necessary to include
   CC2420.h in the 

Re: [Tinyos-help] Flash a mote without make

2009-04-23 Thread Michael Schippling
Examine the last couple of lines in the make install output
and you will find the actual command line for doing the download.
MS


as2 wrote:
 Hi, if I have an app compiled, can I install it in a mote without a tinyos
 full instalation system(Using the files in build/platform)?
 Is there any light weight flasher for use in a small linux system?
 
 thanks
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Carefully play around typecasting

2009-04-23 Thread Michael Schippling
I'd have to go look at the rule book, but I think the general idea
is that types are promoted to the largest referenced on the
right hand side of the expression. In your case they are both uint8
so no implicit conversion gets done. I will go further and assume
that your declared sum should have been carry, in which case
I don't know how you got a negative sign extension in your result.
If carry was signed I could make a case for it though.

I always like to err on the side of explicitness in casts and
ordering just so I don't have to try to remember all the rules.
I even, probably as a result of dealing with always-signed Java,
go so far as to mask results to the precision I want in order to
avoid unintentional sign extension.

In your repaired example you could probably get away with uint16
casts as two 8 bit values will not multiply to larger than 16 bits.
Also you might consider making all your i's and j's unsigned as
the arithmetic is often a bit faster.

MS


and including

王悦 wrote:
 Just a NOTICE, hope to help:)
 
 *Be very careful when using integers of different types in an arithmetic 
 expression. NesC compiler doesn't seem to convert them into one 
 appropriate type during evaluation.
 *
 Because TinyOS doesn't have a full-featured debugging mechanism(though I 
 appreciate printf, which is really a gift), I used to work in VS2005 
 before I transplant the code onto micaz. And recently I wrote something 
 like this:
 
 int8_t i, j;
 uint8_t input[SIZE];
 uint32_t sum = 0;
 
 for(i = SIZE-1; i = 0; i--){
 for(j = 0; j  SIZE; j++){
 carry += input[j] * input[i=j+1?i-j-1:SIZE+i-j-1];
 }
 carry = 8;
 }
 
 It works fine in VS2005, yet has trouble on micaz. input[j] * 
 input[i=j+1?i-j-1:SIZE+i-j-1] can produce negative product though both 
 operands are unsigned int. I fixed it like this:
 
 carry += (uint32_t)input[j] * (uint32_t)input[i=j+1?i-j-1:SIZE+i-j-1];
 
 While VS2005 is tolerant,  one should still pay attention to coding 
 style in case of compiler confusion.
 
 -- 
 Best Regards
 
 Wyatt
 
 
 
 
 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Time to convert ADC for Telos B

2009-04-23 Thread Michael Schippling
You'll probably have to go rummage in the controller manual
to find how many clocks the ADC needs, and then figure out
what clock pre-scaler is being used. I only know (IIRC,
approximately) 25 scaled-instruction-clocks is the number
for the micas.

MS

Carmine Ambrosino wrote:
 Hi,
 How can I see the time used for one convertion with ADC for Telos B.
 thanks everyone
 CA
 
 Nuova grafica e nuove funzionalità! Crea subito Gratis la tua nuova 
 Casella di Posta Katamail http://www.katamail.kataweb.it/?ref=mail
 
 
 
 
 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Setting the MAKERULES variable.

2009-04-23 Thread Michael Schippling
Make sure the file actually exists.
The error says it can't find a tinyos-2.x rules file,
but it looks like you have posted a tinyos-1.x file.

MS

John Smith wrote:
 Hi again,
 
I'm trying to have my simple program compile.
 
 This is the error that I'm getting.
 
 $ make
 ../Makerules:28: /opt/tinyos-2.x/support/make/Makerules: No such file 
 or directory
 make: *** No rule to make target 
 `/opt/tinyos-2.x/support/make/Makerules'.  Stop.
 
 I'm confused.  I set the variable Makerules... so I don't understand why 
 it's not compiling.
 
 tinyos-1.x/apps/Makerules:
 #-*-Makefile-*- vim:syntax=make
 #$Id: Makerules,v 1.37 2004/11/07 15:22:14 mdwelsh Exp $
 
 ##
 # Base Makefile for nesC apps.
 #
 # Created: 6/2002,  Philip Levis p...@cs.berkeley.edu 
 mailto:p...@cs.berkeley.edu
 #
 # Updated: 6/18/2002 Rob von Behren j...@cs.berkeley.edu 
 mailto:j...@cs.berkeley.edu
 #  Multi-platform support
 #
 # Updated: 6/20/2002 David Gay d...@intel-research.net 
 mailto:d...@intel-research.net
 #  Compile via gcc, make tos.th http://tos.th system-wide, not 
 app-wide
 #  (still need to ponder group selection)
 #
 # Updated: 6/27/2003 Jaein Jeong ja...@cs.berkeley.edu 
 mailto:ja...@cs.berkeley.edu
 #  In-network programming support for mica2, mica2dot platforms
 #
 ##
 
 *export MAKERULES=/opt/tinyos-2.x/support/make/Makerules*
 
 ifndef MAKERULES
 MAKERULES=$(shell ncc -print-tosdir)/../apps/Makerules
 endif
 ifndef QUELL_RECURSIVE_TINYOS_APPS_MAKERULES
 QUELL_RECURSIVE_TINYOS_APPS_MAKERULES=1
 include $(MAKERULES)
 else
 
 # this needs to be -dlpt=3 on thinkpads
 # PROGRAMMER_EXTRA_FLAGS :=
 # We don't actually set it here, so you can either set the
 # PROGRAMMER_EXTRA_FLAGS environment variable (recommended) or
 # define it in ../Makelocal
 
 -include $(shell ncc -print-tosdir)/../apps/Makelocal
 
 # User configuration:
 # Specify user values in Makelocal to override the defaults here
 
 ifndef DEFAULT_LOCAL_GROUP
 DEFAULT_LOCAL_GROUP := 0x7d
 
 
 
 What am I missing?
 
 I looked at this source for information.
 
 http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2008-January/030286.html
 
 
 
 
 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Setting the MAKERULES variable.

2009-04-23 Thread John Smith
Yes, the one in tinyos-2.x does exist, I just looked at it.  I haven't
changed anything there and it's the stock Makerules file from when I first
installed tinyos.

Here it is:

#-*-Makefile-*- vim:syntax=make
#$Id: Makerules,v 1.6 2008/09/26 20:13:58 klueska Exp $

# @author Cory Sharp cssh...@eecs.berkeley.edu

### --- This makefile requires GNU Make version 3.80 or newer.


### ---
### --- Prepare variables
### ---

#  Get TOSDIR from ncc if it isn't set already.
ifndef TOSDIR
TOSDIR := $(shell ncc -print-tosdir)
endif

#  Mung MAKERULES for Cygwin; see the warning below for more details.
ifneq ($(findstring \,$(MAKERULES)),)
MAKERULES := $(subst \,/,$(MAKERULES))
define BACKSLASH_WARNING
warning, MAKERULES contains backslashes.

The environment variable MAKERULES contains backslashes \'s.  This can
cause shell scripts including ones in this make system to fail in
strange ways.  I've changed those to forward slashes for you for this
build.  However, you are strongly encouraged to respecify MAKERULES as
either a standard unix-style path or as a mixed-style path where the
backslashes are replaced with forward slashes /'s.

endef
$(warning $(BACKSLASH_WARNING))
endif

#  Deduce TINYOS_MAKE_PATH, the path to this file, if it's not defined
already.
ifndef TINYOS_MAKE_PATH
  ifdef MAKERULES
TINYOS_MAKE_PATH := $(dir $(MAKERULES))
TINYOS_MAKE_PATH := $(TINYOS_MAKE_PATH:%/=%)
  else
TINYOS_MAKE_PATH := $(TOSDIR)/../support/make
  endif
endif

#  Use a default Makelocal if it's not defined already.
TINYOS_MAKELOCAL ?= $(TINYOS_MAKE_PATH)/Makelocal

#  Use a default Makedefaults if it's not defined already.
TINYOS_MAKEDEFAULTS ?= $(TINYOS_MAKE_PATH)/Makedefaults

#  Allow users to specify additional directories to find TOSMake files.
TOSMAKE_TEMP_PATH := $(TOSMAKE_PATH)
TOSMAKE_PATH = $(TINYOS_MAKE_PATH)
TOSMAKE_PATH += $(TOSMAKE_TEMP_PATH)

#  Save makecmdgoals (a read only var) to goals so that we can modify it.
GOALS += $(MAKECMDGOALS)

#  Extract user options from goals of the form opt,arg, transform to
opt=arg,
#  and evaluate.  Then, reduce GOALS to have the args removed.
OptRE := [,.]
GoalOpts := $(shell perl -e 'print join  , map
{s{^(.*?)$(OptRE)}{\U$$1=};$$_} grep /$(OptRE)/, split /\s+/, $(GOALS);')
GOALS := $(shell perl -e '$$_=$(GOALS); s{$(OptRE)\S*}{}g; print;')
$(foreach opt,$(GoalOpts),$(eval $(opt)))


### ---
### --- Define make functions.
### --- (Lord, this is ugly. I want a real scripting language so bad.)
### ---
### --- The functions a user will generally be interested in are
### ---   TOSMake_include(file)
### ---   TOSMake_include_platform(dir)
### ---

#  names(words)
#Produce option names, like junk from /path/to/junk.target.
names = $(sort $(basename $(notdir $(1

#  TOSMake_find(file_or_dir)
#Search for file_or_dir within TOSMAKE_PATH.  For the special case of
#initializing TOSMAKE_PATH itself, this function does not search
#TOSMAKE_PATH if file_or_dir begins with +.
sh_search = for a in $(TOSMAKE_PATH); do [ -e $$a/$$n ]  echo $$a/$$n
 break; done
TOSMake_find = $(if $(filter +%,$(1)),$(1:+%=%),$(shell n=$(1);
$(sh_search)))

#  TOSMake_makelist(dir,extension)
#Get a list of files with the given extension from a directory which
MUST
#be a subdir under TOSMAKE_PATH.
TOSMake_makelist = $(wildcard $(call TOSMake_find,$(1))/*.$(2))

#  TOSMake_include(file)
#Include a makefile which MUST be in a dir or subdir under TOSMAKE_PATH.
TOSMake_include = $(eval include $(call TOSMake_find,$(1)))

#  TOSMake_extra_targets(name)
#Create a default make targets for a TOSMake extra full with its
possible
#options afterward.
define TOSMake_extra_targets
$(subst :,%,$(1)): FORCE
@:
endef

#  TOSMake_include_dir(dir)
#Pull in .extras and .targets from a directory which MUST be a subdir
#under TOSMAKE_PATH.  Create default extra rules as necessary, etc.
TOSMake_include_dir = $(eval $(call TOSMake_include_dir_define,$(1)))
define TOSMake_include_dir_define
$(eval NEW_EXTRAS := $(call TOSMake_makelist,$(1),extra))
$(eval NEW_TARGETS := $(call TOSMake_makelist,$(1),target))
$(eval VALID_EXTRAS += $(NEW_EXTRAS))
$(eval VALID_TARGETS += $(NEW_TARGETS))
$(eval EXTRAS = $(filter $(call names,$(VALID_EXTRAS)),$(GOALS)))
$(eval TARGETS = $(filter $(call names,$(VALID_TARGETS)),$(GOALS)))
$(eval OTHERS = $(filter-out $(EXTRAS) $(TARGETS),$(GOALS)))
$(foreach file,$(NEW_EXTRAS) $(NEW_TARGETS),$(if $(filter $(call
names,$(file)),$(GOALS)),$(eval include $(file
endef

#  TOSMake_include_platform(dir)
#Pull in a directory as a new TOSMake platform, which MUST be a subdir
of
#TOSMAKE_PATH.  A platform directory must also have a .rules file, which
#is automatically evaluated.
TOSMake_include_platform=$(eval $(call
TOSMake_include_platform_define,$(1)))
define TOSMake_include_platform_define
$(call TOSMake_include_dir,$(1))
$(call TOSMake_include,$(1)/$(1).rules)
endef


### ---
### --- Include Makelocal and 

Re: [Tinyos-help] Setting the MAKERULES variable.

2009-04-23 Thread Michael Schippling
So the T1 file was a red herring to see if we were paying attention?
heh...

Try this from the directory where your make is failing:

ls -l $MAKERULES

just to make sure you have the variable set right and the
file is accessible. After that I'm at a loss...

MS

John Smith wrote:
 Yes, the one in tinyos-2.x does exist, I just looked at it.  I haven't 
 changed anything there and it's the stock Makerules file from when I 
 first installed tinyos.
 
 Here it is:
 
 #-*-Makefile-*- vim:syntax=make
 #$Id: Makerules,v 1.6 2008/09/26 20:13:58 klueska Exp $
 
 # @author Cory Sharp cssh...@eecs.berkeley.edu 
 mailto:cssh...@eecs.berkeley.edu
 
 ### --- This makefile requires GNU Make version 3.80 or newer.
 
 
 ### ---
 ### --- Prepare variables
 ### ---
 
 #  Get TOSDIR from ncc if it isn't set already.
 ifndef TOSDIR
 TOSDIR := $(shell ncc -print-tosdir)
 endif
 
 #  Mung MAKERULES for Cygwin; see the warning below for more details.
 ifneq ($(findstring \,$(MAKERULES)),)
 MAKERULES := $(subst \,/,$(MAKERULES))
 define BACKSLASH_WARNING
 warning, MAKERULES contains backslashes.
 
 The environment variable MAKERULES contains backslashes \'s.  This can
 cause shell scripts including ones in this make system to fail in
 strange ways.  I've changed those to forward slashes for you for this
 build.  However, you are strongly encouraged to respecify MAKERULES as
 either a standard unix-style path or as a mixed-style path where the
 backslashes are replaced with forward slashes /'s.
 
 endef
 $(warning $(BACKSLASH_WARNING))
 endif
 
 #  Deduce TINYOS_MAKE_PATH, the path to this file, if it's not defined 
 already.
 ifndef TINYOS_MAKE_PATH
   ifdef MAKERULES
 TINYOS_MAKE_PATH := $(dir $(MAKERULES))
 TINYOS_MAKE_PATH := $(TINYOS_MAKE_PATH:%/=%)
   else
 TINYOS_MAKE_PATH := $(TOSDIR)/../support/make
   endif
 endif
 
 #  Use a default Makelocal if it's not defined already.
 TINYOS_MAKELOCAL ?= $(TINYOS_MAKE_PATH)/Makelocal
 
 #  Use a default Makedefaults if it's not defined already.
 TINYOS_MAKEDEFAULTS ?= $(TINYOS_MAKE_PATH)/Makedefaults
 
 #  Allow users to specify additional directories to find TOSMake files.
 TOSMAKE_TEMP_PATH := $(TOSMAKE_PATH)
 TOSMAKE_PATH = $(TINYOS_MAKE_PATH)
 TOSMAKE_PATH += $(TOSMAKE_TEMP_PATH)
 
 #  Save makecmdgoals (a read only var) to goals so that we can modify it.
 GOALS += $(MAKECMDGOALS)
 
 #  Extract user options from goals of the form opt,arg, transform to 
 opt=arg,
 #  and evaluate.  Then, reduce GOALS to have the args removed.
 OptRE := [,.]
 GoalOpts := $(shell perl -e 'print join  , map 
 {s{^(.*?)$(OptRE)}{\U$$1=};$$_} grep /$(OptRE)/, split /\s+/, $(GOALS);')
 GOALS := $(shell perl -e '$$_=$(GOALS); s{$(OptRE)\S*}{}g; print;')
 $(foreach opt,$(GoalOpts),$(eval $(opt)))
 
 
 ### ---
 ### --- Define make functions.
 ### --- (Lord, this is ugly. I want a real scripting language so bad.)
 ### ---
 ### --- The functions a user will generally be interested in are
 ### ---   TOSMake_include(file)
 ### ---   TOSMake_include_platform(dir)
 ### ---
 
 #  names(words)
 #Produce option names, like junk from /path/to/junk.target.
 names = $(sort $(basename $(notdir $(1
 
 #  TOSMake_find(file_or_dir)
 #Search for file_or_dir within TOSMAKE_PATH.  For the special case of
 #initializing TOSMAKE_PATH itself, this function does not search
 #TOSMAKE_PATH if file_or_dir begins with +.
 sh_search = for a in $(TOSMAKE_PATH); do [ -e $$a/$$n ]  echo 
 $$a/$$n  break; done
 TOSMake_find = $(if $(filter +%,$(1)),$(1:+%=%),$(shell n=$(1); 
 $(sh_search)))
 
 #  TOSMake_makelist(dir,extension)
 #Get a list of files with the given extension from a directory which 
 MUST
 #be a subdir under TOSMAKE_PATH.
 TOSMake_makelist = $(wildcard $(call TOSMake_find,$(1))/*.$(2))
 
 #  TOSMake_include(file)
 #Include a makefile which MUST be in a dir or subdir under TOSMAKE_PATH.
 TOSMake_include = $(eval include $(call TOSMake_find,$(1)))
 
 #  TOSMake_extra_targets(name)
 #Create a default make targets for a TOSMake extra full with its 
 possible
 #options afterward.
 define TOSMake_extra_targets
 $(subst :,%,$(1)): FORCE
 @:
 endef
 
 #  TOSMake_include_dir(dir)
 #Pull in .extras and .targets from a directory which MUST be a subdir
 #under TOSMAKE_PATH.  Create default extra rules as necessary, etc.
 TOSMake_include_dir = $(eval $(call TOSMake_include_dir_define,$(1)))
 define TOSMake_include_dir_define
 $(eval NEW_EXTRAS := $(call TOSMake_makelist,$(1),extra))
 $(eval NEW_TARGETS := $(call TOSMake_makelist,$(1),target))
 $(eval VALID_EXTRAS += $(NEW_EXTRAS))
 $(eval VALID_TARGETS += $(NEW_TARGETS))
 $(eval EXTRAS = $(filter $(call names,$(VALID_EXTRAS)),$(GOALS)))
 $(eval TARGETS = $(filter $(call names,$(VALID_TARGETS)),$(GOALS)))
 $(eval OTHERS = $(filter-out $(EXTRAS) $(TARGETS),$(GOALS)))
 $(foreach file,$(NEW_EXTRAS) $(NEW_TARGETS),$(if $(filter $(call 
 names,$(file)),$(GOALS)),$(eval include $(file
 endef
 

[Tinyos-help] Questions about Implementing Jamming Signals

2009-04-23 Thread Jane
I am trying to implement jamming signals using iris motes with mib520 chip. My 
goal is to completely block other nodes' communication. In the program, I 
broadcast a node ID using AMPacket. The ID is sent non stop by put a send 
signal in the sendDone event and CCA has been disabled. Then I used Basestation 
to monitor the traffic. It seems that most of the time, my program wasn't able 
to block other traffic. There were very few collisions. 

My questions are:

1. Are there any other things I need to do besides sending non-top and disable 
CCA in order to block all other traffic?
2. Is it possible to send tones on mib520? If so, could someone point a light 
how?
3. I remember seeing RF230Sniffer before, but couldn't find it after searching 
the entire tinyos folder. Would someone point me the direction please?

Thanks in advance.

YanYan 





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

Re: [Tinyos-help] Questions about Implementing Jamming Signals

2009-04-23 Thread Miklos Maroti
Dear YanYan,

On Thu, Apr 23, 2009 at 9:49 PM, Jane janesjunk...@yahoo.com wrote:
 I am trying to implement jamming signals using iris motes with mib520 chip.
 My goal is to completely block other nodes' communication. In the program, I
 broadcast a node ID using AMPacket. The ID is sent non stop by put a send
 signal in the sendDone event and CCA has been disabled. Then I used
 Basestation to monitor the traffic. It seems that most of the time, my
 program wasn't able to block other traffic. There were very few collisions.

The job of the MAC is to avoid collisions, so that is why you do not
see many. Even if you disable the CCA, the RF230 driver will receive
messages if that started before you decided to transmit. So it is hard
to jam the radio channel and your best option would be to write your
own driver. However you can still can get decent blocking with the
following (completely untested) steps:

1) In the RF230.h file (or RF230DriverLayer.h if you use the CVS
version) change RF230_RX_ON to 9 (which is RF230_PLL_ON). This will
disable all receive functionality, so the radio will not block your
transmits when another message is in the air.

2) Change the RF230DriverConfig.requiresRssiCca(message_t* msg)
command in the RF230ActiveMessageP.nc to always return FALSE.

3) Change the RandomCollisionConfig.getMinimumBackoff(),
RandomCollisionConfig.getInitialBackoff(message_t* msg),
RandomCollisionConfig.getCongestionBackoff(message_t* msg) commands in
the RF230ActiveMessageP.nc to return with 100 microsecond delays. You
can experiment with these values. This will reduce the amount of delay
between subsequent transmissions.

 2. Is it possible to send tones on mib520? If so, could someone point a
 light how?

MIB520 has nothing to do with the radio, it just communicates with the IRIS.

 3. I remember seeing RF230Sniffer before, but couldn't find it after
 searching the entire tinyos folder. Would someone point me the direction
 please?

apps/tests/rf230/RF230Sniffer

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


[Tinyos-help] Help: SerialForwarder and Hyperterminal

2009-04-23 Thread Vishal Pal
Hello,

I am trying to use Hyperterminal with SerialForwarder but I am not able to
see any data in Hyperterminal. Please help me.

This is my setup:


   1. I simulated Oscilloscope application in TOSSIM.
   2. I started SerialForwarder java application and connected it to TOSSIM
   to receive the simulated data. It connected successfully. I used -comm
   tossim-serial to do this.
   3. I started Oscilloscope java application to see the data coming and it
   showed the graphs successfuly.
   4. I tried using hyperterminal now. I connected it to 9001 port, it is
   the same port at which SerialForwarder is sending data packets. Ideally
   hyperterminal should show the data packets, but it is not showing any data
   packet except T! string. The hyperterminal has been connected succesfully
   to SerialForwarder as the no. of clients has been increased by 1 in
   SerialForwarder.

Please help me, how can I see the data packets in hyperterminal?

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

[Tinyos-help] USB port permission in XUBUNTOS Vmware

2009-04-23 Thread Akankshu Dhawan
Hi All
I am using vmware to run XUBUNTOS but I am unable to access my usb port. I
tried changing permissions  using   chmod 666 /dev/ttyUSB0  but it says
permission denied.
Has anyone else used this setup and  faced a similar issue ?

Would really appreciate your help.

Regards
Akankshu

-- 
First they ignore you, then they laugh at you, then they fight you, then you
win.
- Mahatma Gandhi
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Questions about Implementing Jamming Signals

2009-04-23 Thread Jane
Hi Miklos,

Thanks so much for the help. I will test the procedure that you suggested and 
let you know if it works. 

Sorry I mixed up mib520 and the RF chip. Anyway, is it possible to send tone? 

Thank you!

YanYan

--- On Thu, 4/23/09, Miklos Maroti mmar...@math.u-szeged.hu wrote:
From: Miklos Maroti mmar...@math.u-szeged.hu
Subject: Re: [Tinyos-help] Questions about Implementing Jamming Signals
To: janesjunk...@yahoo.com
Cc: tinyos-help@millennium.berkeley.edu
Date: Thursday, April 23, 2009, 4:18 PM

Dear YanYan,

On Thu, Apr 23, 2009 at 9:49 PM, Jane janesjunk...@yahoo.com wrote:
 I am trying to implement jamming signals using iris motes with mib520
chip.
 My goal is to completely block other nodes' communication. In the
program, I
 broadcast a node ID using AMPacket. The ID is sent non stop by put a send
 signal in the sendDone event and CCA has been disabled. Then I used
 Basestation to monitor the traffic. It seems that most of the time, my
 program wasn't able to block other traffic. There were very few
collisions.

The job of the MAC is to avoid collisions, so that is why you do not
see many. Even if you disable the CCA, the RF230 driver will receive
messages if that started before you decided to transmit. So it is hard
to jam the radio channel and your best option would be to write your
own driver. However you can still can get decent blocking with the
following (completely untested) steps:

1) In the RF230.h file (or RF230DriverLayer.h if you use the CVS
version) change RF230_RX_ON to 9 (which is RF230_PLL_ON). This will
disable all receive functionality, so the radio will not block your
transmits when another message is in the air.

2) Change the RF230DriverConfig.requiresRssiCca(message_t* msg)
command in the RF230ActiveMessageP.nc to always return FALSE.

3) Change the RandomCollisionConfig.getMinimumBackoff(),
RandomCollisionConfig.getInitialBackoff(message_t* msg),
RandomCollisionConfig.getCongestionBackoff(message_t* msg) commands in
the RF230ActiveMessageP.nc to return with 100 microsecond delays. You
can experiment with these values. This will reduce the amount of delay
between subsequent transmissions.

 2. Is it possible to send tones on mib520? If so, could someone point a
 light how?

MIB520 has nothing to do with the radio, it just communicates with the IRIS.

 3. I remember seeing RF230Sniffer before, but couldn't find it after
 searching the entire tinyos folder. Would someone point me the direction
 please?

apps/tests/rf230/RF230Sniffer

Best,
Miklos



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

[Tinyos-help] Help: SerialForwarder not sending data to MATLAB application

2009-04-23 Thread Vishal Pal
Hello,

I am trying to connect my MATLAB GUI with SerialForwarder application to
fetch the data from it.

I wrote a simple client application in MATLAB to connect port 9001.

After the connection has been established, SerialForwarder application sent
2 bytes (85 32) to my MATLAB application. I read in previous posts that I
have to reply with the same 2 bytes to SerialForwarder to start the data
transmission by SerialForwarder program.

I replied with the same 2 bytes to SerialFOrwarder. But, I am not getting
any data after this from SerialForwarder java application.

Please help me, where am I doing the things wrong?

This is my MATLAB program to collect data from SerialForwarder application.
-
% Create TCP/IP object 't'. Specify server machine and port number.
t = tcpip('localhost', 9001);

% Set size of receiving buffer, if needed.
set(t, 'InputBufferSize', 3);
set(t,'ByteOrder','littleEndian');
% Open connection to the server.
fopen(t);

% Transmit data to the server (or a request for data from the server).
fprintf(t, 'GET /');
% Pause for the communication delay, if needed.
pause(1);
datain = zeros(2,1);
datain = fread(t,1,'uint16');
fprintf(1, 'byte received  = %uint16\n', datain);

fprintf(t, 'GET /');
%get(t,'Status')
pause(1);
fwrite(t,datain,'uint16');
fprintf(1, 'byte sent  = %uint16\n', datain);

fprintf(t, 'GET /');
%get(t,'Status')
pause(1);

data = zeros(50,1);
i=0;
for i = 1:t.BytesAvailable
data(i) = fread(t,1,'uint8');
fprintf(1, 'uint8', data(i));
end

%get(t,'Status')
% Disconnect and clean up the server connection.
fclose(t);
delete(t);
clear t
---

Please help me out as this is a very important part of my project.

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

[Tinyos-help] Help: SerialForwarder and Hyperterminal

2009-04-23 Thread Vishal Pal
Hello,

I am trying to use Hyperterminal with SerialForwarder but I am not able to
see any data in Hyperterminal. Please help me.

This is my setup:


   1. I simulated Oscilloscope application in TOSSIM.
   2. I started SerialForwarder java application and connected it to TOSSIM
   to receive the simulated data. It connected successfully. I used -comm
   tossim-serial to   do this.
   3. I started Oscilloscope java application to see the data coming and it
   showed the graphs successfully.
   4. I tried using hyperterminal now. I connected it to 9001 port, it is
   the same port at which SerialForwarder is sending data packets. Ideally
   hyperterminal should show the data packets, but it is not showing any data
   packet except T! string. The hyperterminal has been connected successfully
   to SerialForwarder as the no. of clients has been increased by 1 in
   SerialForwarder.

Please help me, how can I see the data packets in hyperterminal?

Vishal

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