thank you for your suggestion. I did not try it for the moment, but I used the following syntax for /etc/network/interfaces
auto lo wlan0
iface lo inet loopback
iface wlan0 inet dhcp
pre-up iwconfig wlan0 mode managed
pre-up iwconfig wlan0 channel 6
pre-up iwconfig wlan0 essid ABCDEF
pre-up iwconfig wlan0 key ABCD-EFGH-IJ
and everything works fine on karmic 32 bits.
Then I changed my wireless device to an ANATEL - LITEON WN7600R with RaLink RT2860 chipset (if I understand correctly), and I also switched to jaunty 64bits. Since then, neither version of /etc/network/interfaces works - I have to use the NetworkManager on kde or gnome. Besides, I am not connected to the network automatically on kde, but only on gnome. On kde I have to click on the ESSID in the list of the wireless networks.
This suggests that the syntax in /etc/network/interfaces may depend on which particular wireless card is used.
If I have the patience to try other solutions, including that of alidrus, I will let you know about the results...
PS. How do I mark this issues as "solved" in the forum please ?