Really need your helps...

Can't anybody help me ??

Does it related to simulation section ??





On Tue, Nov 10, 2009 at 10:09 PM, mojtaba raznahan <
mojtaba.razna...@gmail.com> wrote:

> I'm still bickering with this issue...some help plz
>
>
> On Tue, Nov 10, 2009 at 7:44 PM, mojtaba raznahan <
> mojtaba.razna...@gmail.com> wrote:
>
>> How can i make sure that the message ACK is active or not ? I have not
>> worked with ACK yet
>>
>>
>> On Tue, Nov 10, 2009 at 7:26 PM, Ricardo . <ricardo.mas...@gmail.com>wrote:
>>
>>> I read one of the threads that the cause of the issue might be the ACK
>>> messages.  ACK will arrive at the event will never be signaled.  If the
>>> message ACK is active and no ACK is received sendDone is not signaled.
>>>
>>>
>>> On Tue, Nov 10, 2009 at 3:37 PM, mojtaba raznahan <
>>> mojtaba.razna...@gmail.com> wrote:
>>>
>>>> Hi Ricardo,
>>>>
>>>> Thanks for reply. I wrote a dbg statement in first of sendDone event but
>>>> ...the sendDone event is not signaled at all!
>>>>
>>>>
>>>> event void AMSend.sendDone(message_t* bufPtr, error_t error)
>>>> {
>>>>    * dbg("Base","sendDone %s .\n",sim_time_string());*
>>>>
>>>>     if (&pkt == bufPtr) {
>>>>       busy = FALSE;
>>>>     }
>>>>
>>>> }
>>>>
>>>> There isn'nt any statement to print while simulating!!!!
>>>>
>>>> Really confused! What's your idea ??
>>>> Does it related to Radio configuration of simulation code ?(python code
>>>> ?)
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, Nov 10, 2009 at 6:43 PM, Ricardo . <ricardo.mas...@gmail.com>wrote:
>>>>
>>>>> Try print the value of error_t error in sendDone event
>>>>>
>>>>> On Mon, Nov 9, 2009 at 3:53 PM, mojtaba raznahan <
>>>>> mojtaba.razna...@gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Im writing a simple application to test send and receive of motes
>>>>>> .AMSend.send command works but AMSend.sendDone event isn't signaled after
>>>>>> sending so the busy flag does'nt change to false. and in the next time 
>>>>>> the
>>>>>> AMSend.send command does not return SUCCESS .
>>>>>> this is my code :
>>>>>>
>>>>>> event void Boot.booted() {
>>>>>> dbg("Boot","Booted at time %s .\n",sim_time_string());
>>>>>> call AMControl.start();
>>>>>> }
>>>>>>
>>>>>> event void AMControl.startDone(error_t err)
>>>>>> {
>>>>>> dbg("Control","AMControl started %s .\n",sim_time_string());
>>>>>>   if(err == SUCCESS) {
>>>>>>    if(TOS_NODE_ID == 1 ) {
>>>>>>     dbg("Base","This is the base station...ready for sending packets
>>>>>> %s.\n",sim_time_string());
>>>>>>     call Timer.startPeriodic(TIMER_DELAY);
>>>>>>     }
>>>>>> }
>>>>>>   else
>>>>>>    call AMControl.start();
>>>>>> }
>>>>>>
>>>>>> event void AMControl.stopDone(error_t err)
>>>>>> {
>>>>>>
>>>>>> }
>>>>>>
>>>>>> event void Timer.fired()
>>>>>> {
>>>>>>
>>>>>>    if(!busy)
>>>>>>       {
>>>>>>
>>>>>>
>>>>>>           RbsMsg*  data =  (RbsMsg*) ( call
>>>>>> Packet.getPayload(&pkt,sizeof(RbsMsg)));
>>>>>>           data->count = counter;
>>>>>>            if( call AMSend.send(AM_BROADCAST_ADDR,&pkt,sizeof(RbsMsg))
>>>>>> == SUCCESS)
>>>>>>            {
>>>>>>              dbg("Base","Packet sent %s.\n",sim_time_string());
>>>>>>              busy= TRUE;
>>>>>>              counter++;
>>>>>>             }
>>>>>>     else
>>>>>>        dbg("Base","was not SUCCESSFULL %s .\n",sim_time_string());
>>>>>>
>>>>>> }
>>>>>>
>>>>>> }
>>>>>>
>>>>>> --------------------
>>>>>> event void AMSend.sendDone(message_t* bufPtr, error_t error)
>>>>>> {
>>>>>>
>>>>>>     if (&pkt == bufPtr) {
>>>>>>       busy = FALSE;
>>>>>>       dbg("Base","send Done %s .\n",sim_time_string());
>>>>>>     }
>>>>>>
>>>>>> }
>>>>>>
>>>>>> and this is my simulation code with python :
>>>>>>
>>>>>> #! /usr/bin/python
>>>>>>
>>>>>> import sys
>>>>>> import random
>>>>>> from TOSSIM import *
>>>>>> t = Tossim([])
>>>>>> r = t.radio();
>>>>>>
>>>>>> for i in range (0, 3):
>>>>>>  m = t.getNode(i);
>>>>>>  m.bootAtTime(1000 * i+ 1);
>>>>>>
>>>>>> r.add(1, 0, -54.0);
>>>>>> r.add(1, 2, -54.0);
>>>>>> r.add(0, 2, -20.0);
>>>>>> r.add(2, 0, -20.0);
>>>>>>
>>>>>>
>>>>>> t.addChannel("Boot",sys.stdout);
>>>>>> t.addChannel("Base",sys.stdout);
>>>>>> t.addChannel("Receive",sys.stdout);
>>>>>> t.addChannel("Control",sys.stdout);
>>>>>>
>>>>>> for i in range(0, 20000):
>>>>>>   t.runNextEvent();
>>>>>>
>>>>>>
>>>>>> Would you help me please? i really need your helps.
>>>>>>
>>>>>> Regards,
>>>>>> --
>>>>>> Mojtaba Raznahan
>>>>>> BS of Computer engineering
>>>>>> TMU university
>>>>>> www.raznahan.com
>>>>>>
>>>>>> _______________________________________________
>>>>>> Tinyos-help mailing list
>>>>>> Tinyos-help@millennium.berkeley.edu
>>>>>>
>>>>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Mojtaba Raznahan
>>>> BS of Computer engineering
>>>> TMU university
>>>> www.raznahan.com
>>>>
>>>
>>>
>>> _______________________________________________
>>> Tinyos-help mailing list
>>> Tinyos-help@millennium.berkeley.edu
>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>>
>>
>>
>>
>> --
>> Mojtaba Raznahan
>> BS of Computer engineering
>> TMU university
>> www.raznahan.com
>>
>
>
>
> --
> Mojtaba Raznahan
> BS of Computer engineering
> TMU university
> www.raznahan.com
>



-- 
Mojtaba Raznahan
BS of Computer engineering
TMU university
www.raznahan.com
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to