[Tinyos-help] Sync problems with printf and TKN154

Jan Hauer hauer at tkn.tu-berlin.de
Sat Nov 13 02:58:02 PST 2010


It is not unlikely that the printf debugging causes timing problems,
because it involves low-level (interrupt) functions that can reduce
the responsiveness of e.g. the timer subsystem. Why not test your
application without printf and see if it works then (toggle LEDs or
use a sniffer to see what's happening on the channel)? If you think
there is an issue in tkn154 then please try to reproduce it based on
one of the example apps/tests/tkn154/beacon-enabled apps, preferably
with minimal changes.

Jan


On Fri, Nov 12, 2010 at 10:56 PM, Pablo Marcos Oltra
<pablo.marcos.oltra at gmail.com> wrote:
> Hi all,
> I have been trying to program an application with the TKN154 MAC
> implementation, intending to associate a device with the coordinator and
> send packets periodically. It does work, but not very well, cause the device
> misses some beacons periodically as well (I think that is because it tries
> to send something while it should be in rx mode). I have notice that after
> commenting some printf's the time at which the device loses sync is
> different (altough periodically).
> So, I thought that maybe it could have something related with the printf's,
> and that these could made that the TKN154 implementation doesn't work as it
> would. I have read that I should just use the printfflush() in non-time
> critical operations, but even with no printf's my device is losing
> synchronization with the coordinator (but not so often).
> Hence, I would like to ask: has anyone experienced sync problems using the
> printf function in time critical areas or know why I could have these
> problems? How could I solve that? Is there another way to debug the
> application without running a simulation with TOSSIM?
> Thank you ver much in advance.
> Regards,
>   Pablo
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



More information about the Tinyos-help mailing list