Thankyou Thomas for the suggestion,
But I tried Joe's suggestion of matching cnt exactly for one value (so 1
toggle per packet- which should be visible), and it did toggle as long
as I compared with count less than 5. So that seems to suggest that the
even is triggered only for the first 4 bytes of the TOS_Msg, which I
think should just be the address. I have even checked that the sendDone
event is triggered, so it really seems strange why it doesn trigger for
any bytes > 4. In any case I will try the oscilloscope thing over the
week when I am in Lab, but I would welcome any other suggestion.

Thank you.
Regards,
Affan

On Mon, 21 Feb 2005 07:51:12 +0100, Thomas Schmid wrote: 
>If you want to be sure that your LED is (not) blinking, hook up an 
>oscilloscope to the pins and you should be able to check if there 
>actually is tension over the LED or not. It is very well probable that 
>you can't see the LED if it is on for only 450us.
>
>Thomas
>
>On Feb 21, 2005, at 6:35 AM, Affan, Syed wrote:
>
>> I had thought of that,but if it was blinking fast (with 50% duty 
>> cycle).. I should have been able to see it (persistance of vision :))

>> ! I did try your valuable suggestion and it seems that as long as 
>> cnt==x where x <=4 the green light is toggled, other wise for cnt > 4

>> it isnt. It seems as if it is just rtansmitting the address, or if it

>> is tranmmiting anything more.. It doesnt seem to cause the event to 
>> be triggered after the address fld has been transmitted. (I set the 
>> address to TOS_BCAST_ADDR before sending).
>>
>> Thanks for your help.
>>
>> Best Regards,
>> Affan, Syed.
>>
>>
>>
>> -----Original Message-----
>> From: Joe Polastre [mailto:[EMAIL PROTECTED]
>> Sent: Sunday, February 20, 2005 8:55 PM
>> To: Affan, Syed
>> Cc: [email protected]
>> Subject: Re: [Tinyos-users] Using RadioCoordinator interface
>>
>>
>> A byte time is ~450us, so the LED is probably blinking so fast, you 
>> can't actually see it.
>>
>> And it is triggered for every byte of data received.
>>
>> Have you tried:
>>
>> if (cnt == 8) {
>>   call Leds.greenToggle();
>> }
>>
>> that's the quick way to figure it out.
>>
>> -Joe
>>
>> On Sun, 20 Feb 2005 20:49:22 -0800, Affan, Syed <[EMAIL PROTECTED]> 
>> wrote:
>>> Hello,
>>> I am trying to use the RadioCoordinator interface implemented by 
>>> CC1000RadioIntM, to get information when the first few bytes of my 
>>> msg
>>
>>> structure have been sent and then  proceed with some actuation. Here

>>> is my code.
>>>
>>> async event void RadioSendCoord.byte(TOS_MsgPtr msg, uint8_t cnt)
>>>   {
>>> //struct BeaconForSync * beaconSync = (struct BeaconForSync 
>>> *)msg->data;
>>>
>>>     //call Leds.greenToggle();
>>>
>>>         if (cnt >= (offsetof(struct TOS_Msg,data) + 3)
>>>                 && (msg->type == SYNC_BEACON)){
>>>                     call Leds.greenToggle();
>>>                 }
>>>
>>>   }
>>>
>>> Now first of all, no matter what I do the above event is triggered 
>>> exactly once per packet transmission (I check this by toogling the 
>>> red
>>
>>> led when BareSendMsg.send() returns SUCCESS, and uncommenting the 
>>> line
>>
>>> in the code above). MY understanding was this should be triggered 
>>> for every byte that is transmitted. Secondly, the if condition is 
>>> never satisfied and I think the reason might very well be b/c the 
>>> event is not triggered for that large a cnt value. What do I need to

>>> make the event trigger for every byte? And be able to do what I 
>>> want?
>>>
>>> Thanks.
>>>
>>> Best Regards,
>>> Affan, Syed.
>>>
>>> _______________________________________________
>>> Tinyos-users mailing list [email protected]
>>> http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users
>>>
>>
>>
>> _______________________________________________
>> Tinyos-users mailing list [email protected]
>> http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users
>
>_______________________________________________
>Tinyos-users mailing list
>[email protected]
>http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users
>



_______________________________________________
Tinyos-users mailing list
[email protected]
http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users

Reply via email to