Note: The following code may be replaced with systemd equivalent.
dnsmasq and hostapd daemons can be started by script.
Create /usr/local/bin/hostapdstart
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Start dns service for LAN
service dnsmasq restart
sysctl net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -s 192.168.7.0/24 ! -d 192.168.7.0/24 -j MASQUERADE
# Start access point service
ifup wlan0ap
iwconfig wlan0 txpower 7mW
hostapd /etc/hostapd/hostapd.conf
Adjust txpower 7mW as necessary.
If too low, access point will be
invisible, error rate too high, and/or bit rate too slow.
If too high, access point will be
competing too much with other access points and/or bit rate too slow.