Thank you for your prompt response. I realize that this problem may be due
to MicaZ using hardware ACK. I am trying to develop a Localization
(position finding) application. For this purpose I find that it is better
to use my own ACK packet at the application level rather than the link
level ACK.

Thanks anyway,
Chandrika

> It's entirely possible that the ack field is defaulted ON
> when not being used. Also, I haven't looked that
> carefully, but I seem to remember that the 'Z radio has
> a hardware level ACK and the the MacControl disable is
> only for the software level used in the mica2...
> You'd have to search through the radio code to see how it's handled.
>
> MS
>
> [EMAIL PROTECTED] wrote:
>> Hi,
>> I have a question regarding acknowledgments in micaz. I am using the
>> following module and calling the MacControl.disableAck(). However I am
>> still able to receive acks.
>> I was wondering how this is possible??
>>
>> Thanks,
>> Chandrika
>>
>>
>> module MyAppM
>> {
>>   provides {
>>   interface StdControl;
>>   }
>>   uses {
>>   interface Timer;
>>   interface SendMsg;
>>   interface ReceiveMsg;
>>   interface Leds;
>>   interface MacControl;
>>   }
>> }
>>
>> implementation
>> {
>>   TOS_Msg m_msg;
>>   int m_int;
>>   bool sending_packet = FALSE;
>>
>>   command result_t StdControl.init() {
>>     m_int = 0;
>>     call Leds.init();
>>     return SUCCESS;
>>   }
>>
>>   command result_t StdControl.start() {
>>      call MacControl.disableAck();
>>     if( TOS_LOCAL_ADDRESS == 1 ){
>>       call Timer.start( TIMER_REPEAT, 5000 );
>>      }
>>     return SUCCESS;
>>   }
>>
>>   command result_t StdControl.stop() {
>>     return SUCCESS;
>>   }
>>
>>   event result_t Timer.fired() {
>>     if( sending_packet == FALSE ) {
>>       CountMsg_t* body = (CountMsg_t*)m_msg.data;
>>       body->n = m_int;
>>       body->src = TOS_LOCAL_ADDRESS;
>>       if( call SendMsg.send( 2, sizeof(CountMsg_t), &m_msg ) == SUCCESS
>> ) {
>>                      call Leds.set( m_int );
>>                      sending_packet = TRUE;
>>              }
>>     }
>>     //m_int++;
>>     return SUCCESS;
>>   }
>>
>>   event result_t SendMsg.sendDone( TOS_MsgPtr msg, result_t success ) {
>>     if (msg->ack)
>>       m_int++;
>>     sending_packet = FALSE;
>>     return SUCCESS;
>>   }
>>
>>   event TOS_MsgPtr ReceiveMsg.receive( TOS_MsgPtr msg ) {
>>      if( TOS_LOCAL_ADDRESS != 1 ){
>>              CountMsg_t* body = (CountMsg_t*)(&msg->data[0]);
>>              call Leds.set( body->n );
>>      }
>>     return msg;
>>   }
>> }
>>
>>
>>
>> _______________________________________________
>> Tinyos-help mailing list
>> [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
>
>


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

Reply via email to