RICOH THETA Bluetooth SDK - theta-ble-client

theta-ble-client is a mobile app SDK to connect to the RICOH THETA X and Z1 models with bluetooth. Demos are available for Android, iOS and React Native.

Documentation, including implementation and use instructions are in the docs sub-folder.

theta-ble-client/docs at main · ricohapi/theta-ble-client · GitHub

I built the Android library on Windows 11 with no problems.

PS C:\Users\craig\Documents\Development\ricoh\2023\theta-ble-client> ./gradlew assemble

> Task :kotlin-multiplatform:compileReleaseKotlinAndroid
w: file:///C:/Users/craig/Documents/Development/ricoh/2023/theta-ble-client/kotlin-multiplatform/src/commonMain/kotlin/com/ricoh360/thetableclient/ThetaBle.kt:236:51 This is a delicate API and its use requires care. Make sure you fully read and understand documentation of the declaration that is marked as a delicate API.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 5m 34s
50 actionable tasks: 50 executed

I like that there is a warning on the ThetaBle.kt build file.

This is a delicate API and its use requires care. Make sure you fully read and understand documentation of the declaration that is marked as a delicate API.

demos

cd .\demos\
cd .\demo-android\

Testing Android build with Android Studio.

image

Build succeeded

image


Bluetooth authentication

The RICOH THETA X does not require the Bluetooth authentication steps.

Documentation

I got this question from the community. Is it possible to use bluetooth without using Wi-Fi at all?

I found this in the API documentation (here): “RICOH THETA authenticates a central device via Web API and Bluetooth API. The camera does not use pairing.”

To me that sounds like you need Wi-Fi to set up bluetooth. Has anyone set up bluetooth without using Wi-Fi?

yea, it did sound to me that WiFi was needed. I can’t remember what I found out in the tests. You could also try and open an issue on GitHub and post the results here if you get a chance.

If there’s time, you could build the Android demo that is included and test it out.

I’m testing it again with the X. It appears that I need to connect with WiFi using the demo app.

Once connected with WiFi, the Scan BLE button is viewable.

The scan finds my THETA X.

image

theta-ble-client updated test with version 1.2.0

environment

  • Google Pixel 4a
  • Android 13
  • THETA X firmware 2.51.0

build

./gradlew assemble
Starting a Gradle Daemon (subsequent builds will be faster)

> Configure project :kotlin-multiplatform
...
...
BUILD SUCCESSFUL in 50s
50 actionable tasks: 50 executed

install with Android Studio

image

Using physical phone

image

connect THETA X and Google Pixel 4a with WiFi

allow bluetooth scanning

connect

scan for bluetooth devices

use Camera Control Command V2 (THETA X)

info

state

state2

set state notify


Connection After Initial Setup

After the initial setup, I can connect with bluetooth only.

image

Additional Information

THETA X

ref

theta-ble-client demo works with Theta X, but current Theta X provides camera control command v2 service only.

THETA V, Z1

ref

In case of Theta Z1 and Theta V, You need to call camera._setBluetoothDevice command and set _bluetoothPower" option to ON on WiFi to start using Bluetooth API.

Troubleshooting

Error reaching 191.168.1.1

Your phone is likely not connected to the camera.

Make sure that the WiFi icon

In the example below, the WiFi has an exclamation point. This is normal as the camera is not connected to the internet.

image

Check route

There are many ways to check an access point (AP) mode connection and that there is an IP route between your camera and your mobile device.

Firefox

API Tester

termux

One way is to ping the camera at 192.168.1.1

In the example below, I’m using Termux for troubleshooting.

1 Like

capabilities of theta-ble-client with THETA X

theta-ble-client demo with Theta X, only following buttons work:

  • Connect WiFi
  • Scan BLE
  • connect (An error message is displayed but Theta X is connecting)
  • Camera Control Command V2,
  • disconnect
  • Scan SSID.

Tapping another button, an error message is displayed since Theta X does not support necessary BLE characteristics.

ref