Electron and ion temperatures in the ionosphere