Hi Romain, I see two possibilities:
1) There is a local variable declaration inside the booted event function that hides a global variable. The local variable has the right value while the global variable is not initialized. 2) The radio is starting up when you post the task and thus is in an undefined state. When you don't post the task the radio is not yet started but somehow still usable (or at least the radio code doesn't generate an error). Even after the booted event has been called, the radio still has to be started (AMControl.start()). Only once the AMControl.startDone() event has been called can the radio be used (see for instance apps/RadioCountToLeds/RadioCountToLedsC.nc). Cheers, Urs Romain Thouvenin schrieb: > Hi, > > I have made an application that sends a packet right after booting. > > If in the booted event, I post a task that sends the packet, the > sendDone event won't be successful. > But if I copy the code of the task and paste it as is in place of the > post instruction, the sendDone event will be successful... > > What can be the cause of such a problem ? > > Thanks for your help, > Romain _______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
