1

I tried following Web-E's answer on this but when I connect to the AP/hotspot I don't get an IP: How to create a Wi-Fi Hotspot (in Access Point mode)?

I had to use the default hostapd conf for it to even become visible rather than the one in the answer. I stopped just before "Setup internet connection settings" as I don't think I want this.

I have an OrangePi running Armbian 23.02.2. (Running headless)

I want to setup an access point over Wi-Fi that becomes available on every boot. I will host a small HTTP server with a CPP application and I want to be able to access it only over this access point. I don't want to share or be able to access the internet, just the server that I am hosting.

What is the best way to be able to do this and be able to access the server with some sort of domain name rather than an IP address.

Thanks!

Edit:

nmcli dev wifi hotspot ifname wlan0 ssid Armbian password "12345678"

I ran the above command and I could connect to the hotspot and I got an ipaddress and I was then able to ssh to the OrangePi at ..*.1. I now need to figure out how to make it come back after reboots and how to get a domain name to work.

Edit2: nmcli only seems to work while connected to internet, once I pulled out the ethernet cable the hotspot disappeared.

av4625
  • 139

1 Answers1

0

I found the way to create an access point that doesn't rely on having another internet connection using nmcli.

sudo apt install dnsmasq-base -y
nmcli connection add type wifi ifname wlan0 con-name access_point autoconnect yes ssid my_ssid
nmcli connection modify access_point 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli connection modify access_point wifi-sec.key-mgmt wpa-psk
nmcli connection modify access_point wifi-sec.psk "my_password"
nmcli connection up access_point

Replace wlan0 with your Wi-Fi device name.

I'm not 100% sure if installing dnsmasq-base is required, but I think I didn't have it and my device that I connected to the access point couldn't get an IP.

I am also able to ping the hostname when connected to the access point if the device with the AP has an internet connection, but I can't ping the hostname if it doesn't

av4625
  • 139