Testing Insecure HTTP Requests

Originally published at: Testing Insecure HTTP Requests - RICOH THETA Developer Community

When you connect to the RICOH THETA camera at 192.168.1.1, it is an insecure http request, not a https request. Your request may be blocked by the local OS. For example, iOS, Android and MacOS have http disabled by default.

On Android, you need to enable http in the AndroidManifest.xml file.

<application android:usesCleartextTraffic="true">
</application>

There may be additional settings you need to enable depending on your application framework.

If the camera is failing on HTTP GET requests to http://192.168.1.1/osc/info, you can debug some problems by comparing the response to a local HTTP server.

On Windows, running WSL with python3 installed, you can start a HTTP server with no additional software.

python3 -m http.server

In the folder that I run the command in, I have an index.html file with a simple test message.

To access WSL from Windows, I’m using the Ethernet interface that WSL exposes.

Type ifconfig from WSL to see the IP address. Point your application to the IP address that WSL exposes.

 ElevatedButton(
   onPressed: () async {
   // this is a test line from an http server (not https)
     var response =
       await http.get(Uri.parse('http://172.28.244.28:8000'));

If it works, set the endpoint to the camera.

              var response =
                  await http.get(Uri.parse('http://192.168.1.1/osc/info'));
              print(response.body);
              setState(() {
                httpResponseString = response.body.toString();
              });