-
Notifications
You must be signed in to change notification settings - Fork 908
WiFi Access Point
In isolated areas where network connectivity is not an option, you may wish to access motionEyeOS via its own WiFi network. This can be achieved by configuring your board as a WiFi Access Point.
While having your setup behave as an access point may sound cool, keep in mind that:
- not all board/WiFi adapter combinations support this feature (the Raspberry PI 3 and Zero W do)
- the actual throughput is in many cases below what you normally get when using a proper access point
- the connection is often unstable due to broken or experimental drivers
- the WiFi signal strength is usually lower than what you normally get when using a proper access point
- you can't use your WiFi adapter in both access point and client (station) mode at the same time
- motionEyeOS still needs a network connection to function well; if you really don't want/need one, set
os_networkless
totrue
To activate the access point mode on your motionEyeOS you'll need to complete the following two steps:
-
Enable
hostapd
The
hostapd
daemon is the component that makes your WiFi adapter broadcast a network SSID and allow other clients to connect. It is automatically started if you provide ahostapd.conf
file. This needs to be placed on the boot partition before the first boot, as it will be copied on the data partition and used thereafter.Following is a simple example of a hostapd configuration that will create an access point with network name
myssid
, key12345678
and WPA2 encryption, on channel 1:ssid=myssid wpa_passphrase=12345678 wpa=2 wpa_key_mgmt=WPA-PSK interface=wlan0 channel=1 driver=nl80211 hw_mode=g ieee80211n=1 ieee80211ac=1
If you are using a motionEyeOS newer than 20200203 (including dev versions), you need to change the line:
interface=wlan0
to
interface=ap0
-
Enable
dnsmasq
The
dnsmasq
acts as a DHCP server, offering your connected clients an IP configuration. It is automatically started if you provide adnsmasq.conf
file. This needs to be placed on the boot partition before the first boot, as it will be copied on the data partition and used thereafter.Following is a simple example of a dnsmasq configuration that will enable the DHCP server on the
wlan0
interface, offering IP addresses in the range of192.168.27.50
to192.168.27.150
, valid for 24 hours:interface=wlan0 dhcp-range=192.168.27.50,192.168.27.150,24h dhcp-leasefile=/data/dnsmasq.leases
If you are using a motionEyeOS newer than 20200203 (including dev versions), you need to change the line:
interface=wlan0
to
interface=ap0
It is recommended to use the files static_ip.conf and os.conf also.
The AP functionality is actually offered by thingOS. See also: