I ve got an other question. How can i simulate BlinktoRadio with 2 motes ? Indeed, in these files we don't precise if the 2 motes are on the same range. Maybe, it s the reason why it doesn t display something ?

From: "Bibudh Lahiri" <[EMAIL PROTECTED]>
To: [email protected]
Subject: [Tinyos-help] Re: [TOSSIM]
Date: Mon, 25 Jun 2007 10:12:00 -0500

Hi
  r u sure u wrote 'temp' in lowercase in the command export DBG=temp? I
myself made the mistake once, so...
  Also, why don't u write the following statement

 dbg(DBG_TEMP,"BlinkToRadio","compteur : %s\n",btrpkt->counter);

 as

 dbg(DBG_TEMP,"BlinkToRadio computer : %s\n",btrpkt->counter); ?

 Can u specifically mention what error message u r getting?



On 6/25/07, vazoumana fofana <[EMAIL PROTECTED]> wrote:

Hello bibudh and Mehdi,

i don't understand very well your expanation about how displaying values
with debug.
indeed, i ve met the same problem than Mehedi Bakht.

You say that :
U need a debug mode, e.g.,
dbg(DBG_TEMP, "Counter: Value is %i\n", (int)state);
here the mode is 'temp'. To get the message in the console, u need to
export
the debug mode with the following command before u run the program.
export DBG=temp
i add this line on the code but it doesn't work. it doesn t know DBG_TEMP.
Here is the code :

event message_t* Receive.receive(message_t* msg, void* payload, uint8_t
len)
{
if (len == sizeof(BlinkToRadioMsg)) {
   BlinkToRadioMsg* btrpkt = (BlinkToRadioMsg*)payload;
   dbg(DBG_TEMP,"BlinkToRadio","compteur : %s\n",btrpkt->counter);
   call Leds.set(btrpkt->counter);
}
return msg;

from TOSSIM import *
import sys

f = open("log.txt", "w")
t = Tossim([])


t.addChannel("BlinkC", sys.stdout);
t.addChannel("BlinkC", f);

for i in range(0,1):
       m = t.getNode(i).bootAtTime(0);

time = t.time()
while (time + 10000000000 > t.time()):
t.runNextEvent()

_________________________________________________________________
Gagnez des écrans plats avec Live.com http://www.image-addict.fr/




_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

_________________________________________________________________
Ten : Messenger en illimité sur votre mobile ! http://mobile.live.fr/messenger/ten/

_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to