In this paper we study the problem of estimating the channel parameters for a generic wireless sensor network (WSN) in a completely distributed manner, using consensus algorithms. Specifically, we first propose a distributed strategy to minimize the effects of unknown constant offsets in the reading of the radio strength signal indicator due to uncalibrated sensors. Then we show how the computation of the optimal wireless channels parameters, which are the solution of a global least‐square optimization problem, can be obtained with a consensus‐based algorithm. The proposed algorithms are general algorithms for sensor calibration and distributed least‐square parameter identification, and do not require any knowledge either on the global topology of the network nor the total number of nodes. Finally, we apply these algorithms to experimental data collected from an indoor WSN. Copyright © 2009 John Wiley & Sons, Ltd.