I'm having trouble connecting to a network that isn't the first one in my wpa_supplicant.conf
file (NETWORK3
). I can connect to NETWORK1
just fine, but it is a Wifi hotspot, so I would prefer to not use it. The problem is that it cannot connect either to NETWORK2
or NETWORK3
even if the other one isn't broadcasting. I am using the Wi-Pi USB Wifi dongle, so the interface is wlx000f54020407
, not wlan0
. I do not have a monitor, so I'm connecting to the pi through ssh. The pi is a model 1B running Raspbian version 9.
My wpa_supplicant
file looks like this:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=CA
network={
ssid="NETWORK1"
psk="PASSWORD1"
priority=10
}
network={
ssid="NETWORK2"
psk="PASSWORD2"
priority=12
}
network={
ssid="NETWORK3"
psk="PASSWORD3"
priority=5
}
My interfaces
file:
If I put anything with wlan0
in this file, the networking service doesn't start.
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlx000f54020407
iface wlx000f54020407 inet dhcp
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
Here's what happens when I turn off the hotspot (NETWORK1
) for a minute - this is from dmesg
:
[ 3379.870491] wlx000f54020407: deauthenticated from 3e:dc:bc:3c:0f:3a (Reason: 3=DEAUTH_LEAVING)
[ 3381.132294] wlx000f54020407: authenticate with 3e:dc:bc:3c:0f:3a
[ 3381.163746] wlx000f54020407: send auth to 3e:dc:bc:3c:0f:3a (try 1/3)
[ 3381.276358] wlx000f54020407: send auth to 3e:dc:bc:3c:0f:3a (try 2/3)
[ 3381.386376] wlx000f54020407: send auth to 3e:dc:bc:3c:0f:3a (try 3/3)
[ 3381.506361] wlx000f54020407: authentication with 3e:dc:bc:3c:0f:3a timed out
[ 3456.248189] wlx000f54020407: authenticate with 3e:dc:bc:3c:0f:3a
[ 3456.280182] wlx000f54020407: send auth to 3e:dc:bc:3c:0f:3a (try 1/3)
[ 3456.304500] wlx000f54020407: authenticated
[ 3456.314494] wlx000f54020407: associate with 3e:dc:bc:3c:0f:3a (try 1/3)
[ 3456.319038] wlx000f54020407: RX AssocResp from 3e:dc:bc:3c:0f:3a (capab=0x411 status=0 aid=1)
[ 3456.319064] wlx000f54020407: invalid AID value 0x1; bits 15:14 not set
[ 3456.332099] wlx000f54020407: associated
Every network shows up when I do iwlist wlx000f54020407 scan
as root. Here's the information for NETWORK1
:
Cell 02 - Address: 3E:DC:BC:3C:0F:3A
Channel:11
Frequency:2.462 GHz (Channel 11)
Quality=65/70 Signal level=-45 dBm
Encryption key:on
ESSID:"NETWORK1"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
11 Mb/s; 12 Mb/s; 18 Mb/s
Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
Mode:Master
Extra:tsf=00000000d200ed3e
Extra: Last beacon: 60ms ago
IE: Unknown: 00036E6574
IE: Unknown: 010882848B0C12961824
IE: Unknown: 32043048606C
IE: Unknown: 03010B
IE: Unknown: 2A0104
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
IE: Unknown: 2D1A2D0117FF00000000000000000000000000000000000000000000
IE: Unknown: 3D160B001300000000000000000000000000000000000000
IE: Unknown: DD180050F2020101000003A4000027A4000042435E0062322F00
IE: Unknown: DD050016328000
IE: Unknown: DD080050F21102000000
and NETWORK3
:
Cell 04 - Address: 90:50:CA:B9:6D:F8
Channel:11
Frequency:2.462 GHz (Channel 11)
Quality=49/70 Signal level=-61 dBm
Encryption key:on
ESSID:"NETWORK3"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
9 Mb/s; 12 Mb/s; 18 Mb/s
Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
Mode:Master
Extra:tsf=00000026788b22ad
Extra: Last beacon: 60ms ago
IE: Unknown: 000657616E206C69
IE: Unknown: 010882848B968C129824
IE: Unknown: 03010B
IE: Unknown: 2A0100
IE: Unknown: 3204B048606C
IE: Unknown: 2D1AAD011BFFFFFF00000000000000000001000000000406E6470D00
IE: Unknown: 3D160B000500000000000000000000000000000000000000
IE: Unknown: 7F080000000000000040
IE: Unknown: DD180050F2020101800003A4000027A4000042435E0062322F00
IE: Unknown: DD0900037F01010000FF7F
IE: Unknown: DD9E0050F204104A00011010440001021057000101103B00010310470010B5862471C47554CEB60835B1D058B06B10210017486974726F6E20546563686E6F6C6F67792C20496E632E102300044150787810240008415078782D7878781042001253657269616C204E756D62657220486572651054000800060050F204000110110008486974726F6E4150100800022008103C0001011049000600372A000120
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
I've tried using an empty interfaces.conf
, and various different configurations of wpa_supplicant.conf
. I don't know what else to try, so help would be much appreciated!