Issue connecting to Wifi via WPA2 on openwrt

Having issues with your DietPi installation, or, found a bug? Post it here.
vbarter
Posts: 13
Joined: Mon Feb 17, 2020 10:15 am

Issue connecting to Wifi via WPA2 on openwrt

Post by vbarter »

Hello,

I'm having issues connecting my Raspberry Pi 4 to my wifi network. I have 2 radios, both on WPA2. Screenshot of my openwrt settings below. What settings do I configure for the dietpi-wifi.txt file? Do I have to do WPA-EAP instead? If so what do I fill in? It was minimal setup on my router for WPA2.

Image

Code: Select all

# Entry 0
# - WiFi SSID: required, case sensitive
aWIFI_SSID[0]='Wireless'
# - WiFi key: If no key/open, leave this blank
aWIFI_KEY[0]='
# - Key type: NONE (no key/open) | WPA-PSK | WEP | WPA-EAP (then use settings below)
aWIFI_KEYMGR[0]='WPA-PSK'
# - WPA-EAP options: Only fill if WPA-EAP is set above
aWIFI_PROTO[0]=''
aWIFI_PAIRWISE[0]=''
aWIFI_AUTH_ALG[0]=''
aWIFI_EAP[0]=''
aWIFI_IDENTITY[0]=''
aWIFI_PASSWORD[0]=''
aWIFI_PHASE1[0]=''
aWIFI_PHASE2[0]=''
# - Path to the certificate file, e.g.: /boot/mycert.cer
aWIFI_CERT[0]=''
Last edited by vbarter on Wed Jul 29, 2020 9:24 am, edited 1 time in total.
trendy
Posts: 124
Joined: Tue Feb 25, 2020 2:54 pm

Re: Issue connecting to Wifi via WPA2 on openwrt

Post by trendy »

No, you don't have WPA-EAP, use the WPA-PSK.
Be careful cause you have posted the WPA Key in the post above.

For further troubleshooting post from OpenWrt the `uci export wireless` (redact the WPA keys from there as well)
vbarter
Posts: 13
Joined: Mon Feb 17, 2020 10:15 am

Re: Issue connecting to Wifi via WPA2 on openwrt

Post by vbarter »

trendy wrote: Wed Jul 29, 2020 9:22 am No, you don't have WPA-EAP, use the WPA-PSK.
Be careful cause you have posted the WPA Key in the post above.

For further troubleshooting post from OpenWrt the `uci export wireless` (redact the WPA keys from there as well)

Code: Select all

 root@OpenWrt:~# uci export wireless
package wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option hwmode '11a'
        option path 'soc/1b500000.pci/pci0000:00/0000:00:00.0/0000:01:00.0'
        option legacy_rates '0'
        option htmode 'VHT80'
        option channel 'auto'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option key ''
        option ieee80211w '1'
        option ssid '0'
        option encryption 'sae-mixed'

config wifi-device 'radio1'
        option type 'mac80211'
        option hwmode '11g'
        option path 'soc/1b700000.pci/pci0001:00/0001:00:00.0/0001:01:00.0'
        option channel 'auto'
        option legacy_rates '0'
        option htmode 'HT40'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option key ''
        option ssid 'Wss'
        option encryption 'psk-mixed+ccmp'
User avatar
Joulinar
Posts: 2074
Joined: Sat Nov 16, 2019 12:49 am

Re: Issue connecting to Wifi via WPA2 on openwrt

Post by Joulinar »

Hi,

Many thanks for your message. Is DietPi already running? Or do you like to configure WiFi together with the initial setup?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
vbarter
Posts: 13
Joined: Mon Feb 17, 2020 10:15 am

Re: Issue connecting to Wifi via WPA2 on openwrt

Post by vbarter »

Joulinar wrote: Wed Jul 29, 2020 9:37 am Hi,

Many thanks for your message. Is DietPi already running? Or do you like to configure WiFi together with the initial setup?
I ended up switching one of my WiFi settings to be WPA-PSK on the router for the 2.4 band, so I’m setup and running on that.

My question is how can I connect to my 5.0 band network that now runs with WPA2/WPA3? It seems like only WPA-PSK security works and nothing higher with just using a password
User avatar
Joulinar
Posts: 2074
Joined: Sat Nov 16, 2019 12:49 am

Re: Issue connecting to Wifi via WPA2 on openwrt

Post by Joulinar »

Hi,

I tested it with my RPi3B+ without issues. I created an unique 5GHz WiFi using WP2/WPA3 and could connect with the RPi using WPA-PSK without issues. The RPi was connected using WPA2.

