The self-mixing interference is a physical phenomenon well-adapted for sensing applications like range finding or vibration measurements. The optical beam back-scattered by the target into the laser cavity causes fluctuations of the optical output power which allow to determine distances (when the laser wavelength is tuned by a triangular signal) or displacements (for a constant injection current). In this paper, the influence of a weak optical feedback on the spectral characteristics of a semiconductor laser is analyzed for relative and absolute distance measurements. To determine the coherence length of laser diodes with optical feedback, i. e. the maximum range of self-mixing based sensors, the behavior of the spectral linewidth is investigated both theoretically and experimentally. Measurements of the spectral linewidth for several feedback level are made with a Fabry-Perot interferometer. These results are then compared to the theoretical model. The wavelength shift of a Fabry-Perot semiconductor laser due to a current modulation is also studied in the case of a weak feedback. Indeed, the resolution of a self-mixing based laser range finder can be improved by tuning continuously the optical frequency in the greatest region without mode hops. This maximum tuning range without mode hops obviously depends on each laser source but is also modified by the optical feedback. The main characteristics of semiconductor lasers suitable for sensing applications using the self-mixing interference are then deduced.