Set the Static IP Address of the RICOH THETA in Client Mode

You can configure the THETA for client mode access through the USB or Wi-FI APIs. In addition to the SSID, password, and other settings, you can also configure the IP address of the camera. This is useful so that you can know the IP address of the THETA when it is in client mode.

Two methods of setting IP address in client mode with API

Before getting started, let’s understand the limitations of this technique. It cannot set the IP address of the THETA while the THETA is in client mode. You first use the USB API or the Wi-Fi API in Access Point mode.

Method Status
USB API can set client mode configuration
Wi-Fi API in Access Point Mode can set client mode configuration
Wi-Fi API in Client Mode Will not work. You can’t change the IP address

Setting Client Mode Configuration Using Wi-Fi API

The client mode IP address can be set with the Wi-Fi AP, camera._setAccessPoint

Steps

  1. Put camera in AP mode. the Wi-Fi LED on the body of the THETA V will flash blue
  2. Connect your computer to the THETA using Wi-Fi. The THETA will assign your computer an IP address.
  3. Send the setAccessPoint command from your computer to the THETA. The Wi-Fi LED will remain blue
  4. Put your THETA in client mode by pressing the side Wi-Fi button on your camera. This is a physical button. The Wi-Fi LED will be green
  5. Send the THETA client mode commands using digest authentication

Note on steps

  • if you want to connect your computer to the Internet at the same time, the computer must have a second Wi-Fi device (like a USB dongle) or be connected with Ethernet. Your router cannot be at 192.168.1.1. The THETA uses that IP address in AP mode.
  • Before putting the camera in client mode, you may need to reboot the camera
  • The sample code below does not show how to send commands using digest authentication. See Tip: Developing Client Mode Applications for examples of sending client mode commands.

Code Example

Working example with node/express/request is available on GitHub here.

app.post("/setIpAddress", (req, res) => {
  request({
    headers: {
      'content-type': 'application/json;charset=utf-8'
    },
    url: "http://192.168.1.1/osc/commands/execute",
    method: "POST",
    json: {
      name: "camera._setAccessPoint",
      parameters: {
        "ssid": config.ssid,  // change to string for your ssid
        "security": "WPA/WPA2 PSK",
        "password": config.password,  // set string to the password of your router
        "connectionPriority": 1,
        "ipAddressAllocation": "static",
        "ipAddress": "192.168.2.123",
        "subnetMask": "255.255.255.0",
        "defaultGateway": "192.168.2.1"
      }
    }
  }, (error, response, body) => {
    console.log(response);
    res.send(response);
  });
});

Note on Using Node Sample Code

The sample code only uses AP mode to set the IP address for Client Mode. Once the camera is in client mode, you cannot use the sample node code to control the camera. I plan to add this capability in the future. At the current time, the node sample code can only be used to test the camera Wi-Fi API in AP mode (which can be used to configure Client Mode).

Using USB API

I ran across this article by Nao9syu that shows how to set the static IP address of the THETA.

In normal client mode use, the IP of the THETA is set dynamically. Nao9syu experimented with setting the THETA to a static IP address when the THETA is in client mode.

Solved by using WpdMtp with USB connection.
Basically, you can create a byte for transmission with reference to the byte received by AccessPointInfo.

The IP is written as UINT32 with a size of 4, but it remains unclear how to interpret it when compared to a valid byte array.

When IP is received by AccessPointInfo, it becomes the following array. byte array: [4,0,0,0,0,0,0,0]

The IP part set by SetAccessPoint is passed as follows. (Ex 192.168.1.1) Put “4” at the top and IPv4 at the bottom four. byte array: [4,0,0,0,192,168,1,1]

No success setting IP address with OscApi while connected to the client mode. Shows error “Command executed is currently disabled.” Probably because you are using a dynamically configured IP address. But when can I use the change API while using an IP address? (Appendix) → In direct mode, registration was possible with OcsApi.

The first 4 in the bit array is IPv4 4 and the data definition is prepared for IPv6.