I would like to be able to use Volumio 2 in more than one place. At the moment it is happy to use wlan0 if it can’t find a wired ethernet connection, so that’s fine within range of my home LAN. Now, say I take my RPi out into my car, boot it up and it finds it can’t make a network connection. What I would like to then do is run ‘hostapd’ and ‘dnsmasq’ so that acts as an AP, and I can still control it with my phone.
The scripts in /etc/network are a bit convoluted for me, but this seems to be where the decision about whether a wired or a wlan0 connections is made. How do I get the RPi to realise that it can’t find a network connection, and thus call a script to start hostapd/dnsmasq? I could run a script from rc.local to check if an IP address has been assigned (assuming that I’m using dhcp), and if not then start an AP, but this seems a bit clumsy when the decision making has already occurred previously.
Edit: after a night’s sleep thoughts, I have decided that I was being way too complicated. Instead of the RPi acting as an AP, I will simply tether it to my phone acting as a hotspot. Now I just need to work out of to get the RPi to try more than one wireless network (home LAN and phone hotspot).