Talk:Raspberry Pi 3 - Configuring it as wireless access point -AP Mode

From Alpine Linux
Jump to: navigation, search

This works. The only thing I don't like is that it seems I have to restart the Pi for it to come up stably as an AP. What I mean is if I do everything as specified on the wiki page and then restart ONLY the networking, I can see the Pi in the scan list of my peripheral device (my phone for instance) but only for about 10-20 seconds; then it disappears. If I connect to the Pi during said 10-20 second interval, it connects but then disconnects after the 10-20 seconds have passed. However, once I restart the Pi, it shows up in my peripheral device's scan list and stays. Then I can connect to it and the connection persists indefinitely. Anybody know how to get the Pi into AP mode and have it persist WITHOUT rebooting?

BTW, I have tried running a script which stops a bunch services and then starts them back up (similar to when the Pi boots), but that does not help; as described above, I have to reboot the Pi for the AP mode to persist. Here is the aforementioned script:

AP Mode Script

# Stop services
service sshd stop
service crond stop
service chronyd stop
service dbus stop
service hostapd stop
service dnsmasq stop
service syslog stop
service klogd stop
service networking stop
service mdev stop
service acpid stop
#Copy over configuration files with content per
cp -f /etc/hostapd/hostapd.conf.field /etc/hostapd/hostapd.conf
cp -f /etc/dnsmasq.conf.field /etc/dnsmasq.conf
cp -f /etc/network/interfaces.field /etc/network/interfaces
#Commit the changes
lbu ci -d
#Wipe the tmp folder
rm -rf /tmp
#Start services
service acpid start
service mdev start
service networking start
service klogd start
service syslog start
service dnsmasq start
service hostapd start
service dbus start
service chronyd start
service crond start
service sshd start