Signal strength based localization and path-loss exponent self-estimation in wireless networks