I've switch my Rpi 4B (with raspbian) to ubuntu server since will be used as a portable WLAN web-server. My main objective is to set up an hotspot to access the local websites in the raspi.
I got experience with the raspbian way to set up the hotspot: https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md
I tried this in the my new ubuntu server OS and can't make it work.
Hostapd service logs shows:
Mar 18 16:25:49 ubuntu systemd[1]: Starting Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator...
Mar 18 16:25:49 ubuntu hostapd[1388]: Configuration file: /etc/hostapd/hostapd.conf
Mar 18 16:25:49 ubuntu hostapd[1388]: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Mar 18 16:25:49 ubuntu systemd[1]: Started Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
And my dnsmasq logs:
Mar 18 16:25:49 ubuntu systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Mar 18 16:25:49 ubuntu dnsmasq[1393]: dnsmasq: syntax check OK.
Mar 18 16:25:49 ubuntu dnsmasq[1460]: dnsmasq: unknown interface wlan0
Mar 18 16:25:49 ubuntu dnsmasq[1460]: unknown interface wlan0
Mar 18 16:25:49 ubuntu dnsmasq[1460]: FAILED to start up
Mar 18 16:25:49 ubuntu systemd[1]: dnsmasq.service: Control process exited, code=exited status=2
Mar 18 16:25:49 ubuntu systemd[1]: dnsmasq.service: Failed with result 'exit-code'.
Mar 18 16:25:49 ubuntu systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
WHAT I HAVE TRIED:
I've started the wlan0 interface with: sudo ifconfig wlan0 up
, after this I restart dnsmasq and hostapd service and then the hotspot service start just fine. But when I reboot the device wlan0 doesn't start automatically.
One more thing. If I connect the raspi with a wifi dongle (in wlan1 using netplan) to a router and I start as before wlan0 the Hotspot doesn't work either.
wlan0
? – M. Rostami Mar 18 '20 at 18:56