I can't figure out how to make WIFI work correctly on debian.First of all, when I just installed Debian I had WICD as the network program. This program doesn't work correctly. Specifically it can't get past the Validating Authentication. It just does it for a very long time without connecting and at the end I just get at the bottom not connected.I then decided to install gnome-network-manager and use the nm-applet to connect disconnect and so on.But this work erratically. Sometimes it's connected, then all of a sudden the connection is lost even if the nm-applet shows the connection as full. Then I disconnect and connect again like X10 before the connection is restablished.Can someone please tell me what is wrong? Why the WIFI apps are not working?Thanks in advance for your kind help.P.S. I have the latest debian installed.MORE INFO:lspci:root@debian:/home/jenia# lspci -knn | grep Net -A200:19.0 Ethernet controller [0200]: Intel Corporation 82566MM Gigabit Network Connection [8086:1049] (rev 03)    Subsystem: Lenovo ThinkPad T61/R61 [17aa:20b9]    Kernel driver in use: e1000e--03:00.0 Network controller [0280]: Intel Corporation PRO/Wireless 4965 AG or AGN [Kedron] Network Connection [8086:4230] (rev 61)    Subsystem: Intel Corporation Device [8086:1010]    Kernel driver in use: iwl4965uname -a :root@debian:/home/jenia# uname -aLinux debian 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) i686 GNU/LinuxChanges to /etc/network/interfaces made the connection kind of work:# This file describes the network interfaces available on your system# and how to activate them. For more information, see interfaces(5).source /etc/network/interfaces.d/*# The loopback network interfaceauto loiface lo inet loopback# The primary network interfaceallow-hotplug eth0iface eth0 inet dhcpauto  wlan0# I added this   <---------------------------------------iface wlan0 inet dhcp        wpa-ssid ASUS        wpa-psk asdkadmkamdskmakdsmakmdsThe connection works perfectly except that this doesn't explain why the connection times out with gnome-network-manager and nm-applet on the one hand, and authentication fails with WCID on the other hand (I entered and verified the password with WCID GUI a million times!).Also, I'm wondering, how would I connect to other networks? Will I always need to change /etc/network/interfaces?
wireless network working erratically on debian
linux;debian;ubuntu;networking;wifi