I was wondering, why does the Android Device Setup library connects to the Photon in Soft AP mode using TCP instead of HTTP? I want to connect without the setup library. So far, I’ve been connecting to the AP, and sending HTTP requests, but have run into issues. One is that Android no longer allows clear text HTTP traffic by default, which I’ve circumvented with a custom network security config. Another issue is how OkHttp gets confused by a raw ip address, because it tries to use DNS on a local address. I’ve overcome this by implementing the DNS interface for the local 192.168.0.1 address, and passing it into the HttpClient builder. But still, after connecting to the Photon, turning off cellular data, and making an HTTP request for something like http://192.168.0.1/device-id, I get a 404. This is not the case when navigating to http://192.168.0.1/device-id in Chrome. Are there any other pitfalls anyone knows about when going down this route?
Was TCP chosen for the implementation to circumvent these issues? Is it possible to use HTTP instead of TCP for the Android setup process? Thanks.