2

I have a project for which I'd like to automate configuring the network settings on a Raspberry Pi. I can create a WPA1 hotspot very easily with the following bash one-liner.

nmcli connection add \
    con-name wifi_hotspot \
    ifname wlan0 \
    type wifi \
    autoconnect no \
    ipv4.method shared \
    802-11-wireless.band bg \
    802-11-wireless.mode ap \
    802-11-wireless.ssid "wifi_hotspot" \
    802-11-wireless-security.key-mgmt wpa-psk \
    802-11-wireless-security.psk "rubberbabybuggybumpers" \
    802-11-wireless.hidden yes

It seems like the NetworkManager parameter 802-11-wireless-security.key-mgmt is missing an option to specify WPA2 over WPA1.

Is there a way to create a hotspot with WPA2 encryption?

EDIT 1:

I found that specifying 802-11-wireless-security.proto rsn enables WPA2, but also leaves WPA1 enabled. How can I enable only WPA2?

3
  • 2
    What operating system do you use? NetworkManager isn't supported by Raspbian.
    – Ingo
    Commented Jul 17, 2019 at 9:16
  • I am using headless Raspbian Stretch. Could you possibly point me to documentation that NetworkManager isn't supported? It works great except for this one issue I'm having. Commented Jul 17, 2019 at 14:35
  • NetworkManager isn't part of any Raspbian image. You will not find a link that tell you what is not supported. You only will find links telling you what is supported and Raspbian uses dhcpcd: Another Raspbian Desktop User Interface Update. And no, NetworkManager isn't working great on Raspbian as you see.
    – Ingo
    Commented Jul 17, 2019 at 16:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.