WiFi Security
WiFi Security
picture1.PNG (5.96 KiB) Viewed 635 times

Connected Host
Connected Host

Code: Select all

root@DietPi3:~# ip a
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether xxx brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.70/24 brd 192.168.0.255 scope global dynamic wlan0
       valid_lft 86372sec preferred_lft 86372sec
root@DietPi3:~#

Code: Select all

root@DietPi3:~# cat /etc/wpa_supplicant/wpa_supplicant.conf
# Grant all members of group "netdev" permissions to configure WiFi, e.g. via wpa_cli or wpa_gui
ctrl_interface=DIR=/run/wpa_supplicant GROUP=netdev
# Allow wpa_cli/wpa_gui to overwrite this config file
update_config=1
network={
        ssid="Home WLAN5"
        scan_ssid=1
        key_mgmt=WPA-PSK
        psk="xxx"
}

root@DietPi3:~#
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
vbarter
Posts: 13
Joined: Mon Feb 17, 2020 10:15 am

Re: Issue connecting to Wifi via WPA2 on openwrt

Post by vbarter »

Joulinar wrote: Wed Jul 29, 2020 10:38 pm Hi,

I tested it with my RPi3B+ without issues. I created an unique 5GHz WiFi using WP2/WPA3 and could connect with the RPi using WPA-PSK without issues. The RPi was connected using WPA2.
Hey so I tried changing my 2.4 network to be WPA2-PSK and that worked fine... but I still can't connect to my 5.0 network on WPA2.
I tried switching my 5.0 network to WPA-PSK and that connected fine, but WPA2 I'm still having issues.

What am I missing? Below are the 2 commands you ran:

Code: Select all

root@DietPi:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether dc:a6:32:05:1d:4f brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether dc:a6:32:05:1d:50 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.108/24 brd 192.168.1.255 scope global dynamic wlan0
       valid_lft 43068sec preferred_lft 43068sec
    inet6 fd8d:da28:f427:0:dea6:32ff:fe05:1d50/64 scope global dynamic mngtmpaddr 
       valid_lft forever preferred_lft forever
    inet6 2605:e000:1521:9248:dea6:32ff:fe05:1d50/64 scope global dynamic mngtmpaddr 
       valid_lft 603130sec preferred_lft 603130sec
    inet6 fe80::dea6:32ff:fe05:1d50/64 scope link 
       valid_lft forever preferred_lft forever
root@DietPi:~# 

Code: Select all

  GNU nano 3.2        /etc/wpa_supplicant/wpa_supplicant.conf                   

# Grant all members of group "netdev" permissions to configure WiFi, e.g. via w$
ctrl_interface=DIR=/run/wpa_supplicant GROUP=netdev
# Allow wpa_cli/wpa_gui to overwrite this config file
update_config=1
network={
        ssid="Wireless 5.0"
        scan_ssid=1
        key_mgmt=WPA-PSK
        psk="XXXX"
}

network={
        ssid="Wireless 2.4"
        scan_ssid=1
        key_mgmt=WPA-PSK
        psk="XXXX"
}
vbarter
Posts: 13
Joined: Mon Feb 17, 2020 10:15 am

Re: Issue connecting to Wifi via WPA2 on openwrt

Post by vbarter »

So I got my WPA2 to work, I had to add freq_list= to my wpa_supplicant

Here's the example:

Code: Select all

# Grant all members of group "netdev" permissions to configure WiFi, e.g. via wpa_cli or wpa_gui
ctrl_interface=DIR=/run/wpa_supplicant GROUP=netdev
# Allow wpa_cli/wpa_gui to overwrite this config file
update_config=1

freq_list=5170 5180 5190 5200 5210 5220 5230 5240 5260 5280 5300 5320 5500 5520 5540 5560 5580 5600 5620 5640 5660 5680 5700

network={
        ssid="Wireless 5.0"
        scan_ssid=1
        key_mgmt=WPA-PSK
        psk="XXXX"
}
User avatar
Joulinar
Posts: 2074
Joined: Sat Nov 16, 2019 12:49 am

Re: Issue connecting to Wifi via WPA2 on openwrt

Post by Joulinar »

What channel you are running the 5GHz Network? Mine is running on channel 36.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
vbarter
Posts: 13
Joined: Mon Feb 17, 2020 10:15 am

Re: Issue connecting to Wifi via WPA2 on openwrt

Post by vbarter »

Joulinar wrote: Thu Jul 30, 2020 9:18 am What channel you are running the 5GHz Network? Mine is running on channel 36.
I had issues on other channels for sure, 36 was best
Post Reply