Report comment

Hi Greg, if you consistently loose the ip for the hotspot after the same period of time then it could be the ip lease is set too low. i'm not sure which script your using as this comment is on a discontinued article, but in the dnsmasq.conf file there will be a line like
dhcp-range=10.0.0.50,10.0.0.150,12h
the end part, 12h, is the lease. if this is set at 2h then you will loose the ip after 2 hours.
If your connected to your router then the router manages the lease time not the pi. so;
The file /var/lib/dhcp/dhclient.leases should give you some info on current ip lease times.
Also sudo grep dhclient /var/log/syslog should tell you more on what it happening with your dhcp client.

To get a new lease from your router bring the wlan0 interface down and backup should get yuou a new lease.
sudo ip link set dev wlan0 down
sudo ip link set dev wlan0 up

or sudo dhclient -v -r

The only other area you could lookinto is if your wifi is going to sleep, Pi3 and Zero w shouldn't go to sleep but wifi dongles may do.

Hope this helps

The current versions of the scripts are available on the front page :)