The Network Manager does make most of it quite easy. Here are the steps which I used to set up a Raspberry Pi (running Bookworm) as an access point:The example uses 172.16.0.0/12 but you can choose any RFC 1918 network range you like.
The SSID would be the wi-fi network name you would like to call it and the PSK would be the WLAN password you want to use for it. It's just the simplest of connections. Setting up a captive portal or using more a complex back end for authentication would be another matter.
You can use 5GHz instead of 2.4GHz by selecting 'a' instead of 'bg' and be sure to choose an appropriate channel.
I have not figured out how to have the Network Manager's DNSmasq plug-in to serve custom local host names though. That is not covered above.
Code:
nmcli connection add con-name 'wlan0-static' ifname wlan0 \ ip4 172.16.0.1/12 type wifi autoconnect yes ssid ...nmcli connection modify wlan0-static 802-11-wireless.mode ap \ 802-11-wireless.band bg 802-11-wireless.channel 11 \ ipv4.method sharednmcli connection modify wlan0-static wifi-sec.key-mgmt wpa-psknmcli connection modify wlan0-static wifi-sec.psk "...."nmcli connection up wlan0-static
The SSID would be the wi-fi network name you would like to call it and the PSK would be the WLAN password you want to use for it. It's just the simplest of connections. Setting up a captive portal or using more a complex back end for authentication would be another matter.
You can use 5GHz instead of 2.4GHz by selecting 'a' instead of 'bg' and be sure to choose an appropriate channel.
Code:
nmcli connection modify wlan0-static 802-11-wireless.band a 802-11-wireless.channel 44nmcli connection down wlan0-staticnmcli connection up wlan0-static
Statistics: Posted by tpyo kingg — Fri Feb 02, 2024 8:41 am