Hi Harri and others,
I had installed CntToLedsAndRfm in one of the micaz mote(sender) with TIMER_REPEAT as 1000 and debugging RfmToLeds in other micaz mote(receiver) sitting on mib board with jtag ice.

once the CntToLedsAndRfm starts it starts the first transmission 0x01(red led on). When this value is sent in Radio, the message is received by other micaz mote and value is received(red led is on).

Now if i switch off the sender(CntToLedsAndRfm) mote, i need to switch off the red led in the receiver mote also. But it is still on.

While debugging i found, when the first value 0x01 is sent by CntToLedsAndRfm
in sched.c,

func = TOSH_queue[old_full].tp;
  if (func == NULL)
    {
      __nesc_atomic_sleep();
      return 0;
      }

the fun! c value is CC2420RadioM$PacketRcvd and then IntToLedsM$outputDone. Now when the sender mote is off, func value becomes void and goes into infinite loop __nesc_atomic_sleep and TOSH_wait() functions, the loop goes until interrupt generated, i.e till a radio packet. If the func is void, i need to come out of this loop and do some action(make led off on the receiver).

I need to switch OFF the Led in the receiver mote when the sender is completely OFF.
Any ideas?
Hope I made my question clear.

TIA
Regs,
Peri

Harri Siirtola <[EMAIL PROTECTED]> wrote:
Hi Peri,

if you have an application which sets or clears the leds according to
received messages, there's nothing for the remote to act upon if the sender
is just switched off. Remember, the remote mote must receive a ra! dio
message where the red led is off. If you just switch the base off, nothing
gets sent. Sorry if I misunderstood what you mean.

Regards,

Harri

At 02:03 AM 1/4/2006 -0800, Thiagraj Peri Natraj wrote:
>
>Hi all,
>I have two micaz motes of which one is sitting on a MIB510 board(without
>battery) and other micaz mote battery supplied.
>
>I turned on one of LED in the micaz mote sitting on MIB510 and sent the
>value over radio by modifying the CntToLedsAndRfm program so that it sends
>only the value of one LED ON status (not in counting fashion from 0x00 to
>0x07) and in other mote supplied with battery i programmed the RfmToLeds
>program to receive the LED status and it was recevied fine.
>But, What i expect is when i turn OFF the micaz mote sitting on MIB510, i
>expect the LED to get turned OFF on the micaz mote with battery supplied
>since the radio connect! ion is lost. Once the micaz mote sitting on MIB510
>is off, the radio connection is lost, but still the LED is ON on the micaz
>mote with battery.
>
>Is there a way to check in the RfmToLeds Program to display the value of
>LED, only if there is radio connection! (that is micaz mote sitting on
>MIB510 is OFF) ? and if there is no radio connection make automatically
>the LEDs to OFF in the micaz mote with battery supplied.
>
>TIA,
>Regards,
>Peri
>
>
>Yahoo! Photos
>Ring in the New Year with
>Photo
>Calendars. Add photos, events, holidays, whatever.
>_______________________________________________
>Tinyos-help mailing list
>[email protected]
>https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



Yahoo! Photos
Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to