I've got a Debian 7 machine with Linux3.2 kernel and a USB wifi adapter with Atheros chipset (D-Link DWA-16 Xtreme N Dual Band), which in theory should work.
Indeed, I managed to establish a wifi communication with NetworkManager and it worked more or less fine for ~30 minutes, but then disconnected and failed to reestablish the connection.
I failed to reestablish the connection with NetworkManager, it successfully associates and authenticates, starts 4-way handshake, but then deauthenticates due to reason 15 (4-way handshake timeout).
Then I tried to do the same via the good old ifupdown
by creating an entry in /etc/network/interfaces
:
allow-hotplug wlan1
iface wlan1 inet static
wpa-ssid MyNet
wpa-psk <My key hash generated by `wpa_passphrase MyNet key`>
address 192.168.1.2
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers a.b.c.d
When I sudo ifup wlan1
, it behaves reasonably, until:
wpa_supplicant[8258]: wlan1: Associated with <router's MAC>
wpa_supplicant[3402]: wlan1: No network configuration found for the current AP
(from /var/log/syslog
). Wireshark
sees ARP packages going from my wifi adapter to the router, but the router doesn't reply.
Do you have any ideas about what could that mean and how to troubleshoot this?
SOLUTION:
Thanks to suggestion by peterph, I tried to create wpa_supplicant.conf
and run wpa_supplicant
as a standalone program both in foreground and background and then used wpa-conf wpa_supplicant.conf
in /etc/network/interfaces
.
sudo wpa_supplicant -iwlan1 -c/etc/wpa_supplicant/wpa_supplicant.conf -d
sudo wpa_supplicant -iwlan1 -c/etc/wpa_supplicant/wpa_supplicant.conf -B
I had the first part of troubles (with spontaneous disconnect after "status: associated") disappear, when I killed a running instance of NetworkManager
. It seems to have interfered.
Second part of trouble was with the 4-way handshake failing. It passed ok, when I disabled MAC address filtration on the Access Point. My wifi interface's MAC was in the list of available MACs, but for some reason it still was failing to connect with MAC filtering on the router.
UPDATE 2: The problems are back. 4-way handshake is failing again. Reload of the driver won't help.
ifupdown
completely and do all the steps manually? That is: 1. runwpa_supplicant
with an appropriate config file and then a dhcp client, once the wifi connection is stable. You might want to check how theifupdown
runswpa_supplicant
- it has to pass it some sort of configuration in a file, that you could intercept - output ofps fax | grep wpa_supplicant
whenifupdown
is running should give you an idea where to look for the generated config file - it is the parameter of the-c
option. – peterph Sep 18 '13 at 19:53