My current approach is to have the first sensor set itself up as an AP and every other sensor connect to it. Once this is done, the phone can connect to the AP ESP8266. Using UDP to discover each other, the phone initiates a TCP connection to the AP which has already established TCP connections to each subsequent ESP8266. Lastly, the ESP8266s send back the sensor data which is aggregated onto the TCP connection between the phone and the AP ESP8266.
The trouble I'm having is getting a reliable connection from the ESP8266 to the phone. I'm using the Arduino ESP8266 library and the WiFiClient write just starts returning 0 bytes written on the AP with a connection status of CLOSED. However, the phone doesn't know the connection has been closed.
Is this a reasonable approach? Are there any better approaches?