Hi,
     Your(MS) line of thought  gave  further  insight.Thanks.
     I am not using any simulator.I use tinyos 1.1.10, mica2 motes.
     I think irrespective of Listen tool functioning, TOSBase forwards
packets to UART.
     The UARTRcvdTask() signifies that if a packet is put on UART, TOSBase
will send it over Radio.Thus, TOSBase  can also function as
transmitter.But, how to put packet on UART?
     In my TOSBase(attached), I need to extract the Msg->strength(rssi) of
received packet and transmit it.I just added 3 lines to TOSBase  at
different points in event TOS_MsgPtr RadioReceive.receive(TOS_MsgPtr Msg).

          line 197 :gpTxMsg->data[0] = Msg->strength & 0xFF;     ( gpTxMsg
is a global pointer to gTxMsg)
         line 198:  gpTxMsg->data[1] = Msg->strength >>8;
         line 207: post UARTRcvdTask();

Is my resolution correct?

Many Thanks,
kishore

On Wed, May 7, 2008 at 9:48 PM, Michael Schippling <[EMAIL PROTECTED]>
wrote:

> OH, maybe I get it now...
>
> TOSBase is to be used as the base-station on your PC. It passes
> messages between the radio (from re-Mote devices) and the serial
> port. The Listen program (or other host based software) sits on
> the other end of the serial. It only makes sense when it's on a
> piece of real hardware dangling off your computer.
>
> I guess if you are running it in the simulator it seems like it
> should just connect to Listen directly, but how? I believe both
> serial and radio are "simulated" in the simulator, where the radio
> connection passes messages between mote simulations and the UART
> connection is some kind of net port (like SerialForwarder) to
> which your host programs can connect.
>
> Did that make sense?
> MS
>
> ram kishore wrote:
>
>>  Hi,
>>        Thanks for reply.
>>  After message is received over UART, in my opinion it should be delivered
>> to listen tool.Why is it sending over the radio again?
>> Is TOSBase working as transmitter also?
>>
>> TOSBaseM.nc is attached.
>>
>> Regards,
>> Kishore
>> On Wed, May 7, 2008 at 9:04 PM, Michael Schippling <[EMAIL PROTECTED]<mailto:
>> [EMAIL PROTECTED]>> wrote:
>>
>>    I don't understand...
>>
>>    The code you include is presumably called when a message is received
>>    over
>>    the UART. It calls RadioSend.send(), which, if names are to be
>> believed,
>>    sends a message over the radio. The last time I looked at
>>    RadioRcvdTask()
>>    (or whatever the symmetric function is called) it called
>>    UARTSend.send().
>>
>>    So I'm not sure what your question is?
>>    MS
>>
>>
>>    ram kishore wrote:
>>
>>        Hi,
>>            When packet is receive,RadioReceive interface generates
>>        "*receive"* event which posts RadioRcvdTask() whose function is
>>        to send that packet to UART.When UART receives the packet, it
>>        generates "receive" event which posts UARTRcvdTask() whose
>>        function must be to send it to PC. Instead, it sends it back
>>        over radio (see UARTRcvdTask() below) as indicated by
>>        Radiosend.send(....) interface.
>>
>>        Please help,
>>        Thanking you,
>>        Kishore
>>
>>        task void UARTRcvdTask() {
>>           result_t Result;
>>
>>           dbg (DBG_USR1, "TOSBase forwarding UART packet to Radio\n");
>>           gpTxMsg->group = TOS_AM_GROUP;
>>           Result = call RadioSend.send(gpTxMsg);
>>
>>           if (Result != SUCCESS) {
>>             atomic gfTxFlags = 0;
>>           }
>>           else {
>>             call Leds.redToggle();
>>           }
>>         }
>>
>>
>>
>>        On Tue, May 6, 2008 at 10:56 PM, Michael Schippling
>>        <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>>        <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote:
>>
>>           Search for UARTSend and RadioSend in your TOSBaseM.nc file,
>>           I find them used in the RadioRcvdTask() and UARTRcvdTask()
>>           methods.
>>
>>           The UARTTokenReceive thing is a bit mysterious, but it looks
>>           like it is used to send an ACK to the UART after the message
>>           has been forwarded over the radio.
>>
>>           MS
>>
>>           ram kishore wrote:
>>
>>               Hi all,
>>                        TOSBase uses interfaces:
>>
>>                  interface BareSendMsg as UARTSend;
>>                  interface ReceiveMsg as UARTReceive;
>>                  interface TokenReceiveMsg as UARTTokenReceive;
>>                    interface StdControl as RadioControl;
>>                  interface BareSendMsg as RadioSend;
>>                  interface ReceiveMsg as RadioReceive;
>>
>>               It uses BareSendMsg interface but never transmits.How to
>>        make it
>>               transmit?
>>               What is the purpose of TokenReceiveMsg interface?
>>
>>               Attached is TOSBase module file.
>>
>>               Regards,
>>               Kishore
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>>               _______________________________________________
>>               Tinyos-help mailing list
>>               [email protected]
>>        <mailto:[email protected]>
>>               <mailto:[email protected]
>>        <mailto:[email protected]>>
>>
>>
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>
>>
>>           --    Platform: WinXP/Cygwin
>>           TinyOS version: 1.x, Boomerang
>>           Programmer: MIB510
>>           Device(s): Mica2, MicaZ, Tmote
>>           Sensor board: homebrew
>>
>>
>>
>>    --    Platform: WinXP/Cygwin
>>    TinyOS version: 1.x, Boomerang
>>    Programmer: MIB510
>>    Device(s): Mica2, MicaZ, Tmote
>>    Sensor board: homebrew
>>
>>
>>
> --
> Platform: WinXP/Cygwin
> TinyOS version: 1.x, Boomerang
> Programmer: MIB510
> Device(s): Mica2, MicaZ, Tmote
> Sensor board: homebrew
>
>

Attachment: TOSBaseM.nc
Description: Cdf file

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

Reply via email to