I have created a Raspberry Pi 3A+ prototype system consisting of a rover with camera and touch screen remote control that communicate across a Wi-Fi network. My expectation was to have the rover switch from our local Wi-Fi router to the remote control once it started hostapd at which point the rover streams video and shares sockets with the remote control through its access point.
In this current configuration, both RPis run arch linux arm without wpa_supplicant. The rover is the server that receives commands from the remote using sockets. I use netctl to switch wlan0 to the remote control's AP SSID when it appears using a 'iw dev wlan0 scan' command. While connected, the rover pings the remote control IP address to confirm it is connected. Should the ping fail or the AP SSID vanishes, the netctl call switches the rover back to the local Wi-Fi LAN.
Yesterday I confirmed the netctl switched the rover to the remote control access point correctly but once I shut down the local Wi-Fi router, the rover lost connection with the remote control and the streaming video stopped playing on the remote control.
At this point, I am not sure what to use to create this “subnetwork” solution so that these two RPi units communicate outside an internal Wi-Fi network. Do I need to purchase a separate miniature pocket Wi-Fi router or is there a way for the two RPis to communicate and stream video over their internal Wi-Fi chips?
I am open to any alternative suggestions or recommendations. If there is a site with this information, I will be appreciative of that recommendation. I searched but could not find a solution.