Re: [Tinyos-help] CTP timeout-related questions
Thanks for those replies: I have a better understanding now of how the CTP+LPL timeouts work. Fyi: I am seeing about 5-6 hour delays in re-establishing the mesh network when there's a problem Here's the use case: - 2 motes, pretty far away from the basestation, but the signal is able to get through. Each mote is transmitting a sensor reading over CTP+LPL once a minute (except when the mote is still busy in a sensor read or send, from a previous cycle). - Occasionally, something happens to interrupt the mesh network (maybe something in the office that adds some interference), and then both the motes drop off the network (basestation stops receiving data over CTP+LPL), and don't want to come up again again. - If I take both motes and put them right next to the basestation, the data still doesn't come through - About 5-6 hours later, the signals start coming through again on both motes at around the same time. I've seen this type of pattern a couple of times so far. I think that this might be because of the CTP send code on both motes, taking a very long time to time out, possibly combined with the mesh network having trouble re-establishing. If it becomes a problem, I'll see if using the send cancel interface to CTP on the motes helps a bit, to get the data coming through from the motes again sooner. Or maybe I need to try something like making all the motes reboot themselves after an hour of CTP inactivity, or explicitely turning the CTP algorithm off and on on all the motes, to help restart the logic? Thanks for your advice so far. PS: With regards to my earlier question, CTP+LPL, with a 1 second duty cycle, seems to be working very well for me so far in terms of low power usage. ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] CTP timeout-related questions
On Mar 7, 2011, at 2:02 AM, David wrote: Hi there, I've started using CTP+LPL in a project (thanks for the earlier suggestion), and have a few questions about the network behavior when the basestation mote is offline/unavailable. (in this mail, I assume a very basic setup, where the motes can normally all reach the basestation directly over CTP). Also, I'm using the official TinyOS 2.1.1 release, installed from the deb files. Basically I have these queries: 1. CTP send timeout length: If you send a packet over CTP, but the basestation is off, the sent event never seems to fire (even with an error/timeout code). Or rather, sometimes it does, but not other times. Will the send eventually timeout, or will the mote eternally be in a trying to send state, without calling any event code in the app? If there is an eventual send timeout, then how long is it, and where can it be configured? There will be an eventual send timeout. But it might take a long, long time. With LPL, each packet transmission can take a while. And by default CTP can retransmit a packet up to 32 times. 2. Cancelling CTP send: If for instance you're trying to send data over CTP from sensors, but your data is out of date (basestation off for a long time), or your sensor changes it's mind about wanting to send - is there a way to cancel an existing in progress send? I don't see an interface for this. Would stopping and starting the radio, and the collect engines achieve the same thing? (at the moment: I'm assuming that if the mote has been offline for a long time, that the first received packet's sensor data should be ignored, due to likely being very out of date). Send has a cancel command. Take a look at the interface. 3. Updating the packet being sent. Alternately - if the CTP algorithm is taking a long time to send the packet (basestation is off for a long time), is it safe to update the not-yet-sent payload with newer details? (probably not safe, but just checking). No. It's probably already loaded in the radio, so changing it in memory won't matter. 4. Time for CTP network to re-establish. If the motes are unable to contact the basestation for a long time (eg: hours/days), but then later the basestation becomes available - then how long typically would it take for the network to re-establish, and for data to start coming through from the sensors? That is a great question: we've definitely tested starting a mote fresh, but if it was disconnected for a long time (the link was bad), it make take a while for the link estimate to come down to a point where the node might use it. It in part also depends on whether there are other nodes: the disconnected node might be creating routing loops, desperately searching for a route to the root. In that case it might take a while. This seems like a good test case to try sometime and make sure CTP handles well. Phil ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] CTP timeout-related questions
On Sat, Mar 12, 2011 at 8:51 PM, Philip Levis p...@cs.stanford.edu wrote: On Mar 7, 2011, at 2:02 AM, David wrote: ... If the motes are unable to contact the basestation for a long time (eg: hours/days), but then later the basestation becomes available - then how long typically would it take for the network to re-establish, and for data to start coming through from the sensors? That is a great question: we've definitely tested starting a mote fresh, but if it was disconnected for a long time (the link was bad), it make take a while for the link estimate to come down to a point where the node might use it. It in part also depends on whether there are other nodes: the disconnected node might be creating routing loops, desperately searching for a route to the root. In that case it might take a while. This seems like a good test case to try sometime and make sure CTP handles well. If the gap in sequence number is too large, it should reset the estimator so we can use it as quickly as possible. But, yeah, it is good to test these cases. From LinkEstimatorP.nc: packetGap = seq - NeighborTable[idx].lastseq; ... if (packetGap MAX_PKT_GAP) { initNeighborIdx(idx, NeighborTable[idx].ll_addr); ... - om_p ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] CTP timeout-related questions
Also, a quick amendment to the one question: 4. Time for CTP network to re-establish. If the motes are unable to contact the basestation for a long time (eg: hours/days), but then later the basestation becomes available - then how long typically would it take for the network to re-establish, and for data to start coming through from the sensors? Also, does it make a difference whether the basestation is initially available (routes are able to establish before the basestation goes offline), or if the basestation is not available when the sensor motes are started, but then later the basestation comes online. Regards, David. ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help