Hi, I was writing an tiny-os program, starting with "Chirp" as a template, and I ran into an interesting problem. Under certain conditions, the TX_DONE callback would return me a buffer pointer that was not my own. Following the text of the Chirp example, I checked for this condition and ignored it. Unfortunately, doing this would cause the system to lock up, because the TX_DONE callback was never being called again with _my_ pointer. This condition seemed to be correlated with concurrently sending and receiving packets. Asking a local tinyos guru, I was informed that if you don't get your own pointer back, you must SAVE the pointer you do get and subsequently use it.. that is, you might get a different buffer back, but that's the buffer you should use. After changing my code to do this, I found that my application now works reliably. I have three questions regarding this: 1. Is this the correct implementation? 2. If so, under what conditions is a different buffer returned? I started digging down through the layers, and I haven't found it yet, so I thought I would ask. 3. Do any of the sample applications actually handle this case correctly? I looked through several of them and have yet to find one that does. Thanks, Lew
