Report comment

Hi Ben, if the autohotspot script tries to connect to the network but no ip address is issued by the router within 10 second it presumes the connection has failed and go back to a hotspot.

Enter the command sudo /usr/bin/autohotspot
It will give you feed back. If it says "Cleaning wifi and activating hotspot" but after it says "Checking Wifi connecton OK" it says "Wifi failed falling back to hotspot" then your router may be taking longer than 10 seconds, my experience it connects within 6.

Change the line sleep to more than 10:

echo "Checking WiFi connection ok"
sleep 10 #give time for connection to be completed to router

As your wifi password is ok as it works ok then i presume it's a slow connection.

Let me know if you still have an issue.