Try using the Bluetooth Low Energy (BLE) API of THETA A1, X or Z1. THETA's BLE APIs are unique profiles defined on Bluetooth's Generic Attribute Profile (GATT). THETA is a BLE peripheral, and a device calls THETA's API is BLE central. The THETA advertisement is scanned by the central and a connection request is issued. If the connection request is accepted, the connection can be made and the communication can be started by GATT. Many free applications for BLE scanning, connection, and GATT communication are available, so that using THETA's BLE API in the app first will speed up your understanding.
Turn on THETA, and turn Bluetooth on to the shooting screen to advertise. The advertisement packet contains the following information:
AA0123456
.0123456
.f74d1ba5-bc52-4f10-99c0-85e785ebe43f
The connection can be started by issuing a connection request from the central, and GATT communication can be started. In GATT, the server is THETA, and the client is the device that calls the API of THETA.
Theta A1, X and Z1 supports the following services:
Now let’s try using some characteristics from the Camera Control Command v2 service (b6ac7a7e-8c01-4a52-b188-68d53df53ea2
) in the BLE app.
Read the characteristic a0452e2d-c7d8-4314-8cd6-7b8bbab4d523
.
Returns camera information in JSON format.
Response example:
{
"_bluetoothMacAddress": "58:38:79:46:F7:61",
"firmwareVersion": "2.30.0",
"manufacturer": "Ricoh Company, Ltd.",
"model": "RICOH THETA X",
"serialNumber": "15001045",
"_wlanMacAddress": "-",
"uptime": 46
}
Read the characteristic 083d92b0-21e0-4fb2-9503-7d8b2c2bb1d1
.
Returns the THETA state in JSON format.
Response example:
{
"_batteryInsert": true,
"batteryLevel": 0.97,
"_batteryState": "disconnect",
"_cameraError": [],
"_captureStatus": "idle",
"_capturedPictures": 0,
"_function": "normal",
"_latestFileUrl": "",
"_recordableTime": 3844,
"_recordedTime": 0,
"_batteryTemp": 29,
"_boardTemp": 28,
}
Read the characteristic 8881ce4e-96fc-4c6c-8103-5dda0ad138fb
.
Returns the THETA state in JSON format.
Response example:
{
"_externalGpsInfo": {
"gpsInfo": {
"_altitude": 10.0000000000000,
"_dateTimeZone": "2024:01:11 06:03:20+00:00",
"_datum": "WGS84",
"lat": 35.0000000,
"lng": 135.0000000
}
},
"_internalGpsInfo": {
"gpsInfo": {
"_altitude": 0,
"_dateTimeZone": "",
"_datum": "",
"lat": 65535,
"lng": 65535
}
}
}
Set Options (Theta A1 and X only)
f0bcd2f9-5862-4653-b50d-80dc51e8cb82
as a UTF-8 string.
Request to set still image mode
{"captureMode":"image"}
Request to set to video mode
{"captureMode":"video"}
Request Shutter Command (Theta A1 and X only)
6e2deebe-88b0-42a5-829d-1b2c6abce750
as a UTF-8 string.
Request to take a photo in still mode
{"name":"camera.takePicture"}
Request to start recording in video mode
{"name":"camera.startCapture"}
Request to stop recording in video mode
{"name":"camera.stopCapture"}