[Tinyos-help] divide by 0 problem in 4bitle

Omprakash Gnawali gnawali at cs.stanford.edu
Sun Apr 11 16:29:28 PDT 2010

2010/4/2 Islam Hegazy <islheg at gmail.com>:
> Hi all,
> There is a divide by 0 problem in 4bitle. In LinkEstimatorP.nc, the
> function updateNeighborEntryIdx() calls updateNeighborTableEst() if rcvCnt +
> failCnt >= BLQ_PKT_WINDOW. This means that updateNeighborTableEst() can be
> called if rcvCnt = 0. Well, if this is the first call and we missed the
> first BLQ_PKT_WINDOW packets i.e. failCnt = BLQ_PKT_WINDOW, remember that
> inQuality is initialized to 0, then the calculations in
> updateNeighborTableEst() will reveal inQuality = 0, which will lead to
> divide by 0 problem when computeETX() is called.

I am not sure if this problem exists in the latest version of the link
estimator. Can you double check?

BTW, I fixed the problems you reported earlier.

- om_p

More information about the Tinyos-help mailing list